nes: mapper 218: minor code cleanup ( no changes )

This commit is contained in:
goyuken 2014-02-03 15:03:34 +00:00
parent 28521af0b4
commit a21c1a144c
1 changed files with 4 additions and 12 deletions

View File

@ -7,7 +7,7 @@
//configuration //configuration
int prg_byte_mask; int prg_byte_mask;
int chr_addr_mask; int chr_addr_mask;
public override bool Configure(NES.EDetectionOrigin origin) public override bool Configure(NES.EDetectionOrigin origin)
{ {
switch (Cart.board_type) switch (Cart.board_type)
@ -49,7 +49,7 @@
// we need an ines identification for correct mirroring // we need an ines identification for correct mirroring
return false; return false;
} }
prg_byte_mask = (Cart.prg_size*1024) - 1; prg_byte_mask = (Cart.prg_size * 1024) - 1;
return true; return true;
} }
@ -64,20 +64,12 @@
public override byte ReadPPU(int addr) public override byte ReadPPU(int addr)
{ {
if (addr < 0x3f00) return NES.CIRAM[TransformPPU(addr)];
return NES.CIRAM[TransformPPU(addr)];
else
// palettes only
return base.ReadPPU(addr);
} }
public override void WritePPU(int addr, byte value) public override void WritePPU(int addr, byte value)
{ {
if (addr < 0x3f00) NES.CIRAM[TransformPPU(addr)] = value;
NES.CIRAM[TransformPPU(addr)] = value;
else
// palettes only
base.WritePPU(addr, value);
} }
public override byte ReadPRG(int addr) public override byte ReadPRG(int addr)