|
|
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: #if 0 ! 12: #include "sysdeps.h" ! 13: #include "maccess.h" ! 14: #include "main.h" ! 15: #else ! 16: /* TODO: IoMem will later become independent from STRam... */ ! 17: #include "stMemory.h" ! 18: #define IoMem STRam ! 19: #endif ! 20: ! 21: ! 22: extern Uint32 IoAccessBaseAddress; ! 23: extern Uint32 IoAccessCurrentAddress; ! 24: extern int nIoMemAccessSize; ! 25: ! 26: ! 27: /*-----------------------------------------------------------------------*/ ! 28: /* ! 29: Read 32-bit word from IO memory space without interception. ! 30: NOTE - value will be converted to PC endian. ! 31: */ ! 32: static inline Uint32 IoMem_ReadLong(Uint32 Address) ! 33: { ! 34: Address &= 0x0ffffff; ! 35: return do_get_mem_long(&IoMem[Address]); ! 36: } ! 37: ! 38: /*-----------------------------------------------------------------------*/ ! 39: /* ! 40: Read 16-bit word from IO memory space without interception. ! 41: NOTE - value will be converted to PC endian. ! 42: */ ! 43: static inline Uint16 IoMem_ReadWord(Uint32 Address) ! 44: { ! 45: Address &= 0x0ffffff; ! 46: return do_get_mem_word(&IoMem[Address]); ! 47: } ! 48: ! 49: /*-----------------------------------------------------------------------*/ ! 50: /* ! 51: Read 8-bit byte from IO memory space without interception. ! 52: */ ! 53: static inline Uint8 IoMem_ReadByte(Uint32 Address) ! 54: { ! 55: Address &= 0x0ffffff; ! 56: return IoMem[Address]; ! 57: } ! 58: ! 59: ! 60: /*-----------------------------------------------------------------------*/ ! 61: /* ! 62: Write 32-bit word into IO memory space without interception. ! 63: NOTE - value will be convert to 68000 endian ! 64: */ ! 65: static inline void IoMem_WriteLong(Uint32 Address, Uint32 Var) ! 66: { ! 67: Address &= 0x0ffffff; ! 68: do_put_mem_long(&IoMem[Address], Var); ! 69: } ! 70: ! 71: /*-----------------------------------------------------------------------*/ ! 72: /* ! 73: Write 16-bit word into IO memory space without interception. ! 74: NOTE - value will be convert to 68000 endian. ! 75: */ ! 76: static inline void IoMem_WriteWord(Uint32 Address, Uint16 Var) ! 77: { ! 78: Address &= 0xffffff; ! 79: do_put_mem_word(&IoMem[Address], Var); ! 80: } ! 81: ! 82: /*-----------------------------------------------------------------------*/ ! 83: /* ! 84: Write 8-bit byte into IO memory space without interception. ! 85: */ ! 86: static inline void IoMem_WriteByte(Uint32 Address, Uint8 Var) ! 87: { ! 88: Address &= 0x0ffffff; ! 89: IoMem[Address] = Var; ! 90: } ! 91: ! 92: ! 93: extern void IoMem_Init(void); ! 94: extern void IoMem_UnInit(void); ! 95: ! 96: extern uae_u32 IoMem_bget(uaecptr addr); ! 97: extern uae_u32 IoMem_wget(uaecptr addr); ! 98: extern uae_u32 IoMem_lget(uaecptr addr); ! 99: ! 100: extern void IoMem_bput(uaecptr addr, uae_u32 val); ! 101: extern void IoMem_wput(uaecptr addr, uae_u32 val); ! 102: extern void IoMem_lput(uaecptr addr, uae_u32 val); ! 103: ! 104: extern void IoMem_BusErrorEvenReadAccess(void); ! 105: extern void IoMem_BusErrorOddReadAccess(void); ! 106: extern void IoMem_BusErrorEvenWriteAccess(void); ! 107: extern void IoMem_BusErrorOddWriteAccess(void); ! 108: extern void IoMem_VoidRead(void); ! 109: extern void IoMem_VoidWrite(void); ! 110: extern void IoMem_WriteWithoutInterception(void); ! 111: extern void IoMem_ReadWithoutInterception(void); ! 112: ! 113: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.