Banner
Views: 843,924,654
Time:
23 users online: Amine Retro,  Anorakun, AntiDuck, autisticsceptile1993, caiqueleo, Counterfeit, essetrouxaaqui17,  FPzero, Infinity,  Koopster, MassPunishment, Narcologer,  Ninja Boy,  patcdr, pixelninetales, Powblock532, Rilla Roo, Second, StackDino, SuperHack64, UltiMario, Valkyria, Vellidragon - Guests: 61 - Bots: 81 Users: 46,385 (2,798 active)
Latest: chilistudios
Tip: Verify that your hack's BPS patch is functioning correctly before submitting it.Not logged in.
List of sprites to be rendered in RAM?
Forum Index - SMW Hacking - SMW Hacking Help - List of sprites to be rendered in RAM?
Pages: « 1 »
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
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - List of sprites to be rendered in RAM?

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy