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