|
|
1.1 root 1: /*
2: Hatari - ioMem.h
3:
1.1.1.6 root 4: This file is distributed under the GNU General Public License, version 2
5: or at your option any later version. Read the file gpl.txt for details.
1.1 root 6: */
7:
8: #ifndef HATARI_IOMEM_H
9: #define HATARI_IOMEM_H
10:
1.1.1.3 root 11: #include "config.h"
12:
13: #if ENABLE_SMALL_MEM
14: # include "sysdeps.h"
15: # include "maccess.h"
16: # include "main.h"
17: extern uae_u8 *IOmemory;
18: # define IoMem (IOmemory-0xff0000)
1.1 root 19: #else
1.1.1.3 root 20: # include "stMemory.h"
21: # define IoMem STRam
22: #endif /* ENABLE_SMALL_MEM */
1.1 root 23:
24:
1.1.1.7 root 25: extern int nIoMemAccessSize;
1.1.1.8 ! root 26: extern Uint32 IoAccessFullAddress;
1.1 root 27: extern Uint32 IoAccessBaseAddress;
1.1.1.3 root 28: extern Uint32 IoAccessCurrentAddress;
1.1.1.7 root 29:
30: extern int IoAccessInstrCount;
1.1 root 31:
32:
1.1.1.4 root 33: /**
34: * Read 32-bit word from IO memory space without interception.
35: * NOTE - value will be converted to PC endian.
36: */
1.1 root 37: static inline Uint32 IoMem_ReadLong(Uint32 Address)
38: {
39: Address &= 0x0ffffff;
40: return do_get_mem_long(&IoMem[Address]);
41: }
42:
1.1.1.4 root 43:
44: /**
45: * Read 16-bit word from IO memory space without interception.
46: * NOTE - value will be converted to PC endian.
47: */
1.1 root 48: static inline Uint16 IoMem_ReadWord(Uint32 Address)
49: {
50: Address &= 0x0ffffff;
51: return do_get_mem_word(&IoMem[Address]);
52: }
53:
1.1.1.4 root 54:
55: /**
56: * Read 8-bit byte from IO memory space without interception.
57: */
1.1 root 58: static inline Uint8 IoMem_ReadByte(Uint32 Address)
59: {
60: Address &= 0x0ffffff;
61: return IoMem[Address];
62: }
63:
64:
1.1.1.4 root 65: /**
66: * Write 32-bit word into IO memory space without interception.
67: * NOTE - value will be convert to 68000 endian
68: */
1.1 root 69: static inline void IoMem_WriteLong(Uint32 Address, Uint32 Var)
70: {
71: Address &= 0x0ffffff;
72: do_put_mem_long(&IoMem[Address], Var);
73: }
74:
1.1.1.4 root 75:
76: /**
77: * Write 16-bit word into IO memory space without interception.
78: * NOTE - value will be convert to 68000 endian.
79: */
1.1 root 80: static inline void IoMem_WriteWord(Uint32 Address, Uint16 Var)
81: {
82: Address &= 0xffffff;
83: do_put_mem_word(&IoMem[Address], Var);
84: }
85:
1.1.1.4 root 86:
87: /**
88: * Write 8-bit byte into IO memory space without interception.
89: */
1.1 root 90: static inline void IoMem_WriteByte(Uint32 Address, Uint8 Var)
91: {
92: Address &= 0x0ffffff;
93: IoMem[Address] = Var;
94: }
95:
96:
97: extern void IoMem_Init(void);
98: extern void IoMem_UnInit(void);
1.1.1.5 root 99: extern void IoMem_Init_FalconInSTeBuscompatibilityMode(Uint8 value);
100:
1.1 root 101:
1.1.1.7 root 102: extern uae_u32 REGPARAM3 IoMem_bget(uaecptr addr);
103: extern uae_u32 REGPARAM3 IoMem_wget(uaecptr addr);
104: extern uae_u32 REGPARAM3 IoMem_lget(uaecptr addr);
105:
106: extern void REGPARAM3 IoMem_bput(uaecptr addr, uae_u32 val);
107: extern void REGPARAM3 IoMem_wput(uaecptr addr, uae_u32 val);
108: extern void REGPARAM3 IoMem_lput(uaecptr addr, uae_u32 val);
1.1 root 109:
110: extern void IoMem_BusErrorEvenReadAccess(void);
111: extern void IoMem_BusErrorOddReadAccess(void);
112: extern void IoMem_BusErrorEvenWriteAccess(void);
113: extern void IoMem_BusErrorOddWriteAccess(void);
114: extern void IoMem_VoidRead(void);
1.1.1.5 root 115: extern void IoMem_VoidRead_00(void);
1.1 root 116: extern void IoMem_VoidWrite(void);
117: extern void IoMem_WriteWithoutInterception(void);
118: extern void IoMem_ReadWithoutInterception(void);
119:
1.1.1.5 root 120: extern void IoMem_MemorySnapShot_Capture(bool bSave);
121:
1.1 root 122: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.