Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
memory_mapper.h
Go to the documentation of this file.
1 /* A work-in-progess MEGA65 (Commodore 65 clone origins) emulator
2  Part of the Xemu project, please visit: https://github.com/lgblgblgb/xemu
3  Copyright (C)2017-2022 LGB (Gábor Lénárt) <lgblgblgb@gmail.com>
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
18 
19 #ifndef XEMU_MEGA65_MEMORY_MAPPER_H_INCLUDED
20 #define XEMU_MEGA65_MEMORY_MAPPER_H_INCLUDED
21 
22 extern void memory_init ( void );
23 extern void memory_set_do_map ( void );
25 extern void memory_set_cpu_io_port ( int addr, Uint8 value );
26 extern void memory_set_cpu_io_port_ddr_and_data ( Uint8 p0, Uint8 p1 );
27 extern Uint8 memory_get_cpu_io_port ( int addr );
28 
30 extern void memory_debug_write_phys_addr ( int addr, Uint8 data );
33 
34 //#define SIZEOF_CHIP_RAM 0x20000
35 //#define SIZEOF_FAST_RAM 0x20000
36 //#define SIZEOF_EXTRA_RAM 0x20000
37 
40 extern Uint8 main_ram[512 << 10], colour_ram[0x8000], char_wom[0x2000], hypervisor_ram[0x4000];
41 extern Uint8 nvram[64];
42 extern Uint8 mega65_uuid[8];
43 extern Uint8 rtc_regs[6];
44 #define SLOW_RAM_SIZE (8 << 20)
46 //extern Uint8 chip_ram[SIZEOF_CHIP_RAM], fast_ram[SIZEOF_FAST_RAM];
47 // Ugly hack for more RAM!
48 //#define chip_ram (main_ram + 0)
49 //#define fast_ram (main_ram + 0x20000)
50 //#define extra_ram (main_ram + 0x40000)
51 
52 extern int cpu_rmw_old_data;
53 
54 #endif
memory_debug_write_phys_addr
void memory_debug_write_phys_addr(int addr, Uint8 data)
Definition: memory_mapper.c:960
map_offset_low
int map_offset_low
Definition: memory_mapper.h:38
char_wom
Uint8 char_wom[0x2000]
Definition: memory_mapper.h:40
colour_ram
Uint8 colour_ram[0x8000]
Definition: memory_mapper.h:40
addr
int addr
Definition: dma65.c:81
map_offset_high
int map_offset_high
Definition: memory_mapper.h:38
SLOW_RAM_SIZE
#define SLOW_RAM_SIZE
Definition: memory_mapper.h:44
m65-memcontent-generator.data
data
Definition: m65-memcontent-generator.py:119
map_megabyte_low
int map_megabyte_low
Definition: memory_mapper.h:38
memory_set_vic3_rom_mapping
void memory_set_vic3_rom_mapping(Uint8 value)
Definition: memory_mapper.c:689
cpu_rmw_old_data
int cpu_rmw_old_data
Definition: memory_mapper.c:123
Uint8
uint8_t Uint8
Definition: fat32.c:51
memory_set_do_map
void memory_set_do_map(void)
Definition: memory_mapper.c:774
memory_set_cpu_io_port
void memory_set_cpu_io_port(int addr, Uint8 value)
Definition: memory_mapper.c:737
memory_debug_read_phys_addr
Uint8 memory_debug_read_phys_addr(int addr)
Definition: memory_mapper.c:954
rom_protect
int rom_protect
Definition: memory_mapper.c:144
mega65_uuid
Uint8 mega65_uuid[8]
Definition: memory_mapper.c:73
rtc_regs
Uint8 rtc_regs[6]
Definition: memory_mapper.c:75
map_mask
int map_mask
Definition: memory_mapper.c:142
memory_debug_read_cpu_addr
Uint8 memory_debug_read_cpu_addr(Uint16 addr)
Definition: memory_mapper.c:973
value
int value
Definition: dma65.c:90
Uint16
uint16_t Uint16
Definition: fat32.c:50
hypervisor_ram
Uint8 hypervisor_ram[0x4000]
Definition: memory_mapper.h:40
slow_ram
Uint8 slow_ram[SLOW_RAM_SIZE]
Definition: memory_mapper.c:77
map_megabyte_high
int map_megabyte_high
Definition: memory_mapper.h:38
memory_set_cpu_io_port_ddr_and_data
void memory_set_cpu_io_port_ddr_and_data(Uint8 p0, Uint8 p1)
Definition: memory_mapper.c:755
memory_get_cpu_io_port
Uint8 memory_get_cpu_io_port(int addr)
Definition: memory_mapper.c:763
memory_debug_write_cpu_addr
void memory_debug_write_cpu_addr(Uint16 addr, Uint8 data)
Definition: memory_mapper.c:978
nvram
Uint8 nvram[64]
Definition: memory_mapper.c:71
memory_init
void memory_init(void)
Definition: memory_mapper.c:479
skip_unhandled_mem
int skip_unhandled_mem
Definition: memory_mapper.h:39
main_ram
Uint8 main_ram[512<< 10]
Definition: memory_mapper.c:47