Language…
7 users online: cletus_deletus,  Donut, masl, playagmes169, sinseiga, Skewer, toady - Guests: 230 - Bots: 318
Users: 64,795 (2,375 active)
Latest user: mathew

List of sprites to be rendered in RAM?

Greetings SMW Central,

I'm a student working on a project with OpenAI Retro's reinforcement learning library.

SMW for the SNES is my guinea pig, and what is being emulated. The Retro wrapper can extra values directly from RAM.

My question(s) are related to navigating the RAM map. I would like to know what sprites are on the current rendered frame and their X/Y position. So far I understand there are different kinds of sprites (primarily interested in the enemy/standard sprites, not backgrounds), and that Mario has his own dedicated RAM addresses.

I found these lists of Sprites, which are helpful for associating a sprite and it's hex code.

http://old.smwiki.net/wiki/Sprite
https://docs.google.com/spreadsheets/d/1YuEyTkBXl-BvXyAf6C7EPXo20CdVlbwUttp2RXHoY2U/edit#gid=0

Right now my leads are the following:

1) The OAM table (What does OAM stand for?) Seems to be described as having slots for rendering sprites? Is this where I can extract a list of enemies on the rendered frame?

2) GFX Bundles - I believe the .bin files store the actual sprite images/animations; Are any GFX RAM entries related to what is being displayed in context of the sprite code and X/Y positions?

Thank you for your help!


You can use a combination of $9E and $14C8 to check what sprites are currently loaded. There are 12 sprite "slots", with each slot receiving one byte in those tables. $14C8 will tell you whether a slot is being used (0 = not used, anything else = used), while $9E will tell you the ID of the actual sprite in that slot.

You can then get the sprite's psition from $D8, $E4, $14D4, and $14E0. Positions are 16-bit and spread across two tables ($D8 and $14D4 for Y position, $E4 and $14E0 for X).


OAM (Object Attribute Memory) is specifically for individual sprite graphical tiles. It tells the system, "here is the tile I want drawn, and here's how and where I want it". The tiles are not linked directly to any specific sprite, though, so it's not particularly useful in identifying the current on-screen sprites.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer