SMS Power! Logo Forums
Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Development - Music

 View topic - Zexall and CRC calculation
Log in
Search
Memberlist
Membermap
Profile
Register
 Log in to check your private messages
Reply to topic    Forum Index - Development
Author Message
JwB

Joined: 05 Jan 2010
Posts: 2
Zexall and CRC calculation
Post Posted:  Wed Jan 06, 2010 9:58 am Reply with quote

Could anyone explain to me how zexall calculates its CRCs? I was under the impression that certain flags could not be tested (H/N) and neither can the F register be accessed?

Or is there something I'm missing?

I've looked at the code but its way above my head :(

Thanks for any pointers.
Back to top

View user's profile Send private message Visit poster's website
Maxim
Site Admin

Joined: 19 Oct 1999
Posts: 7468
Location: London, UK
Post Posted:  Wed Jan 06, 2010 10:57 am Reply with quote

You can read the F register using
push af
pop bc

for example, which copies it to register c. Zexall also masks the F register to allow it to ignore certain flags; we ignore the undocumented flags because no game is known to rely on them, and they are a pain to emulate.

Zexall calculates CRCs using (I think) the standard CRC32 algorithm. The input data stream is the contents of a block of memory, which includes a dump of the registers as well as some memory that has been operated on by the test, before and after each instruction test.
Back to top

View user's profile Send private message Visit poster's website
JwB

Joined: 05 Jan 2010
Posts: 2
Post Posted:  Wed Jan 06, 2010 11:07 am Reply with quote

aha. I knew it would be something simple.

Cheers :)
Back to top

View user's profile Send private message Visit poster's website
Reply to topic    Forum Index - Development All times are GMT
Page 1 of 1

 

Script phpBB © 2001, 2005 phpBB Group



Back to the top of this page
Back to SMS Power!