src/mess/drivers/supracan.c
| r6920 | r6921 | |
| 38 | 38 | static int tilemap_scrollx[4],tilemap_scrolly[4]; |
| 39 | 39 | static UINT16 video_flags; |
| 40 | 40 | static UINT16 tilemap_flags[4]; |
| 41 | static UINT16 irq_mask; |
| 41 | 42 | |
| 42 | 43 | static UINT16 supracan_video_regs[256]; |
| 43 | 44 | |
| r6920 | r6921 | |
| 340 | 341 | } |
| 341 | 342 | |
| 342 | 343 | static 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 ) |
| 344 | 345 | AM_RANGE( 0xe80200, 0xe80201 ) AM_READ_PORT("P1") |
| 345 | 346 | AM_RANGE( 0xe80202, 0xe80203 ) AM_READ_PORT("P2") |
| 346 | 347 | // AM_RANGE( 0xe80204, 0xe80205 ) AM_READ( supracan_unk1_r ) //or'ed with player 2 inputs, why? |
| 347 | 348 | AM_RANGE( 0xe80208, 0xe80209 ) AM_READ_PORT("P3") |
| 348 | 349 | AM_RANGE( 0xe8020c, 0xe8020d ) AM_READ_PORT("P4") |
| 349 | 350 | 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 ) |
| 351 | 352 | AM_RANGE( 0xe90000, 0xe9001f ) AM_WRITE( supracan_sound_w ) |
| 352 | 353 | AM_RANGE( 0xe90020, 0xe9002b ) AM_WRITE( supracan_dma_w ) |
| 353 | 354 | AM_RANGE( 0xf00000, 0xf001ff ) AM_READWRITE( supracan_video_r, supracan_video_w ) |
| r6920 | r6921 | |
| 365 | 366 | // AM_RANGE( 0x0420, 0x0420 ) AM_READ(status) |
| 366 | 367 | // AM_RANGE( 0x0420, 0x0420 ) AM_WRITE(data) |
| 367 | 368 | // 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 ) |
| 369 | 370 | ADDRESS_MAP_END |
| 370 | 371 | |
| 371 | 372 | static WRITE16_HANDLER( supracan_char_w ) |
| r6920 | r6921 | |
| 689 | 690 | // ... |
| 690 | 691 | } |
| 691 | 692 | break; |
| 693 | case 0x1c/2: |
| 694 | irq_mask = data & 1; //correct? |
| 695 | break; |
| 692 | 696 | case 0x08/2: |
| 693 | 697 | video_flags = data; |
| 694 | 698 | break; |
| r6920 | r6921 | |
| 735 | 739 | UINT8 *cart = memory_region( image->machine, "cart" ); |
| 736 | 740 | int size = image_length( image ); |
| 737 | 741 | |
| 738 | | if ( size != 0x80000 ) |
| 742 | if ( size > 0x400000 ) |
| 739 | 743 | { |
| 740 | 744 | image_seterror( image, IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size" ); |
| 741 | 745 | return INIT_FAIL; |
| r6920 | r6921 | |
| 761 | 765 | { |
| 762 | 766 | cputag_set_input_line(machine, "soundcpu", INPUT_LINE_HALT, ASSERT_LINE); |
| 763 | 767 | timer_adjust_oneshot( supracan_video_timer, video_screen_get_time_until_pos( machine->primary_screen, 0, 0 ), 0 ); |
| 768 | irq_mask = 0; |
| 764 | 769 | } |
| 765 | 770 | |
| 766 | 771 | static const gfx_layout supracan_gfxlayout = |
| r6920 | r6921 | |
| 790 | 795 | GFXDECODE_ENTRY( "ram_gfx", 0, supracan_sprlayout, 0, 0x10 ) |
| 791 | 796 | GFXDECODE_END |
| 792 | 797 | |
| 798 | static INTERRUPT_GEN( supracan_irq ) |
| 799 | { |
| 800 | if(irq_mask) |
| 801 | cpu_set_input_line(device, 7, HOLD_LINE); |
| 802 | } |
| 803 | |
| 793 | 804 | static MACHINE_DRIVER_START( supracan ) |
| 794 | 805 | MDRV_CPU_ADD( "maincpu", M68000, XTAL_10_738635MHz ) /* Correct frequency unknown */ |
| 795 | 806 | MDRV_CPU_PROGRAM_MAP( supracan_mem ) |
| 796 | | MDRV_CPU_VBLANK_INT("screen", irq7_line_hold) |
| 807 | MDRV_CPU_VBLANK_INT("screen", supracan_irq) |
| 797 | 808 | |
| 798 | 809 | MDRV_CPU_ADD( "soundcpu", M6502, XTAL_3_579545MHz ) /* TODO: Verfiy actual clock */ |
| 799 | 810 | MDRV_CPU_PROGRAM_MAP( supracan_sound_mem ) |
| r6920 | r6921 | |
| 820 | 831 | |
| 821 | 832 | |
| 822 | 833 | ROM_START( supracan ) |
| 823 | | ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF ) |
| 834 | ROM_REGION( 0x400000, "cart", ROMREGION_ERASEFF ) |
| 824 | 835 | |
| 825 | 836 | ROM_REGION( 0x20000, "ram_gfx", ROMREGION_ERASEFF ) |
| 826 | 837 | ROM_END |
| 827 | 838 | |
| 828 | 839 | |
| 829 | 840 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 830 | | CONS( 1995, supracan, 0, 0, supracan, supracan, 0, "Funtech Entertainment", "Super A'Can", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 841 | CONS( 1995, supracan, 0, 0, supracan, supracan, 0, "Funtech Entertainment", "Super A'Can", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) |
| 831 | 842 | |
| 832 | 843 | |