Previous 15994 Revisions Next

r5457 Tuesday 18th August, 2009 at 10:59:41 UTC by Angelo Salese
[SNES]: Corrected a bunch of SPC registers behaviour
[src/mame/audio]snes.c

src/mame/audio/snes.c
r5456r5457
12411241{
12421242   switch( offset )   /* Offset is from 0x00f0 */
12431243   {
1244      case 0x0: //FIXME: Super Bomberman PBW reads from there, is it really write-only?
1245         return 0;
12441246      case 0x1:
12451247         return 0; //Super Kick Boxing reads port 1 and wants it to be zero.
12461248      case 0x2:      /* Register address */
r5456r5457
12531255      case 0x7:      /* Port 3 */
12541256//          mame_printf_debug("SPC: rd %02x @ %d, PC=%x\n", spc_port_in[offset-4], offset-4, cpu_get_pc(space->cpu));
12551257         return spc_port_in[offset - 4];
1258      case 0x8: //normal RAM, can be read even if the ram disabled flag ($f0 bit 1) is active
1259      case 0x9:
1260         return spc_ram[0xf0 + offset];
12561261      case 0xA:      /* Timer 0 */
12571262      case 0xB:      /* Timer 1 */
12581263      case 0xC:      /* Timer 2 */
r5456r5457
12671272      }
12681273   }
12691274
1270   return 0xff;
1275   return 0;
12711276}
12721277
12731278WRITE8_HANDLER( spc_io_w )
12741279{
12751280   switch( offset )   /* Offset is from 0x00f0 */
12761281   {
1282      case 0x0:
1283         printf("Warning: write to SOUND TEST register with data %02x!\n",data);
1284         break;
12771285      case 0x1:      /* Control */
12781286         if( data & 0x1 && !timers[0].enabled )
12791287         {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team