Previous 199869 Revisions Next

r29435 Tuesday 8th April, 2014 at 07:36:15 UTC by Fabio Priuli
(MESS) smssdisp: implemented game selection. [Enik Land]
[src/mess/drivers]sms.c
[src/mess/includes]sms.h
[src/mess/machine]sms.c

trunk/src/mess/machine/sms.c
r29434r29435
804804      save_item(NAME(m_ctrl2_th_latch));
805805      save_item(NAME(m_ctrl1_th_state));
806806      save_item(NAME(m_ctrl2_th_state));
807      save_item(NAME(m_lphaser_x_offs));
807808   }
808809
809810   if (m_is_gamegear)
r29434r29435
871872
872873READ8_MEMBER(smssdisp_state::sms_store_cart_select_r)
873874{
874   return 0xff;
875   return m_store_cart_selection_data;
875876}
876877
877878
r29434r29435
897898   UINT8 slot = data >> 4;
898899   UINT8 slottype = data & 0x08;
899900
900   // The SMS Store Display only uses the logical cartridge slot to map
901   // the active cartridge or card slot, of its multiple ones.
901   // The SMS Store Display Unit only uses the logical cartridge slot to
902   // map the active cartridge or card slot, of its multiple ones.
902903   if (slottype == 0)
903904      m_cartslot = m_slots[slot];
904905   else
r29434r29435
907908   logerror("switching in part of %s slot #%d\n", slottype ? "card" : "cartridge", slot);
908909}
909910
910
911READ8_MEMBER(smssdisp_state::sms_store_select1)
912{
913   return 0xff;
914}
915
916
917READ8_MEMBER(smssdisp_state::sms_store_select2)
918{
919   return 0xff;
920}
921
922
923READ8_MEMBER(smssdisp_state::sms_store_control_r)
924{
925   return m_store_control;
926}
927
928
929911WRITE8_MEMBER(smssdisp_state::sms_store_control_w)
930912{
913   int led_number = data >> 4;
914   int led_column = led_number / 4;
915   int led_line = 3 - (led_number % 4);
916   int game_number = (4 * led_column) + led_line;
917
931918   logerror("0x%04X: sms_store_control write 0x%02X\n", space.device().safe_pc(), data);
919   logerror("sms_store_control: LED #%d activated for game #%d\n", led_number, game_number);
920
932921   if (data & 0x02)
933922   {
934923      m_maincpu->resume(SUSPEND_REASON_HALT);
trunk/src/mess/includes/sms.h
r29434r29435
200200
201201   DECLARE_READ8_MEMBER(sms_store_cart_select_r);
202202   DECLARE_WRITE8_MEMBER(sms_store_cart_select_w);
203   DECLARE_READ8_MEMBER(sms_store_select1);
204   DECLARE_READ8_MEMBER(sms_store_select2);
205   DECLARE_READ8_MEMBER(sms_store_control_r);
206203   DECLARE_WRITE8_MEMBER(sms_store_control_w);
207204   DECLARE_DRIVER_INIT(smssdisp);
208205
trunk/src/mess/drivers/sms.c
r29434r29435
1111
1212 - SIO interface for Game Gear (needs netplay, I guess)
1313 - Gear to Gear Port SMS Controller Adaptor
14 - SMS Store Display Unit (kiosk console)
1514 - Sega Demo Unit II (kiosk expansion device)
1615 - SMS Disk System (floppy disk drive expansion device) - unreleased
1716 - Sega Graphic Board (black version) - unreleased
r29434r29435
2032028000      - System Control Register (R/W)
204203            Reading:
205204            bit7      - ready (0 = ready, 1 = not ready)
206            bit6-bit5 - unknown
207            bit4-bit3 - timer selection bit switches
208            bit2-bit0 - unknown
205            bit6      - active timer bit switch (0 = selection 2, 1 = selection 1)
206            bit5      - unknown
207            bit4-bit3 - timer selection 2 bit switches (10s-25s)
208            bit2-bit0 - timer selection 1 bit switches (30s-135s)
209209            Writing:
210            bit7-bit4 - unknown, maybe led of selected game to set?
210            bit7-bit4 - led of selected game to set
211211            bit3      - unknown, 1 seems to be written all the time
212212            bit2      - unknown, 1 seems to be written all the time
213213            bit1      - reset signal for sms cpu, 0 = reset low, 1 = reset high
r29434r29435
259259   AM_RANGE(0x0000, 0x3fff) AM_ROM                     /* BIOS */
260260   AM_RANGE(0x4000, 0x47ff) AM_RAM                     /* RAM */
261261   AM_RANGE(0x6000, 0x7fff) AM_READ(store_cart_peek)
262   AM_RANGE(0x8000, 0x8000) AM_READWRITE(sms_store_control_r, sms_store_control_w) /* Control */
262   AM_RANGE(0x8000, 0x8000) AM_READ_PORT("DSW") AM_WRITE(sms_store_control_w) /* Control */
263263   AM_RANGE(0xc000, 0xc000) AM_READWRITE(sms_store_cart_select_r, sms_store_cart_select_w) /* cartridge/card slot selector */
264   AM_RANGE(0xd800, 0xd800) AM_READ(sms_store_select1)         /* Game selector port #1 */
265   AM_RANGE(0xdc00, 0xdc00) AM_READ(sms_store_select2)         /* Game selector port #2 */
264   AM_RANGE(0xd800, 0xd800) AM_READ_PORT("GAMESEL1")         /* Game selector port #1 */
265   AM_RANGE(0xdc00, 0xdc00) AM_READ_PORT("GAMESEL2")         /* Game selector port #2 */
266266ADDRESS_MAP_END
267267
268268// I/O ports $3E and $3F do not exist on Mark III
r29434r29435
381381   //PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Rapid Button") /* Not implemented */
382382INPUT_PORTS_END
383383
384static INPUT_PORTS_START( smssdisp )
385   PORT_INCLUDE( sms )
386
387   PORT_START("DSW")
388   PORT_DIPNAME( 0x07, 0x07, "Time Selection 1" )
389   PORT_DIPSETTING( 0x00, "135s" )
390   PORT_DIPSETTING( 0x01, "120s" )
391   PORT_DIPSETTING( 0x02, "105s" )
392   PORT_DIPSETTING( 0x03, "90s" )
393   PORT_DIPSETTING( 0x04, "75s" )
394   PORT_DIPSETTING( 0x05, "60s" )
395   PORT_DIPSETTING( 0x06, "45s" )
396   PORT_DIPSETTING( 0x07, "30s" )
397   PORT_DIPNAME( 0x18, 0x18, "Time Selection 2" )
398   PORT_DIPSETTING( 0x00, "25s" )
399   PORT_DIPSETTING( 0x08, "20s" )
400   PORT_DIPSETTING( 0x10, "15s" )
401   PORT_DIPSETTING( 0x18, "10s" )
402   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
403   PORT_DIPSETTING( 0x00, DEF_STR( On ) )
404   PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
405   PORT_DIPNAME( 0x40, 0x40, "Active Time Selection" )
406   PORT_DIPSETTING( 0x00, "2" )
407   PORT_DIPSETTING( 0x40, "1" )
408   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )   // must be high
409
410   PORT_START("GAMESEL1")
411   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 03") PORT_CODE(KEYCODE_B)
412   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 02") PORT_CODE(KEYCODE_G)
413   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 01") PORT_CODE(KEYCODE_T)
414   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 00") PORT_CODE(KEYCODE_5)
415   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 07") PORT_CODE(KEYCODE_N)
416   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 06") PORT_CODE(KEYCODE_H)
417   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 05") PORT_CODE(KEYCODE_Y)
418   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 04") PORT_CODE(KEYCODE_6)
419
420   PORT_START("GAMESEL2")
421   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 11") PORT_CODE(KEYCODE_M)
422   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 10") PORT_CODE(KEYCODE_J)
423   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 09") PORT_CODE(KEYCODE_U)
424   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 08") PORT_CODE(KEYCODE_7)
425   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 15") PORT_CODE(KEYCODE_COMMA)
426   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 14") PORT_CODE(KEYCODE_K)
427   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 13") PORT_CODE(KEYCODE_I)
428   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Game 12") PORT_CODE(KEYCODE_8)
429INPUT_PORTS_END
430
384431static INPUT_PORTS_START( gg )
385432   PORT_START("GG_PORT_DC")
386433   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY
r29434r29435
9881035CONS( 1985, sg1000m3,   sms,        0,      sg1000m3,    sg1000m3, sms_state,      sg1000m3, "Sega",     "SG-1000 Mark III",                 GAME_SUPPORTS_SAVE )
9891036CONS( 1986, sms1,       sms,        0,      sms1_ntsc,   sms1,     sms_state,      sms1,     "Sega",     "Master System I",                  GAME_SUPPORTS_SAVE )
9901037CONS( 1986, sms1pal,    sms,        0,      sms1_pal,    sms1,     sms_state,      sms1,     "Sega",     "Master System I (PAL)" ,           GAME_SUPPORTS_SAVE )
991CONS( 1986, smssdisp,   sms,        0,      sms_sdisp,   sms,      smssdisp_state, smssdisp, "Sega",     "Master System Store Display Unit", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
1038CONS( 1986, smssdisp,   sms,        0,      sms_sdisp,   smssdisp, smssdisp_state, smssdisp, "Sega",     "Master System Store Display Unit", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
9921039CONS( 1987, smsj,       sms,        0,      smsj,        smsj,     sms_state,      smsj,     "Sega",     "Master System (Japan)",            GAME_SUPPORTS_SAVE )
9931040CONS( 1990, sms,        0,          0,      sms2_ntsc,   sms,      sms_state,      sms1,     "Sega",     "Master System II",                 GAME_SUPPORTS_SAVE )
9941041CONS( 1990, smspal,     sms,        0,      sms2_pal,    sms,      sms_state,      sms1,     "Sega",     "Master System II (PAL)",           GAME_SUPPORTS_SAVE )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team