};
struct InternalPPU {
- bool8_32 ColorsChanged;
+ bool8 ColorsChanged;
uint8 HDMA;
- bool8_32 HDMAStarted;
+ bool8 HDMAStarted;
uint8 MaxBrightness;
- bool8_32 LatchedBlanking;
- bool8_32 OBJChanged;
- bool8_32 RenderThisFrame;
- bool8_32 DirectColourMapsNeedRebuild;
+ bool8 LatchedBlanking;
+ bool8 OBJChanged;
+ bool8 RenderThisFrame;
+ bool8 DirectColourMapsNeedRebuild;
uint32 FrameCount;
uint32 RenderedFramesCount;
uint32 DisplayedRenderedFrameCount;
uint32 FrameSkip;
uint8 *TileCache [3];
uint8 *TileCached [3];
- bool8_32 FirstVRAMRead;
- bool8_32 LatchedInterlace;
- bool8_32 DoubleWidthPixels;
+ bool8 FirstVRAMRead;
+ bool8 LatchedInterlace;
+ bool8 DoubleWidthPixels;
int RenderedScreenHeight;
int RenderedScreenWidth;
uint32 Red [256];
uint8 Brightness;
struct {
- bool8_32 High;
+ bool8 High;
uint8 Increment;
uint16 Address;
uint16 Mask1;
uint16 SCSize;
} BG [4];
- bool8_32 CGFLIP;
+ bool8 CGFLIP;
uint16 CGDATA [256];
uint8 FirstSprite;
uint8 LastSprite;
uint16 ScreenHeight;
uint32 WRAM;
uint8 BG_Forced;
- bool8_32 ForcedBlanking;
- bool8_32 OBJThroughMain;
- bool8_32 OBJThroughSub;
+ bool8 ForcedBlanking;
+ bool8 OBJThroughMain;
+ bool8 OBJThroughSub;
uint8 OBJSizeSelect;
uint16 OBJNameBase;
- bool8_32 OBJAddition;
+ bool8 OBJAddition;
uint8 OAMReadFlip;
uint8 OAMData [512 + 32];
- bool8_32 VTimerEnabled;
- bool8_32 HTimerEnabled;
+ bool8 VTimerEnabled;
+ bool8 HTimerEnabled;
short HTimerPosition;
uint8 Mosaic;
- bool8_32 BGMosaic [4];
- bool8_32 Mode7HFlip;
- bool8_32 Mode7VFlip;
+ bool8 BGMosaic [4];
+ bool8 Mode7HFlip;
+ bool8 Mode7VFlip;
uint8 Mode7Repeat;
uint8 Window1Left;
uint8 Window1Right;
uint8 ClipWindowOverlapLogic [6];
uint8 ClipWindow1Enable [6];
uint8 ClipWindow2Enable [6];
- bool8_32 ClipWindow1Inside [6];
- bool8_32 ClipWindow2Inside [6];
- bool8_32 RecomputeClipWindows;
+ bool8 ClipWindow1Inside [6];
+ bool8 ClipWindow2Inside [6];
+ bool8 RecomputeClipWindows;
uint8 CGFLIPRead;
uint16 OBJNameSelect;
- bool8_32 Need16x8Mulitply;
+ bool8 Need16x8Mulitply;
uint8 Joypad3ButtonReadPos;
uint8 MouseSpeed[2];
};
#define CLIP_XNOR 3
struct SDMA {
- bool8_32 TransferDirection;
- bool8_32 AAddressFixed;
- bool8_32 AAddressDecrement;
+ bool8 TransferDirection;
+ bool8 AAddressFixed;
+ bool8 AAddressDecrement;
uint8 TransferMode;
uint8 ABank;
uint16 TransferBytes;
// H-DMA only:
- bool8_32 HDMAIndirectAddressing;
+ bool8 HDMAIndirectAddressing;
uint16 IndirectAddress;
uint8 IndirectBank;
uint8 Repeat;
};
START_EXTERN_C
+void S9xNextController ();
+
void S9xUpdateScreen ();
void S9xResetPPU ();
void S9xFixColourBrightness ();
{
if ((Byte & 0x7f) != (PPU.CGDATA[PPU.CGADD] >> 8))
{
- if (Settings.SixteenBit&& !(Settings.os9x_hack&PPU_IGNORE_PALWRITE)){
+ if (!(Settings.os9x_hack&PPU_IGNORE_PALWRITE)){
FLUSH_REDRAW ();
}
PPU.CGDATA[PPU.CGADD] &= 0x00FF;
PPU.CGDATA[PPU.CGADD] |= (Byte & 0x7f) << 8;
IPPU.ColorsChanged = TRUE;
-#ifndef _SNESPPC
- if (Settings.SixteenBit)
-#endif
- {
+
IPPU.Blue [PPU.CGADD] = IPPU.XB [(Byte >> 2) & 0x1f];
IPPU.Green [PPU.CGADD] = IPPU.XB [(PPU.CGDATA[PPU.CGADD] >> 5) & 0x1f];
IPPU.ScreenColors [PPU.CGADD] = (uint16) BUILD_PIXEL (IPPU.Red [PPU.CGADD],
IPPU.Green [PPU.CGADD],
IPPU.Blue [PPU.CGADD]);
- }
}
PPU.CGADD++;
}
{
if (Byte != (uint8) (PPU.CGDATA[PPU.CGADD] & 0xff))
{
- if (Settings.SixteenBit&& !(Settings.os9x_hack&PPU_IGNORE_PALWRITE)){
+ if (!(Settings.os9x_hack&PPU_IGNORE_PALWRITE)){
FLUSH_REDRAW ();
}
PPU.CGDATA[PPU.CGADD] &= 0x7F00;
PPU.CGDATA[PPU.CGADD] |= Byte;
IPPU.ColorsChanged = TRUE;
-#ifndef _SNESPPC
- if (Settings.SixteenBit)
-#endif
- {
+
IPPU.Red [PPU.CGADD] = IPPU.XB [Byte & 0x1f];
IPPU.Green [PPU.CGADD] = IPPU.XB [(PPU.CGDATA[PPU.CGADD] >> 5) & 0x1f];
IPPU.ScreenColors [PPU.CGADD] = (uint16) BUILD_PIXEL (IPPU.Red [PPU.CGADD],
IPPU.Green [PPU.CGADD],
IPPU.Blue [PPU.CGADD]);
- }
}
}
PPU.CGFLIP ^= 1;