summaryrefslogtreecommitdiff
path: root/src/apuaux.c
blob: 9705dd67263d3fecef23d2c376ba60702980d5cb (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
#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;
}