summaryrefslogtreecommitdiff
path: root/jaguar.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2016-10-31 09:23:25 -0700
committerMichael Pavone <pavone@retrodev.com>2016-10-31 09:23:25 -0700
commit00f0049405b59a3931ed9f24e9084902118e0ce7 (patch)
tree7ac4baf6ea60e6e8412618dc65989d965ade396e /jaguar.c
parentd350c84a11393f5d3a12e434951341c101530f5a (diff)
Get Jaguar disassembler more or less working. Dump gpu program to file when GPU GO bit is set
Diffstat (limited to 'jaguar.c')
-rw-r--r--jaguar.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/jaguar.c b/jaguar.c
index 96ceec5..0caea87 100644
--- a/jaguar.c
+++ b/jaguar.c
@@ -142,6 +142,11 @@ void rom0_write_16(uint32_t address, jaguar_context *system, uint16_t value)
//GPU/Blitter registers
if (address < 0x102200) {
fprintf(stderr, "Unhandled write to GPU registers %X: %X\n", address, value);
+ if (address == 0x102116 && (value & 1)) {
+ FILE *f = fopen("gpu.bin", "wb");
+ fwrite(system->gpu_local, 1, sizeof(system->gpu_local), f);
+ fclose(f);
+ }
} else {
fprintf(stderr, "Unhandled write to Blitter registers %X: %X\n", address, value);
}