Finish ppu, and mbc1 mapping

This commit is contained in:
2025-02-01 19:05:25 -07:00
parent 2603916972
commit 89a99b160d
17 changed files with 779 additions and 18 deletions

View File

@ -70,7 +70,6 @@ static void proc_halt(cpu_context *ctx) {
static void proc_stop(cpu_context *ctx) {
printf("CPU STOP!\n");
NO_IMPL
}
static void proc_rlca(cpu_context *ctx) {
@ -384,7 +383,6 @@ static void proc_pop(cpu_context *ctx) {
u16 n = (hi << 8) | lo;
cpu_set_reg(ctx->cur_inst->reg_1, n);
emu_cycles(2);
if (ctx->cur_inst->reg_1 == RT_AF) {
cpu_set_reg(ctx->cur_inst->reg_1, n & 0xFFF0);
@ -397,6 +395,8 @@ static void proc_push(cpu_context *ctx) {
emu_cycles(1);
stack_push((val & 0xFF));
emu_cycles(1);
emu_cycles(1);
}
static void proc_ldh(cpu_context *ctx) {
@ -423,8 +423,8 @@ static void proc_ld(cpu_context *ctx) {
emu_cycles(1);
} else {
bus_write(ctx->mem_dest, ctx->fetched_data);
emu_cycles(1);
}
emu_cycles(1);
return;
}