]> Shamusworld >> Repos - apple2/blob - src/mmu.h
8427e769dffcec87bba50253a360bd91e2c71866
[apple2] / src / mmu.h
1 #ifndef __MMU_H__
2 #define __MMU_H__
3
4 #include <stdint.h>
5
6 // Macros for function pointers
7 #define READFUNC(x) uint8_t (* x)(uint16_t)
8 #define WRITEFUNC(x) void (* x)(uint16_t, uint8_t)
9
10 struct SlotData
11 {
12         READFUNC(ioR);          // I/O read function
13         WRITEFUNC(ioW);         // I/O write function
14         READFUNC(pageR);        // Driver page read function
15         WRITEFUNC(pageW);       // Driver page write function
16         READFUNC(extraR);       // Driver 2K read function
17         WRITEFUNC(extraW);      // Driver 2K write function
18 };
19
20 void SetupAddressMap(void);
21 void ResetMMUPointers(void);
22 void InstallSlotHandler(uint8_t slot, SlotData *);
23 uint8_t AppleReadMem(uint16_t);
24 void AppleWriteMem(uint16_t, uint8_t);
25 void SwitchLC(void);
26 uint8_t ReadFloatingBus(uint16_t);
27
28 #endif  // __MMU_H__
29