mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
at, at_keybc: hook up Display Switch
This commit is contained in:
parent
ce285e1d62
commit
47c125bfa8
@ -24,6 +24,15 @@ static ADDRESS_MAP_START( at_keybc_io, AS_IO, 8, at_keyboard_controller_device)
|
||||
AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READ( p1_r)
|
||||
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(p2_r, p2_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static INPUT_PORTS_START( at_keybc )
|
||||
PORT_START("DSW")
|
||||
PORT_BIT( 0xbf, 0xbf, IPT_UNUSED )
|
||||
PORT_DIPNAME( 0x40, 0x40, "Display switch")
|
||||
PORT_DIPSETTING( 0x40, "Monochrome adapter" )
|
||||
PORT_DIPSETTING( 0x00, "Color/Graphics adapter" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
// machine fragment
|
||||
static MACHINE_CONFIG_FRAGMENT( at_keybc )
|
||||
MCFG_CPU_ADD("at_keybc", I8042, DERIVED_CLOCK(1,1))
|
||||
@ -71,6 +80,15 @@ const rom_entry *at_keyboard_controller_device::device_rom_region() const
|
||||
return ROM_NAME(at_keybc);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// input_ports - device-specific input ports
|
||||
//-------------------------------------------------
|
||||
|
||||
ioport_constructor at_keyboard_controller_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( at_keybc );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
@ -139,7 +157,7 @@ READ8_MEMBER( at_keyboard_controller_device::t1_r )
|
||||
*/
|
||||
READ8_MEMBER( at_keyboard_controller_device::p1_r )
|
||||
{
|
||||
return 0xbf;
|
||||
return ioport("DSW")->read();
|
||||
}
|
||||
|
||||
READ8_MEMBER( at_keyboard_controller_device::p2_r )
|
||||
|
@ -79,6 +79,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
private:
|
||||
|
@ -264,28 +264,6 @@ ADDRESS_MAP_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( atcga )
|
||||
PORT_START("DSW0")
|
||||
PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives")
|
||||
PORT_DIPSETTING( 0x00, "1" )
|
||||
PORT_DIPSETTING( 0x40, "2" )
|
||||
PORT_DIPSETTING( 0x80, "3" )
|
||||
PORT_DIPSETTING( 0xc0, "4" )
|
||||
PORT_DIPNAME( 0x30, 0x00, "Graphics adapter")
|
||||
PORT_DIPSETTING( 0x00, "EGA/VGA" )
|
||||
PORT_DIPSETTING( 0x10, "Color 40x25" )
|
||||
PORT_DIPSETTING( 0x20, "Color 80x25" )
|
||||
PORT_DIPSETTING( 0x30, "Monochrome" )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, "RAM banks")
|
||||
PORT_DIPSETTING( 0x00, "1 - 16 64 256K" )
|
||||
PORT_DIPSETTING( 0x04, "2 - 32 128 512K" )
|
||||
PORT_DIPSETTING( 0x08, "3 - 48 192 576K" )
|
||||
PORT_DIPSETTING( 0x0c, "4 - 64 256 640K" )
|
||||
PORT_DIPNAME( 0x02, 0x00, "80387 installed")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x01, 0x01, "Floppy installed")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Yes ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( atvga )
|
||||
@ -302,29 +280,6 @@ static INPUT_PORTS_START( atvga )
|
||||
PORT_DIPNAME( 0x01, 0x01, "VGA 4")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW0")
|
||||
PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives")
|
||||
PORT_DIPSETTING( 0x00, "1" )
|
||||
PORT_DIPSETTING( 0x40, "2" )
|
||||
PORT_DIPSETTING( 0x80, "3" )
|
||||
PORT_DIPSETTING( 0xc0, "4" )
|
||||
PORT_DIPNAME( 0x30, 0x00, "Graphics adapter")
|
||||
PORT_DIPSETTING( 0x00, "EGA/VGA" )
|
||||
PORT_DIPSETTING( 0x10, "Color 40x25" )
|
||||
PORT_DIPSETTING( 0x20, "Color 80x25" )
|
||||
PORT_DIPSETTING( 0x30, "Monochrome" )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, "RAM banks")
|
||||
PORT_DIPSETTING( 0x00, "1 - 16 64 256K" )
|
||||
PORT_DIPSETTING( 0x04, "2 - 32 128 512K" )
|
||||
PORT_DIPSETTING( 0x08, "3 - 48 192 576K" )
|
||||
PORT_DIPSETTING( 0x0c, "4 - 64 256 640K" )
|
||||
PORT_DIPNAME( 0x02, 0x00, "80387 installed")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x01, 0x01, "Floppy installed")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Yes ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
WRITE_LINE_MEMBER( at_state::at_mc146818_irq )
|
||||
|
Loading…
Reference in New Issue
Block a user