diff options
-rw-r--r-- | gb.h | 2 | ||||
-rwxr-xr-x | gen.rb | 4 | ||||
-rw-r--r-- | ops.yaml | 4 |
3 files changed, 7 insertions, 3 deletions
@@ -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) @@ -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") @@ -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; } |