diff options
author | aliaspider | 2014-10-30 06:25:49 +0100 |
---|---|---|
committer | aliaspider | 2014-10-30 06:25:49 +0100 |
commit | 1fbc985d61038c52af8559bbac8ce801d2a1f0b8 (patch) | |
tree | 7f837cae2946d6da8420618c4214d0b23b9ed7a9 /source | |
parent | 9d26cad1e39af6e4c96a4efb5ae00332207163ca (diff) | |
download | snesemu-1fbc985d61038c52af8559bbac8ce801d2a1f0b8.tar.gz snesemu-1fbc985d61038c52af8559bbac8ce801d2a1f0b8.tar.bz2 snesemu-1fbc985d61038c52af8559bbac8ce801d2a1f0b8.zip |
remove ZSNES_FX defines
Diffstat (limited to 'source')
-rw-r--r-- | source/cpu.c | 14 | ||||
-rw-r--r-- | source/globals.c | 4 | ||||
-rw-r--r-- | source/memmap.c | 10 | ||||
-rw-r--r-- | source/ppu.c | 27 | ||||
-rw-r--r-- | source/snapshot.c | 25 |
5 files changed, 1 insertions, 79 deletions
diff --git a/source/cpu.c b/source/cpu.c index 977ac77..0bc9d6c 100644 --- a/source/cpu.c +++ b/source/cpu.c @@ -102,7 +102,6 @@ #include "obc1.h" -#ifndef ZSNES_FX #include "fxemu.h" extern struct FxInit_s SuperFX; @@ -112,7 +111,6 @@ void S9xResetSuperFX() SuperFX.vFlags = 0; //FX_FLAG_ROM_BUFFER;// | FX_FLAG_ADDRESS_CHECKING; FxReset(&SuperFX); } -#endif void S9xResetCPU() { @@ -164,20 +162,11 @@ void S9xResetCPU() S9xUnpackStatus(); } -#ifdef ZSNES_FX -void S9xResetSuperFX(); -bool8 WinterGold = 0; -extern uint8* C4Ram; -#endif - void S9xReset(void) { if (Settings.SuperFX) S9xResetSuperFX(); -#ifdef ZSNES_FX - WinterGold = Settings.WinterGold; -#endif ZeroMemory(Memory.FillRAM, 0x8000); memset(Memory.VRAM, 0x00, 0x10000); memset(Memory.RAM, 0x55, 0x20000); @@ -207,9 +196,6 @@ void S9xSoftReset(void) if (Settings.SuperFX) S9xResetSuperFX(); -#ifdef ZSNES_FX - WinterGold = Settings.WinterGold; -#endif ZeroMemory(Memory.FillRAM, 0x8000); memset(Memory.VRAM, 0x00, 0x10000); // memset (Memory.RAM, 0x55, 0x20000); diff --git a/source/globals.c b/source/globals.c index b28f88a..87307df 100644 --- a/source/globals.c +++ b/source/globals.c @@ -137,11 +137,7 @@ SSNESGameFixes SNESGameFixes; uint8 OpenBus = 0; -#ifndef ZSNES_FX struct FxInit_s SuperFX; -#else -uint8* SFXPlotTable = NULL; -#endif SPPU PPU; InternalPPU IPPU; diff --git a/source/memmap.c b/source/memmap.c index e3d474a..0dfeddf 100644 --- a/source/memmap.c +++ b/source/memmap.c @@ -121,12 +121,8 @@ #include <malloc.h> #endif -#ifndef ZSNES_FX #include "fxemu.h" extern struct FxInit_s SuperFX; -#else -extern uint8* SFXPlotTable; -#endif #ifndef SET_UI_COLOR #define SET_UI_COLOR(r,g,b) ; @@ -469,15 +465,11 @@ bool8 Init() Memory.ROM = Memory.ROM; Memory.SRAM = Memory.SRAM; -#ifdef ZSNES_FX - SFXPlotTable = ROM + 0x400000; -#else SuperFX.pvRegisters = &Memory.FillRAM [0x3000]; SuperFX.nRamBanks = 2; // Most only use 1. 1=64KB, 2=128KB=1024Mb SuperFX.pvRam = Memory.SRAM; SuperFX.nRomBanks = (2 * 1024 * 1024) / (32 * 1024); SuperFX.pvRom = (uint8*) Memory.ROM; -#endif ZeroMemory(IPPU.TileCache [TILE_2BIT], MAX_2BIT_TILES * 128); ZeroMemory(IPPU.TileCache [TILE_4BIT], MAX_4BIT_TILES * 128); @@ -1267,9 +1259,7 @@ uint32 caCRC32(uint8* array, uint32 size, register uint32 crc32) void InitROM(bool8 Interleaved) { -#ifndef ZSNES_FX SuperFX.nRomBanks = Memory.CalculatedSize >> 15; -#endif Settings.MultiPlayer5Master = Settings.MultiPlayer5; Settings.MouseMaster = Settings.Mouse; Settings.SuperScopeMaster = Settings.SuperScope; diff --git a/source/ppu.c b/source/ppu.c index a7d58a2..e0e451a 100644 --- a/source/ppu.c +++ b/source/ppu.c @@ -101,14 +101,9 @@ #include "srtc.h" #include "spc7110.h" -#ifndef ZSNES_FX #include "fxemu.h" #include "fxinst.h" extern struct FxInit_s SuperFX; -#else -void S9xSuperFXWriteReg(uint8, uint32); -uint8 S9xSuperFXReadReg(uint32); -#endif uint32 justifiers = 0xFFFF00AA; uint8 in_bit = 0; @@ -887,11 +882,6 @@ void S9xSetPPU(uint8 Byte, uint16 Address) if (!Settings.SuperFX) return; -#ifdef ZSNES_FX - Memory.FillRAM [Address] = Byte; - if (Address < 0x3040) - S9xSuperFXWriteReg(Byte, Address); -#else switch (Address) { case 0x3030: @@ -942,7 +932,6 @@ void S9xSetPPU(uint8 Byte, uint16 Address) FxCacheWriteAccess(Address); break; } -#endif return; } } @@ -1375,19 +1364,7 @@ uint8 S9xGetPPU(uint16 Address) if (!Settings.SuperFX) return OpenBus; -#ifdef ZSNES_FX - if (Address < 0x3040) - byte = S9xSuperFXReadReg(Address); - else - byte = Memory.FillRAM [Address]; -#ifdef CPU_SHUTDOWN - if (Address == 0x3030) - CPU.WaitAddress = CPU.PCAtOpcodeStart; -#endif - if (Address == 0x3031) - CLEAR_IRQ_SOURCE(GSU_IRQ_SOURCE); -#else byte = Memory.FillRAM [Address]; //if (Address != 0x3030 && Address != 0x3031) @@ -1403,7 +1380,6 @@ uint8 S9xGetPPU(uint16 Address) Memory.FillRAM [0x3031] = byte & 0x7f; } return (byte); -#endif } // fprintf(stderr, "%03d: %02x from %04x\n", CPU.V_Counter, byte, Address); return (byte); @@ -2793,7 +2769,7 @@ void S9xUpdateJoypads() } -#ifndef ZSNES_FX + void S9xSuperFXExec() { #if 1 @@ -2971,7 +2947,6 @@ void S9xSuperFXExec() S9xSetIRQ(GSU_IRQ_SOURCE); #endif } -#endif // Register reads and writes... diff --git a/source/snapshot.c b/source/snapshot.c index da0ba77..2b1edc0 100644 --- a/source/snapshot.c +++ b/source/snapshot.c @@ -116,12 +116,6 @@ extern uint8* SRAM; -#ifdef ZSNES_FX -void S9xSuperFXPreSaveState(); -void S9xSuperFXPostSaveState(); -void S9xSuperFXPostLoadState(); -#endif - bool8 S9xUnfreezeZSNES(const char* filename); typedef struct @@ -651,11 +645,6 @@ void S9xFreezeToStream(STREAM stream) char buffer [1024]; int i; -#ifdef ZSNES_FX - if (Settings.SuperFX) - S9xSuperFXPreSaveState(); -#endif - S9xUpdateRTC(); S9xSRTCPreSaveState(); @@ -705,11 +694,6 @@ void S9xFreezeToStream(STREAM stream) FreezeStruct(stream, "SP7", &s7r, SnapSPC7110, COUNT(SnapSPC7110)); if (Settings.SPC7110RTC) FreezeStruct(stream, "RTC", &rtc_f9, SnapS7RTC, COUNT(SnapS7RTC)); - -#ifdef ZSNES_FX - if (Settings.SuperFX) - S9xSuperFXPostSaveState(); -#endif } int S9xUnfreezeFromStream(STREAM stream) @@ -913,11 +897,6 @@ int S9xUnfreezeFromStream(STREAM stream) S9xFixCycles(); // S9xReschedule (); // <-- this causes desync when recording or playing movies -#ifdef ZSNES_FX - if (Settings.SuperFX) - S9xSuperFXPostLoadState(); -#endif - S9xSRTCPostLoadState(); if (Settings.SDD1) S9xSDD1PostLoadState(); @@ -1805,10 +1784,6 @@ bool8 S9xUnfreezeZSNES(const char* filename) S9xUnpackStatus(); S9xFixCycles(); S9xReschedule(); -#ifdef ZSNES_FX - if (Settings.SuperFX) - S9xSuperFXPostLoadState(); -#endif return (TRUE); } fclose(fs); |