Riatoju's Feed

Riatoju
08-24-2019 at 01:25 PM
3 Comments
Rate this Entry

See if you can spot the timer in memory.


I found out where in memory the timer is updated and stored. Using the top right hand portion of the screen, try to see if you can spot it. It's in that small table that represents the Atari's RAM! Even more interesting, it's formatted in binary coded decimal!


ThanksJJT_Defender thanked this post
LikesRogerpoco, Barthax, JJT_Defender liked this post
Comments
  1. GibGirl's Avatar

    That's such a strange way to store those values! I'm sure there's some clever programming reason why this is the case though...

    LikesRiatoju liked this post
  2. Riatoju's Avatar

    Quote Originally Posted by GibGirl

    That's such a strange way to store those values! I'm sure there's some clever programming reason why this is the case though...


    I kinda get why they used Binary Coded Decimal, it is a little easier to work with and visualize in code than how it is traditionally stored, however I am a little surprised to see it used as most people seem to avoid it.

    As for how it's stored in memory, that's because each digit is separated by the other players times, it's pretty obvious when you fire the game up but I didn't notice until I got to the second where the actual math takes place.


    I'm pretty close to the algorithm too. Hopefully I'll find it tonight.

    LikesRogerpoco, nads liked this post
  3. Snowflake's Avatar

    dont forget the 6502 has an option to do math in bcd so using bcd, rather than converting on the fly, saves you instructions. probably saves time, definitely saves instruction room.

    LikesBarthax liked this post
Join us