atari-representation-learning icon indicating copy to clipboard operation
atari-representation-learning copied to clipboard

Pixel positions

Open frederikschubert opened this issue 4 years ago • 2 comments

Did you find out how the positions of the sprites are encoded? For example in Asteroids, I want to find the asteroid or the player given its x-y-coordinate in the RAM. But I can't find a simple mapping between the RAM coordinates and the pixels.

frederikschubert avatar Oct 18 '19 12:10 frederikschubert

Hi Frederik, Yeah to the best of my knowledge for most games there is not an exact mapping. The frame size is 210x160 and the possible values of ram are [0,255]. The only instance I can think of the RAM value matching exactly to the pixel position is the x-coordinate of the logs in Pitfall. Often the RAM changes in increments of 16 from frame to frame as a sprite moves.

I do not understand assembly code and Atari game development enough to know exactly how a RAM value is mapped to the final pixels. Also, I think each game developer may have used the RAM differently in how they mapped its value to the position on the screen?

I can point you to a few resources, which may or may not be helpful:

Sorry, if that is a lot of information to learn just to get the position of the ateroids. Let me know if you have any other questions or if you figure it out (I'd like to learn as well!)!

eracah avatar Oct 18 '19 14:10 eracah

Thank you for your quick response!

From a first look at your resources, it seems to be rather difficult to determine the connection between the memory and the drawn pixels. I will see how far I get in understanding the assembly code and will comment back with my findings.

frederikschubert avatar Oct 21 '19 13:10 frederikschubert