Annotation of previous/src/includes/nextMemory.h, revision 1.1.1.5

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: 
1.1.1.3   root       18: extern Uint8 NEXTRam[128*1024*1024];
1.1       root       19: extern Uint8 NEXTRom[0x20000];
                     20: extern Uint8 NEXTIo[0x20000];
                     21: 
1.1.1.5 ! root       22: 
        !            23: 
1.1       root       24: /* Offset NEXT address to PC pointer: */
                     25: // # define NEXTRAM_ADDR(Var)  ((unsigned long)NEXTRam+((Uint32)(Var) & 0x03ffffff))
                     26: 
                     27: /**
1.1.1.4   root       28:  * Write 32-bit word into NeXT memory space.
1.1       root       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: /**
1.1.1.4   root       38:  * Write 16-bit word into NeXT memory space.
1.1       root       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: /**
1.1.1.4   root       47:  * Write 8-bit byte into NeXT memory space.
1.1       root       48:  */
                     49: static inline void NEXTMemory_WriteByte(Uint32 Address, Uint8 Var)
                     50: {
                     51:        put_byte(Address, Var);
                     52: }
                     53: 
                     54: 
                     55: /**
1.1.1.4   root       56:  * Read 32-bit word from NeXT memory space.
1.1       root       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: /**
1.1.1.4   root       66:  * Read 16-bit word from NeXT memory space.
1.1       root       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: /**
1.1.1.4   root       76:  * Read 8-bit byte from NeXT memory space
1.1       root       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.