summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gb.h2
-rwxr-xr-xgen.rb4
-rw-r--r--ops.yaml4
3 files changed, 7 insertions, 3 deletions
diff --git a/gb.h b/gb.h
index 2aff333..ea092a2 100644
--- a/gb.h
+++ b/gb.h
@@ -51,7 +51,7 @@ struct gb_t_ {
// FIXME: combine these?
uint8_t ram[0x2000]; // working ram (8k)
- uint8_t eram[65536]; // external ram (banked, up to 64k)
+ uint8_t eram[0x10000]; // external ram (banked, up to 64k)
uint8_t vram[0x2000]; // vram (8k)
uint8_t oam[0xA0]; // oam (160 bytes)
uint8_t zram[0x7F]; // zram (128 bytes)
diff --git a/gen.rb b/gen.rb
index bc8db44..c88b924 100755
--- a/gen.rb
+++ b/gen.rb
@@ -57,17 +57,17 @@ DATA['ops'].each do |set_id, ops|
[
"case 0x%s: /* op: \"%s\", cat: \"%s\" */",
+ " %s", # time_expr
" %s", # action_expr
" %s", # pc_expr
- " %s", # time_expr
" break;"
].join("\n") % [
hex,
op['id'],
op['cat'],
+ time_expr,
op['code'] || 'cpu_set_state(ctx, old_pc, GB_CPU_STATE_NOT_IMPLEMENTED);',
pc_expr,
- time_expr,
]
end
}.join("\n")
diff --git a/ops.yaml b/ops.yaml
index dab380c..199b61d 100644
--- a/ops.yaml
+++ b/ops.yaml
@@ -10601,4 +10601,8 @@ templates:
// init gpu
gpu_set_mode(ctx, GPU_MODE_OAM);
gpu_set_line(ctx, 0);
+ ctx->gpu.lcdc = 0x91;
+ ctx->gpu.bgp = 0xFC;
+ ctx->gpu.obp0 = 0xFF;
+ ctx->gpu.obp1 = 0xFF;
}