diff options
author | Ian C <ianc@noddybox.co.uk> | 2016-05-06 08:38:10 +0100 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2016-05-06 08:38:10 +0100 |
commit | beb25c09c87c67e83f05f89fe704890493aac263 (patch) | |
tree | 66cf4d328abf3b3413d27f1af619a3735d87837e /src | |
parent | d66326a6717195dc93602d2f9af24f3411b25dd9 (diff) |
Fixed SNES checksum.
Diffstat (limited to 'src')
-rw-r--r-- | src/snesout.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/snesout.c b/src/snesout.c index 911ee49..c8b0bac 100644 --- a/src/snesout.c +++ b/src/snesout.c @@ -290,13 +290,15 @@ int SNESOutput(const char *filename, const char *filename_bank, */ csum = 0; + PokeW(mem, 0xffdc, 0xffff); + for(f = 0; f < count; f++) { csum = CalcChecksum(bank[f]->memory + base, len, csum); } PokeW(mem, 0xffde, csum); - PokeW(mem, 0xffdc, 0xffffu - csum); + PokeW(mem, 0xffdc, csum ^ 0xffff); /* Output ROM contents */ |