aboutsummaryrefslogtreecommitdiff
path: root/src/snesout.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/snesout.c')
-rw-r--r--src/snesout.c4
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
*/