From beb25c09c87c67e83f05f89fe704890493aac263 Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 6 May 2016 08:38:10 +0100 Subject: Fixed SNES checksum. --- src/snesout.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/snesout.c') 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 */ -- cgit v1.2.3