PCE: added settings to show/hide BG/OBJ for TurboGrafx (not for SuperGrafx)
Now setrenderplanes() works for TurboGrafx (not for SuperGrafx)
This commit is contained in:
parent
beb0b5a74d
commit
30b0dc6780
|
@ -84,7 +84,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
Controller = NullController.GetNullController();
|
||||
Cpu = new HuC6280();
|
||||
VCE = new VCE();
|
||||
VDC1 = new VDC(Cpu, VCE);
|
||||
VDC1 = new VDC(this, Cpu, VCE);
|
||||
PSG = new HuC6280PSG();
|
||||
SCSI = new ScsiCDBus(this, disc);
|
||||
|
||||
|
@ -100,7 +100,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
|
||||
else if (SuperGrafx)
|
||||
{
|
||||
VDC2 = new VDC(Cpu, VCE);
|
||||
VDC2 = new VDC(this, Cpu, VCE);
|
||||
VPC = new VPC(VDC1, VDC2, VCE, Cpu);
|
||||
Ram = new byte[0x8000];
|
||||
Cpu.ReadMemory21 = ReadMemorySGX;
|
||||
|
|
|
@ -108,11 +108,11 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
if (ActiveLine >= FrameHeight)
|
||||
return;
|
||||
|
||||
RenderBackgroundScanline();
|
||||
RenderSpritesScanline();
|
||||
RenderBackgroundScanline(pce.CoreInputComm.PCE_ShowBG);
|
||||
RenderSpritesScanline(pce.CoreInputComm.PCE_ShowOBJ);
|
||||
}
|
||||
|
||||
void RenderBackgroundScanline()
|
||||
void RenderBackgroundScanline(bool show)
|
||||
{
|
||||
Array.Clear(PriorityBuffer, 0, FrameWidth);
|
||||
|
||||
|
@ -146,7 +146,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
FrameBuffer[(ActiveLine * FramePitch) + x] = vce.Palette[0];
|
||||
else
|
||||
{
|
||||
FrameBuffer[(ActiveLine * FramePitch) + x] = vce.Palette[paletteBase + c];
|
||||
FrameBuffer[(ActiveLine * FramePitch) + x] = show ? vce.Palette[paletteBase + c] : vce.Palette[0];
|
||||
PriorityBuffer[x] = 1;
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
|
||||
byte[] heightTable = { 16, 32, 64, 64 };
|
||||
|
||||
public void RenderSpritesScanline()
|
||||
public void RenderSpritesScanline(bool show)
|
||||
{
|
||||
if (SpritesEnabled == false)
|
||||
return;
|
||||
|
@ -274,7 +274,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
if (pixel != 0 && InterSpritePriorityBuffer[xs] == 0)
|
||||
{
|
||||
InterSpritePriorityBuffer[xs] = 1;
|
||||
if (priority || PriorityBuffer[xs] == 0)
|
||||
if ((priority || PriorityBuffer[xs] == 0) && show)
|
||||
FrameBuffer[(ActiveLine * FramePitch) + xs] = vce.Palette[paletteBase + pixel];
|
||||
}
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
if (pixel != 0 && InterSpritePriorityBuffer[xs] == 0)
|
||||
{
|
||||
InterSpritePriorityBuffer[xs] = 1;
|
||||
if (priority || PriorityBuffer[xs] == 0)
|
||||
if ((priority || PriorityBuffer[xs] == 0) && show)
|
||||
FrameBuffer[(ActiveLine * FramePitch) + xs] = vce.Palette[paletteBase + pixel];
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
if (pixel != 0 && InterSpritePriorityBuffer[xs] == 0)
|
||||
{
|
||||
InterSpritePriorityBuffer[xs] = 1;
|
||||
if (priority || PriorityBuffer[xs] == 0)
|
||||
if ((priority || PriorityBuffer[xs] == 0) && show)
|
||||
FrameBuffer[(ActiveLine * FramePitch) + xs] = vce.Palette[paletteBase + pixel];
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
if (pixel != 0 && InterSpritePriorityBuffer[xs] == 0)
|
||||
{
|
||||
InterSpritePriorityBuffer[xs] = 1;
|
||||
if (priority || PriorityBuffer[xs] == 0)
|
||||
if ((priority || PriorityBuffer[xs] == 0) && show)
|
||||
FrameBuffer[(ActiveLine * FramePitch) + xs] = vce.Palette[paletteBase + pixel];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,14 +84,16 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
public const byte StatusSprite0Collision = 0x01;
|
||||
|
||||
const int VramSize = 0x8000;
|
||||
|
||||
|
||||
PCEngine pce;
|
||||
HuC6280 cpu;
|
||||
VCE vce;
|
||||
|
||||
public int MultiResHack = 0;
|
||||
|
||||
public VDC(HuC6280 cpu, VCE vce)
|
||||
public VDC(PCEngine pce, HuC6280 cpu, VCE vce)
|
||||
{
|
||||
this.pce = pce;
|
||||
this.cpu = cpu;
|
||||
this.vce = vce;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
public int NES_BackdropColor;
|
||||
public bool NES_UnlimitedSprites;
|
||||
public bool NES_ShowBG, NES_ShowOBJ;
|
||||
public bool PCE_ShowBG, PCE_ShowOBJ;
|
||||
}
|
||||
|
||||
public class CoreOutputComm
|
||||
|
@ -13,4 +14,4 @@
|
|||
public string RomStatusAnnotation;
|
||||
public string RomStatusDetails;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -296,6 +296,9 @@
|
|||
public int NESTopLine = 8;
|
||||
public int NESBottomLine = 231;
|
||||
|
||||
public bool PCEDispBackground = true;
|
||||
public bool PCEDispSprites = true;
|
||||
|
||||
//GB Debugger settings
|
||||
public bool AutoloadGBDebugger = false;
|
||||
public bool GBDebuggerSaveWindowPosition = true;
|
||||
|
@ -860,4 +863,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -366,6 +366,11 @@ namespace BizHawk.MultiClient
|
|||
Global.CoreInputComm.NES_ShowOBJ = Global.Config.NESDispSprites = (bool)lua_p0;
|
||||
Global.CoreInputComm.NES_ShowBG = Global.Config.NESDispBackground = (bool)lua_p1;
|
||||
}
|
||||
else if(Global.Emulator is BizHawk.Emulation.Consoles.TurboGrafx.PCEngine)
|
||||
{
|
||||
Global.CoreInputComm.PCE_ShowOBJ = Global.Config.PCEDispSprites = (bool)lua_p0;
|
||||
Global.CoreInputComm.PCE_ShowBG = Global.Config.PCEDispBackground = (bool)lua_p1;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
|
|
@ -252,6 +252,8 @@ namespace BizHawk.MultiClient
|
|||
Global.CoreInputComm.NES_UnlimitedSprites = Global.Config.NESAllowMoreThanEightSprites;
|
||||
Global.CoreInputComm.NES_ShowBG = Global.Config.NESDispBackground;
|
||||
Global.CoreInputComm.NES_ShowOBJ = Global.Config.NESDispSprites;
|
||||
Global.CoreInputComm.PCE_ShowBG = Global.Config.PCEDispBackground;
|
||||
Global.CoreInputComm.PCE_ShowOBJ = Global.Config.PCEDispSprites;
|
||||
}
|
||||
|
||||
void SyncPresentationMode()
|
||||
|
|
Loading…
Reference in New Issue