summaryrefslogtreecommitdiff
path: root/src/apuaux.cpp
blob: e10ac6e789d54d05f5d6a19a7e061c2b4eab6c1c (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
28
29
30
31
32
#include "snes9x.h"
#include "spc700.h"
#include "apu.h"

extern "C" {

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;
}


}