summaryrefslogtreecommitdiff
path: root/src/apuaux.c
blob: 1af75f11b07eea9020c1715c5acd2bd13185c39f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "snes9x.h"
#include "spc700.h"
#include "apu.h"

void S9xAPUSetByteFFtoF0(uint8 val, uint32 Address)
{
   if (Address >= 0xf4 && Address <= 0xf7)
      APU.OutPorts [Address - 0xf4] = val;
   else if (Address < 0xfd)
   {
      IAPU.RAM [Address] = val;
      if (Address >= 0xfa)
      {
         if (val == 0)
            APU.TimerTarget [Address - 0xfa] = 0x100;
         else
            APU.TimerTarget [Address - 0xfa] = val;
      }
   }
}

void S9xAPUSetByteFFC0(uint8 val, uint32 Address)
{
   APU.ExtraRAM [Address - 0xffc0] = val;
   if (!APU.ShowROM) IAPU.RAM [Address] = val;
}