Allow FDS conversion mappers to use FDS APU

This commit is contained in:
negativeExponent
2020-03-05 23:54:34 +08:00
parent 80b002a04e
commit 722154b93f
22 changed files with 381 additions and 288 deletions

View File

@@ -23,6 +23,7 @@
*/
#include "mapinc.h"
#include "../fds_apu.h"
static uint32 mapperNum;
static uint8 preg[4];
@@ -140,6 +141,7 @@ static DECLFW(M359WriteEx) {
}
static void M359Power(void) {
FDSSoundPower();
Sync();
SetReadHandler(0x6000, 0xFFFF, CartBR);
SetWriteHandler(0x8000, 0x8FFF, M359WritePRG);
@@ -148,6 +150,11 @@ static void M359Power(void) {
SetWriteHandler(0xC000, 0xCFFF, M359WriteIRQ);
}
static void M359Reset(void) {
FDSSoundReset();
Sync();
}
static void FP_FASTAPASS(1) M359CPUHook(int a) {
if (!irqPA12) {
if (IRQa && IRQCount16) {
@@ -177,6 +184,7 @@ static void StateRestore(int version) {
void Mapper359_Init(CartInfo* info) {
mapperNum = 359;
info->Power = M359Power;
info->Reset = M359Reset;
MapIRQHook = M359CPUHook;
GameHBIRQHook = M359IRQHook;
GameStateRestore = StateRestore;