mirror of
https://github.com/holub/mame
synced 2025-05-31 18:11:50 +03:00
(MESS) smssdisp: minor cleanup and mapping conflict avoidance + added
support for 3D glasses since the PCB had the necessary connector. From Enik Land. nw.
This commit is contained in:
parent
a59dbb22f5
commit
fd6507c8f8
@ -371,18 +371,18 @@ static INPUT_PORTS_START( sms1 )
|
||||
PORT_INCLUDE( sg1000m3 )
|
||||
|
||||
PORT_START("RESET")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Reset Button")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset Button")
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( smsj )
|
||||
PORT_INCLUDE( sg1000m3 )
|
||||
|
||||
//PORT_START("RAPID")
|
||||
//PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Rapid Button") /* Not implemented */
|
||||
//PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Rapid Button") /* Not implemented */
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( smssdisp )
|
||||
PORT_INCLUDE( sms )
|
||||
PORT_INCLUDE( sms1 )
|
||||
|
||||
PORT_START("DSW")
|
||||
PORT_DIPNAME( 0x07, 0x07, "Timer 1 length" )
|
||||
@ -408,24 +408,24 @@ static INPUT_PORTS_START( smssdisp )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // READY, must be high
|
||||
|
||||
PORT_START("GAMESEL1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 03") PORT_CODE(KEYCODE_B)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 02") PORT_CODE(KEYCODE_G)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 01") PORT_CODE(KEYCODE_T)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 00") PORT_CODE(KEYCODE_5)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 07") PORT_CODE(KEYCODE_N)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 06") PORT_CODE(KEYCODE_H)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 05") PORT_CODE(KEYCODE_Y)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 04") PORT_CODE(KEYCODE_6)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 03") PORT_CODE(KEYCODE_N)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 02") PORT_CODE(KEYCODE_H)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 01") PORT_CODE(KEYCODE_Y)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 00") PORT_CODE(KEYCODE_6)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 07") PORT_CODE(KEYCODE_M)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 06") PORT_CODE(KEYCODE_J)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 05") PORT_CODE(KEYCODE_U)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 04") PORT_CODE(KEYCODE_7)
|
||||
|
||||
PORT_START("GAMESEL2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 11") PORT_CODE(KEYCODE_M)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 10") PORT_CODE(KEYCODE_J)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 09") PORT_CODE(KEYCODE_U)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 08") PORT_CODE(KEYCODE_7)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 15") PORT_CODE(KEYCODE_COMMA)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 14") PORT_CODE(KEYCODE_K)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 13") PORT_CODE(KEYCODE_I)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 12") PORT_CODE(KEYCODE_8)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 11") PORT_CODE(KEYCODE_COMMA)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 10") PORT_CODE(KEYCODE_K)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 09") PORT_CODE(KEYCODE_I)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 08") PORT_CODE(KEYCODE_8)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 15") PORT_CODE(KEYCODE_STOP)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 14") PORT_CODE(KEYCODE_L)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 13") PORT_CODE(KEYCODE_O)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 12") PORT_CODE(KEYCODE_9)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( gg )
|
||||
@ -606,42 +606,19 @@ static MACHINE_CONFIG_DERIVED( sms1_ntsc, sms_ntsc_base )
|
||||
MCFG_SMS_EXPANSION_ADD("exp", sms_expansion_devices, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( sms_sdisp, smssdisp_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_53_693175MHz/15)
|
||||
MCFG_CPU_PROGRAM_MAP(sms_mem)
|
||||
MCFG_CPU_IO_MAP(sms_io)
|
||||
static MACHINE_CONFIG_DERIVED_CLASS( sms_sdisp, sms1_ntsc, smssdisp_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(60))
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(sms_state,sms)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(sms_state,sms)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("segapsg", SEGAPSG, XTAL_53_693175MHz/15)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS(XTAL_53_693175MHz/10, \
|
||||
SEGA315_5124_WIDTH , SEGA315_5124_LBORDER_START + SEGA315_5124_LBORDER_WIDTH - 2, SEGA315_5124_LBORDER_START + SEGA315_5124_LBORDER_WIDTH + 256 + 10, \
|
||||
SEGA315_5124_HEIGHT_NTSC, SEGA315_5124_TBORDER_START + SEGA315_5124_NTSC_224_TBORDER_HEIGHT, SEGA315_5124_TBORDER_START + SEGA315_5124_NTSC_224_TBORDER_HEIGHT + 224)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(sms_state, screen_update_sms)
|
||||
|
||||
MCFG_DEVICE_ADD("sms_vdp", SEGA315_5246, 0)
|
||||
MCFG_SEGA315_5246_SET_SCREEN("screen")
|
||||
MCFG_SEGA315_5246_IS_PAL(false)
|
||||
MCFG_SEGA315_5246_INT_CB(WRITELINE(smssdisp_state, sms_store_int_callback))
|
||||
MCFG_SEGA315_5246_PAUSE_CB(WRITELINE(sms_state, sms_pause_callback))
|
||||
MCFG_DEVICE_MODIFY("sms_vdp")
|
||||
MCFG_SEGA315_5124_INT_CB(WRITELINE(smssdisp_state, sms_store_int_callback))
|
||||
|
||||
MCFG_CPU_ADD("control", Z80, XTAL_53_693175MHz/15)
|
||||
MCFG_CPU_PROGRAM_MAP(sms_store_mem)
|
||||
/* Both CPUs seem to communicate with the VDP etc? */
|
||||
MCFG_CPU_IO_MAP(sms_io)
|
||||
|
||||
MCFG_SMS_CARTRIDGE_ADD("slot", sms_cart, NULL) // should be mandatory?
|
||||
MCFG_DEVICE_REMOVE("mycard")
|
||||
MCFG_DEVICE_REMOVE("exp")
|
||||
|
||||
MCFG_SMS_CARTRIDGE_ADD("slot2", sms_cart, NULL)
|
||||
MCFG_SMS_CARTRIDGE_ADD("slot3", sms_cart, NULL)
|
||||
MCFG_SMS_CARTRIDGE_ADD("slot4", sms_cart, NULL)
|
||||
@ -674,16 +651,6 @@ static MACHINE_CONFIG_START( sms_sdisp, smssdisp_state )
|
||||
MCFG_SMS_CARD_ADD("slot30", sms_cart, NULL)
|
||||
MCFG_SMS_CARD_ADD("slot31", sms_cart, NULL)
|
||||
MCFG_SMS_CARD_ADD("slot32", sms_cart, NULL)
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list","sms")
|
||||
|
||||
MCFG_SMS_CONTROL_PORT_ADD(CONTROL1_TAG, sms_control_port_devices, "joypad")
|
||||
MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(WRITELINE(sms_state, sms_ctrl1_th_input))
|
||||
MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(READ32(sms_state, sms_pixel_color))
|
||||
|
||||
MCFG_SMS_CONTROL_PORT_ADD(CONTROL2_TAG, sms_control_port_devices, "joypad")
|
||||
MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(WRITELINE(sms_state, sms_ctrl2_th_input))
|
||||
MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(READ32(sms_state, sms_pixel_color))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( sms_pal_base, sms_state )
|
||||
|
@ -912,8 +912,8 @@ WRITE8_MEMBER(smssdisp_state::sms_store_control_w)
|
||||
{
|
||||
int led_number = data >> 4;
|
||||
int led_column = led_number / 4;
|
||||
int led_line = 3 - (led_number % 4);
|
||||
int game_number = (4 * led_column) + led_line;
|
||||
int led_line = led_number % 4;
|
||||
int game_number = (4 * led_column) + (3 - led_line);
|
||||
|
||||
logerror("0x%04X: sms_store_control write 0x%02X\n", space.device().safe_pc(), data);
|
||||
logerror("sms_store_control: LED #%d activated for game #%d\n", led_number, game_number);
|
||||
|
Loading…
Reference in New Issue
Block a user