|
|
1.1 root 1: /*
1.1.1.2 root 2: Hatari - stMemory.h
3:
1.1.1.12 root 4: This file is distributed under the GNU General Public License, version 2
5: or at your option any later version. Read the file gpl.txt for details.
1.1 root 6: */
7:
1.1.1.2 root 8: #ifndef HATARI_STMEMORY_H
9: #define HATARI_STMEMORY_H
10:
1.1.1.9 root 11: #include "main.h"
1.1.1.3 root 12: #include "sysdeps.h"
13: #include "maccess.h"
1.1.1.13 root 14: #include "memory.h"
15:
1.1.1.3 root 16:
1.1.1.7 root 17: #if ENABLE_SMALL_MEM
18: extern Uint8 *STRam;
19: extern uae_u8 *ROMmemory;
20: # define RomMem (ROMmemory-0xe00000)
21: #else
1.1.1.3 root 22: extern Uint8 STRam[16*1024*1024];
1.1.1.7 root 23: #define RomMem STRam
24: #endif /* ENABLE_SMALL_MEM */
1.1.1.3 root 25:
1.1.1.13 root 26: extern uae_u8 *TTmemory;
27: extern uae_u32 TTmem_size;
1.1.1.10 root 28:
1.1.1.13 root 29: extern Uint32 STRamEnd;
1.1.1.3 root 30:
31:
1.1.1.14 root 32: #define MEM_BANK_SIZE_128 ( 128 * 1024 ) /* 00b */
33: #define MEM_BANK_SIZE_512 ( 512 * 1024 ) /* 01b */
34: #define MEM_BANK_SIZE_2048 ( 2048 * 1024 ) /* 10b */
35: #define MEM_BANK_SIZE_8192 ( 8192 * 1024 ) /* for TT */
36:
37: extern Uint32 RAM_Bank0_Size;
38: extern Uint32 RAM_Bank1_Size;
39:
40: extern Uint32 MMU_Bank0_Size;
41: extern Uint32 MMU_Bank1_Size;
42:
43:
44: extern void STMemory_Init ( int RAM_Size_Byte );
45: extern void STMemory_Reset ( bool bCold );
46:
1.1.1.15! root 47: extern bool STMemory_SafeClear(Uint32 addr, unsigned int len);
1.1.1.11 root 48: extern bool STMemory_SafeCopy(Uint32 addr, Uint8 *src, unsigned int len, const char *name);
1.1.1.10 root 49: extern void STMemory_MemorySnapShot_Capture(bool bSave);
1.1.1.6 root 50: extern void STMemory_SetDefaultConfig(void);
1.1.1.13 root 51: extern bool STMemory_CheckAreaType ( Uint32 addr , int size , int mem_type );
52: extern bool STMemory_CheckRegionBusError ( Uint32 addr );
53: extern void *STMemory_STAddrToPointer ( Uint32 addr );
54:
55: extern void STMemory_Write ( Uint32 addr , Uint32 val , int size );
56: extern void STMemory_WriteLong ( Uint32 addr , Uint32 val );
57: extern void STMemory_WriteWord ( Uint32 addr , Uint16 val );
58: extern void STMemory_WriteByte ( Uint32 addr , Uint8 val );
59: extern Uint32 STMemory_Read ( Uint32 addr , int size );
60: extern Uint32 STMemory_ReadLong ( Uint32 addr );
61: extern Uint16 STMemory_ReadWord ( Uint32 addr );
62: extern Uint8 STMemory_ReadByte ( Uint32 addr );
1.1.1.2 root 63:
1.1.1.14 root 64: extern void STMemory_MMU_Config_ReadByte ( void );
65: extern void STMemory_MMU_Config_WriteByte ( void );
66:
67: extern int STMemory_RAM_Validate_Size_KB ( int TotalMem );
68: extern bool STMemory_RAM_SetBankSize ( int TotalMem , Uint32 *pBank0_Size , Uint32 *pBank1_Size , Uint8 *pMMU_Conf );
69: extern Uint32 STMemory_MMU_Translate_Addr ( Uint32 addr_logical );
70:
1.1.1.2 root 71: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.