diff options
author | meepingsnesroms | 2016-10-18 18:38:32 -0700 |
---|---|---|
committer | meepingsnesroms | 2016-10-18 18:38:32 -0700 |
commit | 32cfef97a6f652c6f23c35db0a00eb1cd2d8b320 (patch) | |
tree | 13308752c72a85bf149ac902f06d8037333cc890 | |
parent | bb0fecf54bff6b2754f03cc0b9142386d02dcb04 (diff) | |
download | snes9x2002-32cfef97a6f652c6f23c35db0a00eb1cd2d8b320.tar.gz snes9x2002-32cfef97a6f652c6f23c35db0a00eb1cd2d8b320.tar.bz2 snes9x2002-32cfef97a6f652c6f23c35db0a00eb1cd2d8b320.zip |
Remove breakpoint functions.
No one should use this emu for testing, and those functions where just
floating there disconnected.
-rw-r--r-- | src/fxemu.c | 48 | ||||
-rw-r--r-- | src/fxemu.h | 7 | ||||
-rw-r--r-- | src/fxinst.c | 48 |
3 files changed, 2 insertions, 101 deletions
diff --git a/src/fxemu.c b/src/fxemu.c index 8cd2b66..fc2cc9c 100644 --- a/src/fxemu.c +++ b/src/fxemu.c @@ -629,10 +629,7 @@ int FxEmulate(uint32 nInstructions) /* Execute GSU session */
CF(IRQ);
- if (GSU.bBreakPoint)
- vCount = fx_ppfFunctionTable[FX_FUNCTION_RUN_TO_BREAKPOINT](nInstructions);
- else
- vCount = fx_ppfFunctionTable[FX_FUNCTION_RUN](nInstructions);
+ vCount = fx_ppfFunctionTable[FX_FUNCTION_RUN](nInstructions);
/* Store GSU registers */
fx_writeRegisterSpace();
@@ -644,49 +641,6 @@ int FxEmulate(uint32 nInstructions) return vCount;
}
-/* Breakpoints */
-void FxBreakPointSet(uint32 vAddress)
-{
- GSU.bBreakPoint = TRUE;
- GSU.vBreakPoint = USEX16(vAddress);
-}
-void FxBreakPointClear()
-{
- GSU.bBreakPoint = FALSE;
-}
-
-/* Step by step execution */
-int FxStepOver(uint32 nInstructions)
-{
- uint32 vCount;
- fx_readRegisterSpace();
-
- /* Check if the start address is valid */
- if (!fx_checkStartAddress())
- {
- CF(G);
-#if 0
- GSU.vIllegalAddress = (GSU.vPrgBankReg << 24) | R15;
- return FX_ERROR_ILLEGAL_ADDRESS;
-#else
- return 0;
-#endif
- }
-
- if (PIPE >= 0xf0)
- GSU.vStepPoint = USEX16(R15 + 3);
- else if ((PIPE >= 0x05 && PIPE <= 0x0f) || (PIPE >= 0xa0 && PIPE <= 0xaf))
- GSU.vStepPoint = USEX16(R15 + 2);
- else
- GSU.vStepPoint = USEX16(R15 + 1);
- vCount = fx_ppfFunctionTable[FX_FUNCTION_STEP_OVER](nInstructions);
- fx_writeRegisterSpace();
- if (GSU.vErrorCode)
- return GSU.vErrorCode;
- else
- return vCount;
-}
-
/* Errors */
int FxGetErrorCode()
{
diff --git a/src/fxemu.h b/src/fxemu.h index 133f646..2c03a97 100644 --- a/src/fxemu.h +++ b/src/fxemu.h @@ -112,13 +112,6 @@ extern int FxEmulate(uint32 nInstructions); extern void FxCacheWriteAccess(uint16 vAddress);
extern void FxFlushCache(); /* Callled when the G flag in SFR is set to zero */
-/* Breakpoint */
-extern void FxBreakPointSet(uint32 vAddress);
-extern void FxBreakPointClear();
-
-/* Step by step execution */
-extern int FxStepOver(uint32 nInstructions);
-
/* Errors */
extern int FxGetErrorCode();
extern int FxGetIllegalAddress();
diff --git a/src/fxinst.c b/src/fxinst.c index 527d13b..15c54ba 100644 --- a/src/fxinst.c +++ b/src/fxinst.c @@ -3357,59 +3357,13 @@ static uint32 fx_run(uint32 nInstructions) return (nInstructions - GSU.vInstCount);
}
-static uint32 fx_run_to_breakpoint(uint32 nInstructions)
-{
- uint32 vCounter = 0;
- while (TF(G) && vCounter < nInstructions)
- {
- vCounter++;
- FX_STEP;
- if (USEX16(R15) == GSU.vBreakPoint)
- {
- GSU.vErrorCode = FX_BREAKPOINT;
- break;
- }
- }
- /*
- #ifndef FX_ADDRESS_CHECK
- GSU.vPipeAdr = USEX16(R15-1) | (USEX8(GSU.vPrgBankReg)<<16);
- #endif
- */
- return vCounter;
-}
-
-static uint32 fx_step_over(uint32 nInstructions)
-{
- uint32 vCounter = 0;
- while (TF(G) && vCounter < nInstructions)
- {
- vCounter++;
- FX_STEP;
- if (USEX16(R15) == GSU.vBreakPoint)
- {
- GSU.vErrorCode = FX_BREAKPOINT;
- break;
- }
- if (USEX16(R15) == GSU.vStepPoint)
- break;
- }
- /*
- #ifndef FX_ADDRESS_CHECK
- GSU.vPipeAdr = USEX16(R15-1) | (USEX8(GSU.vPrgBankReg)<<16);
- #endif
- */
- return vCounter;
-}
-
#ifdef FX_FUNCTION_TABLE
uint32(*FX_FUNCTION_TABLE[])(uint32) =
#else
uint32(*fx_apfFunctionTable[])(uint32) =
#endif
{
- &fx_run,
- &fx_run_to_breakpoint,
- &fx_step_over,
+ &fx_run
};
/*** Special table for the different plot configurations ***/
|