mirror of
https://github.com/holub/mame
synced 2025-04-28 11:11:48 +03:00
(MESS) Tagmap lookup cleanup. (nw)
This commit is contained in:
parent
4fc811f5ea
commit
59ad3282df
@ -319,7 +319,7 @@ READ8_MEMBER( pc1512_state::printer_r )
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
data |= ioport("LK")->read() & 0x07;
|
data |= m_lk->read() & 0x07;
|
||||||
|
|
||||||
data |= m_centronics->fault_r() << 3;
|
data |= m_centronics->fault_r() << 3;
|
||||||
data |= m_centronics->vcc_r() << 4;
|
data |= m_centronics->vcc_r() << 4;
|
||||||
@ -404,7 +404,7 @@ READ8_MEMBER( pc1640_state::printer_r )
|
|||||||
*/
|
*/
|
||||||
data = m_printer_control;
|
data = m_printer_control;
|
||||||
data |= m_opt << 5;
|
data |= m_opt << 5;
|
||||||
data |= (ioport("SW")->read() & 0x60) << 1;
|
data |= (m_sw->read() & 0x60) << 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -489,7 +489,7 @@ READ8_MEMBER( pc1640_state::io_r )
|
|||||||
}
|
}
|
||||||
else if (!BIT(offset, 7))
|
else if (!BIT(offset, 7))
|
||||||
{
|
{
|
||||||
UINT16 sw = ioport("SW")->read();
|
UINT16 sw = m_sw->read();
|
||||||
|
|
||||||
if (!BIT(offset, 14))
|
if (!BIT(offset, 14))
|
||||||
{
|
{
|
||||||
@ -1084,7 +1084,7 @@ FLOPPY_FORMATS_MEMBER( pc1512_state::floppy_formats )
|
|||||||
FLOPPY_FORMATS_END
|
FLOPPY_FORMATS_END
|
||||||
|
|
||||||
static SLOT_INTERFACE_START( ibmpc_floppies )
|
static SLOT_INTERFACE_START( ibmpc_floppies )
|
||||||
SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
|
SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
|
||||||
SLOT_INTERFACE_END
|
SLOT_INTERFACE_END
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ mappings, this is another situation where natural keyboard comes very handy!
|
|||||||
|
|
||||||
INPUT_CHANGED_MEMBER(pecom_state::ef_w)
|
INPUT_CHANGED_MEMBER(pecom_state::ef_w)
|
||||||
{
|
{
|
||||||
machine().device(CDP1802_TAG)->execute().set_input_line((int)(FPTR)param, newval);
|
m_cdp1802->set_input_line((int)(FPTR)param, newval);
|
||||||
}
|
}
|
||||||
|
|
||||||
static INPUT_PORTS_START( pecom )
|
static INPUT_PORTS_START( pecom )
|
||||||
@ -198,13 +198,13 @@ MACHINE_CONFIG_END
|
|||||||
|
|
||||||
/* ROM definition */
|
/* ROM definition */
|
||||||
ROM_START( pecom64 )
|
ROM_START( pecom64 )
|
||||||
ROM_REGION( 0x10000, CDP1802_TAG, ROMREGION_ERASEFF )
|
ROM_REGION( 0x10000, CDP1802_TAG, ROMREGION_ERASEFF )
|
||||||
ROM_SYSTEM_BIOS(0, "ver4", "version 4")
|
ROM_SYSTEM_BIOS(0, "ver4", "version 4")
|
||||||
ROMX_LOAD( "pecom64-1.bin", 0x8000, 0x4000, CRC(9a433b47) SHA1(dadb8c399e0a25a2693e10e42a2d7fc2ea9ad427), ROM_BIOS(1) )
|
ROMX_LOAD( "pecom64-1.bin", 0x8000, 0x4000, CRC(9a433b47) SHA1(dadb8c399e0a25a2693e10e42a2d7fc2ea9ad427), ROM_BIOS(1) )
|
||||||
ROMX_LOAD( "pecom64-2.bin", 0xc000, 0x4000, CRC(2116cadc) SHA1(03f11055cd221d438a40a41874af8fba0fa116d9), ROM_BIOS(1) )
|
ROMX_LOAD( "pecom64-2.bin", 0xc000, 0x4000, CRC(2116cadc) SHA1(03f11055cd221d438a40a41874af8fba0fa116d9), ROM_BIOS(1) )
|
||||||
ROM_SYSTEM_BIOS(1, "ver1", "version 1")
|
ROM_SYSTEM_BIOS(1, "ver1", "version 1")
|
||||||
ROMX_LOAD( "170887-rom1.bin", 0x8000, 0x4000, CRC(43710fb4) SHA1(f84f75061c9ac3e34af93141ecabd3c955881aa2), ROM_BIOS(2) )
|
ROMX_LOAD( "170887-rom1.bin", 0x8000, 0x4000, CRC(43710fb4) SHA1(f84f75061c9ac3e34af93141ecabd3c955881aa2), ROM_BIOS(2) )
|
||||||
ROMX_LOAD( "170887-rom2.bin", 0xc000, 0x4000, CRC(d0d34f08) SHA1(7baab17d1e68771b8dcef97d0fffc655beabef28), ROM_BIOS(2) )
|
ROMX_LOAD( "170887-rom2.bin", 0xc000, 0x4000, CRC(d0d34f08) SHA1(7baab17d1e68771b8dcef97d0fffc655beabef28), ROM_BIOS(2) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
/* Driver */
|
/* Driver */
|
||||||
|
@ -206,10 +206,9 @@ READ_LINE_MEMBER( tmc600_state::ef2_r )
|
|||||||
|
|
||||||
READ_LINE_MEMBER( tmc600_state::ef3_r )
|
READ_LINE_MEMBER( tmc600_state::ef3_r )
|
||||||
{
|
{
|
||||||
UINT8 keydata[8] = { m_y0->read(), m_y1->read(), m_y2->read(), m_y3->read(),
|
ioport_port* portnames[8] = { m_y0, m_y1, m_y2, m_y3, m_y4, m_y5, m_y6, m_y7 };
|
||||||
m_y4->read(), m_y5->read(), m_y6->read(), m_y7->read() };
|
|
||||||
|
|
||||||
UINT8 data = ~keydata[m_keylatch / 8];
|
UINT8 data = ~portnames[m_keylatch / 8]->read();
|
||||||
|
|
||||||
return BIT(data, m_keylatch % 8);
|
return BIT(data, m_keylatch % 8);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,9 @@ public:
|
|||||||
m_floppy0(*this, PC_FDC_XT_TAG ":0:525dd" ),
|
m_floppy0(*this, PC_FDC_XT_TAG ":0:525dd" ),
|
||||||
m_floppy1(*this, PC_FDC_XT_TAG ":1:525dd" ),
|
m_floppy1(*this, PC_FDC_XT_TAG ":1:525dd" ),
|
||||||
m_bus(*this, ISA_BUS_TAG),
|
m_bus(*this, ISA_BUS_TAG),
|
||||||
|
m_char_rom(*this, AMS40041_TAG),
|
||||||
m_video_ram(*this, "video_ram"),
|
m_video_ram(*this, "video_ram"),
|
||||||
|
m_lk(*this, "LK"),
|
||||||
m_pit1(0),
|
m_pit1(0),
|
||||||
m_pit2(0),
|
m_pit2(0),
|
||||||
m_status1(0),
|
m_status1(0),
|
||||||
@ -93,7 +95,9 @@ public:
|
|||||||
required_device<floppy_image_device> m_floppy0;
|
required_device<floppy_image_device> m_floppy0;
|
||||||
optional_device<floppy_image_device> m_floppy1;
|
optional_device<floppy_image_device> m_floppy1;
|
||||||
required_device<isa8_device> m_bus;
|
required_device<isa8_device> m_bus;
|
||||||
|
optional_memory_region m_char_rom;
|
||||||
optional_shared_ptr<UINT8> m_video_ram;
|
optional_shared_ptr<UINT8> m_video_ram;
|
||||||
|
required_ioport m_lk;
|
||||||
|
|
||||||
virtual void machine_start();
|
virtual void machine_start();
|
||||||
virtual void machine_reset();
|
virtual void machine_reset();
|
||||||
@ -196,7 +200,6 @@ public:
|
|||||||
UINT8 m_printer_control;
|
UINT8 m_printer_control;
|
||||||
|
|
||||||
// video state
|
// video state
|
||||||
const UINT8 *m_char_rom;
|
|
||||||
int m_toggle;
|
int m_toggle;
|
||||||
int m_lpen;
|
int m_lpen;
|
||||||
int m_blink;
|
int m_blink;
|
||||||
@ -210,7 +213,6 @@ public:
|
|||||||
|
|
||||||
// sound state
|
// sound state
|
||||||
int m_speaker_drive;
|
int m_speaker_drive;
|
||||||
UINT32 screen_update_pc1512(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class pc1640_state : public pc1512_state
|
class pc1640_state : public pc1512_state
|
||||||
@ -218,7 +220,8 @@ class pc1640_state : public pc1512_state
|
|||||||
public:
|
public:
|
||||||
pc1640_state(const machine_config &mconfig, device_type type, const char *tag)
|
pc1640_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: pc1512_state(mconfig, type, tag),
|
: pc1512_state(mconfig, type, tag),
|
||||||
m_opt(0)
|
m_sw(*this, "SW"),
|
||||||
|
m_opt(0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
virtual void machine_start();
|
virtual void machine_start();
|
||||||
@ -236,6 +239,8 @@ public:
|
|||||||
DECLARE_READ8_MEMBER( printer_r );
|
DECLARE_READ8_MEMBER( printer_r );
|
||||||
DECLARE_READ8_MEMBER( io_unmapped_r );
|
DECLARE_READ8_MEMBER( io_unmapped_r );
|
||||||
|
|
||||||
|
required_ioport m_sw;
|
||||||
|
|
||||||
// video state
|
// video state
|
||||||
int m_opt;
|
int m_opt;
|
||||||
UINT8 m_egc_ctrl;
|
UINT8 m_egc_ctrl;
|
||||||
|
@ -65,6 +65,9 @@ ioport_constructor c64_4cga_device::device_input_ports() const
|
|||||||
c64_4cga_device::c64_4cga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
c64_4cga_device::c64_4cga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||||
device_t(mconfig, C64_4CGA, "C64 Protovision 4 Player Interface", tag, owner, clock),
|
device_t(mconfig, C64_4CGA, "C64 Protovision 4 Player Interface", tag, owner, clock),
|
||||||
device_c64_user_port_interface(mconfig, *this),
|
device_c64_user_port_interface(mconfig, *this),
|
||||||
|
m_fire(*this, "FIRE"),
|
||||||
|
m_joy3(*this, "JOY3"),
|
||||||
|
m_joy4(*this, "JOY4"),
|
||||||
m_port(0)
|
m_port(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -87,15 +90,15 @@ void c64_4cga_device::device_start()
|
|||||||
|
|
||||||
UINT8 c64_4cga_device::c64_pb_r(address_space &space, offs_t offset)
|
UINT8 c64_4cga_device::c64_pb_r(address_space &space, offs_t offset)
|
||||||
{
|
{
|
||||||
UINT8 data = ioport("FIRE")->read();
|
UINT8 data = m_fire->read();
|
||||||
|
|
||||||
if (m_port)
|
if (m_port)
|
||||||
{
|
{
|
||||||
data &= ioport("JOY3")->read();
|
data &= m_joy3->read();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
data &= ioport("JOY4")->read();
|
data &= m_joy4->read();
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
@ -44,6 +44,10 @@ protected:
|
|||||||
virtual void c64_pb_w(address_space &space, offs_t offset, UINT8 data);
|
virtual void c64_pb_w(address_space &space, offs_t offset, UINT8 data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
required_ioport m_fire;
|
||||||
|
required_ioport m_joy3;
|
||||||
|
required_ioport m_joy4;
|
||||||
|
|
||||||
int m_port;
|
int m_port;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,7 +65,9 @@ ioport_constructor c64_4dxh_device::device_input_ports() const
|
|||||||
|
|
||||||
c64_4dxh_device::c64_4dxh_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
c64_4dxh_device::c64_4dxh_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||||
device_t(mconfig, C64_4DXH, "C64 DXH 4-Player Adapter", tag, owner, clock),
|
device_t(mconfig, C64_4DXH, "C64 DXH 4-Player Adapter", tag, owner, clock),
|
||||||
device_c64_user_port_interface(mconfig, *this)
|
device_c64_user_port_interface(mconfig, *this),
|
||||||
|
m_pb(*this, "PB"),
|
||||||
|
m_pa2(*this, "PA2")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +87,7 @@ void c64_4dxh_device::device_start()
|
|||||||
|
|
||||||
UINT8 c64_4dxh_device::c64_pb_r(address_space &space, offs_t offset)
|
UINT8 c64_4dxh_device::c64_pb_r(address_space &space, offs_t offset)
|
||||||
{
|
{
|
||||||
return ioport("PB")->read();
|
return m_pb->read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,7 +97,7 @@ UINT8 c64_4dxh_device::c64_pb_r(address_space &space, offs_t offset)
|
|||||||
|
|
||||||
int c64_4dxh_device::c64_pa2_r()
|
int c64_4dxh_device::c64_pa2_r()
|
||||||
{
|
{
|
||||||
return BIT(ioport("PA2")->read(), 0);
|
return BIT(m_pa2->read(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,6 +45,10 @@ protected:
|
|||||||
virtual UINT8 c64_pb_r(address_space &space, offs_t offset);
|
virtual UINT8 c64_pb_r(address_space &space, offs_t offset);
|
||||||
virtual int c64_pa2_r();
|
virtual int c64_pa2_r();
|
||||||
virtual void c64_cnt1_w(int level);
|
virtual void c64_cnt1_w(int level);
|
||||||
|
|
||||||
|
private:
|
||||||
|
required_ioport m_pb;
|
||||||
|
required_ioport m_pa2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,7 +65,9 @@ ioport_constructor c64_4ksa_device::device_input_ports() const
|
|||||||
|
|
||||||
c64_4ksa_device::c64_4ksa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
c64_4ksa_device::c64_4ksa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||||
device_t(mconfig, C64_4KSA, "C64 Kingsoft 4-Player Adapter", tag, owner, clock),
|
device_t(mconfig, C64_4KSA, "C64 Kingsoft 4-Player Adapter", tag, owner, clock),
|
||||||
device_c64_user_port_interface(mconfig, *this)
|
device_c64_user_port_interface(mconfig, *this),
|
||||||
|
m_pb(*this, "PB"),
|
||||||
|
m_pa2(*this, "PA2")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +87,7 @@ void c64_4ksa_device::device_start()
|
|||||||
|
|
||||||
UINT8 c64_4ksa_device::c64_pb_r(address_space &space, offs_t offset)
|
UINT8 c64_4ksa_device::c64_pb_r(address_space &space, offs_t offset)
|
||||||
{
|
{
|
||||||
return ioport("PB")->read();
|
return m_pb->read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,7 +97,7 @@ UINT8 c64_4ksa_device::c64_pb_r(address_space &space, offs_t offset)
|
|||||||
|
|
||||||
int c64_4ksa_device::c64_pa2_r()
|
int c64_4ksa_device::c64_pa2_r()
|
||||||
{
|
{
|
||||||
return BIT(ioport("PA2")->read(), 0);
|
return BIT(m_pa2->read(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,6 +45,10 @@ protected:
|
|||||||
virtual UINT8 c64_pb_r(address_space &space, offs_t offset);
|
virtual UINT8 c64_pb_r(address_space &space, offs_t offset);
|
||||||
virtual int c64_pa2_r();
|
virtual int c64_pa2_r();
|
||||||
virtual void c64_cnt1_w(int level);
|
virtual void c64_cnt1_w(int level);
|
||||||
|
|
||||||
|
private:
|
||||||
|
required_ioport m_pb;
|
||||||
|
required_ioport m_pa2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,7 +65,9 @@ ioport_constructor c64_4tba_device::device_input_ports() const
|
|||||||
|
|
||||||
c64_4tba_device::c64_4tba_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
c64_4tba_device::c64_4tba_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||||
device_t(mconfig, C64_4TBA, "C64 Tie Break Adapter", tag, owner, clock),
|
device_t(mconfig, C64_4TBA, "C64 Tie Break Adapter", tag, owner, clock),
|
||||||
device_c64_user_port_interface(mconfig, *this)
|
device_c64_user_port_interface(mconfig, *this),
|
||||||
|
m_pb(*this, "PB"),
|
||||||
|
m_pa2(*this, "PA2")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +87,7 @@ void c64_4tba_device::device_start()
|
|||||||
|
|
||||||
UINT8 c64_4tba_device::c64_pb_r(address_space &space, offs_t offset)
|
UINT8 c64_4tba_device::c64_pb_r(address_space &space, offs_t offset)
|
||||||
{
|
{
|
||||||
return ioport("PB")->read();
|
return m_pb->read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,7 +97,7 @@ UINT8 c64_4tba_device::c64_pb_r(address_space &space, offs_t offset)
|
|||||||
|
|
||||||
int c64_4tba_device::c64_pa2_r()
|
int c64_4tba_device::c64_pa2_r()
|
||||||
{
|
{
|
||||||
return BIT(ioport("PA2")->read(), 0);
|
return BIT(m_pa2->read(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,6 +45,10 @@ protected:
|
|||||||
virtual UINT8 c64_pb_r(address_space &space, offs_t offset);
|
virtual UINT8 c64_pb_r(address_space &space, offs_t offset);
|
||||||
virtual int c64_pa2_r();
|
virtual int c64_pa2_r();
|
||||||
virtual void c64_cnt1_w(int level);
|
virtual void c64_cnt1_w(int level);
|
||||||
|
|
||||||
|
private:
|
||||||
|
required_ioport m_pb;
|
||||||
|
required_ioport m_pa2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -216,7 +216,15 @@ c64_sfx_sound_expander_cartridge_device::c64_sfx_sound_expander_cartridge_device
|
|||||||
device_t(mconfig, C64_SFX_SOUND_EXPANDER, "C64 SFX Sound Expander cartridge", tag, owner, clock),
|
device_t(mconfig, C64_SFX_SOUND_EXPANDER, "C64 SFX Sound Expander cartridge", tag, owner, clock),
|
||||||
device_c64_expansion_card_interface(mconfig, *this),
|
device_c64_expansion_card_interface(mconfig, *this),
|
||||||
m_opl(*this, YM3526_TAG),
|
m_opl(*this, YM3526_TAG),
|
||||||
m_exp(*this, C64_EXPANSION_SLOT_TAG)
|
m_exp(*this, C64_EXPANSION_SLOT_TAG),
|
||||||
|
m_kb0(*this, "KB0"),
|
||||||
|
m_kb1(*this, "KB1"),
|
||||||
|
m_kb2(*this, "KB2"),
|
||||||
|
m_kb3(*this, "KB3"),
|
||||||
|
m_kb4(*this, "KB4"),
|
||||||
|
m_kb5(*this, "KB5"),
|
||||||
|
m_kb6(*this, "KB6"),
|
||||||
|
m_kb7(*this, "KB7")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,14 +261,14 @@ UINT8 c64_sfx_sound_expander_cartridge_device::c64_cd_r(address_space &space, of
|
|||||||
{
|
{
|
||||||
switch (offset & 0x07)
|
switch (offset & 0x07)
|
||||||
{
|
{
|
||||||
case 0: data = ioport("KB0")->read(); break;
|
case 0: data = m_kb0->read(); break;
|
||||||
case 1: data = ioport("KB1")->read(); break;
|
case 1: data = m_kb1->read(); break;
|
||||||
case 2: data = ioport("KB2")->read(); break;
|
case 2: data = m_kb2->read(); break;
|
||||||
case 3: data = ioport("KB3")->read(); break;
|
case 3: data = m_kb3->read(); break;
|
||||||
case 4: data = ioport("KB4")->read(); break;
|
case 4: data = m_kb4->read(); break;
|
||||||
case 5: data = ioport("KB5")->read(); break;
|
case 5: data = m_kb5->read(); break;
|
||||||
case 6: data = ioport("KB6")->read(); break;
|
case 6: data = m_kb6->read(); break;
|
||||||
case 7: data = ioport("KB7")->read(); break;
|
case 7: data = m_kb7->read(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (BIT(offset, 5))
|
else if (BIT(offset, 5))
|
||||||
|
@ -59,6 +59,14 @@ protected:
|
|||||||
private:
|
private:
|
||||||
required_device<ym3526_device> m_opl;
|
required_device<ym3526_device> m_opl;
|
||||||
required_device<c64_expansion_slot_device> m_exp;
|
required_device<c64_expansion_slot_device> m_exp;
|
||||||
|
required_ioport m_kb0;
|
||||||
|
required_ioport m_kb1;
|
||||||
|
required_ioport m_kb2;
|
||||||
|
required_ioport m_kb3;
|
||||||
|
required_ioport m_kb4;
|
||||||
|
required_ioport m_kb5;
|
||||||
|
required_ioport m_kb6;
|
||||||
|
required_ioport m_kb7;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,7 +69,9 @@ ioport_constructor comx_joy_device::device_input_ports() const
|
|||||||
|
|
||||||
comx_joy_device::comx_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
comx_joy_device::comx_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||||
device_t(mconfig, COMX_JOY, "COMX JoyCard", tag, owner, clock),
|
device_t(mconfig, COMX_JOY, "COMX JoyCard", tag, owner, clock),
|
||||||
device_comx_expansion_card_interface(mconfig, *this)
|
device_comx_expansion_card_interface(mconfig, *this),
|
||||||
|
m_joy1(*this, "JOY1"),
|
||||||
|
m_joy2(*this, "JOY2")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,11 +104,11 @@ UINT8 comx_joy_device::comx_io_r(address_space &space, offs_t offset)
|
|||||||
|
|
||||||
if (offset == 2)
|
if (offset == 2)
|
||||||
{
|
{
|
||||||
data = ioport("JOY1")->read();
|
data = m_joy1->read();
|
||||||
}
|
}
|
||||||
else if (offset == 4)
|
else if (offset == 4)
|
||||||
{
|
{
|
||||||
data = ioport("JOY2")->read();
|
data = m_joy2->read();
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
@ -42,6 +42,10 @@ protected:
|
|||||||
|
|
||||||
// device_comx_expansion_card_interface overrides
|
// device_comx_expansion_card_interface overrides
|
||||||
virtual UINT8 comx_io_r(address_space &space, offs_t offset);
|
virtual UINT8 comx_io_r(address_space &space, offs_t offset);
|
||||||
|
|
||||||
|
private:
|
||||||
|
required_ioport m_joy1;
|
||||||
|
required_ioport m_joy2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -260,6 +260,18 @@ ioport_constructor pc1512_keyboard_device::device_input_ports() const
|
|||||||
pc1512_keyboard_device::pc1512_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
pc1512_keyboard_device::pc1512_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||||
: device_t(mconfig, PC1512_KEYBOARD, "Amstrad PC1512 Keyboard", tag, owner, clock),
|
: device_t(mconfig, PC1512_KEYBOARD, "Amstrad PC1512 Keyboard", tag, owner, clock),
|
||||||
m_maincpu(*this, I8048_TAG),
|
m_maincpu(*this, I8048_TAG),
|
||||||
|
m_y1(*this, "Y1"),
|
||||||
|
m_y2(*this, "Y2"),
|
||||||
|
m_y3(*this, "Y3"),
|
||||||
|
m_y4(*this, "Y4"),
|
||||||
|
m_y5(*this, "Y5"),
|
||||||
|
m_y6(*this, "Y6"),
|
||||||
|
m_y7(*this, "Y7"),
|
||||||
|
m_y8(*this, "Y8"),
|
||||||
|
m_y9(*this, "Y9"),
|
||||||
|
m_y10(*this, "Y10"),
|
||||||
|
m_y11(*this, "Y11"),
|
||||||
|
m_com(*this, "COM"),
|
||||||
m_data_in(1),
|
m_data_in(1),
|
||||||
m_clock_in(1),
|
m_clock_in(1),
|
||||||
m_kb_y(0xffff),
|
m_kb_y(0xffff),
|
||||||
@ -391,18 +403,18 @@ READ8_MEMBER( pc1512_keyboard_device::kb_bus_r )
|
|||||||
|
|
||||||
UINT8 data = 0xff;
|
UINT8 data = 0xff;
|
||||||
|
|
||||||
if (!BIT(m_kb_y, 0)) data &= ioport("Y1")->read();
|
if (!BIT(m_kb_y, 0)) data &= m_y1->read();
|
||||||
if (!BIT(m_kb_y, 1)) data &= ioport("Y2")->read();
|
if (!BIT(m_kb_y, 1)) data &= m_y2->read();
|
||||||
if (!BIT(m_kb_y, 2)) data &= ioport("Y3")->read();
|
if (!BIT(m_kb_y, 2)) data &= m_y3->read();
|
||||||
if (!BIT(m_kb_y, 3)) data &= ioport("Y4")->read();
|
if (!BIT(m_kb_y, 3)) data &= m_y4->read();
|
||||||
if (!BIT(m_kb_y, 4)) data &= ioport("Y5")->read();
|
if (!BIT(m_kb_y, 4)) data &= m_y5->read();
|
||||||
if (!BIT(m_kb_y, 5)) data &= ioport("Y6")->read();
|
if (!BIT(m_kb_y, 5)) data &= m_y6->read();
|
||||||
if (!BIT(m_kb_y, 6)) data &= ioport("Y7")->read();
|
if (!BIT(m_kb_y, 6)) data &= m_y7->read();
|
||||||
if (!BIT(m_kb_y, 7)) data &= ioport("Y8")->read();
|
if (!BIT(m_kb_y, 7)) data &= m_y8->read();
|
||||||
if (!BIT(m_kb_y, 8)) data &= ioport("Y9")->read();
|
if (!BIT(m_kb_y, 8)) data &= m_y9->read();
|
||||||
if (!BIT(m_kb_y, 9)) data &= ioport("Y10")->read();
|
if (!BIT(m_kb_y, 9)) data &= m_y10->read();
|
||||||
if (!BIT(m_kb_y, 10)) data &= ioport("Y11")->read();
|
if (!BIT(m_kb_y, 10)) data &= m_y11->read();
|
||||||
if (!m_joy_com) data &= ioport("COM")->read();
|
if (!m_joy_com) data &= m_com->read();
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,18 @@ private:
|
|||||||
devcb_resolved_write_line m_out_clock_func;
|
devcb_resolved_write_line m_out_clock_func;
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_ioport m_y1;
|
||||||
|
required_ioport m_y2;
|
||||||
|
required_ioport m_y3;
|
||||||
|
required_ioport m_y4;
|
||||||
|
required_ioport m_y5;
|
||||||
|
required_ioport m_y6;
|
||||||
|
required_ioport m_y7;
|
||||||
|
required_ioport m_y8;
|
||||||
|
required_ioport m_y9;
|
||||||
|
required_ioport m_y10;
|
||||||
|
required_ioport m_y11;
|
||||||
|
required_ioport m_com;
|
||||||
|
|
||||||
int m_data_in;
|
int m_data_in;
|
||||||
int m_clock_in;
|
int m_clock_in;
|
||||||
|
@ -390,7 +390,7 @@ int pc1512_state::get_display_mode(UINT8 mode)
|
|||||||
|
|
||||||
offs_t pc1512_state::get_char_rom_offset()
|
offs_t pc1512_state::get_char_rom_offset()
|
||||||
{
|
{
|
||||||
return ((ioport("LK")->read() >> 5) & 0x03) << 11;
|
return ((m_lk->read() >> 5) & 0x03) << 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pc1512_state::draw_alpha(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
|
void pc1512_state::draw_alpha(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
|
||||||
@ -421,7 +421,7 @@ void pc1512_state::draw_alpha(bitmap_rgb32 &bitmap, const rectangle &cliprect, U
|
|||||||
}
|
}
|
||||||
|
|
||||||
offs_t addr = char_rom_offset | (code << 3) | (ra & 0x07);
|
offs_t addr = char_rom_offset | (code << 3) | (ra & 0x07);
|
||||||
UINT8 data = m_char_rom[addr & 0x1fff];
|
UINT8 data = m_char_rom->base()[addr & 0x1fff];
|
||||||
|
|
||||||
if ((column == cursor_x) && m_cursor)
|
if ((column == cursor_x) && m_cursor)
|
||||||
{
|
{
|
||||||
@ -548,9 +548,6 @@ static MC6845_INTERFACE( crtc_intf )
|
|||||||
|
|
||||||
void pc1512_state::video_start()
|
void pc1512_state::video_start()
|
||||||
{
|
{
|
||||||
// find memory regions
|
|
||||||
m_char_rom = memregion(AMS40041_TAG)->base();
|
|
||||||
|
|
||||||
// allocate memory
|
// allocate memory
|
||||||
m_video_ram.allocate(0x10000);
|
m_video_ram.allocate(0x10000);
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ READ8_MEMBER( pc1640_state::iga_r )
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// switch sense
|
// switch sense
|
||||||
data |= BIT(ioport("SW")->read(), ((m_egc_ctrl >> 2) & 0x03) ^ 0x03);
|
data |= BIT(m_sw->read(), ((m_egc_ctrl >> 2) & 0x03) ^ 0x03);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x15: // Sequencer Data Register
|
case 0x15: // Sequencer Data Register
|
||||||
@ -364,7 +364,7 @@ static MC6845_INTERFACE( crtc_intf )
|
|||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// VIDEO_START( pc1640 )
|
// VIDEO_START( pc1640 )s
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
void pc1640_state::video_start()
|
void pc1640_state::video_start()
|
||||||
@ -380,7 +380,7 @@ void pc1640_state::video_start()
|
|||||||
|
|
||||||
UINT32 pc1640_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
UINT32 pc1640_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ WRITE_LINE_MEMBER(pecom_state::pecom_prd_w)
|
|||||||
// every other PRD triggers a DMAOUT request
|
// every other PRD triggers a DMAOUT request
|
||||||
if (m_dma)
|
if (m_dma)
|
||||||
{
|
{
|
||||||
machine().device(CDP1802_TAG)->execute().set_input_line(COSMAC_INPUT_LINE_DMAOUT, HOLD_LINE);
|
m_cdp1802->set_input_line(COSMAC_INPUT_LINE_DMAOUT, HOLD_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_dma = !m_dma;
|
m_dma = !m_dma;
|
||||||
|
Loading…
Reference in New Issue
Block a user