Previous 15994 Revisions Next

r6907 Sunday 3rd January, 2010 at 22:47:01 UTC by Angelo Salese
[ACAN]: Implemented basic sound comms
[src/mess/drivers]supracan.c

src/mess/drivers/supracan.c
r6906r6907
344344   AM_RANGE( 0xe80200, 0xe80201 ) AM_READ( supracan_inp0_r )
345345   AM_RANGE( 0xe80204, 0xe80205 ) AM_READ( supracan_unk1_r )
346346   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 )
349348   AM_RANGE( 0xe90000, 0xe9001f ) AM_WRITE( supracan_sound_w )
350349   AM_RANGE( 0xe90020, 0xe9002b ) AM_WRITE( supracan_dma_w )
351350   AM_RANGE( 0xf00000, 0xf001ff ) AM_READWRITE( supracan_video_r, supracan_video_w )
r6906r6907
360359
361360static ADDRESS_MAP_START( supracan_sound_mem, ADDRESS_SPACE_PROGRAM, 8 )
362361   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 )
364367ADDRESS_MAP_END
365368
366369static WRITE16_HANDLER( supracan_char_w )
r6906r6907
436439{
437440   switch ( offset )
438441   {
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 )
443448         {
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            }
447455         }
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;
459466   }
460467}
461468
r6906r6907
685692   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
686693
687694   ROM_REGION( 0x20000, "ram_gfx", ROMREGION_ERASEFF )
688
689//   ROM_REGION( 0x8000, "spr_gfx", ROMREGION_ERASEFF )
690
691695ROM_END
692696
693697

Previous 15994 Revisions Next


© 1998-2018 The MESS Team