aboutsummaryrefslogtreecommitdiff
path: root/src/ppusim/mem.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-02-24 19:11:59 +0100
committerlonkaars <loek@pipeframe.xyz>2023-02-24 19:11:59 +0100
commitf5c8ae2f2d2074d483490e857db5aef8388f06c9 (patch)
treea76e1985433216a31e112d3f4daccdf19097c06d /src/ppusim/mem.c
parent5f5c6a410cafaa917ca3ff0a2a95bb1f2db4b980 (diff)
c interface semi-done
Diffstat (limited to 'src/ppusim/mem.c')
-rw-r--r--src/ppusim/mem.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ppusim/mem.c b/src/ppusim/mem.c
new file mode 100644
index 0000000..72e01c5
--- /dev/null
+++ b/src/ppusim/mem.c
@@ -0,0 +1,13 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "ppusim/mem.h"
+#include "ppu/internals.h"
+
+hh_ppu_data_t *g_hh_ppusim_vram = NULL;
+
+void hh_ppu_vram_dwrite(hh_ppu_addr_t addr, hh_ppu_data_t data) {
+ if (!hh_ppu_vram_valid_address(addr)) return;
+ printf("ppu[0x%04x] = %04x\n", addr, data);
+ g_hh_ppusim_vram[addr] = data;
+}