aboutsummaryrefslogtreecommitdiff
path: root/dumpgttxt.c
blob: 9b6c7e8213fda6064e0600a947d998365ba42530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>

int main(int argc, char **argv) {
	int i;
	unsigned char buf[16384];
	FILE *f = fopen("defender.rom", "rb");
	fread(buf, 16384, 1, f);

	putchar('\'');
	for(i = 0; i < 7 * 37; i++) {
		unsigned char c = buf[i + 0x156];
		if(!c) {
			putchar('\'');
			putchar('\n');
			putchar('\'');
		} else {
			putchar(c - 0x80);
		}
	}
}