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

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

unix.superglobalmegacorp.com

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