AppleWin/source/CPU.h

34 lines
958 B
C
Raw Normal View History

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
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 ();
void CpuCalcCycles(ULONG nExecutedCycles);
2006-02-25 20:50:29 +00:00
DWORD CpuExecute (DWORD);
ULONG CpuGetCyclesThisVideoFrame(ULONG nExecutedCycles);
2006-02-25 20:50:29 +00:00
void CpuInitialize ();
void CpuSetupBenchmark ();
void CpuIrqReset();
void CpuIrqAssert(eIRQSRC Device);
void CpuIrqDeassert(eIRQSRC Device);
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);
BYTE CpuRead(USHORT addr, ULONG uExecutedCycles);
void CpuWrite(USHORT addr, BYTE a, ULONG uExecutedCycles);