Users browsing this thread: 1 Guest(s)
FF4 SNES SRM Checksum
02-12-2017, 03:50 PM
Awesome! Thanks for the source assembly code. It's been a long time since I've dealt with assembly code (~17 years or so), so I'll need to brush up on it to get familiar with what these op codes and instructions do on the 65816.
If I understand what you said correctly, and from looking at the main loop (0x1cc7b to 0x1cc80) it treats the data as 16-bit (accumulator set to 16 bits at 0x1cc6d), but only increments the byte address by 1?
So if my 16-bit words are as follows,
0x1122
0x3344
0x5566
It would add 0x1122, 0x2233, 0x3344, 0x4455, 0x5566 and then set the accumulator to 8-bit mode (effectively dropping all higher bits) and return that as the 16(?)-bit checksum?
Am I kind of on the right track?
If I understand what you said correctly, and from looking at the main loop (0x1cc7b to 0x1cc80) it treats the data as 16-bit (accumulator set to 16 bits at 0x1cc6d), but only increments the byte address by 1?
So if my 16-bit words are as follows,
0x1122
0x3344
0x5566
It would add 0x1122, 0x2233, 0x3344, 0x4455, 0x5566 and then set the accumulator to 8-bit mode (effectively dropping all higher bits) and return that as the 16(?)-bit checksum?
Am I kind of on the right track?
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)