diff jaguar.c @ 1094:1dba006bad47

Get Jaguar disassembler more or less working. Dump gpu program to file when GPU GO bit is set
author Michael Pavone <pavone@retrodev.com>
date Mon, 31 Oct 2016 09:23:25 -0700
parents f338c950fcef
children faa3a4617f62
line wrap: on
line diff
--- a/jaguar.c	Sun Oct 30 19:42:48 2016 -0700
+++ b/jaguar.c	Mon Oct 31 09:23:25 2016 -0700
@@ -142,6 +142,11 @@
 			//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);
 			}