Add mapper 273.

This commit is contained in:
NewRisingSun
2025-09-11 00:55:05 +02:00
parent f1576fd15a
commit eb35ef36df
4 changed files with 88 additions and 5 deletions

View File

@@ -24,13 +24,11 @@
static uint8 irqEnabled;
static uint8 irqCounter;
static uint8 irqPrescaler;
static uint8 irqMask;
static SFORMAT stateRegs[] ={
{ &irqEnabled, 1, "IRQE" },
{ &irqCounter, 1, "CNTL" },
{ &irqCounter, 1, "CNTR" },
{ &irqPrescaler, 1, "IRQP" },
{ &irqMask, 1, "IRQC" },
{ 0 }
};
@@ -53,7 +51,7 @@ static DECLFW(writeIRQ) {
}
}
void FP_FASTAPASS(1) cpuCycle (int a) {
static void FP_FASTAPASS(1) cpuCycle (int a) {
while (a--) {
if (irqEnabled &1) {
irqPrescaler++;
@@ -67,7 +65,7 @@ void FP_FASTAPASS(1) cpuCycle (int a) {
}
static void power(void) {
irqEnabled = irqCounter = irqPrescaler = irqMask = 0;
irqEnabled = irqCounter = irqPrescaler = 0;
VRC24_power();
SetWriteHandler(0xF000, 0xFFFF, writeIRQ);
}