Annotation of previous_trunk/src/includes/nextMemory.h, revision 1.1

1.1     ! root        1: /*
        !             2:   Hatari - stMemory.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_STMEMORY_H
        !             9: #define HATARI_STMEMORY_H
        !            10: 
        !            11: #include "main.h"
        !            12: #include "sysdeps.h"
        !            13: #include "maccess.h"
        !            14: #include "memory.h"
        !            15: 
        !            16: extern Uint32 NEXTRamEnd;
        !            17: 
        !            18: extern Uint8 NEXTRam[128*1024*1024];
        !            19: extern Uint8 NEXTRom[0x20000];
        !            20: extern Uint8 NEXTIo[0x20000];
        !            21: 
        !            22: 
        !            23: 
        !            24: /* Offset NEXT address to PC pointer: */
        !            25: // # define NEXTRAM_ADDR(Var)  ((unsigned long)NEXTRam+((Uint32)(Var) & 0x03ffffff))
        !            26: 
        !            27: /**
        !            28:  * Write 32-bit word into NeXT memory space.
        !            29:  * NOTE - value will be convert to 68000 endian
        !            30:  */
        !            31: static inline void NEXTMemory_WriteLong(Uint32 Address, Uint32 Var)
        !            32: {
        !            33:        put_long(Address, Var);
        !            34: }
        !            35: 
        !            36: 
        !            37: /**
        !            38:  * Write 16-bit word into NeXT memory space.
        !            39:  * NOTE - value will be convert to 68000 endian.
        !            40:  */
        !            41: static inline void NEXTMemory_WriteWord(Uint32 Address, Uint16 Var)
        !            42: {
        !            43:        put_word(Address, Var);
        !            44: }
        !            45: 
        !            46: /**
        !            47:  * Write 8-bit byte into NeXT memory space.
        !            48:  */
        !            49: static inline void NEXTMemory_WriteByte(Uint32 Address, Uint8 Var)
        !            50: {
        !            51:        put_byte(Address, Var);
        !            52: }
        !            53: 
        !            54: 
        !            55: /**
        !            56:  * Read 32-bit word from NeXT memory space.
        !            57:  * NOTE - value will be converted to PC endian.
        !            58:  */
        !            59: static inline Uint32 NEXTMemory_ReadLong(Uint32 Address)
        !            60: {
        !            61:        return get_long(Address);
        !            62: }
        !            63: 
        !            64: 
        !            65: /**
        !            66:  * Read 16-bit word from NeXT memory space.
        !            67:  * NOTE - value will be converted to PC endian.
        !            68:  */
        !            69: static inline Uint16 NEXTMemory_ReadWord(Uint32 Address)
        !            70: {
        !            71:        return get_word(Address);
        !            72: }
        !            73: 
        !            74: 
        !            75: /**
        !            76:  * Read 8-bit byte from NeXT memory space
        !            77:  */
        !            78: static inline Uint8 NEXTMemory_ReadByte(Uint32 Address)
        !            79: {
        !            80:        return get_byte(Address);
        !            81: }
        !            82: 
        !            83: #endif

unix.superglobalmegacorp.com

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