mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-24 07:30:24 +00:00
a4bae75d2a
-memclear 0 Initialize memory to zero -memclear 1 Initialize memory to random values -memclear 2 Initialize memory to 4 byte pattern: FF FF 00 00 -memclear 3 Initialize memory to even pages FF, odd pages 00 -memclear 4 Initialize memory to first half page 00, last half page FF -memclear 5 Initialize memory to first half page FF, last half page 00 -memclear 6 Initialize memory to byte offset of page (current memory address low byte) -memclear 7 Initialize memory to page address (current memory address high byte)
63 lines
1.9 KiB
C
63 lines
1.9 KiB
C
#pragma once
|
|
|
|
enum
|
|
{
|
|
// Note: All are in bytes!
|
|
APPLE_SLOT_SIZE = 0x0100, // 1 page = $Cx00 .. $CxFF (slot 1 .. 7)
|
|
APPLE_SLOT_BEGIN = 0xC100, // each slot has 1 page reserved for it
|
|
APPLE_SLOT_END = 0xC7FF, //
|
|
|
|
FIRMWARE_EXPANSION_SIZE = 0x0800, // 8 pages = $C800 .. $CFFF
|
|
FIRMWARE_EXPANSION_BEGIN = 0xC800, // [C800,CFFF)
|
|
FIRMWARE_EXPANSION_END = 0xCFFF //
|
|
};
|
|
|
|
enum MemoryInitPattern_e
|
|
{
|
|
MIP_ZERO
|
|
, MIP_RANDOM
|
|
, MIP_FF_FF_00_00
|
|
, MIP_FF_00_FULL_PAGE
|
|
, MIP_00_FF_HALF_PAGE
|
|
, MIP_FF_00_HALF_PAGE
|
|
, MIP_PAGE_ADDRESS_LOW
|
|
, MIP_PAGE_ADDRESS_HIGH
|
|
, NUM_MIP
|
|
};
|
|
extern MemoryInitPattern_e g_eMemoryInitPattern;
|
|
|
|
extern iofunction IORead[256];
|
|
extern iofunction IOWrite[256];
|
|
extern LPBYTE memwrite[0x100];
|
|
extern LPBYTE mem;
|
|
extern LPBYTE memdirty;
|
|
|
|
#ifdef RAMWORKS
|
|
extern UINT g_uMaxExPages; // user requested ram pages (from cmd line)
|
|
#endif
|
|
|
|
void RegisterIoHandler(UINT uSlot, iofunction IOReadC0, iofunction IOWriteC0, iofunction IOReadCx, iofunction IOWriteCx, LPVOID lpSlotParameter, BYTE* pExpansionRom);
|
|
|
|
void MemDestroy ();
|
|
bool MemGet80Store();
|
|
bool MemCheckSLOTCXROM();
|
|
LPBYTE MemGetAuxPtr(const WORD);
|
|
LPBYTE MemGetMainPtr(const WORD);
|
|
LPBYTE MemGetBankPtr(const UINT nBank);
|
|
LPBYTE MemGetCxRomPeripheral();
|
|
void MemInitialize ();
|
|
BYTE MemReadFloatingBus(const ULONG uExecutedCycles);
|
|
BYTE MemReadFloatingBus(const BYTE highbit, const ULONG uExecutedCycles);
|
|
void MemReset ();
|
|
void MemResetPaging ();
|
|
void MemUpdatePaging(BOOL initialize);
|
|
BYTE MemReturnRandomData (BYTE highbit);
|
|
LPVOID MemGetSlotParameters (UINT uSlot);
|
|
DWORD MemGetSnapshot(SS_BaseMemory* pSS);
|
|
DWORD MemSetSnapshot(SS_BaseMemory* pSS);
|
|
|
|
BYTE __stdcall IO_Null(WORD programcounter, WORD address, BYTE write, BYTE value, ULONG nCycles);
|
|
|
|
BYTE __stdcall MemCheckPaging (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nCyclesLeft);
|
|
BYTE __stdcall MemSetPaging(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nCyclesLeft);
|