summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--old/gfx16.cpp.last2
-rw-r--r--old/gfx16.cpp.old22
-rw-r--r--src/cheats2.cpp2
-rw-r--r--src/clip.cpp8
-rw-r--r--src/gfx.cpp2
-rw-r--r--src/gfx16.cpp2
-rw-r--r--src/globals.cpp3
-rw-r--r--src/memmap.cpp13
-rw-r--r--src/memmap.h4
-rw-r--r--src/port.h7
-rw-r--r--src/ppu.cpp27
-rw-r--r--src/ppu_.cpp167
-rw-r--r--src/sdd1.cpp4
-rw-r--r--src/snaporig.cpp3
14 files changed, 91 insertions, 155 deletions
diff --git a/old/gfx16.cpp.last b/old/gfx16.cpp.last
index 24e004b..0ebb820 100644
--- a/old/gfx16.cpp.last
+++ b/old/gfx16.cpp.last
@@ -542,13 +542,11 @@ void S9xStartScreenRefresh ()
{
if (IPPU.RenderThisFrame)
{
-#ifndef _SNESPPC
if (!S9xInitUpdate ())
{
IPPU.RenderThisFrame = FALSE;
return;
}
-#endif
IPPU.RenderedFramesCount++;
IPPU.PreviousLine = IPPU.CurrentLine = 0;
IPPU.MaxBrightness = PPU.Brightness;
diff --git a/old/gfx16.cpp.old2 b/old/gfx16.cpp.old2
index 5a9fcb8..36358a5 100644
--- a/old/gfx16.cpp.old2
+++ b/old/gfx16.cpp.old2
@@ -547,13 +547,11 @@ void S9xStartScreenRefresh ()
{
if (IPPU.RenderThisFrame)
{
-#ifndef _SNESPPC
if (!S9xInitUpdate ())
{
IPPU.RenderThisFrame = FALSE;
return;
}
-#endif
IPPU.RenderedFramesCount++;
IPPU.PreviousLine = IPPU.CurrentLine = 0;
IPPU.MaxBrightness = PPU.Brightness;
diff --git a/src/cheats2.cpp b/src/cheats2.cpp
index 1805a34..ec8062a 100644
--- a/src/cheats2.cpp
+++ b/src/cheats2.cpp
@@ -187,9 +187,7 @@ bool8 S9xSaveCheatFile (const char *filename)
{
if (Cheat.num_cheats == 0)
{
-#ifndef _SNESPPC
(void) remove (filename);
-#endif
return (TRUE);
}
diff --git a/src/clip.cpp b/src/clip.cpp
index faeb641..e991b92 100644
--- a/src/clip.cpp
+++ b/src/clip.cpp
@@ -65,11 +65,7 @@ struct Band
R.Left = MAX(A.Left, B.Left); \
R.Right = MIN(A.Right, B.Right);}
-#ifndef _SNESPPC
static int IntCompare (const void *d1, const void *d2)
-#else
-static int _cdecl IntCompare (const void *d1, const void *d2)
-#endif
{
/*
if (*(uint32 *) d1 > *(uint32 *) d2)
@@ -82,11 +78,7 @@ static int _cdecl IntCompare (const void *d1, const void *d2)
return (*(uint32 *) d1 - *(uint32 *) d2);
}
-#ifndef _SNESPPC
static int BandCompare (const void *d1, const void *d2)
-#else
-static int _cdecl BandCompare (const void *d1, const void *d2)
-#endif
{
/*
if (((struct Band *) d1)->Left > ((struct Band *) d2)->Left)
diff --git a/src/gfx.cpp b/src/gfx.cpp
index acb1294..fe8f2b4 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -546,13 +546,11 @@ void S9xStartScreenRefresh ()
{
if (IPPU.RenderThisFrame)
{
-#ifndef _SNESPPC
if (!S9xInitUpdate ())
{
IPPU.RenderThisFrame = FALSE;
return;
}
-#endif
IPPU.RenderedFramesCount++;
IPPU.PreviousLine = IPPU.CurrentLine = 0;
IPPU.MaxBrightness = PPU.Brightness;
diff --git a/src/gfx16.cpp b/src/gfx16.cpp
index a05e335..3ac95ca 100644
--- a/src/gfx16.cpp
+++ b/src/gfx16.cpp
@@ -559,13 +559,11 @@ void S9xStartScreenRefresh ()
if (IPPU.RenderThisFrame)
{
-#ifndef _SNESPPC
if (!S9xInitUpdate ())
{
IPPU.RenderThisFrame = FALSE;
return;
}
-#endif
IPPU.RenderedFramesCount++;
IPPU.PreviousLine = IPPU.CurrentLine = 0;
IPPU.MaxBrightness = PPU.Brightness;
diff --git a/src/globals.cpp b/src/globals.cpp
index e95a835..9f9bbbd 100644
--- a/src/globals.cpp
+++ b/src/globals.cpp
@@ -52,9 +52,6 @@
#include "soundux.h"
#include "cheats.h"
#include "sa1.h"
-#ifndef _SNESPPC
-//#include "netplay.h"
-#endif
}
START_EXTERN_C
char String[513];
diff --git a/src/memmap.cpp b/src/memmap.cpp
index e93beaa..4436fe3 100644
--- a/src/memmap.cpp
+++ b/src/memmap.cpp
@@ -315,10 +315,6 @@ int checkzip( char * fn )
/* LoadROM() */
/* This function loads a Snes-Backup image */
/**********************************************************************************************/
-#ifdef _SNESPPC
-#pragma warning(disable : 4101)
-#pragma warning(disable : 4700)
-#endif
bool8_32 CMemory::LoadROM (const char *filename)
{
unsigned long FileSize = 0;
@@ -341,13 +337,8 @@ bool8_32 CMemory::LoadROM (const char *filename)
CalculatedSize = 0;
again:
-#ifndef _SNESPPC
_splitpath (filename, drive, dir, name, ext);
_makepath (fname, drive, dir, name, ext);
-#else
- strcpy(fname, filename);
-// strupr(fname);
-#endif
#ifdef __WIN32__
memmove (&ext [0], &ext[1], 4);
@@ -391,9 +382,7 @@ again:
memmove (&ext [1], &ext [0], 4);
ext [0] = '.';
#endif
-#ifndef _SNESPPC
_makepath (fname, drive, dir, name, ext);
-#endif
}
else
if (ptr - ROM < MAX_ROM_SIZE + 0x200 &&
@@ -408,9 +397,7 @@ again:
memmove (&ext [1], &ext [0], 4);
ext [0] = '.';
#endif
-#ifndef _SNESPPC
_makepath (fname, drive, dir, name, ext);
-#endif
}
else
more = FALSE;
diff --git a/src/memmap.h b/src/memmap.h
index d146522..96c5e50 100644
--- a/src/memmap.h
+++ b/src/memmap.h
@@ -167,11 +167,7 @@ public:
uint32 SDD1LoggedDataCountPrev;
uint32 SDD1LoggedDataCount;
uint8 SDD1LoggedData [MEMMAP_MAX_SDD1_LOGGED_ENTRIES];
-#ifndef _SNESPPC
char ROMFilename [_MAX_PATH];
-#else
- char ROMFilename [1024];
-#endif
};
START_EXTERN_C
diff --git a/src/port.h b/src/port.h
index 6342940..04422e9 100644
--- a/src/port.h
+++ b/src/port.h
@@ -53,10 +53,6 @@ I can't take it anymore, it's too convoluted. So I've commented out the entire
with a single define-block for each target platform.
*/
-/*
-** _SNESPPC DEFINES
-*/
-
#if 1
//Title
@@ -145,7 +141,6 @@ typedef short int16_32;
EXTERN_C void S9xGenerateSound ();
-//Additional Items for _SNESPPC port
void _makepath (char *path, const char *drive, const char *dir,
const char *fname, const char *ext);
void _splitpath (const char *path, char *drive, char *dir, char *fname,
@@ -163,6 +158,6 @@ void _splitpath (const char *path, char *drive, char *dir, char *fname,
#define inline __inline
#endif
-#endif // _SNESPPC
+#endif //
#endif // _PORT_H_
diff --git a/src/ppu.cpp b/src/ppu.cpp
index 6d1af27..54526cf 100644
--- a/src/ppu.cpp
+++ b/src/ppu.cpp
@@ -48,9 +48,6 @@
#include "gfx.h"
#include "display.h"
#include "sa1.h"
-#ifndef _SNESPPC
-//#include "netplay.h"
-#endif
#include "sdd1.h"
#include "srtc.h"
@@ -128,19 +125,17 @@ void S9xUpdateHTimer ()
void S9xFixColourBrightness ()
{
- IPPU.XB = mul_brightness [PPU.Brightness];
-#ifndef _SNESPPC
- if (Settings.SixteenBit)
-#endif
- {
- for (unsigned int i = 0; i < 256; i++)
- {
- //IPPU.Red [i] = IPPU.XB [PPU.CGDATA [i] & 0x1f];
- //IPPU.Green [i] = IPPU.XB [(PPU.CGDATA [i] >> 5) & 0x1f];
- //IPPU.Blue [i] = IPPU.XB [(PPU.CGDATA [i] >> 10) & 0x1f];
- IPPU.ScreenColors [i] = BUILD_PIXEL (IPPU.XB[IPPU.Red [i]], IPPU.XB[IPPU.Green [i]], IPPU.XB[IPPU.Blue [i]]);
- }
- }
+ IPPU.XB = mul_brightness [PPU.Brightness];
+ if (Settings.SixteenBit)
+ {
+ for (unsigned int i = 0; i < 256; i++)
+ {
+ //IPPU.Red [i] = IPPU.XB [PPU.CGDATA [i] & 0x1f];
+ //IPPU.Green [i] = IPPU.XB [(PPU.CGDATA [i] >> 5) & 0x1f];
+ //IPPU.Blue [i] = IPPU.XB [(PPU.CGDATA [i] >> 10) & 0x1f];
+ IPPU.ScreenColors [i] = BUILD_PIXEL (IPPU.XB[IPPU.Red [i]], IPPU.XB[IPPU.Green [i]], IPPU.XB[IPPU.Blue [i]]);
+ }
+ }
}
/**********************************************************************************************/
diff --git a/src/ppu_.cpp b/src/ppu_.cpp
index e91be78..1e29935 100644
--- a/src/ppu_.cpp
+++ b/src/ppu_.cpp
@@ -48,9 +48,6 @@
#include "gfx.h"
#include "display.h"
#include "sa1.h"
-#ifndef _SNESPPC
-//#include "netplay.h"
-#endif
#include "sdd1.h"
#include "srtc.h"
@@ -126,20 +123,18 @@ void S9xUpdateHTimer ()
void S9xFixColourBrightness ()
{
- IPPU.XB = mul_brightness [PPU.Brightness];
-#ifndef _SNESPPC
- if (Settings.SixteenBit)
-#endif
- {
- for (int i = 0; i < 256; i++)
- {
- IPPU.Red [i] = IPPU.XB [PPU.CGDATA [i] & 0x1f];
- IPPU.Green [i] = IPPU.XB [(PPU.CGDATA [i] >> 5) & 0x1f];
- IPPU.Blue [i] = IPPU.XB [(PPU.CGDATA [i] >> 10) & 0x1f];
- IPPU.ScreenColors [i] = BUILD_PIXEL (IPPU.Red [i], IPPU.Green [i],
- IPPU.Blue [i]);
- }
- }
+ IPPU.XB = mul_brightness [PPU.Brightness];
+ if (Settings.SixteenBit)
+ {
+ for (int i = 0; i < 256; i++)
+ {
+ IPPU.Red [i] = IPPU.XB [PPU.CGDATA [i] & 0x1f];
+ IPPU.Green [i] = IPPU.XB [(PPU.CGDATA [i] >> 5) & 0x1f];
+ IPPU.Blue [i] = IPPU.XB [(PPU.CGDATA [i] >> 10) & 0x1f];
+ IPPU.ScreenColors [i] = BUILD_PIXEL (IPPU.Red [i], IPPU.Green [i],
+ IPPU.Blue [i]);
+ }
+ }
}
/**********************************************************************************************/
@@ -2396,77 +2391,73 @@ void S9xNextController ()
void S9xUpdateJoypads ()
{
-#ifdef _SNESPPC
- int i = 0;
-#else
- int i;
-
- for (i = 0; i < 5; i++)
-#endif
- {
- IPPU.Joypads [i] = S9xReadJoypad (i);
- if (IPPU.Joypads [i] & SNES_LEFT_MASK)
- IPPU.Joypads [i] &= ~SNES_RIGHT_MASK;
- if (IPPU.Joypads [i] & SNES_UP_MASK)
- IPPU.Joypads [i] &= ~SNES_DOWN_MASK;
- }
-
- //touhaiden controller Fix
- if (SNESGameFixes.TouhaidenControllerFix &&
- (IPPU.Controller == SNES_JOYPAD || IPPU.Controller == SNES_MULTIPLAYER5))
- {
- for (i = 0; i < 5; i++)
- {
- if (IPPU.Joypads [i])
- IPPU.Joypads [i] |= 0xffff0000;
- }
- }
-
- // Read mouse position if enabled
- if (Settings.MouseMaster)
- {
- for (i = 0; i < 2; i++)
- S9xProcessMouse (i);
- }
-
- // Read SuperScope if enabled
- if (Settings.SuperScopeMaster)
- ProcessSuperScope ();
-
- if (Memory.FillRAM [0x4200] & 1)
- {
- PPU.Joypad1ButtonReadPos = 16;
- if (Memory.FillRAM [0x4201] & 0x80)
- {
- PPU.Joypad2ButtonReadPos = 16;
- PPU.Joypad3ButtonReadPos = 0;
- }
- else
- {
- PPU.Joypad2ButtonReadPos = 0;
- PPU.Joypad3ButtonReadPos = 16;
- }
- int ind = Settings.SwapJoypads ? 1 : 0;
-
- Memory.FillRAM [0x4218] = (uint8) IPPU.Joypads [ind];
- Memory.FillRAM [0x4219] = (uint8) (IPPU.Joypads [ind] >> 8);
- Memory.FillRAM [0x421a] = (uint8) IPPU.Joypads [ind ^ 1];
- Memory.FillRAM [0x421b] = (uint8) (IPPU.Joypads [ind ^ 1] >> 8);
- if (Memory.FillRAM [0x4201] & 0x80)
- {
- Memory.FillRAM [0x421c] = (uint8) IPPU.Joypads [ind];
- Memory.FillRAM [0x421d] = (uint8) (IPPU.Joypads [ind] >> 8);
- Memory.FillRAM [0x421e] = (uint8) IPPU.Joypads [2];
- Memory.FillRAM [0x421f] = (uint8) (IPPU.Joypads [2] >> 8);
- }
- else
- {
- Memory.FillRAM [0x421c] = (uint8) IPPU.Joypads [3];
- Memory.FillRAM [0x421d] = (uint8) (IPPU.Joypads [3] >> 8);
- Memory.FillRAM [0x421e] = (uint8) IPPU.Joypads [4];
- Memory.FillRAM [0x421f] = (uint8) (IPPU.Joypads [4] >> 8);
- }
- }
+ int i;
+
+ for (i = 0; i < 5; i++)
+ {
+ IPPU.Joypads [i] = S9xReadJoypad (i);
+ if (IPPU.Joypads [i] & SNES_LEFT_MASK)
+ IPPU.Joypads [i] &= ~SNES_RIGHT_MASK;
+ if (IPPU.Joypads [i] & SNES_UP_MASK)
+ IPPU.Joypads [i] &= ~SNES_DOWN_MASK;
+ }
+
+ //touhaiden controller Fix
+ if (SNESGameFixes.TouhaidenControllerFix &&
+ (IPPU.Controller == SNES_JOYPAD || IPPU.Controller == SNES_MULTIPLAYER5))
+ {
+ for (i = 0; i < 5; i++)
+ {
+ if (IPPU.Joypads [i])
+ IPPU.Joypads [i] |= 0xffff0000;
+ }
+ }
+
+ // Read mouse position if enabled
+ if (Settings.MouseMaster)
+ {
+ for (i = 0; i < 2; i++)
+ S9xProcessMouse (i);
+ }
+
+ // Read SuperScope if enabled
+ if (Settings.SuperScopeMaster)
+ ProcessSuperScope ();
+
+ if (Memory.FillRAM [0x4200] & 1)
+ {
+ PPU.Joypad1ButtonReadPos = 16;
+ if (Memory.FillRAM [0x4201] & 0x80)
+ {
+ PPU.Joypad2ButtonReadPos = 16;
+ PPU.Joypad3ButtonReadPos = 0;
+ }
+ else
+ {
+ PPU.Joypad2ButtonReadPos = 0;
+ PPU.Joypad3ButtonReadPos = 16;
+ }
+ int ind = Settings.SwapJoypads ? 1 : 0;
+
+ Memory.FillRAM [0x4218] = (uint8) IPPU.Joypads [ind];
+ Memory.FillRAM [0x4219] = (uint8) (IPPU.Joypads [ind] >> 8);
+ Memory.FillRAM [0x421a] = (uint8) IPPU.Joypads [ind ^ 1];
+ Memory.FillRAM [0x421b] = (uint8) (IPPU.Joypads [ind ^ 1] >> 8);
+ if (Memory.FillRAM [0x4201] & 0x80)
+ {
+ Memory.FillRAM [0x421c] = (uint8) IPPU.Joypads [ind];
+ Memory.FillRAM [0x421d] = (uint8) (IPPU.Joypads [ind] >> 8);
+ Memory.FillRAM [0x421e] = (uint8) IPPU.Joypads [2];
+ Memory.FillRAM [0x421f] = (uint8) (IPPU.Joypads [2] >> 8);
+ }
+ else
+ {
+ Memory.FillRAM [0x421c] = (uint8) IPPU.Joypads [3];
+ Memory.FillRAM [0x421d] = (uint8) (IPPU.Joypads [3] >> 8);
+ Memory.FillRAM [0x421e] = (uint8) IPPU.Joypads [4];
+ Memory.FillRAM [0x421f] = (uint8) (IPPU.Joypads [4] >> 8);
+ }
+ }
}
#ifndef ZSNES_FX
diff --git a/src/sdd1.cpp b/src/sdd1.cpp
index aa3da87..878bf4c 100644
--- a/src/sdd1.cpp
+++ b/src/sdd1.cpp
@@ -81,11 +81,7 @@ void S9xSDD1PostLoadState ()
S9xSetSDD1MemoryMap (i, Memory.FillRAM [0x4804 + i]);
}
-#ifndef _SNESPPC
static int S9xCompareSDD1LoggedDataEntries (const void *p1, const void *p2)
-#else
-static int _cdecl S9xCompareSDD1LoggedDataEntries (const void *p1, const void *p2)
-#endif
{
uint8 *b1 = (uint8 *) p1;
uint8 *b2 = (uint8 *) p2;
diff --git a/src/snaporig.cpp b/src/snaporig.cpp
index 833e1f9..26ee8b7 100644
--- a/src/snaporig.cpp
+++ b/src/snaporig.cpp
@@ -87,9 +87,6 @@ bool8_32 S9xLoadOrigSnapshot (const char *filename)
return (FALSE);
}
-#ifdef _SNESPPC
-#pragma warning(disable : 4018)
-#endif
static int ReadBlock (const char *key, void *block, int max_len, STREAM snap)
{
char buffer [20];