workaround a problem with the harmattan gcc
[drnoksnes] / ppu.h
diff --git a/ppu.h b/ppu.h
index 20e44a1..c7032b1 100644 (file)
--- a/ppu.h
+++ b/ppu.h
@@ -67,14 +67,14 @@ struct ClipData {
 };
 
 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;
@@ -82,9 +82,9 @@ struct InternalPPU {
     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];
@@ -121,7 +121,7 @@ struct SPPU {
     uint8  Brightness;
 
     struct {
-       bool8_32 High;
+       bool8 High;
        uint8 Increment;
        uint16 Address;
        uint16 Mask1;
@@ -138,7 +138,7 @@ struct SPPU {
        uint16 SCSize;
     } BG [4];
 
-    bool8_32  CGFLIP;
+    bool8  CGFLIP;
     uint16 CGDATA [256]; 
     uint8  FirstSprite;
     uint8  LastSprite;
@@ -174,21 +174,21 @@ struct SPPU {
     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;
@@ -198,12 +198,12 @@ struct SPPU {
     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];
 };
@@ -214,9 +214,9 @@ struct SPPU {
 #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;
@@ -228,7 +228,7 @@ struct SDMA {
     uint16 TransferBytes;
 
     // H-DMA only:
-    bool8_32  HDMAIndirectAddressing;
+    bool8  HDMAIndirectAddressing;
     uint16 IndirectAddress;
     uint8  IndirectBank;
     uint8  Repeat;
@@ -237,6 +237,8 @@ struct SDMA {
 };
 
 START_EXTERN_C
+void S9xNextController ();
+
 void S9xUpdateScreen ();
 void S9xResetPPU ();
 void S9xFixColourBrightness ();
@@ -484,22 +486,18 @@ STATIC INLINE void REGISTER_2122(uint8 Byte)
     {
        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++;
     }
@@ -507,22 +505,18 @@ STATIC INLINE void REGISTER_2122(uint8 Byte)
     {
        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;