]> Shamusworld >> Repos - apple2/blob - src/mmu.h
Graphical fixes for DHIRES and added CASIN emulation.
[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 enum { SLOT0 = 0, SLOT1, SLOT2, SLOT3, SLOT4, SLOT5, SLOT6, SLOT7 };
11
12 struct SlotData
13 {
14         READFUNC(ioR);          // I/O read function
15         WRITEFUNC(ioW);         // I/O write function
16         READFUNC(pageR);        // Driver page read function
17         WRITEFUNC(pageW);       // Driver page write function
18         READFUNC(extraR);       // Driver 2K read function
19         WRITEFUNC(extraW);      // Driver 2K write function
20 };
21
22 void SetupAddressMap(void);
23 void ResetMMUPointers(void);
24 void InstallSlotHandler(uint8_t slot, SlotData *);
25 uint8_t AppleReadMem(uint16_t);
26 void AppleWriteMem(uint16_t, uint8_t);
27 void SwitchLC(void);
28 uint8_t ReadFloatingBus(uint16_t);
29
30 #endif  // __MMU_H__
31