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

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

unix.superglobalmegacorp.com

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