Implement Sunsoft1 (mapper 184)
This commit is contained in:
parent
e4543720d1
commit
d952e21463
|
@ -25,6 +25,8 @@ Other chips used: Sunsoft-1
|
||||||
class Sunsoft1 : NES.NESBoardBase
|
class Sunsoft1 : NES.NESBoardBase
|
||||||
{
|
{
|
||||||
int prg, chr;
|
int prg, chr;
|
||||||
|
int left_piece = 0;
|
||||||
|
int right_piece = 3;
|
||||||
|
|
||||||
public override bool Configure(NES.EDetectionOrigin origin)
|
public override bool Configure(NES.EDetectionOrigin origin)
|
||||||
{
|
{
|
||||||
|
@ -43,8 +45,8 @@ Other chips used: Sunsoft-1
|
||||||
|
|
||||||
public override byte ReadPPU(int addr)
|
public override byte ReadPPU(int addr)
|
||||||
{
|
{
|
||||||
int left_piece = 0;
|
left_piece &= 3;
|
||||||
int right_piece = 3;
|
right_piece &= 3;
|
||||||
|
|
||||||
if (addr < 0x1000)
|
if (addr < 0x1000)
|
||||||
{
|
{
|
||||||
|
@ -57,6 +59,13 @@ Other chips used: Sunsoft-1
|
||||||
|
|
||||||
return base.ReadPPU(addr);
|
return base.ReadPPU(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void WriteWRAM(int addr, byte value)
|
||||||
|
{
|
||||||
|
left_piece = value & 7;
|
||||||
|
right_piece = (value & 127) / 16;
|
||||||
|
Debug.Assert(left_piece < 8);
|
||||||
|
Debug.Assert(right_piece < 8);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue