mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
used read8_delegate instead of read8_space_func for vga port read (nw)
This commit is contained in:
parent
d81de35ce5
commit
c2ea84b05c
@ -54,7 +54,7 @@
|
||||
|
||||
static struct
|
||||
{
|
||||
read8_space_func read_dipswitch;
|
||||
read8_delegate read_dipswitch;
|
||||
struct pc_svga_interface svga_intf;
|
||||
|
||||
UINT8 *memory;
|
||||
@ -1614,19 +1614,19 @@ READ8_HANDLER( vga_port_03c0_r )
|
||||
switch ((vga.miscellaneous_output>>2)&3)
|
||||
{
|
||||
case 3:
|
||||
if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x01)
|
||||
if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x01)
|
||||
data |= 0x10;
|
||||
break;
|
||||
case 2:
|
||||
if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x02)
|
||||
if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x02)
|
||||
data |= 0x10;
|
||||
break;
|
||||
case 1:
|
||||
if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x04)
|
||||
if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x04)
|
||||
data |= 0x10;
|
||||
break;
|
||||
case 0:
|
||||
if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x08)
|
||||
if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x08)
|
||||
data |= 0x10;
|
||||
break;
|
||||
}
|
||||
@ -2017,7 +2017,7 @@ WRITE8_HANDLER(vga_mem_w)
|
||||
}
|
||||
}
|
||||
|
||||
void pc_vga_init(running_machine &machine, read8_space_func read_dipswitch, const struct pc_svga_interface *svga_intf)
|
||||
void pc_vga_init(running_machine &machine, read8_delegate read_dipswitch, const struct pc_svga_interface *svga_intf)
|
||||
{
|
||||
memset(&vga, 0, sizeof(vga));
|
||||
|
||||
|
@ -25,7 +25,7 @@ struct pc_svga_interface
|
||||
void (*choosevideomode)(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT8 *sequencer, const UINT8 *crtc, int *width, int *height);
|
||||
};
|
||||
|
||||
void pc_vga_init(running_machine &machine, read8_space_func read_dipswitch, const struct pc_svga_interface *svga_intf);
|
||||
void pc_vga_init(running_machine &machine, read8_delegate read_dipswitch, const struct pc_svga_interface *svga_intf);
|
||||
void pc_vga_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset);
|
||||
void pc_vga_gamtor_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset);
|
||||
void pc_svga_trident_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset);
|
||||
|
@ -175,6 +175,7 @@ public:
|
||||
DECLARE_DRIVER_INIT(calchase);
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
|
||||
@ -804,7 +805,7 @@ static IRQ_CALLBACK(irq_callback)
|
||||
return pic8259_acknowledge( state->m_pic8259_1);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER( calchase_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
void calchase_state::machine_start()
|
||||
{
|
||||
@ -976,7 +977,7 @@ DRIVER_INIT_MEMBER(calchase_state,calchase)
|
||||
{
|
||||
m_bios_ram = auto_alloc_array(machine(), UINT32, 0x20000/4);
|
||||
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(calchase_state::vga_setting),this), NULL);
|
||||
pc_svga_trident_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
init_pc_common(machine(), PCCOMMON_KEYBOARD_AT, calchase_set_keyb_int);
|
||||
|
||||
|
@ -35,6 +35,7 @@ public:
|
||||
: driver_device(mconfig, type, tag){ }
|
||||
DECLARE_WRITE32_MEMBER(gamtor_unk_w);
|
||||
DECLARE_DRIVER_INIT(gaminator);
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
WRITE32_MEMBER(gaminator_state::gamtor_unk_w)
|
||||
@ -1248,12 +1249,12 @@ ROM_START( llcharma )
|
||||
ROM_LOAD( "llc_92_5.6-0", 0x0000, 0x2000000, CRC(c8c2a5d3) SHA1(ec23eff63871cc515ec58a894446d4d639d864e4) )
|
||||
ROM_END
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER(gaminator_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
|
||||
DRIVER_INIT_MEMBER(gaminator_state,gaminator)
|
||||
{
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(gaminator_state::vga_setting),this), NULL);
|
||||
pc_vga_gamtor_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x44000000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x40000000);
|
||||
}
|
||||
|
||||
|
@ -100,6 +100,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(at_com_interrupt_1);
|
||||
DECLARE_DRIVER_INIT(magtouch);
|
||||
virtual void machine_start();
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
|
||||
@ -196,7 +197,7 @@ static void magtouch_set_keyb_int(running_machine &machine, int state)
|
||||
pic8259_ir1_w(machine.device("pic8259_1"), state);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER( magtouch_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
void magtouch_state::machine_start()
|
||||
{
|
||||
@ -248,7 +249,7 @@ ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(magtouch_state,magtouch)
|
||||
{
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(magtouch_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
}
|
||||
|
||||
|
@ -98,6 +98,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(midqslvr_pic8259_1_set_int_line);
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
|
||||
@ -652,7 +653,7 @@ static void ide_interrupt(device_t *device, int state)
|
||||
pic8259_ir6_w(drvstate->m_pic8259_2, state);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER( midqslvr_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
void midqslvr_state::machine_start()
|
||||
{
|
||||
@ -671,7 +672,7 @@ void midqslvr_state::machine_start()
|
||||
intel82439tx_init(machine());
|
||||
|
||||
kbdc8042_init(machine(), &at8042);
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(midqslvr_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
}
|
||||
|
||||
|
@ -107,6 +107,7 @@ public:
|
||||
|
||||
DECLARE_DRIVER_INIT(pangofun);
|
||||
virtual void machine_start();
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
|
||||
@ -164,7 +165,7 @@ static void pangofun_set_keyb_int(running_machine &machine, int state)
|
||||
pic8259_ir1_w(machine.device("pic8259_1"), state);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER(pangofun_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
static void set_gate_a20(running_machine &machine, int a20)
|
||||
{
|
||||
@ -243,7 +244,7 @@ ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(pangofun_state,pangofun)
|
||||
{
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(pangofun_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
|
||||
DECLARE_DRIVER_INIT(pcat_dyn);
|
||||
virtual void machine_start();
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
|
||||
@ -109,7 +110,7 @@ static void pcat_dyn_set_keyb_int(running_machine &machine, int state)
|
||||
pic8259_ir1_w(machine.device("pic8259_1"), state);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER(pcat_dyn_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
static void set_gate_a20(running_machine &machine, int a20)
|
||||
{
|
||||
@ -196,7 +197,7 @@ ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(pcat_dyn_state,pcat_dyn)
|
||||
{
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(pcat_dyn_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
}
|
||||
|
||||
|
@ -112,6 +112,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(at_com_interrupt_1);
|
||||
DECLARE_DRIVER_INIT(pcat_nit);
|
||||
virtual void machine_start();
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
WRITE_LINE_MEMBER(pcat_nit_state::microtouch_out)
|
||||
@ -227,7 +228,7 @@ static void streetg2_set_keyb_int(running_machine &machine, int state)
|
||||
pic8259_ir1_w(machine.device("pic8259_1"), state);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER(pcat_nit_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
void pcat_nit_state::machine_start()
|
||||
{
|
||||
@ -426,7 +427,7 @@ DRIVER_INIT_MEMBER(pcat_nit_state,pcat_nit)
|
||||
m_banked_nvram = auto_alloc_array(machine(), UINT8, 0x2000);
|
||||
machine().device<nvram_device>("nvram")->set_base(m_banked_nvram, 0x2000);
|
||||
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(pcat_nit_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(at_pit8254_out2_changed);
|
||||
DECLARE_DRIVER_INIT(photoply);
|
||||
virtual void machine_start();
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
|
||||
@ -335,7 +336,7 @@ static GFXDECODE_START( photoply )
|
||||
//there's also a 8x16 entry (just after the 8x8)
|
||||
GFXDECODE_END
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER(photoply_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
static MACHINE_CONFIG_START( photoply, photoply_state )
|
||||
/* basic machine hardware */
|
||||
@ -377,7 +378,7 @@ ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(photoply_state,photoply)
|
||||
{
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(photoply_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
}
|
||||
|
||||
|
@ -153,6 +153,7 @@ public:
|
||||
DECLARE_READ16_MEMBER(pntnpuzl_eeprom_r);
|
||||
DECLARE_WRITE16_MEMBER(pntnpuzl_eeprom_w);
|
||||
DECLARE_DRIVER_INIT(pip);
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
|
||||
@ -356,7 +357,7 @@ static INPUT_PORTS_START( pntnpuzl )
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER(pntnpuzl_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
static MACHINE_CONFIG_START( pntnpuzl, pntnpuzl_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 12000000)//??
|
||||
@ -384,7 +385,7 @@ DRIVER_INIT_MEMBER(pntnpuzl_state,pip)
|
||||
// UINT16 *rom = (UINT16 *)machine().root_device().memregion("maincpu")->base();
|
||||
// rom[0x2696/2] = 0x4e71;
|
||||
// rom[0x26a0/2] = 0x4e71;
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(pntnpuzl_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x3a0000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x3c0000);
|
||||
|
||||
}
|
||||
|
@ -636,7 +636,7 @@ static void ide_interrupt(device_t *device, int state)
|
||||
pic8259_ir6_w(drvstate->m_pic8259_2, state);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER(queen_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
void queen_state::machine_start()
|
||||
{
|
||||
@ -655,7 +655,7 @@ void queen_state::machine_start()
|
||||
intel82439tx_init(machine());
|
||||
|
||||
kbdc8042_init(machine(), &at8042);
|
||||
pc_vga_init(machine(), ::vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(queen_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
}
|
||||
|
||||
|
@ -94,6 +94,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(savquest_pic8259_1_set_int_line);
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
// Intel 82439TX System Controller (MXTC)
|
||||
@ -516,7 +517,7 @@ static void ide_interrupt(device_t *device, int state)
|
||||
pic8259_ir6_w(drvstate->m_pic8259_2, state);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER(savquest_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
void savquest_state::machine_start()
|
||||
{
|
||||
@ -528,7 +529,7 @@ void savquest_state::machine_start()
|
||||
intel82439tx_init(machine());
|
||||
|
||||
kbdc8042_init(machine(), &at8042);
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(savquest_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
DECLARE_READ8_MEMBER(get_slave_ack);
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
|
||||
@ -169,7 +170,7 @@ static void ide_interrupt(device_t *device, int state)
|
||||
*
|
||||
*************************************************************/
|
||||
|
||||
static READ8_HANDLER( vga_setting )
|
||||
READ8_MEMBER(su2000_state::vga_setting )
|
||||
{
|
||||
/* TODO */
|
||||
return 0xff;
|
||||
@ -286,7 +287,7 @@ void su2000_state::machine_start()
|
||||
|
||||
kbdc8042_init(machine(), &at8042);
|
||||
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(su2000_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
}
|
||||
|
||||
|
@ -83,6 +83,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_taitowlf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
#if !ENABLE_VGA
|
||||
@ -696,7 +697,7 @@ static void taitowlf_set_keyb_int(running_machine &machine, int state)
|
||||
}
|
||||
|
||||
#if ENABLE_VGA
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER(taitowlf_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
#endif
|
||||
|
||||
DRIVER_INIT_MEMBER(taitowlf_state,taitowlf)
|
||||
@ -709,7 +710,7 @@ DRIVER_INIT_MEMBER(taitowlf_state,taitowlf)
|
||||
|
||||
kbdc8042_init(machine(), &at8042);
|
||||
#if ENABLE_VGA
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(taitowlf_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
#endif
|
||||
}
|
||||
|
@ -69,6 +69,7 @@ public:
|
||||
DECLARE_DRIVER_INIT(voyager);
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
|
||||
@ -650,7 +651,7 @@ static IRQ_CALLBACK(irq_callback)
|
||||
return pic8259_acknowledge( state->m_pic8259_1);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER(voyager_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
void voyager_state::machine_start()
|
||||
{
|
||||
@ -800,7 +801,7 @@ DRIVER_INIT_MEMBER(voyager_state,voyager)
|
||||
{
|
||||
m_bios_ram = auto_alloc_array(machine(), UINT32, 0x20000/4);
|
||||
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(voyager_state::vga_setting),this), NULL);
|
||||
pc_svga_trident_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
init_pc_common(machine(), PCCOMMON_KEYBOARD_AT, voyager_set_keyb_int);
|
||||
|
||||
|
@ -115,6 +115,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(xtom3d_pic8259_1_set_int_line);
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
DECLARE_READ8_MEMBER(vga_setting);
|
||||
};
|
||||
|
||||
// Intel 82439TX System Controller (MXTC)
|
||||
@ -644,7 +645,7 @@ static void ide_interrupt(device_t *device, int state)
|
||||
pic8259_ir6_w(drvstate->m_pic8259_2, state);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
|
||||
READ8_MEMBER(xtom3d_state::vga_setting ) { return 0xff; } // hard-code to color
|
||||
|
||||
void xtom3d_state::machine_start()
|
||||
{
|
||||
@ -663,7 +664,7 @@ void xtom3d_state::machine_start()
|
||||
intel82439tx_init(machine());
|
||||
|
||||
kbdc8042_init(machine(), &at8042);
|
||||
pc_vga_init(machine(), vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(xtom3d_state::vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ public:
|
||||
: driver_device(mconfig, type, tag) { }
|
||||
DECLARE_DRIVER_INIT(indiana);
|
||||
virtual void machine_reset();
|
||||
DECLARE_READ8_MEMBER(indiana_vga_setting);
|
||||
};
|
||||
|
||||
|
||||
@ -76,14 +77,14 @@ static MACHINE_CONFIG_START( indiana, indiana_state )
|
||||
MCFG_FRAGMENT_ADD( pcvideo_vga )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
READ8_HANDLER( indiana_vga_setting )
|
||||
READ8_MEMBER(indiana_state::indiana_vga_setting)
|
||||
{
|
||||
return 0xff; // TODO
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(indiana_state,indiana)
|
||||
{
|
||||
pc_vga_init(machine(), indiana_vga_setting, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(indiana_state::indiana_vga_setting),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x7f7a0000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x7f600000);
|
||||
}
|
||||
|
||||
|
@ -1405,7 +1405,7 @@ DRIVER_INIT_MEMBER(pc_state,mc1502)
|
||||
mess_init_pc_common(machine(), 0, NULL, pc_set_irq_line);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( input_port_0_r ) { return space.machine().root_device().ioport("IN0")->read(); }
|
||||
READ8_MEMBER(pc_state::input_port_0_r ) { return machine().root_device().ioport("IN0")->read(); }
|
||||
|
||||
DRIVER_INIT_MEMBER(pc_state,pc1640)
|
||||
{
|
||||
@ -1421,7 +1421,7 @@ DRIVER_INIT_MEMBER(pc_state,pc_vga)
|
||||
{
|
||||
mess_init_pc_common(machine(), PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line);
|
||||
|
||||
pc_vga_init(machine(), ::input_port_0_r, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(pc_state::input_port_0_r),this), NULL);
|
||||
pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ const struct pc_svga_interface cirrus_svga_interface =
|
||||
|
||||
void cirrus_device::device_start()
|
||||
{
|
||||
pc_vga_init(machine(), NULL, &cirrus_svga_interface);
|
||||
pc_vga_init(machine(), read8_delegate(), &cirrus_svga_interface);
|
||||
pc_vga_io_init(machine(), machine().device("ppc1")->memory().space(AS_PROGRAM), 0xC00A0000, machine().device("ppc1")->memory().space(AS_PROGRAM), 0x80000000);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ isa8_svga_cirrus_device::isa8_svga_cirrus_device(const machine_config &mconfig,
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
|
||||
READ8_MEMBER(isa8_svga_cirrus_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
|
||||
|
||||
void isa8_svga_cirrus_device::device_start()
|
||||
{
|
||||
@ -66,7 +66,7 @@ void isa8_svga_cirrus_device::device_start()
|
||||
|
||||
video_start_vga( machine() );
|
||||
|
||||
pc_vga_init(machine(), input_port_0_r, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(isa8_svga_cirrus_device::input_port_0_r),this), NULL);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 0x100; i++)
|
||||
|
@ -23,6 +23,8 @@ public:
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
|
||||
DECLARE_READ8_MEMBER(input_port_0_r);
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
@ -58,7 +58,7 @@ isa16_svga_s3_device::isa16_svga_s3_device(const machine_config &mconfig, const
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
|
||||
READ8_MEMBER(isa16_svga_s3_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
|
||||
|
||||
void isa16_svga_s3_device::device_start()
|
||||
{
|
||||
@ -66,7 +66,7 @@ void isa16_svga_s3_device::device_start()
|
||||
|
||||
video_start_vga( machine() );
|
||||
|
||||
pc_vga_init(machine(), input_port_0_r, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(isa16_svga_s3_device::input_port_0_r),this), NULL);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 0x100; i++)
|
||||
|
@ -23,6 +23,8 @@ public:
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
|
||||
DECLARE_READ8_MEMBER(input_port_0_r);
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
@ -57,7 +57,7 @@ isa8_svga_et4k_device::isa8_svga_et4k_device(const machine_config &mconfig, cons
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
|
||||
READ8_MEMBER(isa8_svga_et4k_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
|
||||
|
||||
void isa8_svga_et4k_device::device_start()
|
||||
{
|
||||
@ -65,7 +65,7 @@ void isa8_svga_et4k_device::device_start()
|
||||
|
||||
video_start_vga( machine() );
|
||||
|
||||
pc_vga_init(machine(), input_port_0_r, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(isa8_svga_et4k_device::input_port_0_r),this), NULL);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 0x100; i++)
|
||||
|
@ -23,6 +23,8 @@ public:
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
|
||||
DECLARE_READ8_MEMBER(input_port_0_r);
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
@ -57,7 +57,7 @@ isa8_vga_device::isa8_vga_device(const machine_config &mconfig, const char *tag,
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
|
||||
READ8_MEMBER( isa8_vga_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
|
||||
|
||||
void isa8_vga_device::device_start()
|
||||
{
|
||||
@ -65,7 +65,7 @@ void isa8_vga_device::device_start()
|
||||
|
||||
video_start_vga( machine() );
|
||||
|
||||
pc_vga_init(machine(), input_port_0_r, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(isa8_vga_device::input_port_0_r),this), NULL);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 0x100; i++)
|
||||
|
@ -23,6 +23,8 @@ public:
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
|
||||
DECLARE_READ8_MEMBER(input_port_0_r);
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
@ -61,7 +61,7 @@ isa16_vga_gfxultra_device::isa16_vga_gfxultra_device(const machine_config &mconf
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
|
||||
READ8_MEMBER(isa16_vga_gfxultra_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
|
||||
|
||||
void isa16_vga_gfxultra_device::device_start()
|
||||
{
|
||||
@ -69,7 +69,7 @@ void isa16_vga_gfxultra_device::device_start()
|
||||
|
||||
video_start_vga( machine() );
|
||||
|
||||
pc_vga_init(machine(), input_port_0_r, NULL);
|
||||
pc_vga_init(machine(), read8_delegate(FUNC(isa16_vga_gfxultra_device::input_port_0_r),this), NULL);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 0x100; i++)
|
||||
|
@ -30,6 +30,8 @@ public:
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
|
||||
DECLARE_READ8_MEMBER(input_port_0_r);
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
Loading…
Reference in New Issue
Block a user