summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ops.yaml18
1 files changed, 12 insertions, 6 deletions
diff --git a/ops.yaml b/ops.yaml
index 158b6df..0b6a42e 100644
--- a/ops.yaml
+++ b/ops.yaml
@@ -8319,8 +8319,8 @@ templates:
case 0x8000:
case 0x9000:
// vram (8k)
- // FIXME: can we write directly to vram?
- // return ctx->mmu.vram[addr & 0x1FFF];
+ // (FIXME: can we write directly to vram?)
+ ctx->mmu.vram[addr & 0x1FFF] = val;
break;
case 0xA000:
case 0xB000:
@@ -9384,6 +9384,14 @@ templates:
}
static void
+ gpu_draw(
+ gb_t * const ctx
+ ) {
+ UNUSED(ctx);
+ // TODO
+ }
+
+ static void
gpu_step(
gb_t * const ctx,
const uint16_t clock
@@ -9412,13 +9420,12 @@ templates:
break;
case GPU_MODE_HBLANK:
if (ctx->gpu.clock > 204) {
- // clear clock, increment line
+ // clear clock, draw line, increment line
ctx->gpu.clock = 0;
+ gpu_draw(ctx);
gpu_set_line(ctx, ctx->gpu.line + 1);
if (ctx->gpu.line < 143) {
- // TODO: process scanline
-
// set mode
gpu_set_mode(ctx, GPU_MODE_OAM);
} else {
@@ -9437,7 +9444,6 @@ templates:
ctx->gpu.clock = 0;
gpu_set_line(ctx, ctx->gpu.line + 1);
-
if (ctx->gpu.line > 153) {
// reset clock, reset line, set mode
ctx->gpu.clock = 0;