Cleanup unused stuff
This commit is contained in:
parent
f19f1695a6
commit
7a642069e3
3 changed files with 0 additions and 46 deletions
8
cpu.c
8
cpu.c
|
@ -684,14 +684,6 @@ void print_register_usage(void)
|
||||||
reg[REG_CPSR] = (n_flag << 31) | (z_flag << 30) | (c_flag << 29) | \
|
reg[REG_CPSR] = (n_flag << 31) | (z_flag << 30) | (c_flag << 29) | \
|
||||||
(v_flag << 28) | (reg[REG_CPSR] & 0xFF) \
|
(v_flag << 28) | (reg[REG_CPSR] & 0xFF) \
|
||||||
|
|
||||||
#define memory_region(r_dest, l_dest, address) \
|
|
||||||
r_dest = memory_regions[address >> 24]; \
|
|
||||||
l_dest = memory_limits[address >> 24] \
|
|
||||||
|
|
||||||
|
|
||||||
#define pc_region() \
|
|
||||||
memory_region(pc_region, pc_limit, pc) \
|
|
||||||
|
|
||||||
#define check_pc_region() \
|
#define check_pc_region() \
|
||||||
new_pc_region = (pc >> 15); \
|
new_pc_region = (pc >> 15); \
|
||||||
if(new_pc_region != pc_region) \
|
if(new_pc_region != pc_region) \
|
||||||
|
|
35
gba_memory.c
35
gba_memory.c
|
@ -321,9 +321,6 @@ u32 gamepak_size;
|
||||||
|
|
||||||
dma_transfer_type dma[4];
|
dma_transfer_type dma[4];
|
||||||
|
|
||||||
u8 *memory_regions[16];
|
|
||||||
u32 memory_limits[16];
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
u32 page_timestamp;
|
u32 page_timestamp;
|
||||||
|
@ -3196,38 +3193,6 @@ void init_memory(void)
|
||||||
{
|
{
|
||||||
u32 map_offset = 0;
|
u32 map_offset = 0;
|
||||||
|
|
||||||
memory_regions[0x00] = (u8 *)bios_rom;
|
|
||||||
memory_regions[0x01] = (u8 *)bios_rom;
|
|
||||||
memory_regions[0x02] = (u8 *)ewram;
|
|
||||||
memory_regions[0x03] = (u8 *)iwram + 0x8000;
|
|
||||||
memory_regions[0x04] = (u8 *)io_registers;
|
|
||||||
memory_regions[0x05] = (u8 *)palette_ram;
|
|
||||||
memory_regions[0x06] = (u8 *)vram;
|
|
||||||
memory_regions[0x07] = (u8 *)oam_ram;
|
|
||||||
memory_regions[0x08] = (u8 *)gamepak_rom;
|
|
||||||
memory_regions[0x09] = (u8 *)(gamepak_rom + 0xFFFFFF);
|
|
||||||
memory_regions[0x0A] = (u8 *)gamepak_rom;
|
|
||||||
memory_regions[0x0B] = (u8 *)(gamepak_rom + 0xFFFFFF);
|
|
||||||
memory_regions[0x0C] = (u8 *)gamepak_rom;
|
|
||||||
memory_regions[0x0D] = (u8 *)(gamepak_rom + 0xFFFFFF);
|
|
||||||
memory_regions[0x0E] = (u8 *)gamepak_backup;
|
|
||||||
|
|
||||||
memory_limits[0x00] = 0x3FFF;
|
|
||||||
memory_limits[0x01] = 0x3FFF;
|
|
||||||
memory_limits[0x02] = 0x3FFFF;
|
|
||||||
memory_limits[0x03] = 0x7FFF;
|
|
||||||
memory_limits[0x04] = 0x7FFF;
|
|
||||||
memory_limits[0x05] = 0x3FF;
|
|
||||||
memory_limits[0x06] = 0x17FFF;
|
|
||||||
memory_limits[0x07] = 0x3FF;
|
|
||||||
memory_limits[0x08] = 0x1FFFFFF;
|
|
||||||
memory_limits[0x09] = 0x1FFFFFF;
|
|
||||||
memory_limits[0x0A] = 0x1FFFFFF;
|
|
||||||
memory_limits[0x0B] = 0x1FFFFFF;
|
|
||||||
memory_limits[0x0C] = 0x1FFFFFF;
|
|
||||||
memory_limits[0x0D] = 0x1FFFFFF;
|
|
||||||
memory_limits[0x0E] = 0xFFFF;
|
|
||||||
|
|
||||||
// Fill memory map regions, areas marked as NULL must be checked directly
|
// Fill memory map regions, areas marked as NULL must be checked directly
|
||||||
map_region(read, 0x0000000, 0x1000000, 1, bios_rom);
|
map_region(read, 0x0000000, 0x1000000, 1, bios_rom);
|
||||||
map_null(read, 0x1000000, 0x2000000);
|
map_null(read, 0x1000000, 0x2000000);
|
||||||
|
|
|
@ -171,9 +171,6 @@ u8 read_backup(u32 address);
|
||||||
void function_cc write_backup(u32 address, u32 value);
|
void function_cc write_backup(u32 address, u32 value);
|
||||||
void function_cc write_rtc(u32 address, u32 value);
|
void function_cc write_rtc(u32 address, u32 value);
|
||||||
|
|
||||||
extern u8 *memory_regions[16];
|
|
||||||
extern u32 memory_limits[16];
|
|
||||||
|
|
||||||
/* EDIT: Shouldn't this be extern ?! */
|
/* EDIT: Shouldn't this be extern ?! */
|
||||||
extern u32 waitstate_cycles_sequential[16][3];
|
extern u32 waitstate_cycles_sequential[16][3];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue