diff options
author | Toad King | 2012-06-14 03:21:06 -0400 |
---|---|---|
committer | Toad King | 2012-06-14 03:21:06 -0400 |
commit | 6fb0c7a7a53e1eba7a0f5dc5b1ade312a0d76119 (patch) | |
tree | 885cf7f507139b795ba7b2a6fb829dc044da39dd /src/apuaux.cpp | |
download | snes9x2002-6fb0c7a7a53e1eba7a0f5dc5b1ade312a0d76119.tar.gz snes9x2002-6fb0c7a7a53e1eba7a0f5dc5b1ade312a0d76119.tar.bz2 snes9x2002-6fb0c7a7a53e1eba7a0f5dc5b1ade312a0d76119.zip |
initial pocketsnes commit
Diffstat (limited to 'src/apuaux.cpp')
-rw-r--r-- | src/apuaux.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/apuaux.cpp b/src/apuaux.cpp new file mode 100644 index 0000000..e10ac6e --- /dev/null +++ b/src/apuaux.cpp @@ -0,0 +1,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; +} + + +} |