src/mess/drivers/supracan.c
| r6906 | r6907 | |
| 344 | 344 | AM_RANGE( 0xe80200, 0xe80201 ) AM_READ( supracan_inp0_r ) |
| 345 | 345 | AM_RANGE( 0xe80204, 0xe80205 ) AM_READ( supracan_unk1_r ) |
| 346 | 346 | AM_RANGE( 0xe80300, 0xe80301 ) AM_READ( supracan_unk1_r ) |
| 347 | | AM_RANGE( 0xe88400, 0xe8efff ) AM_RAM /* sample table + sample data */ |
| 348 | | AM_RANGE( 0xe8f000, 0xe8ffff ) AM_RAM_WRITE( supracan_soundram_w ) AM_BASE( &supracan_soundram_16 ) |
| 347 | AM_RANGE( 0xe88400, 0xe8ffff ) AM_RAM_WRITE( supracan_soundram_w ) AM_BASE( &supracan_soundram_16 ) |
| 349 | 348 | AM_RANGE( 0xe90000, 0xe9001f ) AM_WRITE( supracan_sound_w ) |
| 350 | 349 | AM_RANGE( 0xe90020, 0xe9002b ) AM_WRITE( supracan_dma_w ) |
| 351 | 350 | AM_RANGE( 0xf00000, 0xf001ff ) AM_READWRITE( supracan_video_r, supracan_video_w ) |
| r6906 | r6907 | |
| 360 | 359 | |
| 361 | 360 | static ADDRESS_MAP_START( supracan_sound_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 362 | 361 | AM_RANGE( 0x0000, 0x03ff ) AM_RAM |
| 363 | | AM_RANGE( 0xf000, 0xffff ) AM_RAM AM_BASE( &supracan_soundram ) |
| 362 | AM_RANGE( 0x0411, 0x0411 ) AM_READ(soundlatch_r) |
| 363 | // AM_RANGE( 0x0420, 0x0420 ) AM_READ(status) |
| 364 | // AM_RANGE( 0x0420, 0x0420 ) AM_WRITE(data) |
| 365 | // AM_RANGE( 0x0422, 0x0422 ) AM_WRITE(address) |
| 366 | AM_RANGE( 0x8400, 0xffff ) AM_RAM AM_BASE( &supracan_soundram ) |
| 364 | 367 | ADDRESS_MAP_END |
| 365 | 368 | |
| 366 | 369 | static WRITE16_HANDLER( supracan_char_w ) |
| r6906 | r6907 | |
| 436 | 439 | { |
| 437 | 440 | switch ( offset ) |
| 438 | 441 | { |
| 439 | | case 0x001c/2: /* Sound cpu control. Bit 0 tied to sound cpu RESET line */ |
| 440 | | if ( data & 0x01 ) |
| 441 | | { |
| 442 | | if ( ! supracan_m6502_reset ) |
| 442 | case 0x000a/2: |
| 443 | soundlatch_w(space, 0, (data & 0xff00) >> 8); |
| 444 | cputag_set_input_line(space->machine, "soundcpu", 0, HOLD_LINE); |
| 445 | break; |
| 446 | case 0x001c/2: /* Sound cpu control. Bit 0 tied to sound cpu RESET line */ |
| 447 | if ( data & 0x01 ) |
| 443 | 448 | { |
| 444 | | /* Reset and enable the sound cpu */ |
| 445 | | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_HALT, CLEAR_LINE); |
| 446 | | cputag_reset( space->machine, "soundcpu" ); |
| 449 | if ( ! supracan_m6502_reset ) |
| 450 | { |
| 451 | /* Reset and enable the sound cpu */ |
| 452 | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_HALT, CLEAR_LINE); |
| 453 | cputag_reset( space->machine, "soundcpu" ); |
| 454 | } |
| 447 | 455 | } |
| 448 | | } |
| 449 | | else |
| 450 | | { |
| 451 | | /* Halt the sound cpu */ |
| 452 | | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_HALT, ASSERT_LINE); |
| 453 | | } |
| 454 | | supracan_m6502_reset = data & 0x01; |
| 455 | | break; |
| 456 | | default: |
| 457 | | logerror("supracan_sound_w: writing %04x to unknown address %08x\n", data, 0xe90000 + offset * 2 ); |
| 458 | | break; |
| 456 | else |
| 457 | { |
| 458 | /* Halt the sound cpu */ |
| 459 | cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_HALT, ASSERT_LINE); |
| 460 | } |
| 461 | supracan_m6502_reset = data & 0x01; |
| 462 | break; |
| 463 | default: |
| 464 | printf("supracan_sound_w: writing %04x to unknown address %08x\n", data, 0xe90000 + offset * 2 ); |
| 465 | break; |
| 459 | 466 | } |
| 460 | 467 | } |
| 461 | 468 | |
| r6906 | r6907 | |
| 685 | 692 | ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF ) |
| 686 | 693 | |
| 687 | 694 | ROM_REGION( 0x20000, "ram_gfx", ROMREGION_ERASEFF ) |
| 688 | | |
| 689 | | // ROM_REGION( 0x8000, "spr_gfx", ROMREGION_ERASEFF ) |
| 690 | | |
| 691 | 695 | ROM_END |
| 692 | 696 | |
| 693 | 697 | |