summaryrefslogtreecommitdiff
path: root/old
diff options
context:
space:
mode:
Diffstat (limited to 'old')
-rw-r--r--old/clip.cpp.new4
-rw-r--r--old/gfx16.cpp.last44
-rw-r--r--old/gfx16.cpp.old244
-rw-r--r--old/spc700/debug/apumem.h8
4 files changed, 50 insertions, 50 deletions
diff --git a/old/clip.cpp.new b/old/clip.cpp.new
index 8e6baa3..895ea48 100644
--- a/old/clip.cpp.new
+++ b/old/clip.cpp.new
@@ -188,7 +188,7 @@ static uint8 region_map[6][6] =
};
static inline uint8 CalcWindowMask (int, uint8, uint8);
-static inline void StoreWindowRegions (uint8, struct ClipData *, int, int16 *, uint8 *, bool8, bool8 s = FALSE);
+static inline void StoreWindowRegions (uint8, ClipData *, int, int16 *, uint8 *, bool8, bool8 s = FALSE);
static inline uint8 CalcWindowMask (int i, uint8 W1, uint8 W2)
@@ -240,7 +240,7 @@ static inline uint8 CalcWindowMask (int i, uint8 W1, uint8 W2)
return (0);
}
-static inline void StoreWindowRegions (uint8 Mask, struct ClipData *Clip, int n_regions, int16 *windows, uint8 *drawing_modes, bool8 sub, bool8 StoreMode0)
+static inline void StoreWindowRegions (uint8 Mask, ClipData *Clip, int n_regions, int16 *windows, uint8 *drawing_modes, bool8 sub, bool8 StoreMode0)
{
int ct = 0;
diff --git a/old/gfx16.cpp.last b/old/gfx16.cpp.last
index 0ebb820..fb57f65 100644
--- a/old/gfx16.cpp.last
+++ b/old/gfx16.cpp.last
@@ -110,10 +110,10 @@ extern NormalTileRenderer DrawHiResTilePtr;
extern ClippedTileRenderer DrawHiResClippedTilePtr;
extern LargePixelRenderer DrawLargePixelPtr;
-extern struct SBG BG;
+extern SBG BG;
-extern struct SLineData LineData[240];
-extern struct SLineMatrixData LineMatrixData [240];
+extern SLineData LineData[240];
+extern SLineMatrixData LineMatrixData [240];
extern uint8 Mode7Depths [2];
@@ -581,7 +581,7 @@ void RenderLine (uint8 C)
if (PPU.BGMode == 7)
{
- struct SLineMatrixData *p = &LineMatrixData [C];
+ SLineMatrixData *p = &LineMatrixData [C];
p->MatrixA = PPU.MatrixA;
p->MatrixB = PPU.MatrixB;
p->MatrixC = PPU.MatrixC;
@@ -699,7 +699,7 @@ TileRendererSet TileRenderersNoZ[] = {
{DrawNoZTile16Sub1_2, DrawClippedTile16Sub1_2, DrawLargePixel16Sub1_2}, // 7 -> GFX.r2131:7 = 1, GFX.r2131:6 = 1, GFX.r2130:1 = 1
{DrawNoZTile16, DrawClippedTile16, DrawLargePixel16} // 8 -> normal
};
-INLINE void SelectTileRenderer (bool8_32 normal, bool NoZ = false)
+static INLINE void SelectTileRenderer (bool8_32 normal, bool NoZ = false)
{
if (normal) {
TileRenderer = 8;
@@ -2226,23 +2226,23 @@ void RenderScreen (uint8 *Screen, bool8_32 sub, bool8_32 force_no_add, uint8 D)
}
if (BG0)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(0));
+ SelectTileRenderer (sub || !SUB_OR_ADD(0), false);
DrawBackground (PPU.BGMode, 0, D + 10, D + 14);
}
if (BG1)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(1));
+ SelectTileRenderer (sub || !SUB_OR_ADD(1), false);
DrawBackground (PPU.BGMode, 1, D + 9, D + 13);
}
if (BG2)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(2));
+ SelectTileRenderer (sub || !SUB_OR_ADD(2), false);
DrawBackground (PPU.BGMode, 2, D + 3,
PPU.BG3Priority ? D + 17 : D + 6);
}
if (BG3 && PPU.BGMode == 0)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(3));
+ SelectTileRenderer (sub || !SUB_OR_ADD(3), false);
DrawBackground (PPU.BGMode, 3, D + 2, D + 5);
}
}
@@ -2255,12 +2255,12 @@ void RenderScreen (uint8 *Screen, bool8_32 sub, bool8_32 force_no_add, uint8 D)
}
if (BG0)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(0));
+ SelectTileRenderer (sub || !SUB_OR_ADD(0), false);
DrawBackground (PPU.BGMode, 0, D + 5, D + 13);
}
if (PPU.BGMode != 6 && BG1)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(1));
+ SelectTileRenderer (sub || !SUB_OR_ADD(1), false);
DrawBackground (PPU.BGMode, 1, D + 2, D + 9);
}
}
@@ -2472,7 +2472,7 @@ void S9xUpdateScreen () // ~30-50ms! (called from FLUSH_REDRAW())
!((GFX.r2130 & 0x30) == 0x10 && IPPU.Clip[1].Count[5] == 0))
{
// transparency effects in use, so lets get busy!
- struct ClipData *pClip;
+ ClipData *pClip;
uint32 fixedColour;
GFX.FixedColour = BUILD_PIXEL (IPPU.XB [PPU.FixedColourRed],
IPPU.XB [PPU.FixedColourGreen],
@@ -2517,7 +2517,7 @@ void S9xUpdateScreen () // ~30-50ms! (called from FLUSH_REDRAW())
register unsigned int width = pClip->Right [c][5] - pClip->Left [c][5];
if (width > 0) {
- asm volatile (
+ __asm__ volatile (
" mov r0, %[fixedcolour] \n"
" subs %[width], %[width], #4 \n"
" bmi 2f \n"
@@ -2575,7 +2575,7 @@ void S9xUpdateScreen () // ~30-50ms! (called from FLUSH_REDRAW())
if (IPPU.Clip [0].Count [5])
{
- asm volatile (
+ __asm__ volatile (
"1: \n"
" mov r1, #(256 >> 2) \n"
@@ -2655,7 +2655,7 @@ void S9xUpdateScreen () // ~30-50ms! (called from FLUSH_REDRAW())
}
#define SUBSCREEN_BG(rop, half) \
\
-asm volatile (\
+__asm__ volatile (\
" ldrb r0, [%[d]], #1 \n"\
"71: \n"\
\
@@ -2722,7 +2722,7 @@ ROP_##rop##half (r0, r1)\
// copy the sub-screen to the main screen
// or fill it with the back-drop colour if the
// sub-screen is clear.
- asm volatile (
+ __asm__ volatile (
" ldrb r0, [%[d]], #1 \n"
"31: \n"
@@ -2775,7 +2775,7 @@ ROP_##rop##half (r0, r1)\
uint32 Left = pClip->Left [b][5];
uint32 Right = pClip->Right [b][5];
if (Left >= Right) continue;
- asm volatile (
+ __asm__ volatile (
" tst %[c], #1 \n"
" bne 21f \n"
@@ -2815,7 +2815,7 @@ ROP_##rop##half (r0, r1)\
}
else
{
- asm volatile (
+ __asm__ volatile (
"@ -- SubScreen clear \n"
"1113: \n"
" mov r1, #(256/8) \n"
@@ -2902,7 +2902,7 @@ ROP_##rop##half (r0, r1)\
{
register unsigned int width = IPPU.Clip [0].Right [c][5] - IPPU.Clip [0].Left [c][5];
if (width > 0) {
- asm volatile (
+ __asm__ volatile (
" mov r0, %[back] \n"
" subs %[width], %[width], #4 \n"
" bmi 2f \n"
@@ -3063,7 +3063,7 @@ else \
if (OB)
{
FIXCLIP(4);
- DrawOBJS ();
+ DrawOBJS (FALSE, 0);
}
if (BG0)
{
@@ -3093,7 +3093,7 @@ else \
if (OB)
{
FIXCLIP(4);
- DrawOBJS ();
+ DrawOBJS (FALSE, 0);
}
if (BG0)
{
@@ -3113,7 +3113,7 @@ else \
if (OB)
{
FIXCLIP(4);
- DrawOBJS ();
+ DrawOBJS (FALSE, 0);
}
}
}
diff --git a/old/gfx16.cpp.old2 b/old/gfx16.cpp.old2
index 36358a5..80133c3 100644
--- a/old/gfx16.cpp.old2
+++ b/old/gfx16.cpp.old2
@@ -115,10 +115,10 @@ extern NormalTileRenderer DrawHiResTilePtr;
extern ClippedTileRenderer DrawHiResClippedTilePtr;
extern LargePixelRenderer DrawLargePixelPtr;
-extern struct SBG BG;
+extern SBG BG;
-extern struct SLineData LineData[240];
-extern struct SLineMatrixData LineMatrixData [240];
+extern SLineData LineData[240];
+extern SLineMatrixData LineMatrixData [240];
extern uint8 Mode7Depths [2];
@@ -586,7 +586,7 @@ void RenderLine (uint8 C)
if (PPU.BGMode == 7)
{
- struct SLineMatrixData *p = &LineMatrixData [C];
+ SLineMatrixData *p = &LineMatrixData [C];
p->MatrixA = PPU.MatrixA;
p->MatrixB = PPU.MatrixB;
p->MatrixC = PPU.MatrixC;
@@ -704,7 +704,7 @@ TileRendererSet TileRenderersNoZ[] = {
{DrawNoZTile16Sub1_2, DrawClippedTile16Sub1_2, DrawLargePixel16Sub1_2}, // 7 -> GFX.r2131:7 = 1, GFX.r2131:6 = 1, GFX.r2130:1 = 1
{DrawNoZTile16, DrawClippedTile16, DrawLargePixel16} // 8 -> normal
};
-INLINE void SelectTileRenderer (bool8_32 normal, bool NoZ = false)
+static INLINE void SelectTileRenderer (bool8_32 normal, bool NoZ = false)
{
if (normal) {
TileRenderer = 8;
@@ -2242,23 +2242,23 @@ void RenderScreen (uint8 *Screen, bool8_32 sub, bool8_32 force_no_add, uint8 D)
}
if (BG0)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(0));
+ SelectTileRenderer (sub || !SUB_OR_ADD(0), false);
DrawBackground (PPU.BGMode, 0, D + 10, D + 14);
}
if (BG1)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(1));
+ SelectTileRenderer (sub || !SUB_OR_ADD(1), false);
DrawBackground (PPU.BGMode, 1, D + 9, D + 13);
}
if (BG2)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(2));
+ SelectTileRenderer (sub || !SUB_OR_ADD(2), false);
DrawBackground (PPU.BGMode, 2, D + 3,
PPU.BG3Priority ? D + 17 : D + 6);
}
if (BG3 && PPU.BGMode == 0)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(3));
+ SelectTileRenderer (sub || !SUB_OR_ADD(3), false);
DrawBackground (PPU.BGMode, 3, D + 2, D + 5);
}
}
@@ -2271,12 +2271,12 @@ void RenderScreen (uint8 *Screen, bool8_32 sub, bool8_32 force_no_add, uint8 D)
}
if (BG0)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(0));
+ SelectTileRenderer (sub || !SUB_OR_ADD(0), false);
DrawBackground (PPU.BGMode, 0, D + 5, D + 13);
}
if (PPU.BGMode != 6 && BG1)
{
- SelectTileRenderer (sub || !SUB_OR_ADD(1));
+ SelectTileRenderer (sub || !SUB_OR_ADD(1), false);
DrawBackground (PPU.BGMode, 1, D + 2, D + 9);
}
}
@@ -2488,7 +2488,7 @@ void S9xUpdateScreen () // ~30-50ms! (called from FLUSH_REDRAW())
!((GFX.r2130 & 0x30) == 0x10 && IPPU.Clip[1].Count[5] == 0))
{
// transparency effects in use, so lets get busy!
- struct ClipData *pClip;
+ ClipData *pClip;
uint32 fixedColour;
GFX.FixedColour = BUILD_PIXEL (IPPU.XB [PPU.FixedColourRed],
IPPU.XB [PPU.FixedColourGreen],
@@ -2533,7 +2533,7 @@ void S9xUpdateScreen () // ~30-50ms! (called from FLUSH_REDRAW())
register unsigned int width = pClip->Right [c][5] - pClip->Left [c][5];
if (width > 0) {
- asm volatile (
+ __asm__ volatile (
" mov r0, %[fixedcolour] \n"
" subs %[width], %[width], #4 \n"
" bmi 2f \n"
@@ -2591,7 +2591,7 @@ void S9xUpdateScreen () // ~30-50ms! (called from FLUSH_REDRAW())
if (IPPU.Clip [0].Count [5])
{
- asm volatile (
+ __asm__ volatile (
"1: \n"
" mov r1, #(256 >> 2) \n"
@@ -2671,7 +2671,7 @@ void S9xUpdateScreen () // ~30-50ms! (called from FLUSH_REDRAW())
}
#define SUBSCREEN_BG(rop, half) \
\
-asm volatile (\
+__asm__ volatile (\
" ldrb r0, [%[d]], #1 \n"\
"71: \n"\
\
@@ -2738,7 +2738,7 @@ ROP_##rop##half (r0, r1)\
// copy the sub-screen to the main screen
// or fill it with the back-drop colour if the
// sub-screen is clear.
- asm volatile (
+ __asm__ volatile (
" ldrb r0, [%[d]], #1 \n"
"31: \n"
@@ -2791,7 +2791,7 @@ ROP_##rop##half (r0, r1)\
uint32 Left = pClip->Left [b][5];
uint32 Right = pClip->Right [b][5];
if (Left >= Right) continue;
- asm volatile (
+ __asm__ volatile (
" tst %[c], #1 \n"
" bne 21f \n"
@@ -2831,7 +2831,7 @@ ROP_##rop##half (r0, r1)\
}
else
{
- asm volatile (
+ __asm__ volatile (
"@ -- SubScreen clear \n"
"1113: \n"
" mov r1, #(256/8) \n"
@@ -2918,7 +2918,7 @@ ROP_##rop##half (r0, r1)\
{
register unsigned int width = IPPU.Clip [0].Right [c][5] - IPPU.Clip [0].Left [c][5];
if (width > 0) {
- asm volatile (
+ __asm__ volatile (
" mov r0, %[back] \n"
" subs %[width], %[width], #4 \n"
" bmi 2f \n"
@@ -3079,7 +3079,7 @@ else \
if (OB)
{
FIXCLIP(4);
- DrawOBJS ();
+ DrawOBJS (FALSE, 0);
}
if (BG0)
{
@@ -3109,7 +3109,7 @@ else \
if (OB)
{
FIXCLIP(4);
- DrawOBJS ();
+ DrawOBJS (FALSE, 0);
}
if (BG0)
{
@@ -3129,7 +3129,7 @@ else \
if (OB)
{
FIXCLIP(4);
- DrawOBJS ();
+ DrawOBJS (FALSE, 0);
}
}
}
diff --git a/old/spc700/debug/apumem.h b/old/spc700/debug/apumem.h
index b1b5f65..499bd3f 100644
--- a/old/spc700/debug/apumem.h
+++ b/old/spc700/debug/apumem.h
@@ -48,7 +48,7 @@ END_EXTERN_C
// TODO: restore nondebug version
-INLINE uint8 S9xAPUGetByteZ (uint8 Address)
+static INLINE uint8 S9xAPUGetByteZ (uint8 Address)
{
uint8 res = 0;
pIAPU->memread_addr = Address;
@@ -86,7 +86,7 @@ INLINE uint8 S9xAPUGetByteZ (uint8 Address)
return res;
}
-INLINE void S9xAPUSetByteZ (uint8 val, uint8 Address)
+static INLINE void S9xAPUSetByteZ (uint8 val, uint8 Address)
{
pIAPU->memwrite_addr = Address;
pIAPU->memwrite_data = val;
@@ -120,7 +120,7 @@ INLINE void S9xAPUSetByteZ (uint8 val, uint8 Address)
pIAPU->DirectPage [Address] = val;
}
-INLINE uint8 S9xAPUGetByte (uint32 Address)
+static INLINE uint8 S9xAPUGetByte (uint32 Address)
{
Address &= 0xffff;
uint8 res = 0;
@@ -159,7 +159,7 @@ INLINE uint8 S9xAPUGetByte (uint32 Address)
return res;
}
-INLINE void S9xAPUSetByte (uint8 val, uint32 Address)
+static INLINE void S9xAPUSetByte (uint8 val, uint32 Address)
{
Address &= 0xffff;
pIAPU->memwrite_addr = Address;