mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
Add VS9209 I/O device for various Video System games
This commit is contained in:
parent
ba5c26a09b
commit
498fc34641
@ -4126,6 +4126,8 @@ files {
|
||||
|
||||
createMAMEProjects(_target, _subtarget, "vsystem")
|
||||
files {
|
||||
MAME_DIR .. "src/mame/machine/vs9209.cpp",
|
||||
MAME_DIR .. "src/mame/machine/vs9209.h",
|
||||
MAME_DIR .. "src/mame/video/vsystem_gga.cpp",
|
||||
MAME_DIR .. "src/mame/video/vsystem_gga.h",
|
||||
MAME_DIR .. "src/mame/video/vsystem_spr.cpp",
|
||||
|
@ -65,6 +65,7 @@ Verification still needed for the other PCBs.
|
||||
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/vs9209.h"
|
||||
#include "sound/2610intf.h"
|
||||
#include "sound/3812intf.h"
|
||||
#include "video/vsystem_gga.h"
|
||||
@ -95,6 +96,12 @@ WRITE8_MEMBER(aerofgt_state::pending_command_clear_w)
|
||||
m_pending_command = 0;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(aerofgt_state::aerofgt_unknown_output_w)
|
||||
{
|
||||
if (data != 0)
|
||||
logerror("Writing %02X to unknown output port\n", data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(aerofgt_state::aerofgt_sh_bankswitch_w)
|
||||
{
|
||||
m_soundbank->set_entry(data & 0x03);
|
||||
@ -299,13 +306,7 @@ static ADDRESS_MAP_START( aerofgt_map, AS_PROGRAM, 16, aerofgt_state )
|
||||
AM_RANGE(0xffff80, 0xffff87) AM_WRITE(aerofgt_gfxbank_w)
|
||||
AM_RANGE(0xffff88, 0xffff89) AM_WRITE(aerofgt_bg1scrolly_w) /* + something else in the top byte */
|
||||
AM_RANGE(0xffff90, 0xffff91) AM_WRITE(aerofgt_bg2scrolly_w) /* + something else in the top byte */
|
||||
AM_RANGE(0xffffa0, 0xffffa1) AM_READ_PORT("P1")
|
||||
AM_RANGE(0xffffa2, 0xffffa3) AM_READ_PORT("P2")
|
||||
AM_RANGE(0xffffa4, 0xffffa5) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0xffffa6, 0xffffa7) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xffffa8, 0xffffa9) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0xffffac, 0xffffad) AM_READ8(pending_command_r, 0x00ff) AM_WRITENOP /* ??? */
|
||||
AM_RANGE(0xffffae, 0xffffaf) AM_READ_PORT("DSW3")
|
||||
AM_RANGE(0xffffa0, 0xffffbf) AM_DEVREADWRITE8("io", vs9209_device, read, write, 0x00ff)
|
||||
AM_RANGE(0xffffc0, 0xffffc1) AM_WRITE8(sound_command_w, 0x00ff)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -994,92 +995,92 @@ INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( aerofgt )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("P2")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("SYSTEM")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("DSW1")
|
||||
/* "Free Play mode: Have SW1:1-8 ON." */
|
||||
PORT_DIPNAME( 0x0001, 0x0001, "Coin Slot" ) PORT_DIPLOCATION("SW1:1")
|
||||
PORT_DIPSETTING( 0x0001, "Same" )
|
||||
PORT_DIPSETTING( 0x0000, "Individual" )
|
||||
PORT_DIPNAME( 0x000e, 0x000e, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:2,3,4")
|
||||
PORT_DIPSETTING( 0x000a, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x000c, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x000e, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x0006, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x0070, 0x0070, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7")
|
||||
PORT_DIPSETTING( 0x0050, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0060, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0070, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x0030, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, "Continue Coin" ) PORT_DIPLOCATION("SW1:8") /* "When ON, SW1:2-7 are disabled." */
|
||||
PORT_DIPSETTING( 0x0080, "Start 1 Coin/Continue 1 Coin" )
|
||||
PORT_DIPSETTING( 0x0000, "Start 2 Coin/Continue 1 Coin" )
|
||||
PORT_DIPNAME( 0x01, 0x01, "Coin Slot" ) PORT_DIPLOCATION("SW1:1")
|
||||
PORT_DIPSETTING( 0x01, "Same" )
|
||||
PORT_DIPSETTING( 0x00, "Individual" )
|
||||
PORT_DIPNAME( 0x0e, 0x0e, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:2,3,4")
|
||||
PORT_DIPSETTING( 0x0a, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0e, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x70, 0x70, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7")
|
||||
PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x70, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x80, 0x80, "Continue Coin" ) PORT_DIPLOCATION("SW1:8") /* "When ON, SW1:2-7 are disabled." */
|
||||
PORT_DIPSETTING( 0x80, "Start 1 Coin/Continue 1 Coin" )
|
||||
PORT_DIPSETTING( 0x00, "Start 2 Coin/Continue 1 Coin" )
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1")
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2")
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,4")
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x000c, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
|
||||
PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:5,6")
|
||||
PORT_DIPSETTING( 0x0020, "1" )
|
||||
PORT_DIPSETTING( 0x0010, "2" )
|
||||
PORT_DIPSETTING( 0x0030, "3" )
|
||||
PORT_DIPSETTING( 0x0000, "4" )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:7")
|
||||
PORT_DIPSETTING( 0x0040, "200000" )
|
||||
PORT_DIPSETTING( 0x0000, "300000" )
|
||||
PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW2:8" )
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2")
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,4")
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
|
||||
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:5,6")
|
||||
PORT_DIPSETTING( 0x20, "1" )
|
||||
PORT_DIPSETTING( 0x10, "2" )
|
||||
PORT_DIPSETTING( 0x30, "3" )
|
||||
PORT_DIPSETTING( 0x00, "4" )
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:7")
|
||||
PORT_DIPSETTING( 0x40, "200000" )
|
||||
PORT_DIPSETTING( 0x00, "300000" )
|
||||
PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
|
||||
|
||||
/* This DSW3 is not documented in the Aero Fighters manual */
|
||||
PORT_START("DSW3")
|
||||
PORT_DIPNAME( 0x000f, 0x0000, DEF_STR( Region ) )
|
||||
PORT_DIPSETTING( 0x0000, "Any" )
|
||||
PORT_DIPSETTING( 0x000f, "USA/Canada" )
|
||||
PORT_DIPSETTING( 0x000e, DEF_STR( Korea ) )
|
||||
PORT_DIPSETTING( 0x000d, DEF_STR( Hong_Kong ) )
|
||||
PORT_DIPSETTING( 0x000b, DEF_STR( Taiwan ) )
|
||||
/* Jumpers not documented in the Aero Fighters manual */
|
||||
PORT_START("JP1")
|
||||
PORT_DIPNAME( 0xf, 0x0, DEF_STR( Region ) )
|
||||
PORT_DIPSETTING( 0x0, "Any" )
|
||||
PORT_DIPSETTING( 0xf, "USA/Canada" )
|
||||
PORT_DIPSETTING( 0xe, DEF_STR( Korea ) )
|
||||
PORT_DIPSETTING( 0xd, DEF_STR( Hong_Kong ) )
|
||||
PORT_DIPSETTING( 0xb, DEF_STR( Taiwan ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( wbbc97 )
|
||||
@ -1785,6 +1786,16 @@ static MACHINE_CONFIG_START( aerofgt, aerofgt_state )
|
||||
MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt)
|
||||
|
||||
MCFG_DEVICE_ADD("io", VS9209, 0)
|
||||
MCFG_VS9209_IN_PORTA_CB(IOPORT("P1"))
|
||||
MCFG_VS9209_IN_PORTB_CB(IOPORT("P2"))
|
||||
MCFG_VS9209_IN_PORTC_CB(IOPORT("SYSTEM"))
|
||||
MCFG_VS9209_IN_PORTD_CB(IOPORT("DSW1"))
|
||||
MCFG_VS9209_IN_PORTE_CB(IOPORT("DSW2"))
|
||||
MCFG_VS9209_IN_PORTG_CB(READ8(aerofgt_state, pending_command_r))
|
||||
MCFG_VS9209_OUT_PORTG_CB(WRITE8(aerofgt_state, aerofgt_unknown_output_w))
|
||||
MCFG_VS9209_IN_PORTH_CB(IOPORT("JP1"))
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(61.31) /* verified on pcb */
|
||||
|
@ -38,6 +38,7 @@ Missing mixer registers (mainly layer enable/disable)
|
||||
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/vs9209.h"
|
||||
#include "sound/2610intf.h"
|
||||
#include "speaker.h"
|
||||
|
||||
@ -191,12 +192,18 @@ void gstriker_state::machine_start()
|
||||
|
||||
/*** MISC READ / WRITE HANDLERS **********************************************/
|
||||
|
||||
READ16_MEMBER(gstriker_state::dmmy_8f)
|
||||
READ8_MEMBER(gstriker_state::dmmy_8f)
|
||||
{
|
||||
m_dmmy_8f_ret = ~m_dmmy_8f_ret;
|
||||
return m_dmmy_8f_ret;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(gstriker_state::unknown_output_w)
|
||||
{
|
||||
if (data != 0)
|
||||
logerror("Unknown output write: %02X\n", data);
|
||||
}
|
||||
|
||||
/*** SOUND RELATED ***********************************************************/
|
||||
|
||||
|
||||
@ -280,12 +287,7 @@ static ADDRESS_MAP_START( gstriker_map, AS_PROGRAM, 16, gstriker_state )
|
||||
AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE("zoomtilemap", mb60553_zooming_tilemap_device, regs_r, regs_w )
|
||||
AM_RANGE(0x200040, 0x20005f) AM_RAM AM_SHARE("mixerregs1")
|
||||
AM_RANGE(0x200060, 0x20007f) AM_RAM AM_SHARE("mixerregs2")
|
||||
AM_RANGE(0x200080, 0x200081) AM_READ_PORT("P1")
|
||||
AM_RANGE(0x200082, 0x200083) AM_READ_PORT("P2")
|
||||
AM_RANGE(0x200084, 0x200085) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0x200086, 0x200087) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x200088, 0x200089) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0x20008e, 0x20008f) AM_READ(dmmy_8f)
|
||||
AM_RANGE(0x200080, 0x20009f) AM_DEVREADWRITE8("io", vs9209_device, read, write, 0x00ff)
|
||||
AM_RANGE(0x2000a0, 0x2000a1) AM_WRITE(sound_command_w)
|
||||
|
||||
AM_RANGE(0xffc000, 0xffffff) AM_RAM AM_SHARE("work_ram")
|
||||
@ -311,203 +313,194 @@ ADDRESS_MAP_END
|
||||
|
||||
static INPUT_PORTS_START( gstriker_generic )
|
||||
PORT_START("SYSTEM")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE2 ) // "Test"
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_TILT )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN) // vbl?
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // "Test"
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) // vbl?
|
||||
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) // "Spare"
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) // "Spare"
|
||||
|
||||
PORT_START("P2")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) // "Spare"
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) // "Spare"
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( gstriker )
|
||||
PORT_INCLUDE( gstriker_generic )
|
||||
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x000c, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPNAME( 0x0010, 0x0000, "2 Players VS CPU Game" ) // "Cooperation Coin"
|
||||
PORT_DIPSETTING( 0x0010, "1 Credit" )
|
||||
PORT_DIPSETTING( 0x0000, "2 Credits" )
|
||||
PORT_DIPNAME( 0x0020, 0x0000, "Player VS Player Game" ) // "Competitive Coin"
|
||||
PORT_DIPSETTING( 0x0020, "1 Credit" )
|
||||
PORT_DIPSETTING( 0x0000, "2 Credits" )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, "New Challenger" ) /* unknown purpose */
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, "Maximum Players" ) // "Cabinet Type"
|
||||
PORT_DIPSETTING( 0x0000, "1" )
|
||||
PORT_DIPSETTING( 0x0080, "2" )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, "2 Players VS CPU Game" ) // "Cooperation Coin"
|
||||
PORT_DIPSETTING( 0x10, "1 Credit" )
|
||||
PORT_DIPSETTING( 0x00, "2 Credits" )
|
||||
PORT_DIPNAME( 0x20, 0x00, "Player VS Player Game" ) // "Competitive Coin"
|
||||
PORT_DIPSETTING( 0x20, "1 Credit" )
|
||||
PORT_DIPSETTING( 0x00, "2 Credits" )
|
||||
PORT_DIPNAME( 0x40, 0x40, "New Challenger" ) /* unknown purpose */
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x80, 0x80, "Maximum Players" ) // "Cabinet Type"
|
||||
PORT_DIPSETTING( 0x00, "1" )
|
||||
PORT_DIPSETTING( 0x80, "2" )
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Hard ) )
|
||||
PORT_DIPNAME( 0x0006, 0x0006, "Player(s) VS CPU Time" ) // "Tournament Time"
|
||||
PORT_DIPSETTING( 0x0006, "1:30" )
|
||||
PORT_DIPSETTING( 0x0004, "2:00" )
|
||||
PORT_DIPSETTING( 0x0002, "3:00" )
|
||||
PORT_DIPSETTING( 0x0000, "4:00" )
|
||||
PORT_DIPNAME( 0x0018, 0x0018, "Player VS Player Time" ) // "Competitive Time"
|
||||
PORT_DIPSETTING( 0x0018, "2:00" )
|
||||
PORT_DIPSETTING( 0x0010, "3:00" )
|
||||
PORT_DIPSETTING( 0x0008, "4:00" )
|
||||
PORT_DIPSETTING( 0x0000, "5:00" )
|
||||
PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Demo_Sounds ) ) // "Demo Sound"
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, "Communication Mode" ) // "Master/Slave"
|
||||
PORT_DIPSETTING( 0x0040, "Master" )
|
||||
PORT_DIPSETTING( 0x0000, "Slave" )
|
||||
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) // "Self Test Mode"
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
|
||||
PORT_DIPNAME( 0x06, 0x06, "Player(s) VS CPU Time" ) // "Tournament Time"
|
||||
PORT_DIPSETTING( 0x06, "1:30" )
|
||||
PORT_DIPSETTING( 0x04, "2:00" )
|
||||
PORT_DIPSETTING( 0x02, "3:00" )
|
||||
PORT_DIPSETTING( 0x00, "4:00" )
|
||||
PORT_DIPNAME( 0x18, 0x18, "Player VS Player Time" ) // "Competitive Time"
|
||||
PORT_DIPSETTING( 0x18, "2:00" )
|
||||
PORT_DIPSETTING( 0x10, "3:00" )
|
||||
PORT_DIPSETTING( 0x08, "4:00" )
|
||||
PORT_DIPSETTING( 0x00, "5:00" )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) // "Demo Sound"
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, "Communication Mode" ) // "Master/Slave"
|
||||
PORT_DIPSETTING( 0x40, "Master" )
|
||||
PORT_DIPSETTING( 0x00, "Slave" )
|
||||
PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) // "Self Test Mode"
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( twrldc94 )
|
||||
PORT_INCLUDE( gstriker_generic )
|
||||
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) )
|
||||
|
||||
PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x0018, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) )
|
||||
|
||||
PORT_DIPNAME( 0x00c0, 0x00c0, "Play Time" )
|
||||
PORT_DIPSETTING( 0x0000, "P v CPU 1:00, P v P 1:30" )
|
||||
PORT_DIPSETTING( 0x00c0, "P v CPU 1:30, P v P 2:00" )
|
||||
PORT_DIPSETTING( 0x0040, "P v CPU 2:00, P v P 2:30" )
|
||||
PORT_DIPSETTING( 0x0080, "P v CPU 2:30, P v P 3:00" )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_DIPNAME( 0xc0, 0xc0, "Play Time" )
|
||||
PORT_DIPSETTING( 0x00, "P v CPU 1:00, P v P 1:30" )
|
||||
PORT_DIPSETTING( 0xc0, "P v CPU 1:30, P v P 2:00" )
|
||||
PORT_DIPSETTING( 0x40, "P v CPU 2:00, P v P 2:30" )
|
||||
PORT_DIPSETTING( 0x80, "P v CPU 2:30, P v P 3:00" )
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) )
|
||||
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x03, DEF_STR( Normal ) )
|
||||
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0008, 0x0008, "Show Configuration" )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, "Countdown" )
|
||||
PORT_DIPSETTING( 0x0010, "54 sec" )
|
||||
PORT_DIPSETTING( 0x0000, "60 sec" )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, "Start credit" )
|
||||
PORT_DIPSETTING( 0x0020, "1" )
|
||||
PORT_DIPSETTING( 0x0000, "2" )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unused ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, "Show Configuration" )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, "Countdown" )
|
||||
PORT_DIPSETTING( 0x10, "54 sec" )
|
||||
PORT_DIPSETTING( 0x00, "60 sec" )
|
||||
PORT_DIPNAME( 0x20, 0x20, "Start credit" )
|
||||
PORT_DIPSETTING( 0x20, "1" )
|
||||
PORT_DIPSETTING( 0x00, "2" )
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( vgoalsoc )
|
||||
PORT_INCLUDE( gstriker_generic )
|
||||
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) )
|
||||
|
||||
PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x0018, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) )
|
||||
|
||||
PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR (Unknown) ) // Probably difficulty
|
||||
PORT_DIPSETTING( 0x0080, "A" )
|
||||
PORT_DIPSETTING( 0x00c0, "B" )
|
||||
PORT_DIPSETTING( 0x0040, "C" )
|
||||
PORT_DIPSETTING( 0x0000, "D" )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR (Unknown) ) // Probably difficulty
|
||||
PORT_DIPSETTING( 0x80, "A" )
|
||||
PORT_DIPSETTING( 0xc0, "B" )
|
||||
PORT_DIPSETTING( 0x40, "C" )
|
||||
PORT_DIPSETTING( 0x00, "D" )
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x0003, 0x0003, "Player VS CPU Time" ) // no coperative
|
||||
PORT_DIPSETTING( 0x0002, "1:00" )
|
||||
PORT_DIPSETTING( 0x0003, "1:30" )
|
||||
PORT_DIPSETTING( 0x0001, "2:00" )
|
||||
PORT_DIPSETTING( 0x0000, "2:30" )
|
||||
PORT_DIPNAME( 0x000c, 0x000c, "Player VS Player Time" )
|
||||
PORT_DIPSETTING( 0x0008, "1:30" )
|
||||
PORT_DIPSETTING( 0x000c, "2:00" )
|
||||
PORT_DIPSETTING( 0x0004, "2:30" )
|
||||
PORT_DIPSETTING( 0x0000, "3:00" )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, "Countdown" )
|
||||
PORT_DIPSETTING( 0x0010, "54 sec" )
|
||||
PORT_DIPSETTING( 0x0000, "60 sec" )
|
||||
PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, "DWS2:6" ) // hangs at POST
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, "Start credit" )
|
||||
PORT_DIPSETTING( 0x0080, "1" )
|
||||
PORT_DIPSETTING( 0x0000, "2" )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_DIPNAME( 0x03, 0x03, "Player VS CPU Time" ) // no coperative
|
||||
PORT_DIPSETTING( 0x02, "1:00" )
|
||||
PORT_DIPSETTING( 0x03, "1:30" )
|
||||
PORT_DIPSETTING( 0x01, "2:00" )
|
||||
PORT_DIPSETTING( 0x00, "2:30" )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, "Player VS Player Time" )
|
||||
PORT_DIPSETTING( 0x08, "1:30" )
|
||||
PORT_DIPSETTING( 0x0c, "2:00" )
|
||||
PORT_DIPSETTING( 0x04, "2:30" )
|
||||
PORT_DIPSETTING( 0x00, "3:00" )
|
||||
PORT_DIPNAME( 0x10, 0x10, "Countdown" )
|
||||
PORT_DIPSETTING( 0x10, "54 sec" )
|
||||
PORT_DIPSETTING( 0x00, "60 sec" )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, "DWS2:6" ) // hangs at POST
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x80, "Start credit" )
|
||||
PORT_DIPSETTING( 0x80, "1" )
|
||||
PORT_DIPSETTING( 0x00, "2" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
/*** MACHINE DRIVER **********************************************************/
|
||||
@ -521,6 +514,14 @@ static MACHINE_CONFIG_START( gstriker, gstriker_state )
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
MCFG_CPU_IO_MAP(sound_io_map)
|
||||
|
||||
MCFG_DEVICE_ADD("io", VS9209, 0)
|
||||
MCFG_VS9209_IN_PORTA_CB(IOPORT("P1"))
|
||||
MCFG_VS9209_IN_PORTB_CB(IOPORT("P2"))
|
||||
MCFG_VS9209_IN_PORTC_CB(IOPORT("SYSTEM"))
|
||||
MCFG_VS9209_IN_PORTD_CB(IOPORT("DSW1"))
|
||||
MCFG_VS9209_IN_PORTE_CB(IOPORT("DSW2"))
|
||||
MCFG_VS9209_IN_PORTH_CB(READ8(gstriker_state, dmmy_8f))
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
// MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -1006,7 +1007,7 @@ WRITE16_MEMBER(gstriker_state::vbl_toggle_w)
|
||||
|
||||
void gstriker_state::mcu_init()
|
||||
{
|
||||
m_dmmy_8f_ret = 0xFFFF;
|
||||
m_dmmy_8f_ret = 0xff;
|
||||
m_pending_command = 0;
|
||||
m_mcu_data = 0;
|
||||
|
||||
|
@ -42,7 +42,7 @@ Other Chips:
|
||||
VS9210 4L06F1056 JAPAN 9525EAI (176 Pin PQFP)
|
||||
VS920F 4L01F1435 JAPAN 9524EAI (100 Pin PQFP)
|
||||
VS920E 4L06F1057 JAPAN 9533EAI (176 pin PQFP)
|
||||
VS9209 4L01F1429 JAPAN 9523EAI (64 pin PQFP)
|
||||
VS9209 4L01F1429 JAPAN 9523EAI (80 pin PQFP)
|
||||
VS920D 4L04F1689 JAPAN 9524EAI (160 pin PQFP)
|
||||
KONAMI KS10011-PF 053936 PSAC2 9522 Z02 (80 pin PQFP)
|
||||
|
||||
@ -63,7 +63,7 @@ PALs: (4 total, not dumped, 2 located near 68000, 1 near Z80B, 1 near VS9210)
|
||||
|
||||
DIPs: 8 position x 3 (ALL DIPs linked to VS9209)
|
||||
|
||||
Info taken from sheet supplied with PCB, no info for SW3.
|
||||
Info taken from sheet supplied with PCB, no info for SW3 (which is never read?).
|
||||
|
||||
ROMs: (on ALL ROMs is written only "EB26")
|
||||
|
||||
@ -87,6 +87,7 @@ EB26IC73.BIN 27C240 / Main Program
|
||||
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/vs9209.h"
|
||||
#include "sound/2610intf.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
@ -131,18 +132,13 @@ static ADDRESS_MAP_START( suprslam_map, AS_PROGRAM, 16, suprslam_state )
|
||||
AM_RANGE(0xfe0000, 0xfe0fff) AM_RAM_WRITE(suprslam_screen_videoram_w) AM_SHARE("screen_videoram")
|
||||
AM_RANGE(0xff0000, 0xff1fff) AM_RAM_WRITE(suprslam_bg_videoram_w) AM_SHARE("bg_videoram")
|
||||
AM_RANGE(0xff2000, 0xff203f) AM_RAM AM_SHARE("screen_vregs")
|
||||
// AM_RANGE(0xff3000, 0xff3001) AM_WRITENOP // sprite buffer trigger?
|
||||
AM_RANGE(0xff3000, 0xff3001) AM_WRITENOP // sprite buffer trigger?
|
||||
AM_RANGE(0xff8000, 0xff8fff) AM_DEVREADWRITE("k053936", k053936_device, linectrl_r, linectrl_w)
|
||||
AM_RANGE(0xff9000, 0xff9001) AM_WRITE(sound_command_w)
|
||||
AM_RANGE(0xffa000, 0xffafff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
|
||||
AM_RANGE(0xffd000, 0xffd01f) AM_DEVWRITE("k053936", k053936_device, ctrl_w)
|
||||
AM_RANGE(0xffe000, 0xffe001) AM_WRITE(suprslam_bank_w)
|
||||
AM_RANGE(0xfff000, 0xfff001) AM_READ_PORT("P1")
|
||||
AM_RANGE(0xfff002, 0xfff003) AM_READ_PORT("P2")
|
||||
AM_RANGE(0xfff004, 0xfff005) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0xfff006, 0xfff007) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xfff008, 0xfff009) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0xfff00c, 0xfff00d) AM_WRITEONLY AM_SHARE("spr_ctrl")
|
||||
AM_RANGE(0xfff000, 0xfff01f) AM_DEVREADWRITE8("io", vs9209_device, read, write, 0x00ff)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, suprslam_state )
|
||||
@ -162,82 +158,82 @@ ADDRESS_MAP_END
|
||||
|
||||
static INPUT_PORTS_START( suprslam )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
|
||||
PORT_START("P2")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
|
||||
PORT_START("SYSTEM")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) // Only in "test mode"
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE2 ) // "Test"
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_TILT )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) // Only in "test mode"
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) // "Test"
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, "Coin Slots" )
|
||||
PORT_DIPSETTING( 0x0001, "Common" )
|
||||
PORT_DIPSETTING( 0x0000, "Separate" )
|
||||
PORT_DIPNAME( 0x000e, 0x000e, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x000a, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x000c, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x000e, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x0006, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x0070, 0x0070, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x0050, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0060, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0070, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x0030, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x01, 0x01, "Coin Slots" )
|
||||
PORT_DIPSETTING( 0x01, "Common" )
|
||||
PORT_DIPSETTING( 0x00, "Separate" )
|
||||
PORT_DIPNAME( 0x0e, 0x0e, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x0a, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0e, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x70, 0x70, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x70, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Free_Play ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
|
||||
PORT_DIPNAME( 0x000c, 0x000c, "Play Time" )
|
||||
PORT_DIPSETTING( 0x0008, "2:00" )
|
||||
PORT_DIPSETTING( 0x000c, "3:00" )
|
||||
PORT_DIPSETTING( 0x0004, "4:00" )
|
||||
PORT_DIPSETTING( 0x0000, "5:00" )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Flip_Screen ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( On ) )
|
||||
PORT_SERVICE( 0x0040, IP_ACTIVE_LOW )
|
||||
PORT_DIPNAME( 0x0080, 0x0000, "Country" )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Japan ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( World ) )
|
||||
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x03, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, "Play Time" )
|
||||
PORT_DIPSETTING( 0x08, "2:00" )
|
||||
PORT_DIPSETTING( 0x0c, "3:00" )
|
||||
PORT_DIPSETTING( 0x04, "4:00" )
|
||||
PORT_DIPSETTING( 0x00, "5:00" )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
||||
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
|
||||
PORT_DIPNAME( 0x80, 0x00, "Country" )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Japan ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( World ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
/*** GFX DECODE **************************************************************/
|
||||
@ -281,6 +277,7 @@ void suprslam_state::machine_start()
|
||||
save_item(NAME(m_screen_bank));
|
||||
save_item(NAME(m_bg_bank));
|
||||
save_item(NAME(m_pending_command));
|
||||
save_item(NAME(m_spr_ctrl));
|
||||
|
||||
membank("bank1")->configure_entries(0, 4, memregion("audiocpu")->base() + 0x10000, 0x8000);
|
||||
}
|
||||
@ -302,6 +299,13 @@ static MACHINE_CONFIG_START( suprslam, suprslam_state )
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
MCFG_CPU_IO_MAP(sound_io_map)
|
||||
|
||||
MCFG_DEVICE_ADD("io", VS9209, 0)
|
||||
MCFG_VS9209_IN_PORTA_CB(IOPORT("P1"))
|
||||
MCFG_VS9209_IN_PORTB_CB(IOPORT("P2"))
|
||||
MCFG_VS9209_IN_PORTC_CB(IOPORT("SYSTEM"))
|
||||
MCFG_VS9209_IN_PORTD_CB(IOPORT("DSW1"))
|
||||
MCFG_VS9209_IN_PORTE_CB(IOPORT("DSW2"))
|
||||
MCFG_VS9209_OUT_PORTG_CB(WRITE8(suprslam_state, spr_ctrl_w))
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", suprslam)
|
||||
|
||||
|
@ -68,6 +68,7 @@ zooming might be wrong
|
||||
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/vs9209.h"
|
||||
#include "sound/2610intf.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
@ -90,15 +91,18 @@ READ16_MEMBER(taotaido_state::pending_command_r)
|
||||
return m_pending_command;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(taotaido_state::sound_command_w)
|
||||
WRITE8_MEMBER(taotaido_state::sound_command_w)
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
m_pending_command = 1;
|
||||
m_soundlatch->write(space, offset, data & 0xff);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
m_pending_command = 1;
|
||||
m_soundlatch->write(space, offset, data);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(taotaido_state::unknown_output_w)
|
||||
{
|
||||
// Bits 7, 5, 4 used?
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, taotaido_state )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
||||
AM_RANGE(0x800000, 0x803fff) AM_RAM_WRITE(bgvideoram_w) AM_SHARE("bgram") // bg ram?
|
||||
@ -107,21 +111,13 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, taotaido_state )
|
||||
AM_RANGE(0xfe0000, 0xfeffff) AM_RAM // main ram
|
||||
AM_RANGE(0xffc000, 0xffcfff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") // palette ram
|
||||
AM_RANGE(0xffe000, 0xffe3ff) AM_RAM AM_SHARE("scrollram") // rowscroll / rowselect / scroll ram
|
||||
AM_RANGE(0xffff80, 0xffff81) AM_READ_PORT("P1")
|
||||
AM_RANGE(0xffff82, 0xffff83) AM_READ_PORT("P2")
|
||||
AM_RANGE(0xffff84, 0xffff85) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0xffff86, 0xffff87) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xffff88, 0xffff89) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0xffff8a, 0xffff8b) AM_READ_PORT("DSW3")
|
||||
AM_RANGE(0xffff8c, 0xffff8d) AM_READONLY // unknown
|
||||
AM_RANGE(0xffff8e, 0xffff8f) AM_READ_PORT("JP")
|
||||
AM_RANGE(0xffffa0, 0xffffa1) AM_READ_PORT("P3") // used only by taotaida
|
||||
AM_RANGE(0xffffa2, 0xffffa3) AM_READ_PORT("P4") // used only by taotaida
|
||||
AM_RANGE(0xffff80, 0xffff9f) AM_DEVREADWRITE8("io1", vs9209_device, read, write, 0x00ff)
|
||||
AM_RANGE(0xffffa0, 0xffffbf) AM_DEVREADWRITE8("io2", vs9209_device, read, write, 0x00ff)
|
||||
AM_RANGE(0xffff00, 0xffff0f) AM_WRITE(tileregs_w)
|
||||
AM_RANGE(0xffff10, 0xffff11) AM_WRITENOP // unknown
|
||||
AM_RANGE(0xffff20, 0xffff21) AM_WRITENOP // unknown - flip screen related
|
||||
AM_RANGE(0xffff40, 0xffff47) AM_WRITE(sprite_character_bank_select_w)
|
||||
AM_RANGE(0xffffc0, 0xffffc1) AM_WRITE(sound_command_w) // seems right
|
||||
AM_RANGE(0xffffc0, 0xffffc1) AM_WRITE8(sound_command_w, 0x00ff) // seems right
|
||||
AM_RANGE(0xffffe0, 0xffffe1) AM_READ(pending_command_r) // guess - seems to be needed for all the sounds to work
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -370,6 +366,20 @@ static MACHINE_CONFIG_START( taotaido, taotaido_state )
|
||||
MCFG_CPU_IO_MAP(sound_port_map)
|
||||
/* IRQs are triggered by the YM2610 */
|
||||
|
||||
MCFG_DEVICE_ADD("io1", VS9209, 0)
|
||||
MCFG_VS9209_IN_PORTA_CB(IOPORT("P1"))
|
||||
MCFG_VS9209_IN_PORTB_CB(IOPORT("P2"))
|
||||
MCFG_VS9209_IN_PORTC_CB(IOPORT("SYSTEM"))
|
||||
MCFG_VS9209_IN_PORTD_CB(IOPORT("DSW1"))
|
||||
MCFG_VS9209_IN_PORTE_CB(IOPORT("DSW2"))
|
||||
MCFG_VS9209_IN_PORTF_CB(IOPORT("DSW3"))
|
||||
MCFG_VS9209_OUT_PORTG_CB(WRITE8(taotaido_state, unknown_output_w))
|
||||
MCFG_VS9209_IN_PORTH_CB(IOPORT("JP"))
|
||||
|
||||
MCFG_DEVICE_ADD("io2", VS9209, 0)
|
||||
MCFG_VS9209_IN_PORTA_CB(IOPORT("P3")) // used only by taotaida
|
||||
MCFG_VS9209_IN_PORTB_CB(IOPORT("P4")) // used only by taotaida
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", taotaido)
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -85,6 +85,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(aerfboot_soundlatch_w);
|
||||
DECLARE_READ8_MEMBER(pending_command_r);
|
||||
DECLARE_WRITE8_MEMBER(pending_command_clear_w);
|
||||
DECLARE_WRITE8_MEMBER(aerofgt_unknown_output_w);
|
||||
DECLARE_WRITE8_MEMBER(aerofgt_sh_bankswitch_w);
|
||||
DECLARE_WRITE8_MEMBER(aerfboot_okim6295_banking_w);
|
||||
DECLARE_WRITE16_MEMBER(aerofgt_bg1videoram_w);
|
||||
|
@ -47,14 +47,15 @@ public:
|
||||
required_shared_ptr<uint16_t> m_mixerregs1;
|
||||
required_shared_ptr<uint16_t> m_mixerregs2;
|
||||
|
||||
uint16_t m_dmmy_8f_ret;
|
||||
uint8_t m_dmmy_8f_ret;
|
||||
int m_pending_command;
|
||||
int m_gametype;
|
||||
uint16_t m_mcu_data;
|
||||
uint16_t m_prot_reg[2];
|
||||
|
||||
// common
|
||||
DECLARE_READ16_MEMBER(dmmy_8f);
|
||||
DECLARE_READ8_MEMBER(dmmy_8f);
|
||||
DECLARE_WRITE8_MEMBER(unknown_output_w);
|
||||
DECLARE_WRITE16_MEMBER(sound_command_w);
|
||||
DECLARE_WRITE8_MEMBER(sh_pending_command_clear_w);
|
||||
DECLARE_WRITE8_MEMBER(sh_bankswitch_w);
|
||||
|
@ -21,7 +21,6 @@ public:
|
||||
m_bg_videoram(*this, "bg_videoram"),
|
||||
m_sp_videoram(*this, "sp_videoram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_spr_ctrl(*this, "spr_ctrl"),
|
||||
m_screen_vregs(*this, "screen_vregs"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
@ -36,7 +35,6 @@ public:
|
||||
required_shared_ptr<uint16_t> m_bg_videoram;
|
||||
required_shared_ptr<uint16_t> m_sp_videoram;
|
||||
required_shared_ptr<uint16_t> m_spriteram;
|
||||
required_shared_ptr<uint16_t> m_spr_ctrl;
|
||||
required_shared_ptr<uint16_t> m_screen_vregs;
|
||||
|
||||
/* video-related */
|
||||
@ -45,6 +43,7 @@ public:
|
||||
uint16_t m_screen_bank;
|
||||
uint16_t m_bg_bank;
|
||||
uint32_t suprslam_tile_callback( uint32_t code );
|
||||
uint8_t m_spr_ctrl;
|
||||
|
||||
/* misc */
|
||||
int m_pending_command;
|
||||
@ -64,6 +63,7 @@ public:
|
||||
DECLARE_WRITE16_MEMBER(suprslam_screen_videoram_w);
|
||||
DECLARE_WRITE16_MEMBER(suprslam_bg_videoram_w);
|
||||
DECLARE_WRITE16_MEMBER(suprslam_bank_w);
|
||||
DECLARE_WRITE8_MEMBER(spr_ctrl_w);
|
||||
TILE_GET_INFO_MEMBER(get_suprslam_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_suprslam_bg_tile_info);
|
||||
virtual void machine_start() override;
|
||||
|
@ -42,7 +42,8 @@ public:
|
||||
std::unique_ptr<uint16_t[]> m_spriteram2_older;
|
||||
|
||||
DECLARE_READ16_MEMBER(pending_command_r);
|
||||
DECLARE_WRITE16_MEMBER(sound_command_w);
|
||||
DECLARE_WRITE8_MEMBER(sound_command_w);
|
||||
DECLARE_WRITE8_MEMBER(unknown_output_w);
|
||||
DECLARE_WRITE8_MEMBER(pending_command_clear_w);
|
||||
DECLARE_WRITE8_MEMBER(sh_bankswitch_w);
|
||||
DECLARE_WRITE16_MEMBER(sprite_character_bank_select_w);
|
||||
|
157
src/mame/machine/vs9209.cpp
Normal file
157
src/mame/machine/vs9209.cpp
Normal file
@ -0,0 +1,157 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:AJR
|
||||
/**********************************************************************
|
||||
|
||||
VS9209 (4L01F1429) custom QFP80 I/O
|
||||
|
||||
This chip, which appears on various Video System PCBs from 1992
|
||||
to 1995, provides a programmable interface for up to eight ports.
|
||||
|
||||
There are at least four configuration registers that control the
|
||||
directions of individual bits on some of the ports (low for input
|
||||
and high for output). However, the game programs always write
|
||||
zero to the first register, except for Super Slams which doesn't
|
||||
write to it at all.
|
||||
|
||||
No program attempts to write to Ports A, B, C or D, with the
|
||||
dubious exception of Tao Taido writing to the Port C offset on
|
||||
its second VS9209 (whose inputs are mostly unused) at
|
||||
initialization time. It seems possible that only the latter four
|
||||
ports may be configured for output.
|
||||
|
||||
Much like CXD1095, the last port is apparently only half width.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/vs9209.h"
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
const device_type VS9209 = device_creator<vs9209_device>;
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITION
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// vs9209_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
vs9209_device::vs9209_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, VS9209, "VS9209 I/O", tag, owner, clock, "vs9209", __FILE__),
|
||||
m_input_cb{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}},
|
||||
m_output_cb{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}}
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void vs9209_device::device_start()
|
||||
{
|
||||
// resolve callbacks
|
||||
for (auto &cb : m_input_cb)
|
||||
cb.resolve();
|
||||
for (auto &cb : m_output_cb)
|
||||
cb.resolve();
|
||||
|
||||
std::fill(std::begin(m_data_latch), std::end(m_data_latch), 0);
|
||||
|
||||
// save state
|
||||
save_item(NAME(m_data_latch));
|
||||
save_item(NAME(m_data_dir));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void vs9209_device::device_reset()
|
||||
{
|
||||
std::fill(std::begin(m_data_dir), std::end(m_data_dir), 0);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// read - read from an input port
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(vs9209_device::read)
|
||||
{
|
||||
int port = offset & 7;
|
||||
|
||||
if ((offset & 8) == 0)
|
||||
{
|
||||
u8 input_data = 0;
|
||||
u8 input_mask = ~m_data_dir[port];
|
||||
if (port == 7)
|
||||
input_mask &= 0x0f;
|
||||
|
||||
// read through callback if port not configured entirely for output
|
||||
if (input_mask != 0 && !m_input_cb[port].isnull())
|
||||
input_data = m_input_cb[port](0, input_mask) & input_mask;
|
||||
else if (m_data_dir[port] == 0)
|
||||
logerror("%s: Read from undefined input port %c\n", machine().describe_context(), 'A' + port);
|
||||
|
||||
// combine live inputs with latched data
|
||||
return input_data | (m_data_latch[port] & m_data_dir[port]);
|
||||
}
|
||||
|
||||
//logerror("%s: Read from write-only/nonexistent register %d\n", machine().describe_context(), offset);
|
||||
return space.unmap();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// write - write to an output port or one of two
|
||||
// control registers
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(vs9209_device::write)
|
||||
{
|
||||
// port H is probably only 4 bits wide
|
||||
int port = offset & 7;
|
||||
if (port == 7 && (data & 0xf0) != 0)
|
||||
{
|
||||
logerror("%s: Attempt to write %02X to port H%s", machine().describe_context(), data, (offset & 8) != 0 ? " direction register" : "");
|
||||
data &= 0x0f;
|
||||
}
|
||||
|
||||
if ((offset & 8) == 0)
|
||||
{
|
||||
// update our latched data
|
||||
m_data_latch[port] = data;
|
||||
|
||||
if (m_data_dir[port] != 0)
|
||||
{
|
||||
u8 dataout = data & m_data_dir[port];
|
||||
|
||||
// send output through callback
|
||||
if (!m_output_cb[port].isnull())
|
||||
m_output_cb[port](0, dataout, m_data_dir[port]);
|
||||
else
|
||||
logerror("%s: Writing %02X to undefined output port %c\n", machine().describe_context(), dataout, 'A' + port);
|
||||
}
|
||||
else if (m_output_cb[port].isnull())
|
||||
logerror("%s: Writing %02X to input-only port %c\n", machine().describe_context(), data, 'A' + port);
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 old_data_dir = m_data_dir[port];
|
||||
m_data_dir[port] = data;
|
||||
|
||||
u8 all_port_bits = (port == 7) ? 0x0f : 0xff;
|
||||
if (data != all_port_bits)
|
||||
logerror("Port %c & %02X configured for input\n", 'A' + port, all_port_bits ^ data);
|
||||
if (data != 0)
|
||||
{
|
||||
logerror("Port %c & %02X configured for output\n", 'A' + port, data);
|
||||
|
||||
// if direction changed to output, begin output from latch
|
||||
if ((data & ~old_data_dir) != 0 && !m_output_cb[port].isnull())
|
||||
m_output_cb[port](0, m_data_latch[port], data);
|
||||
}
|
||||
}
|
||||
}
|
102
src/mame/machine/vs9209.h
Normal file
102
src/mame/machine/vs9209.h
Normal file
@ -0,0 +1,102 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:AJR
|
||||
/**********************************************************************
|
||||
|
||||
VS9209 (4L01F1429) QFP80 I/O chip
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef MAME_MACHINE_VS9209_H
|
||||
#define MAME_MACHINE_VS9209_H
|
||||
|
||||
//**************************************************************************
|
||||
// CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_VS9209_IN_PORTA_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_input_cb(*device, 0, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_IN_PORTB_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_input_cb(*device, 1, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_IN_PORTC_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_input_cb(*device, 2, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_IN_PORTD_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_input_cb(*device, 3, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_IN_PORTE_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_input_cb(*device, 4, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_IN_PORTF_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_input_cb(*device, 5, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_IN_PORTG_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_input_cb(*device, 6, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_IN_PORTH_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_input_cb(*device, 7, DEVCB_##_devcb);
|
||||
|
||||
#ifdef VS9209_PROBABLY_NONEXISTENT_OUTPUTS
|
||||
#define MCFG_VS9209_OUT_PORTA_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_output_cb(*device, 0, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_OUT_PORTB_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_output_cb(*device, 1, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_OUT_PORTC_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_output_cb(*device, 2, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_OUT_PORTD_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_output_cb(*device, 3, DEVCB_##_devcb);
|
||||
#endif
|
||||
#define MCFG_VS9209_OUT_PORTE_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_output_cb(*device, 4, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_OUT_PORTF_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_output_cb(*device, 5, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_OUT_PORTG_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_output_cb(*device, 6, DEVCB_##_devcb);
|
||||
#define MCFG_VS9209_OUT_PORTH_CB(_devcb) \
|
||||
devcb = &vs9209_device::set_output_cb(*device, 7, DEVCB_##_devcb);
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> vs9209_device
|
||||
|
||||
class vs9209_device : public device_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
vs9209_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// static configuration
|
||||
template<class Object>
|
||||
static devcb_base &set_input_cb(device_t &device, int p, Object &&obj)
|
||||
{
|
||||
assert(p >= 0 && p < 8);
|
||||
return downcast<vs9209_device &>(device).m_input_cb[p].set_callback(std::forward<Object>(obj));
|
||||
}
|
||||
template<class Object>
|
||||
static devcb_base &set_output_cb(device_t &device, int p, Object &&obj)
|
||||
{
|
||||
assert(p >= 0 && p < 8);
|
||||
return downcast<vs9209_device &>(device).m_output_cb[p].set_callback(std::forward<Object>(obj));
|
||||
}
|
||||
|
||||
// memory handlers
|
||||
DECLARE_READ8_MEMBER(read);
|
||||
DECLARE_WRITE8_MEMBER(write);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
private:
|
||||
// input/output callbacks
|
||||
devcb_read8 m_input_cb[8];
|
||||
devcb_write8 m_output_cb[8];
|
||||
|
||||
// internal state
|
||||
u8 m_data_latch[8];
|
||||
u8 m_data_dir[8];
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type VS9209;
|
||||
|
||||
#endif
|
@ -60,19 +60,25 @@ void suprslam_state::video_start()
|
||||
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(suprslam_state::get_suprslam_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64);
|
||||
m_screen_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(suprslam_state::get_suprslam_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
|
||||
|
||||
m_spr_ctrl = 0;
|
||||
m_screen_tilemap->set_transparent_pen(15);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(suprslam_state::spr_ctrl_w)
|
||||
{
|
||||
m_spr_ctrl = data;
|
||||
}
|
||||
|
||||
uint32_t suprslam_state::screen_update_suprslam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_screen_tilemap->set_scrollx(0, m_screen_vregs[0x04/2] );
|
||||
|
||||
bitmap.fill(m_palette->black_pen(), cliprect);
|
||||
m_k053936->zoom_draw(screen, bitmap, cliprect, m_bg_tilemap, 0, 0, 1);
|
||||
if(!(m_spr_ctrl[0] & 8))
|
||||
if(!(m_spr_ctrl & 8))
|
||||
m_spr->draw_sprites(m_spriteram, m_spriteram.bytes(), screen, bitmap, cliprect);
|
||||
m_screen_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
if(m_spr_ctrl[0] & 8)
|
||||
if(m_spr_ctrl & 8)
|
||||
m_spr->draw_sprites(m_spriteram, m_spriteram.bytes(), screen, bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user