add save state format and fix mirroring
This commit is contained in:
parent
6f54fc602c
commit
ca70fde4c7
|
@ -6,6 +6,17 @@
|
||||||
static uint8 reg[9], VRAM_switch;
|
static uint8 reg[9], VRAM_switch;
|
||||||
static int32 irq_enable, irq_counter, irq_latch, irq_clock;
|
static int32 irq_enable, irq_counter, irq_latch, irq_clock;
|
||||||
|
|
||||||
|
static SFORMAT StateRegs[]=
|
||||||
|
{
|
||||||
|
{ reg, sizeof(reg), "MAPPER_REGS" },
|
||||||
|
{ &VRAM_switch, sizeof(VRAM_switch), "MAPPER_VRAMSWITCH" },
|
||||||
|
{ &irq_enable, sizeof(irq_enable), "MAPPER_IRQ_ENABLE" },
|
||||||
|
{ &irq_counter, sizeof(irq_counter), "MAPPER_IRQ_COUNTER" },
|
||||||
|
{ &irq_latch, sizeof(irq_latch), "MAPPER_IRQ_LATCH" },
|
||||||
|
{ &irq_clock, sizeof(irq_clock), "MAPPER_IRQ_CLOCK" },
|
||||||
|
{ 0 }
|
||||||
|
};
|
||||||
|
|
||||||
static void Mapper253_IRQHook(int cycles)
|
static void Mapper253_IRQHook(int cycles)
|
||||||
{
|
{
|
||||||
//basically, this happens at every frame
|
//basically, this happens at every frame
|
||||||
|
@ -88,6 +99,7 @@ static DECLFW(Mapper253_Write)
|
||||||
setmirror(MI_1);
|
setmirror(MI_1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (A & 0xF00C)
|
switch (A & 0xF00C)
|
||||||
|
@ -206,5 +218,6 @@ void Mapper253_Init(CartInfo *info)
|
||||||
info->Close = Mapper253_Close;
|
info->Close = Mapper253_Close;
|
||||||
SetWriteHandler(0x8000, 0xFFFF, Mapper253_Write);
|
SetWriteHandler(0x8000, 0xFFFF, Mapper253_Write);
|
||||||
SetReadHandler(0x8000, 0xFFFF, CartBR);
|
SetReadHandler(0x8000, 0xFFFF, CartBR);
|
||||||
|
AddExState(StateRegs, ~0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue