From 2f167567f523f63f95858fbd7fe281acb30aaffa Mon Sep 17 00:00:00 2001 From: zones Date: Sun, 28 Nov 2010 22:35:41 +0900 Subject: [PATCH] Fix HIRQ --- controls.cpp | 6 --- cpu.cpp | 2 +- cpuexec.cpp | 39 +++++++++++++++++++ cpuexec.h | 44 +++------------------ debug.cpp | 4 +- dma.cpp | 14 +------ docs/snes9x.conf.default | 3 -- macosx/mac-global_prefix.h | 1 - macosx/mac-prefix.h | 2 +- ppu.cpp | 70 +++++---------------------------- ppu.h | 4 -- snapshot.cpp | 79 +++++++++++++++++++++++++++++++------- snapshot.h | 2 +- snes9x.cpp | 10 ----- snes9x.h | 2 - unix/Makefile.in | 2 +- unix/x11.cpp | 1 - 17 files changed, 126 insertions(+), 159 deletions(-) mode change 100644 => 100755 macosx/mac-prefix.h diff --git a/controls.cpp b/controls.cpp index b34bf95b..5985781d 100644 --- a/controls.cpp +++ b/controls.cpp @@ -425,7 +425,6 @@ static const int ptrspeeds[4] = { 1, 1, 4, 8 }; S(ToggleBG2), \ S(ToggleBG3), \ S(ToggleEmuTurbo), \ - S(ToggleHDMA), \ S(ToggleSprites), \ S(ToggleTransparency) \ @@ -2454,11 +2453,6 @@ void S9xApplyCommand (s9xcommand_t cmd, int16 data1, int16 data2) DisplayStateChange("Sprites", !(Settings.BG_Forced & 16)); break; - case ToggleHDMA: - Settings.DisableHDMA = !Settings.DisableHDMA; - DisplayStateChange("HDMA emulation", !Settings.DisableHDMA); - break; - case ToggleTransparency: Settings.Transparency = !Settings.Transparency; DisplayStateChange("Transparency effects", Settings.Transparency); diff --git a/cpu.cpp b/cpu.cpp index 03ebbce4..547a4469 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -217,7 +217,7 @@ static void S9xSoftResetCPU (void) CPU.IRQTransition = FALSE; CPU.IRQLastState = FALSE; CPU.IRQExternal = FALSE; - CPU.IRQPending = 0; + CPU.IRQPending = Timings.IRQPendCount; CPU.MemSpeed = SLOW_ONE_CYCLE; CPU.MemSpeedx2 = SLOW_ONE_CYCLE * 2; CPU.FastROMSpeed = SLOW_ONE_CYCLE; diff --git a/cpuexec.cpp b/cpuexec.cpp index 5307ce85..9e548bea 100644 --- a/cpuexec.cpp +++ b/cpuexec.cpp @@ -187,6 +187,8 @@ #include "missing.h" #endif +static inline void S9xReschedule (void); + void S9xMainLoop (void) { @@ -221,6 +223,7 @@ void S9xMainLoop (void) } CPU.IRQTransition = FALSE; + CPU.IRQPending = Timings.IRQPendCount; if (!CheckFlag(IRQ)) S9xOpcode_IRQ(); @@ -306,6 +309,42 @@ void S9xMainLoop (void) } } +static inline void S9xReschedule (void) +{ + switch (CPU.WhichEvent) + { + case HC_HBLANK_START_EVENT: + CPU.WhichEvent = HC_HDMA_START_EVENT; + CPU.NextEvent = Timings.HDMAStart; + break; + + case HC_HDMA_START_EVENT: + CPU.WhichEvent = HC_HCOUNTER_MAX_EVENT; + CPU.NextEvent = Timings.H_Max; + break; + + case HC_HCOUNTER_MAX_EVENT: + CPU.WhichEvent = HC_HDMA_INIT_EVENT; + CPU.NextEvent = Timings.HDMAInit; + break; + + case HC_HDMA_INIT_EVENT: + CPU.WhichEvent = HC_RENDER_EVENT; + CPU.NextEvent = Timings.RenderPos; + break; + + case HC_RENDER_EVENT: + CPU.WhichEvent = HC_WRAM_REFRESH_EVENT; + CPU.NextEvent = Timings.WRAMRefreshPos; + break; + + case HC_WRAM_REFRESH_EVENT: + CPU.WhichEvent = HC_HBLANK_START_EVENT; + CPU.NextEvent = Timings.HBlankStart; + break; + } +} + void S9xDoHEventProcessing (void) { #ifdef DEBUGGER diff --git a/cpuexec.h b/cpuexec.h index 64021872..ccfadd5c 100644 --- a/cpuexec.h +++ b/cpuexec.h @@ -270,42 +270,6 @@ static inline void S9xFixCycles (void) } } -static inline void S9xReschedule (void) -{ - switch (CPU.WhichEvent) - { - case HC_HBLANK_START_EVENT: - CPU.WhichEvent = HC_HDMA_START_EVENT; - CPU.NextEvent = Timings.HDMAStart; - break; - - case HC_HDMA_START_EVENT: - CPU.WhichEvent = HC_HCOUNTER_MAX_EVENT; - CPU.NextEvent = Timings.H_Max; - break; - - case HC_HCOUNTER_MAX_EVENT: - CPU.WhichEvent = HC_HDMA_INIT_EVENT; - CPU.NextEvent = Timings.HDMAInit; - break; - - case HC_HDMA_INIT_EVENT: - CPU.WhichEvent = HC_RENDER_EVENT; - CPU.NextEvent = Timings.RenderPos; - break; - - case HC_RENDER_EVENT: - CPU.WhichEvent = HC_WRAM_REFRESH_EVENT; - CPU.NextEvent = Timings.WRAMRefreshPos; - break; - - case HC_WRAM_REFRESH_EVENT: - CPU.WhichEvent = HC_HBLANK_START_EVENT; - CPU.NextEvent = Timings.HBlankStart; - break; - } -} - static inline void S9xCheckInterrupts (void) { bool8 thisIRQ = PPU.HTimerEnabled || PPU.VTimerEnabled; @@ -315,7 +279,11 @@ static inline void S9xCheckInterrupts (void) if (PPU.HTimerEnabled) { - if (CPU.PrevCycles >= PPU.HTimerPosition || CPU.Cycles < PPU.HTimerPosition) + int32 htimepos = PPU.HTimerPosition; + if (CPU.Cycles >= Timings.H_Max) + htimepos += Timings.H_Max; + + if (CPU.PrevCycles >= htimepos || CPU.Cycles < htimepos) thisIRQ = FALSE; } @@ -324,7 +292,7 @@ static inline void S9xCheckInterrupts (void) int32 vcounter = CPU.V_Counter; if (CPU.Cycles >= Timings.H_Max) vcounter++; - + if (vcounter != PPU.VTimerPosition) thisIRQ = FALSE; } diff --git a/debug.cpp b/debug.cpp index 52104dad..fdd90d75 100644 --- a/debug.cpp +++ b/debug.cpp @@ -872,7 +872,7 @@ static uint8 debug_cpu_op_print (char *Line, uint8 Bank, uint16 Address) break; } - sprintf(Line, "%-44s A:%04X X:%04X Y:%04X D:%04X DB:%02X S:%04X P:%c%c%c%c%c%c%c%c%c HC:%04ld VC:%03ld FC:%02d %02x", + sprintf(Line, "%-44s A:%04X X:%04X Y:%04X D:%04X DB:%02X S:%04X P:%c%c%c%c%c%c%c%c%c HC:%04ld VC:%03ld FC:%02d %03x", Line, Registers.A.W, Registers.X.W, Registers.Y.W, Registers.D.W, Registers.DB, Registers.S.W, CheckEmulation() ? 'E' : 'e', @@ -887,7 +887,7 @@ static uint8 debug_cpu_op_print (char *Line, uint8 Bank, uint16 Address) (long) CPU.Cycles, (long) CPU.V_Counter, IPPU.FrameCount, - (PPU.HTimerEnabled ? 0x10 : 0) | (PPU.VTimerEnabled ? 0x01 : 0)); + (CPU.IRQExternal ? 0x100 : 0) | (PPU.HTimerEnabled ? 0x10 : 0) | (PPU.VTimerEnabled ? 0x01 : 0)); return (Size); } diff --git a/dma.cpp b/dma.cpp index cb9fb3dd..bf171090 100644 --- a/dma.cpp +++ b/dma.cpp @@ -741,9 +741,6 @@ bool8 S9xDoDMA (uint8 Channel) break; case 0x18: // VMDATAL - #ifndef CORRECT_VRAM_READS - IPPU.FirstVRAMRead = TRUE; - #endif if (!PPU.VMA.FullGraphicCount) { do @@ -766,9 +763,6 @@ bool8 S9xDoDMA (uint8 Channel) break; case 0x19: // VMDATAH - #ifndef CORRECT_VRAM_READS - IPPU.FirstVRAMRead = TRUE; - #endif if (!PPU.VMA.FullGraphicCount) { do @@ -837,9 +831,6 @@ bool8 S9xDoDMA (uint8 Channel) if (d->BAddress == 0x18) { // VMDATAL - #ifndef CORRECT_VRAM_READS - IPPU.FirstVRAMRead = TRUE; - #endif if (!PPU.VMA.FullGraphicCount) { switch (b) @@ -1373,10 +1364,7 @@ static inline bool8 HDMAReadLineCount (int d) void S9xStartHDMA (void) { - if (Settings.DisableHDMA) - PPU.HDMA = 0; - else - PPU.HDMA = Memory.FillRAM[0x420c]; + PPU.HDMA = Memory.FillRAM[0x420c]; #ifdef DEBUGGER missing.hdma_this_frame = PPU.HDMA; diff --git a/docs/snes9x.conf.default b/docs/snes9x.conf.default index c7992087..4f36d25c 100644 --- a/docs/snes9x.conf.default +++ b/docs/snes9x.conf.default @@ -67,8 +67,6 @@ Justifier2Crosshair = 4 MagicPink/Black EnableGameSpecificHacks = TRUE AllowInvalidVRAMAccess = FALSE SpeedHacks = FALSE -DisableIRQ = FALSE -DisableHDMA = FALSE HDMATiming = 100 [Netplay] @@ -231,7 +229,6 @@ K00:4 = ToggleBG3 K00:5 = ToggleSprites K00:9 = ToggleTransparency K00:BackSpace = ClipWindows -K00:0 = ToggleHDMA K00:A+Escape = Debugger M00:Pointer = Pointer Mouse1+Superscope+Justifier1 M00:B0 = {Mouse1 L,Superscope Fire,Justifier1 Trigger} diff --git a/macosx/mac-global_prefix.h b/macosx/mac-global_prefix.h index 25990e2a..8617a352 100644 --- a/macosx/mac-global_prefix.h +++ b/macosx/mac-global_prefix.h @@ -200,7 +200,6 @@ #define JMA_SUPPORT #define USE_OPENGL #define RIGHTSHIFT_IS_SAR -#define CORRECT_VRAM_READS #define HAVE_STDINT_H #define DEBUGGER diff --git a/macosx/mac-prefix.h b/macosx/mac-prefix.h old mode 100644 new mode 100755 index 7aeb2cb0..b1713af9 --- a/macosx/mac-prefix.h +++ b/macosx/mac-prefix.h @@ -197,7 +197,7 @@ #define kMacS9XCFString CFSTR("Snes9x") -#define MAC_VERSION "100" +#define MAC_VERSION "102" #include diff --git a/ppu.cpp b/ppu.cpp index 76c3c6d8..a9dc271f 100644 --- a/ppu.cpp +++ b/ppu.cpp @@ -275,6 +275,11 @@ void S9xUpdateHVTimerPosition (void) if (PPU.VTimerPosition >= Timings.V_Max) PPU.VTimerPosition = 0; } + +#ifdef DEBUGGER + S9xTraceFormattedMessage("--- IRQ Timer set HTimer:%d Pos:%04d VTimer:%d Pos:%03d", + PPU.HTimerEnabled, PPU.HTimerPosition, PPU.VTimerEnabled, PPU.VTimerPosition); +#endif } void S9xFixColourBrightness (void) @@ -618,7 +623,7 @@ void S9xSetPPU (uint8 Byte, uint16 Address) case 0x2116: // VMADDL PPU.VMA.Address &= 0xff00; PPU.VMA.Address |= Byte; - #ifdef CORRECT_VRAM_READS + if (PPU.VMA.FullGraphicCount) { uint32 addr = PPU.VMA.Address; @@ -628,15 +633,13 @@ void S9xSetPPU (uint8 Byte, uint16 Address) } else IPPU.VRAMReadBuffer = READ_WORD(Memory.VRAM + ((PPU.VMA.Address << 1) & 0xffff)); - #else - IPPU.FirstVRAMRead = TRUE; - #endif + break; case 0x2117: // VMADDH PPU.VMA.Address &= 0x00ff; PPU.VMA.Address |= Byte << 8; - #ifdef CORRECT_VRAM_READS + if (PPU.VMA.FullGraphicCount) { uint32 addr = PPU.VMA.Address; @@ -646,22 +649,14 @@ void S9xSetPPU (uint8 Byte, uint16 Address) } else IPPU.VRAMReadBuffer = READ_WORD(Memory.VRAM + ((PPU.VMA.Address << 1) & 0xffff)); - #else - IPPU.FirstVRAMRead = TRUE; - #endif + break; case 0x2118: // VMDATAL - #ifndef CORRECT_VRAM_READS - IPPU.FirstVRAMRead = TRUE; - #endif REGISTER_2118(Byte); break; case 0x2119: // VMDATAH - #ifndef CORRECT_VRAM_READS - IPPU.FirstVRAMRead = TRUE; - #endif REGISTER_2119(Byte); break; @@ -1213,7 +1208,6 @@ uint8 S9xGetPPU (uint16 Address) return (PPU.OpenBus1 = byte); case 0x2139: // VMDATALREAD - #ifdef CORRECT_VRAM_READS byte = IPPU.VRAMReadBuffer & 0xff; if (!PPU.VMA.High) { @@ -1229,33 +1223,13 @@ uint8 S9xGetPPU (uint16 Address) PPU.VMA.Address += PPU.VMA.Increment; } - #else - if (IPPU.FirstVRAMRead) - byte = Memory.VRAM[(PPU.VMA.Address << 1) & 0xffff]; - else - if (PPU.VMA.FullGraphicCount) - { - uint32 addr = PPU.VMA.Address - 1; - uint32 rem = addr & PPU.VMA.Mask1; - uint32 address = (addr & ~PPU.VMA.Mask1) + (rem >> PPU.VMA.Shift) + ((rem & (PPU.VMA.FullGraphicCount - 1)) << 3); - byte = Memory.VRAM[((address << 1) - 2) & 0xffff]; - } - else - byte = Memory.VRAM[((PPU.VMA.Address << 1) - 2) & 0xffff]; - if (!PPU.VMA.High) - { - PPU.VMA.Address += PPU.VMA.Increment; - IPPU.FirstVRAMRead = FALSE; - } - #endif #ifdef DEBUGGER missing.vram_read = 1; #endif return (PPU.OpenBus1 = byte); case 0x213a: // VMDATAHREAD - #ifdef CORRECT_VRAM_READS byte = (IPPU.VRAMReadBuffer >> 8) & 0xff; if (PPU.VMA.High) { @@ -1271,26 +1245,6 @@ uint8 S9xGetPPU (uint16 Address) PPU.VMA.Address += PPU.VMA.Increment; } - #else - if (IPPU.FirstVRAMRead) - byte = Memory.VRAM[((PPU.VMA.Address << 1) + 1) & 0xffff]; - else - if (PPU.VMA.FullGraphicCount) - { - uint32 addr = PPU.VMA.Address - 1; - uint32 rem = addr & PPU.VMA.Mask1; - uint32 address = (addr & ~PPU.VMA.Mask1) + (rem >> PPU.VMA.Shift) + ((rem & (PPU.VMA.FullGraphicCount - 1)) << 3); - byte = Memory.VRAM[((address << 1) - 1) & 0xffff]; - } - else - byte = Memory.VRAM[((PPU.VMA.Address << 1) - 1) & 0xffff]; - - if (PPU.VMA.High) - { - PPU.VMA.Address += PPU.VMA.Increment; - IPPU.FirstVRAMRead = FALSE; - } - #endif #ifdef DEBUGGER missing.vram_read = 1; #endif @@ -1657,8 +1611,6 @@ void S9xSetCPU (uint8 Byte, uint16 Address) case 0x420c: // HDMAEN if (CPU.InDMAorHDMA) return; - if (Settings.DisableHDMA) - Byte = 0; Memory.FillRAM[0x420c] = Byte; // Yoshi's Island, Genjyu Ryodan, Mortal Kombat, Tales of Phantasia PPU.HDMA = Byte & ~PPU.HDMAEnded; @@ -2005,11 +1957,7 @@ void S9xSoftResetPPU (void) ZeroMemory(IPPU.TileCached[TILE_2BIT_ODD], MAX_2BIT_TILES); ZeroMemory(IPPU.TileCached[TILE_4BIT_EVEN], MAX_4BIT_TILES); ZeroMemory(IPPU.TileCached[TILE_4BIT_ODD], MAX_4BIT_TILES); -#ifdef CORRECT_VRAM_READS IPPU.VRAMReadBuffer = 0; // XXX: FIXME: anything better? -#else - IPPU.FirstVRAMRead = FALSE; -#endif IPPU.Interlace = FALSE; IPPU.InterlaceOBJ = FALSE; IPPU.DoubleWidthPixels = FALSE; diff --git a/ppu.h b/ppu.h index 459e4b70..c5cb9d7a 100644 --- a/ppu.h +++ b/ppu.h @@ -213,11 +213,7 @@ struct InternalPPU bool8 DirectColourMapsNeedRebuild; uint8 *TileCache[7]; uint8 *TileCached[7]; -#ifdef CORRECT_VRAM_READS uint16 VRAMReadBuffer; -#else - bool8 FirstVRAMRead; -#endif bool8 Interlace; bool8 InterlaceOBJ; bool8 PseudoHires; diff --git a/snapshot.cpp b/snapshot.cpp index 10ec8b1c..060d5daa 100644 --- a/snapshot.cpp +++ b/snapshot.cpp @@ -342,7 +342,7 @@ struct SnapshotScreenshotInfo static struct Obsolete { - uint8 reserved; + uint8 CPU_IRQActive; } Obsolete; #define STRUCT struct SCPUState @@ -353,7 +353,7 @@ static FreezeData SnapCPU[] = INT_ENTRY(6, PrevCycles), INT_ENTRY(6, V_Counter), INT_ENTRY(6, Flags), -// INT_ENTRY(6, IRQActive), + OBSOLETE_INT_ENTRY(6, 7, CPU_IRQActive), INT_ENTRY(6, IRQPending), INT_ENTRY(6, MemSpeed), INT_ENTRY(6, MemSpeedx2), @@ -366,9 +366,14 @@ static FreezeData SnapCPU[] = INT_ENTRY(6, WhichEvent), INT_ENTRY(6, NextEvent), INT_ENTRY(6, WaitingForInterrupt), -// INT_ENTRY(6, WaitAddress), -// INT_ENTRY(6, WaitCounter), -// INT_ENTRY(6, PBPCAtOpcodeStart) + DELETED_INT_ENTRY(6, 7, WaitAddress, 4), + DELETED_INT_ENTRY(6, 7, WaitCounter, 4), + DELETED_INT_ENTRY(6, 7, PBPCAtOpcodeStart, 4), + INT_ENTRY(7, NMILine), + INT_ENTRY(7, IRQLine), + INT_ENTRY(7, IRQTransition), + INT_ENTRY(7, IRQLastState), + INT_ENTRY(7, IRQExternal) }; #undef STRUCT @@ -576,7 +581,9 @@ static FreezeData SnapTimings[] = INT_ENTRY(6, DMACPUSync), INT_ENTRY(6, NMIDMADelay), INT_ENTRY(6, IRQPendCount), - INT_ENTRY(6, APUSpeedup) + INT_ENTRY(6, APUSpeedup), + INT_ENTRY(7, IRQTriggerCycles), + INT_ENTRY(7, APUAllowTimeOverflow) }; #ifndef ZSNES_FX @@ -649,17 +656,17 @@ static FreezeData SnapFX[] = static FreezeData SnapSA1[] = { -// INT_ENTRY(6, CPUExecuting), + DELETED_INT_ENTRY(6, 7, CPUExecuting, 1), INT_ENTRY(6, ShiftedPB), INT_ENTRY(6, ShiftedDB), INT_ENTRY(6, Flags), -// INT_ENTRY(6, IRQActive), -// INT_ENTRY(6, Waiting), + DELETED_INT_ENTRY(6, 7, IRQActive, 1), + DELETED_INT_ENTRY(6, 7, Waiting, 1), INT_ENTRY(6, WaitingForInterrupt), -// INT_ENTRY(6, WaitAddress), -// INT_ENTRY(6, WaitCounter), -// INT_ENTRY(6, PBPCAtOpcodeStart), -// INT_ENTRY(6, Executing), + DELETED_INT_ENTRY(6, 7, WaitAddress, 4), + DELETED_INT_ENTRY(6, 7, WaitCounter, 4), + DELETED_INT_ENTRY(6, 7, PBPCAtOpcodeStart, 4), + DELETED_INT_ENTRY(6, 7, Executing, 1), INT_ENTRY(6, overflow), INT_ENTRY(6, in_char_dma), INT_ENTRY(6, op1), @@ -667,7 +674,17 @@ static FreezeData SnapSA1[] = INT_ENTRY(6, arithmetic_op), INT_ENTRY(6, sum), INT_ENTRY(6, VirtualBitmapFormat), - INT_ENTRY(6, variable_bit_pos) + INT_ENTRY(6, variable_bit_pos), + INT_ENTRY(7, Cycles), + INT_ENTRY(7, PrevCycles), + INT_ENTRY(7, TimerIRQLastState), + INT_ENTRY(7, HTimerIRQPos), + INT_ENTRY(7, VTimerIRQPos), + INT_ENTRY(7, HCounter), + INT_ENTRY(7, VCounter), + INT_ENTRY(7, PrevHCounter), + INT_ENTRY(7, MemSpeed), + INT_ENTRY(7, MemSpeedx2) }; #undef STRUCT @@ -1686,6 +1703,40 @@ int S9xUnfreezeFromStream (STREAM stream) if (local_bsx_data) UnfreezeStructFromCopy(&BSX, SnapBSX, COUNT(SnapBSX), local_bsx_data, version); + if (version < SNAPSHOT_VERSION) + { + printf("Converting old snapshot version %d to %d\n...", version, SNAPSHOT_VERSION); + + CPU.NMILine = (CPU.Flags & (1 << 7)) ? TRUE : FALSE; + CPU.IRQLine = (CPU.Flags & (1 << 11)) ? TRUE : FALSE; + CPU.IRQTransition = FALSE; + CPU.IRQLastState = FALSE; + CPU.IRQExternal = (Obsolete.CPU_IRQActive & ~(1 << 1)) ? TRUE : FALSE; + + switch (CPU.WhichEvent) + { + case 12: case 1: CPU.WhichEvent = 1; break; + case 2: case 3: CPU.WhichEvent = 2; break; + case 4: case 5: CPU.WhichEvent = 3; break; + case 6: case 7: CPU.WhichEvent = 4; break; + case 8: case 9: CPU.WhichEvent = 5; break; + case 10: case 11: CPU.WhichEvent = 6; break; + } + + if (local_sa1) // FIXME + { + SA1.Cycles = SA1.PrevCycles = 0; + SA1.TimerIRQLastState = FALSE; + SA1.HTimerIRQPos = Memory.FillRAM[0x2212] | (Memory.FillRAM[0x2213] << 8); + SA1.VTimerIRQPos = Memory.FillRAM[0x2214] | (Memory.FillRAM[0x2215] << 8); + SA1.HCounter = 0; + SA1.VCounter = 0; + SA1.PrevHCounter = 0; + SA1.MemSpeed = SLOW_ONE_CYCLE; + SA1.MemSpeedx2 = SLOW_ONE_CYCLE * 2; + } + } + CPU.Flags |= old_flags & (DEBUG_MODE_FLAG | TRACE_FLAG | SINGLE_STEP_FLAG | FRAME_ADVANCE_FLAG); ICPU.ShiftedPB = Registers.PB << 16; ICPU.ShiftedDB = Registers.DB << 16; diff --git a/snapshot.h b/snapshot.h index b3ead241..55c72d7f 100644 --- a/snapshot.h +++ b/snapshot.h @@ -179,7 +179,7 @@ #define _SNAPSHOT_H_ #define SNAPSHOT_MAGIC "#!s9xsnp" -#define SNAPSHOT_VERSION 6 +#define SNAPSHOT_VERSION 7 #define SUCCESS 1 #define WRONG_FORMAT (-1) diff --git a/snes9x.cpp b/snes9x.cpp index dce5cf83..85eb33b7 100644 --- a/snes9x.cpp +++ b/snes9x.cpp @@ -466,8 +466,6 @@ void S9xLoadConfigFiles (char **argv, int argc) Settings.DisableGameSpecificHacks = !conf.GetBool("Hack::EnableGameSpecificHacks", true); Settings.BlockInvalidVRAMAccessMaster = !conf.GetBool("Hack::AllowInvalidVRAMAccess", false); - Settings.DisableIRQ = conf.GetBool("Hack::DisableIRQ", false); - Settings.DisableHDMA = conf.GetBool("Hack::DisableHDMA", false); Settings.HDMATimingHack = conf.GetInt ("Hack::HDMATiming", 100); // Netplay @@ -585,8 +583,6 @@ void S9xUsage (void) S9xMessage(S9X_INFO, S9X_USAGE, "-debug Set the Debugger flag"); S9xMessage(S9X_INFO, S9X_USAGE, "-trace Begin CPU instruction tracing"); #endif - S9xMessage(S9X_INFO, S9X_USAGE, "-noirq (Not recommended) Disable IRQ emulation"); - S9xMessage(S9X_INFO, S9X_USAGE, "-nohdma (Not recommended) Disable HDMA emulation"); S9xMessage(S9X_INFO, S9X_USAGE, "-hdmatiming <1-199> (Not recommended) Changes HDMA transfer timings"); S9xMessage(S9X_INFO, S9X_USAGE, " event comes"); S9xMessage(S9X_INFO, S9X_USAGE, "-invalidvramaccess (Not recommended) Allow invalid VRAM access"); @@ -850,12 +846,6 @@ char * S9xParseArgs (char **argv, int argc) else #endif - if (!strcasecmp(argv[i], "-noirq")) - Settings.DisableIRQ = TRUE; - else - if (!strcasecmp(argv[i], "-nohdma")) - Settings.DisableHDMA = TRUE; - else if (!strcasecmp(argv[i], "-hdmatiming")) { if (i + 1 < argc) diff --git a/snes9x.h b/snes9x.h index df11ab58..ccab8775 100644 --- a/snes9x.h +++ b/snes9x.h @@ -399,8 +399,6 @@ struct SSettings bool8 DisableGameSpecificHacks; bool8 BlockInvalidVRAMAccessMaster; bool8 BlockInvalidVRAMAccess; - bool8 DisableIRQ; - bool8 DisableHDMA; int32 HDMATimingHack; bool8 ForcedPause; diff --git a/unix/Makefile.in b/unix/Makefile.in index 29ce24fd..4faae65b 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -10,7 +10,7 @@ OS = `uname -s -r -m|sed \"s/ /-/g\"|tr \"[A-Z]\" \"[a-z]\"|tr \"/()\" \ BUILDDIR = . OBJECTS = ../apu/apu.o ../apu/SNES_SPC.o ../apu/SNES_SPC_misc.o ../apu/SNES_SPC_state.o ../apu/SPC_DSP.o ../apu/SPC_Filter.o ../bsx.o ../cheats.o ../cheats2.o ../clip.o ../conffile.o ../controls.o ../cpu.o ../cpuexec.o ../cpuops.o ../crosshairs.o ../dma.o ../dsp.o ../dsp1.o ../dsp2.o ../dsp3.o ../dsp4.o ../gfx.o ../globals.o ../logger.o ../memmap.o ../movie.o ../obc1.o ../ppu.o ../reader.o ../sa1.o ../sa1cpu.o ../screenshot.o ../sdd1.o ../sdd1emu.o ../seta.o ../seta010.o ../seta011.o ../seta018.o ../snapshot.o ../snes9x.o ../spc7110.o ../srtc.o ../tile.o ../filter/2xsai.o ../filter/blit.o ../filter/epx.o ../filter/hq2x.o ../filter/snes_ntsc.o unix.o x11.o -DEFS = -DMITSHM -DCPU_SHUTDOWN -DSPC700_SHUTDOWN -DCORRECT_VRAM_READS +DEFS = -DMITSHM ifdef S9XZSNESFX OBJECTS += ../i386/fxemu2.o ../i386/fxemu2b.o ../i386/fxemu2c.o ../i386/fxtable.o ../i386/sfxproc.o ../i386/zsnes.o diff --git a/unix/x11.cpp b/unix/x11.cpp index cf509496..abcb3b74 100644 --- a/unix/x11.cpp +++ b/unix/x11.cpp @@ -451,7 +451,6 @@ const char * S9xParseDisplayConfig (ConfigFile &conf, int pass) keymaps.push_back(strpair_t("K00:3", "ToggleBG2")); keymaps.push_back(strpair_t("K00:4", "ToggleBG3")); keymaps.push_back(strpair_t("K00:5", "ToggleSprites")); - keymaps.push_back(strpair_t("K00:0", "ToggleHDMA")); keymaps.push_back(strpair_t("K00:9", "ToggleTransparency")); keymaps.push_back(strpair_t("K00:BackSpace", "ClipWindows")); keymaps.push_back(strpair_t("K00:A+Escape", "Debugger"));