Annotation of hatari/src/includes/ioMem.h, revision 1.1.1.2

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 int nIoMemAccessSize;
                     24: 
                     25: 
                     26: /*-----------------------------------------------------------------------*/
                     27: /*
                     28:   Read 32-bit word from IO memory space without interception.
                     29:   NOTE - value will be converted to PC endian.
                     30: */
                     31: static inline Uint32 IoMem_ReadLong(Uint32 Address)
                     32: {
                     33:        Address &= 0x0ffffff;
                     34:        return do_get_mem_long(&IoMem[Address]);
                     35: }
                     36: 
                     37: /*-----------------------------------------------------------------------*/
                     38: /*
                     39:   Read 16-bit word from IO memory space without interception.
                     40:   NOTE - value will be converted to PC endian.
                     41: */
                     42: static inline Uint16 IoMem_ReadWord(Uint32 Address)
                     43: {
                     44:        Address &= 0x0ffffff;
                     45:        return do_get_mem_word(&IoMem[Address]);
                     46: }
                     47: 
                     48: /*-----------------------------------------------------------------------*/
                     49: /*
                     50:   Read 8-bit byte from IO memory space without interception.
                     51: */
                     52: static inline Uint8 IoMem_ReadByte(Uint32 Address)
                     53: {
                     54:        Address &= 0x0ffffff;
                     55:        return IoMem[Address];
                     56: }
                     57: 
                     58: 
                     59: /*-----------------------------------------------------------------------*/
                     60: /*
                     61:   Write 32-bit word into IO memory space without interception.
                     62:   NOTE - value will be convert to 68000 endian
                     63: */
                     64: static inline void IoMem_WriteLong(Uint32 Address, Uint32 Var)
                     65: {
                     66:        Address &= 0x0ffffff;
                     67:        do_put_mem_long(&IoMem[Address], Var);
                     68: }
                     69: 
                     70: /*-----------------------------------------------------------------------*/
                     71: /*
                     72:   Write 16-bit word into IO memory space without interception.
                     73:   NOTE - value will be convert to 68000 endian.
                     74: */
                     75: static inline void IoMem_WriteWord(Uint32 Address, Uint16 Var)
                     76: {
                     77:        Address &= 0xffffff;
                     78:        do_put_mem_word(&IoMem[Address], Var);
                     79: }
                     80: 
                     81: /*-----------------------------------------------------------------------*/
                     82: /*
                     83:   Write 8-bit byte into IO memory space without interception.
                     84: */
                     85: static inline void IoMem_WriteByte(Uint32 Address, Uint8 Var)
                     86: {
                     87:        Address &= 0x0ffffff;
                     88:        IoMem[Address] = Var;
                     89: }
                     90: 
                     91: 
                     92: extern void IoMem_Init(void);
                     93: extern void IoMem_UnInit(void);
                     94: 
                     95: extern uae_u32 IoMem_bget(uaecptr addr);
                     96: extern uae_u32 IoMem_wget(uaecptr addr);
                     97: extern uae_u32 IoMem_lget(uaecptr addr);
                     98: 
                     99: extern void IoMem_bput(uaecptr addr, uae_u32 val);
                    100: extern void IoMem_wput(uaecptr addr, uae_u32 val);
                    101: extern void IoMem_lput(uaecptr addr, uae_u32 val);
                    102: 
                    103: extern void IoMem_BusErrorEvenReadAccess(void);
                    104: extern void IoMem_BusErrorOddReadAccess(void);
                    105: extern void IoMem_BusErrorEvenWriteAccess(void);
                    106: extern void IoMem_BusErrorOddWriteAccess(void);
                    107: extern void IoMem_VoidRead(void);
                    108: extern void IoMem_VoidWrite(void);
                    109: extern void IoMem_WriteWithoutInterception(void);
                    110: extern void IoMem_ReadWithoutInterception(void);
                    111: 
                    112: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.