summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/galaxia.cpp
diff options
context:
space:
mode:
authorGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2017-06-22 18:21:28 -0400
committerGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2017-06-22 18:29:16 -0400
commitaa191bfe6b78f6670647dd09e8c44f6c6f705484 (patch) (github)
treeb1a0b7eb403ceca14b6831a1a09ed08c6525494f /src/mame/drivers/galaxia.cpp
parent137a83532ba2c0f012d89a507fe688a4bcd81075 (diff)
downloadmame-aa191bfe6b78f6670647dd09e8c44f6c6f705484.tar.bz2
mame-aa191bfe6b78f6670647dd09e8c44f6c6f705484.zip
s2650: I/O modernization
- Replace fake S2650_SENSE_PORT address with line read callback (set_input_line should also work). There are still some doubts regarding whether VBLANK should be inverted in various drivers. - Replace fake S2650_CTRL_PORT and S2650_DATA_PORT addresses with... well, these aren't dedicated parallel ports, so they actually haven't gone away. They have, however, been moved to a new 1-bit address space, since the ports share the main data bus and are distinguished from each other by an address line.
Diffstat (limited to 'src/mame/drivers/galaxia.cpp')
-rw-r--r--src/mame/drivers/galaxia.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mame/drivers/galaxia.cpp b/src/mame/drivers/galaxia.cpp
index f466b79b188..ae1ec98ffad 100644
--- a/src/mame/drivers/galaxia.cpp
+++ b/src/mame/drivers/galaxia.cpp
@@ -158,9 +158,11 @@ static ADDRESS_MAP_START( galaxia_io_map, AS_IO, 8, galaxia_state )
AM_RANGE(0x06, 0x06) AM_READ_PORT("DSW0")
AM_RANGE(0x07, 0x07) AM_READ_PORT("DSW1")
AM_RANGE(0xac, 0xac) AM_READNOP
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( galaxia_data_map, AS_DATA, 8, galaxia_state )
AM_RANGE(S2650_CTRL_PORT, S2650_CTRL_PORT) AM_READWRITE(galaxia_collision_r, galaxia_ctrlport_w)
AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READWRITE(galaxia_collision_clear, galaxia_dataport_w)
- AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE")
ADDRESS_MAP_END
@@ -240,9 +242,6 @@ static INPUT_PORTS_START( galaxia )
PORT_DIPNAME( 0x80, 0x00, "UNK17" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
-
- PORT_START("SENSE")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
INPUT_PORTS_END
@@ -289,8 +288,10 @@ static MACHINE_CONFIG_START( galaxia )
MCFG_CPU_ADD("maincpu", S2650, XTAL_14_31818MHz/8)
MCFG_CPU_PROGRAM_MAP(galaxia_mem_map)
MCFG_CPU_IO_MAP(galaxia_io_map)
+ MCFG_CPU_DATA_MAP(galaxia_data_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxia_state, galaxia_interrupt)
- MCFG_S2650_FLAG_HANDLER(WRITELINE(cvs_state, write_s2650_flag))
+ MCFG_S2650_SENSE_INPUT(DEVREADLINE("screen", screen_device, vblank))
+ MCFG_S2650_FLAG_OUTPUT(WRITELINE(cvs_state, write_s2650_flag))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -331,8 +332,9 @@ static MACHINE_CONFIG_START( astrowar )
MCFG_CPU_ADD("maincpu", S2650, XTAL_14_31818MHz/8)
MCFG_CPU_PROGRAM_MAP(astrowar_mem_map)
MCFG_CPU_IO_MAP(galaxia_io_map)
+ MCFG_CPU_DATA_MAP(galaxia_data_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxia_state, galaxia_interrupt)
- MCFG_S2650_FLAG_HANDLER(WRITELINE(cvs_state, write_s2650_flag))
+ MCFG_S2650_FLAG_OUTPUT(WRITELINE(cvs_state, write_s2650_flag))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)