nes-fix jaleco JF 13

This commit is contained in:
zeromus 2011-09-26 01:45:50 +00:00
parent 3d1ef60a01
commit 02478925ad
3 changed files with 28 additions and 12 deletions

View File

@ -70,24 +70,24 @@ Open bus and bus conflict emulation is not considered complete or thorough in an
080 Misc (J) Nothing
082 Misc (J) Nothing
085 VRC7 Decent (no OPL sound)
086 Misc (J) Started (One game I tried didn't work but also didn't match the sha1 (but worked in FCEUX)
086 Misc (J) Decent (no sound)
087 Misc (J) Complete
088 Misc (J) Nothing
089 Sunsoft (J) Complete
090 Garbage Junk (+209)
091 Pirate Junk
092 Misc (J) Nothing (similar to 072)
093 Misc (J) Implemented but untested (easy) (hard to test, since the only test rom has been hacked to UNROM everywhere)
094 Misc (J) Complete
093 Misc (J) Minimal (Implemented but untested (easy); hard to test, since the only test rom [shanghai] has been hacked to UNROM everywhere)
094 Misc (J) Complete
095 MMC3Variant Complete
096 Misc (J) Nothing
097 Misc (J) Complete
105 NES-EVENT ~NEEDED~
107 Unlicensed Complete
112 Misc (CN) Nothing
112 Misc (CN) Nothing
113 =USELESS= Junk
115 MMC3Variant Nothing
118 TLSROM Complete
118 TLSROM Complete
119 TQROM Complete
140 Misc (J) Complete
152 Misc (J) Complete

View File

@ -14,10 +14,13 @@ namespace BizHawk.Emulation.Consoles.Nintendo
class JALECO_JF_13 : NES.NESBoardBase
{
//configuration
int prg_bank_mask_32k;
int chr_bank_mask_8k;
//state
int chr;
int prg;
int soundon;
int soundid;
public override bool Configure(NES.EDetectionOrigin origin)
{
@ -28,7 +31,12 @@ namespace BizHawk.Emulation.Consoles.Nintendo
default:
return false;
}
prg_bank_mask_32k = Cart.prg_size / 32 - 1;
chr_bank_mask_8k = Cart.chr_size / 8 - 1;
SetMirrorType(Cart.pad_h, Cart.pad_v);
return true;
}
@ -50,8 +58,18 @@ namespace BizHawk.Emulation.Consoles.Nintendo
public override void WriteWRAM(int addr, byte value)
{
prg = (value >> 4) & 3;
chr = (value & 3) + ((value >> 6) & 1);
switch (addr & 0x1000)
{
case 0x0000:
prg = (value >> 4) & 3;
prg &= prg_bank_mask_32k;
chr = (value & 3) + ((value >> 4) & 0x04);
chr &= chr_bank_mask_8k;
break;
case 0x1000:
//sound regs
break;
}
}
public override void SyncState(Serializer ser)
@ -59,8 +77,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo
base.SyncState(ser);
ser.Sync("chr", ref chr);
ser.Sync("prg", ref prg);
ser.Sync("soundon", ref soundon);
ser.Sync("soundid", ref soundid);
}
}
}

View File

@ -32,7 +32,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
base.Dispose();
prg_banks_8k.Dispose();
chr_banks_1k.Dispose();
regs.Dispose();
}
public override void SyncState(Serializer ser)