--- hatari/tests/debugger/test-dummies.c 2019/04/09 08:55:02 1.1.1.5 +++ hatari/tests/debugger/test-dummies.c 2019/04/09 08:58:42 1.1.1.7 @@ -5,18 +5,23 @@ /* fake tracing flags */ #include "log.h" Uint64 LogTraceFlags = 0; +FILE *TraceFile; /* fake Hatari configuration variables for number parsing */ #include "configuration.h" CNF_PARAMS ConfigureParams; +/* fake hatari-glue.c */ +#include "hatari-glue.h" +struct uae_prefs currprefs; + /* fake options.c */ #include "options.h" bool Opt_IsAtariProgram(const char *path) { return false; } /* fake cycles stuff */ #include "cycles.h" -int CurrentInstrCycles; +Uint64 CyclesGlobalClockCounter; int Cycles_GetCounter(int nId) { return 0; } /* bring in gemdos defines (EMULATEDDRIVES) */ @@ -24,7 +29,12 @@ int Cycles_GetCounter(int nId) { return /* fake ST RAM, only 24-bit support */ #include "stMemory.h" +#if ENABLE_SMALL_MEM +static Uint8 _STRam[16*1024*1024]; +Uint8 *STRam = _STRam; +#else Uint8 STRam[16*1024*1024]; +#endif Uint32 STRamEnd = 4*1024*1024; Uint32 STMemory_ReadLong(Uint32 addr) { Uint32 val; @@ -68,36 +78,24 @@ bool STMemory_CheckAreaType(Uint32 addr, return true; } -/* fake memory banks */ -#include "memory.h" -addrbank *mem_banks[65536]; - -/* fake IO memory variables */ -#include "ioMem.h" -int nIoMemAccessSize; -Uint32 IoAccessBaseAddress; - /* fake CPU wrapper stuff */ #include "m68000.h" -int nWaitStateCycles; -cpu_instruction_t CpuInstruction; -void MakeFromSR(void) { } +Uint16 M68000_GetSR(void) { return 0x2700; } +void M68000_SetSR(Uint16 v) { } +void M68000_SetPC(uaecptr v) { } +void M68000_SetDebugger(bool debug) { } /* fake UAE core registers */ #include "newcpu.h" -cpuop_func *cpufunctbl[65536]; struct regstruct regs; -void MakeSR(void) { } +#if ENABLE_WINUAE_CPU +void m68k_dumpstate(uaecptr *nextpc, uaecptr prevpc) { } +void m68k_dumpstate_file (FILE *f, uaecptr *nextpc, uaecptr prevpc) { } +void m68k_disasm(uaecptr addr, uaecptr *nextpc, uaecptr lastpc, int cnt) { } +#else void m68k_dumpstate (FILE *f, uaecptr *nextpc) { } void m68k_disasm (FILE *f, uaecptr addr, uaecptr *nextpc, int cnt) { } - -/* fake memory snapshot */ -#include "memorySnapShot.h" -void MemorySnapShot_Store(void *pData, int Size) { } - -/* fake TOS variables */ -#include "tos.h" -Uint32 TosAddress, TosSize; +#endif /* fake debugui.c stuff */ #include "debug_priv.h" @@ -105,7 +103,9 @@ Uint32 TosAddress, TosSize; FILE *debugOutput; void DebugUI(debug_reason_t reason) { } int DebugUI_PrintCmdHelp(const char *psCmd) { return DEBUGGER_CMDDONE; } -char *DebugUI_MatchHelper(const char **strings, int items, const char *text, int state) { +int DebugUI_GetPageLines(int config, int defvalue) { return 25; } +char *DebugUI_MatchHelper(const char **strings, int items, const char *text, int state) +{ return NULL; } @@ -119,10 +119,12 @@ Uint32 DebugInfo_GetDATA(void) { ret Uint32 DebugInfo_GetBSS(void) { return 0x1f34; } /* fake debugdsp.c stuff */ +#ifdef ENABLE_DSP_EMU #include "debugdsp.h" void DebugDsp_InitSession(void) { } Uint32 DebugDsp_InstrCount(void) { return 0; } Uint32 DebugDsp_OpcodeType(void) { return 0; } +#endif /* use fake dsp.c stuff in case config.h is configured with DSP emu */ #include "dsp.h"