CPU testing

This commit is contained in:
2025-01-31 17:07:09 -07:00
parent 9a6dc67c3e
commit 5206c3871e
11 changed files with 212 additions and 14 deletions

View File

@ -37,7 +37,7 @@ static void proc_daa(cpu_context *ctx) {
u8 u = 0;
int fc = 0;
if(CPU_FLAG_H || (!CPU_FLAG_N && (ctx->regs.a & 0xF) >9)) {
if(CPU_FLAG_H || (!CPU_FLAG_N && (ctx->regs.a & 0xF) > 9)) {
u = 6;
}
@ -402,7 +402,7 @@ static void proc_ldh(cpu_context *ctx) {
if (!ctx->dest_is_mem) {
cpu_set_reg(ctx->cur_inst->reg_1, bus_read(0XFF00 | ctx->fetched_data));
} else {
bus_write(0xFF00 | ctx->mem_dest, ctx->cur_inst->reg_2);
bus_write(0xFF00 | ctx->mem_dest, cpu_read_reg(ctx->cur_inst->reg_2));
}
emu_cycles(1);
}