Previous 15994 Revisions Next

r4481 Saturday 11th April, 2009 at 14:47:15 UTC by Fabio Priuli
[GAMEGEAR] Removed bogus controller selection
[src/mess/drivers]sms.c
[src/mess/machine]sms.c

src/mess/machine/sms.c
r4480r4481
103103   switch( offset )
104104   {
105105   case 0:
106      switch( input_port_read(space->machine, "CTRLSEL") & 0x0F )
106      switch( input_port_read_safe(space->machine, "CTRLSEL", 0x00) & 0x0F )
107107      {
108108      case 0x03:   /* Sports Pad */
109109         if ( data != sports_pad_last_data_1 )
r4480r4481
125125      break;
126126
127127   case 1:
128      switch( input_port_read(space->machine, "CTRLSEL") >> 4 )
128      switch( input_port_read_safe(space->machine, "CTRLSEL", 0x00) >> 4 )
129129      {
130130      case 0x03:   /* Sports Pad */
131131         if ( data != sports_pad_last_data_2 )
r4480r4481
163163   }
164164
165165   /* Player 1 */
166   switch( input_port_read(machine, "CTRLSEL") & 0x0F )
166   switch( input_port_read_safe(machine, "CTRLSEL", 0x00) & 0x0F )
167167   {
168168   case 0x00:  /* Joystick */
169169      data = input_port_read(machine, "PORT_DC");
r4480r4481
215215   }
216216
217217   /* Player 2 */
218   switch( input_port_read(machine, "CTRLSEL") >> 4 )
218   switch( input_port_read_safe(machine, "CTRLSEL", 0x00) >> 4 )
219219   {
220220   case 0x00:   /* Joystick */
221221      data = input_port_read(machine, "PORT_DC");
src/mess/drivers/sms.c
r4480r4481
244244   PORT_START("START")
245245   PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
246246   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("Start") /* Game Gear START */
247
248   PORT_START("CTRLSEL")   /* Controller selection */
249   PORT_CATEGORY_CLASS( 0x0F, 0x00, "Player 1 Controller" )
250   PORT_CATEGORY_ITEM( 0x00, DEF_STR( Joystick ), 10 )
251//  PORT_CATEGORY_ITEM( 0x01, "Light Phaser", 11 )
252   PORT_CATEGORY_ITEM( 0x02, "Sega Paddle Control", 12 )
253   PORT_CATEGORY_ITEM( 0x03, "Sega Sports Pad", 13 )
254   PORT_CATEGORY_CLASS( 0xF0, 0x00, "Player 2 Controller" )
255   PORT_CATEGORY_ITEM( 0x00, DEF_STR( Joystick ), 20 )
256//  PORT_CATEGORY_ITEM( 0x10, "Light Phaser", 21 )
257   PORT_CATEGORY_ITEM( 0x20, "Sega Paddle Control", 22 )
258   PORT_CATEGORY_ITEM( 0x30, "Sega Sports Pad", 23 )
259247INPUT_PORTS_END
260248
261static PALETTE_INIT( sms ) {
249static PALETTE_INIT( sms )
250{
262251   int i;
263   for( i = 0; i < 64; i++ ) {
252   for( i = 0; i < 64; i++ )
253   {
264254      int r = i & 0x03;
265255      int g = ( i & 0x0C ) >> 2;
266256      int b = ( i & 0x30 ) >> 4;
r4480r4481
285275   palette_set_color_rgb(machine, 64+15, 255, 255, 255 );
286276}
287277
288static PALETTE_INIT( gamegear ) {
278static PALETTE_INIT( gamegear )
279{
289280   int i;
290   for( i = 0; i < 4096; i++ ) {
281   for( i = 0; i < 4096; i++ )
282   {
291283      int r = i & 0x000F;
292284      int g = ( i & 0x00F0 ) >> 4;
293285      int b = ( i & 0x0F00 ) >> 8;
r4480r4481
300292static const smsvdp_configuration config_315_5378 = { MODEL_315_5378, sms_int_callback };
301293static const smsvdp_configuration config_store = { MODEL_315_5124, sms_store_int_callback };
302294
303static VIDEO_START(sega_315_5124) {
295static VIDEO_START(sega_315_5124)
296{
304297   smsvdp_video_init( machine, &config_315_5124 );
305298}
306299
307static VIDEO_START(sega_315_5246) {
300static VIDEO_START(sega_315_5246)
301{
308302   smsvdp_video_init( machine, &config_315_5246 );
309303}
310304
311static VIDEO_START(sega_315_5378) {
305static VIDEO_START(sega_315_5378)
306{
312307   smsvdp_video_init( machine, &config_315_5378 );
313308}
314309
315static VIDEO_START(sega_store_315_5124) {
310static VIDEO_START(sega_store_315_5124)
311{
316312   smsvdp_video_init( machine, &config_store );
317313}
318314
r4480r4481
619615***************************************************************************/
620616
621617/*    YEAR  NAME        PARENT      COMPAT  MACHINE     INPUT   INIT    CONFIG      COMPANY     FULLNAME                            FLAGS */
622CONS( 1984, sg1000m3,   sms,        0,      sg1000m3,   sms,    sg1000m3, 0,        "Sega",     "SG-1000 Mark III",                 0 )
618CONS( 1984, sg1000m3,   sms,        0,      sg1000m3,   sms,    sg1000m3, 0,        "Sega",     "SG-1000 Mark III",                 0 )
623619CONS( 1986, sms1,       sms,        0,      sms1ntsc,   sms,    sms1,     0,        "Sega",     "Master System I",                  0 )
624620CONS( 1986, sms1pal,    sms,        0,      sms1pal,    sms,    sms1,     0,        "Sega",     "Master System I (PAL)" ,           0 )
625CONS( 1986, smssdisp,   sms,        0,      smssdisp,   sms,    smssdisp, 0,     "Sega",     "Master System Store Display Unit", GAME_NOT_WORKING )
621CONS( 1986, smssdisp,   sms,        0,      smssdisp,   sms,    smssdisp, 0,        "Sega",     "Master System Store Display Unit", GAME_NOT_WORKING )
626622CONS( 1987, smsj,       sms,        0,      smsfm,      sms,    smsj,     0,        "Sega",     "Master System (Japan)",            0 )
627623CONS( 1990, sms,        0,          0,      sms2ntsc,   sms,    sms1,     0,        "Sega",     "Master System II",                 0 )
628624CONS( 1990, smspal,     sms,        0,      sms2pal,    sms,    sms1,     0,        "Sega",     "Master System II (PAL)",           0 )
629625CONS( 1990, sms2kr,     sms,        0,      sms2fm,     sms,    sms2kr,   0,        "Samsung",  "Gam*Boy II (Korea)",               0 )
630626
631CONS( 1990, gamegear,   0,          sms,    gamegear,   gg,     gamegear, 0,       "Sega",     "Game Gear (Europe/America)",       0 )
632CONS( 1990, gamegeaj,   gamegear,   0,      gamegear,   gg,     gamegeaj, 0,        "Sega",     "Game Gear (Japan)",                0 )
627CONS( 1990, gamegear,   0,          sms,    gamegear,   gg,     gamegear, 0,        "Sega",     "Game Gear (Europe/America)",       0 )
628CONS( 1990, gamegeaj,   gamegear,   0,      gamegear,   gg,     gamegeaj, 0,        "Sega",     "Game Gear (Japan)",                0 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team