2006-02-25 20:50:29 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
typedef struct _regsrec {
|
|
|
|
BYTE a; // accumulator
|
|
|
|
BYTE x; // index X
|
|
|
|
BYTE y; // index Y
|
|
|
|
BYTE ps; // processor status
|
|
|
|
WORD pc; // program counter
|
|
|
|
WORD sp; // stack pointer
|
2006-06-11 15:49:38 +00:00
|
|
|
BYTE bJammed; // CPU has crashed (NMOS 6502 only)
|
2006-02-25 20:50:29 +00:00
|
|
|
} regsrec, *regsptr;
|
|
|
|
|
|
|
|
extern regsrec regs;
|
|
|
|
extern unsigned __int64 g_nCumulativeCycles;
|
|
|
|
|
|
|
|
void CpuDestroy ();
|
2007-08-06 21:38:35 +00:00
|
|
|
void CpuCalcCycles(ULONG nExecutedCycles);
|
2006-02-25 20:50:29 +00:00
|
|
|
DWORD CpuExecute (DWORD);
|
2010-08-17 07:52:23 +00:00
|
|
|
ULONG CpuGetCyclesThisVideoFrame(ULONG nExecutedCycles);
|
2006-02-25 20:50:29 +00:00
|
|
|
void CpuInitialize ();
|
|
|
|
void CpuSetupBenchmark ();
|
2006-05-02 21:56:28 +00:00
|
|
|
void CpuIrqReset();
|
|
|
|
void CpuIrqAssert(eIRQSRC Device);
|
|
|
|
void CpuIrqDeassert(eIRQSRC Device);
|
2006-06-11 15:49:38 +00:00
|
|
|
void CpuNmiReset();
|
|
|
|
void CpuNmiAssert(eIRQSRC Device);
|
|
|
|
void CpuNmiDeassert(eIRQSRC Device);
|
|
|
|
void CpuReset ();
|
2006-02-25 20:50:29 +00:00
|
|
|
DWORD CpuGetSnapshot(SS_CPU6502* pSS);
|
|
|
|
DWORD CpuSetSnapshot(SS_CPU6502* pSS);
|
2008-08-19 21:36:31 +00:00
|
|
|
|
|
|
|
BYTE CpuRead(USHORT addr, ULONG uExecutedCycles);
|
|
|
|
void CpuWrite(USHORT addr, BYTE a, ULONG uExecutedCycles);
|
2014-09-14 15:12:55 +00:00
|
|
|
|
|
|
|
DWORD CpuGetEmulationTime_ms(void);
|