Previous 15994 Revisions Next

r6921 Monday 4th January, 2010 at 21:52:51 UTC by Angelo Salese
[ACAN]: Mods to support the two new sets, demoted the system as GNW since it has logic quirks
[src/mess/drivers]supracan.c

src/mess/drivers/supracan.c
r6920r6921
3838static int tilemap_scrollx[4],tilemap_scrolly[4];
3939static UINT16 video_flags;
4040static UINT16 tilemap_flags[4];
41static UINT16 irq_mask;
4142
4243static UINT16 supracan_video_regs[256];
4344
r6920r6921
340341}
341342
342343static ADDRESS_MAP_START( supracan_mem, ADDRESS_SPACE_PROGRAM, 16 )
343   AM_RANGE( 0x000000, 0x07ffff ) AM_ROM AM_REGION( "cart", 0 )
344   AM_RANGE( 0x000000, 0x3fffff ) AM_ROM AM_REGION( "cart", 0 )
344345   AM_RANGE( 0xe80200, 0xe80201 ) AM_READ_PORT("P1")
345346   AM_RANGE( 0xe80202, 0xe80203 ) AM_READ_PORT("P2")
346347//   AM_RANGE( 0xe80204, 0xe80205 ) AM_READ( supracan_unk1_r ) //or'ed with player 2 inputs, why?
347348   AM_RANGE( 0xe80208, 0xe80209 ) AM_READ_PORT("P3")
348349   AM_RANGE( 0xe8020c, 0xe8020d ) AM_READ_PORT("P4")
349350   AM_RANGE( 0xe80300, 0xe80301 ) AM_READ( supracan_unk1_r )
350   AM_RANGE( 0xe88400, 0xe8ffff ) AM_RAM_WRITE( supracan_soundram_w ) AM_BASE( &supracan_soundram_16 )
351   AM_RANGE( 0xe81000, 0xe8ffff ) AM_RAM_WRITE( supracan_soundram_w ) AM_BASE( &supracan_soundram_16 )
351352   AM_RANGE( 0xe90000, 0xe9001f ) AM_WRITE( supracan_sound_w )
352353   AM_RANGE( 0xe90020, 0xe9002b ) AM_WRITE( supracan_dma_w )
353354   AM_RANGE( 0xf00000, 0xf001ff ) AM_READWRITE( supracan_video_r, supracan_video_w )
r6920r6921
365366//   AM_RANGE( 0x0420, 0x0420 ) AM_READ(status)
366367//   AM_RANGE( 0x0420, 0x0420 ) AM_WRITE(data)
367368//   AM_RANGE( 0x0422, 0x0422 ) AM_WRITE(address)
368   AM_RANGE( 0x8400, 0xffff ) AM_RAM AM_BASE( &supracan_soundram )
369   AM_RANGE( 0x1000, 0xffff ) AM_RAM AM_BASE( &supracan_soundram )
369370ADDRESS_MAP_END
370371
371372static WRITE16_HANDLER( supracan_char_w )
r6920r6921
689690            // ...
690691         }
691692         break;
693      case 0x1c/2:
694         irq_mask = data & 1; //correct?
695         break;
692696      case 0x08/2:
693697         video_flags = data;
694698         break;
r6920r6921
735739   UINT8 *cart = memory_region( image->machine, "cart" );
736740   int size = image_length( image );
737741
738   if ( size != 0x80000 )
742   if ( size > 0x400000 )
739743   {
740744      image_seterror( image, IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size" );
741745      return INIT_FAIL;
r6920r6921
761765{
762766   cputag_set_input_line(machine, "soundcpu", INPUT_LINE_HALT, ASSERT_LINE);
763767   timer_adjust_oneshot( supracan_video_timer, video_screen_get_time_until_pos( machine->primary_screen, 0, 0 ), 0 );
768   irq_mask = 0;
764769}
765770
766771static const gfx_layout supracan_gfxlayout =
r6920r6921
790795   GFXDECODE_ENTRY( "ram_gfx",  0, supracan_sprlayout,   0, 0x10 )
791796GFXDECODE_END
792797
798static INTERRUPT_GEN( supracan_irq )
799{
800   if(irq_mask)
801      cpu_set_input_line(device, 7, HOLD_LINE);
802}
803
793804static MACHINE_DRIVER_START( supracan )
794805   MDRV_CPU_ADD( "maincpu", M68000, XTAL_10_738635MHz )      /* Correct frequency unknown */
795806   MDRV_CPU_PROGRAM_MAP( supracan_mem )
796   MDRV_CPU_VBLANK_INT("screen", irq7_line_hold)
807   MDRV_CPU_VBLANK_INT("screen", supracan_irq)
797808
798809   MDRV_CPU_ADD( "soundcpu", M6502, XTAL_3_579545MHz )      /* TODO: Verfiy actual clock */
799810   MDRV_CPU_PROGRAM_MAP( supracan_sound_mem )
r6920r6921
820831
821832
822833ROM_START( supracan )
823   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
834   ROM_REGION( 0x400000, "cart", ROMREGION_ERASEFF )
824835
825836   ROM_REGION( 0x20000, "ram_gfx", ROMREGION_ERASEFF )
826837ROM_END
827838
828839
829840/*    YEAR  NAME        PARENT  COMPAT  MACHINE     INPUT     INIT    COMPANY                  FULLNAME        FLAGS */
830CONS( 1995, supracan,   0,      0,      supracan,   supracan, 0,      "Funtech Entertainment", "Super A'Can",  GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS )
841CONS( 1995, supracan,   0,      0,      supracan,   supracan, 0,      "Funtech Entertainment", "Super A'Can",  GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
831842
832843

Previous 15994 Revisions Next


© 1998-2018 The MESS Team