LD, LDH, WRAM, and HRAM
This commit is contained in:
@ -3,4 +3,7 @@
|
||||
#include <common.h>
|
||||
|
||||
u8 bus_read(u16 address);
|
||||
void bus_write(u16 address, u8 value);
|
||||
void bus_write(u16 address, u8 value);
|
||||
|
||||
u16 bus_read16(u16 address);
|
||||
void bus_write16(u16 address, u16 value);
|
@ -30,6 +30,7 @@ typedef struct {
|
||||
bool stepping;
|
||||
|
||||
bool int_master_enabled;
|
||||
u8 ie_register;
|
||||
} cpu_context;
|
||||
|
||||
void cpu_init();
|
||||
@ -42,4 +43,11 @@ IN_PROC inst_get_processor(in_type type);
|
||||
#define CPU_FLAG_Z BIT(ctx->regs.f, 7)
|
||||
#define CPU_FLAG_C BIT(ctx->regs.f, 4)
|
||||
|
||||
u16 cpu_read_reg(reg_type rt);
|
||||
u16 cpu_read_reg(reg_type rt);
|
||||
|
||||
void cpu_set_reg(reg_type rt, u16 val);
|
||||
|
||||
void fetch_data();
|
||||
|
||||
u8 cpu_get_ie_register();
|
||||
void cpu_set_ie_register(u8 ie);
|
9
include/ram.h
Normal file
9
include/ram.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <common.h>
|
||||
|
||||
u8 wram_read(u16 address);
|
||||
void wram_write(u16 address, u8 value);
|
||||
|
||||
u8 hram_read(u16 address);
|
||||
void hram_write(u16 address, u8 value);
|
Reference in New Issue
Block a user