DK Attack - Score Overflow (GBA)

Talk about the Donkey Kong Country ports for GBC and GBA.

DK Attack - Score Overflow (GBA)

Postby Retro » July 23rd, 2016, 2:53 am



You may appreciate my thumbnail if it is examined.

This is just a bit of interesting insight from playing through DK Attack many times.

After discovering that I could exploit the time bonuses resetting by way of continual reentry into bonus rooms, I was able to maximize my score in Reptile Rumble. This led to two limits being discovered: the max score being 500000, and the max time being 2:59.

When I finished, I ended up with a score of 673000. Then, to my surprise, when I entered the level again and exited, the score became 17640. The score had apparently overflowed and reset from the beginning, to grant me a low score instead of my initially high score.

From these numbers, I can deduce that the score is stored in a 16 bit unsigned integer, because 673000 - 17640 = 655360 = 2^16 * 10. I also suspect that the last 0 digit is placeholder, which must be the case if my initial deduction is correct, since the 0 never changes, and 65536 seems too perfect of a difference to be coincidence. My final inference is that there must be two separate variables for the most recent score and the saved level score, the most recent score being a larger form of storage, which would explain why the score did not overflow initially, but changed after I entered and exited the level.
Tourist
Bananas received 5
Posts: 14
Joined: 2015

Return to DKC Ports (GBC, GBA)

Who is online

Users browsing this forum: No registered users and 2 guests

cron