Thanks justin3009, this looks like it will be helpful. Two lines of significance:
$00/B22A BD 23 86 LDA $8623,x[$08:8A70] A:0174 X:044D Y:0000 P:envMxdIzc ;This loads the heart-tank value of 36
Graphics number is well-known. You can see that in the event editor window + compression/decompression programs spit out all the addresses and sizes of each graphic in a txt file. I don't get why the accumulator value doesn't reflect that though. A:0174. Why is it not A:036, or A:054 (decimal)?
$7E:152E - What sprite assembly to use
That address location in RAM is what I'm looking for. Pretty sure MegaEd X is not loading up artificial RAM, for the game, like an emulator would, so I'll have to try and find the sprite assembly in some memory bank. Unfortunately, it's hard to calculate because the program uses this 6mb rom variable that seems to change each time during run-time (maybe it is loading RAM?).
unsigned mapAddr = *LPDWORD(nmmx.rom + SNESCore::snes2pc(*LPDWORD(nmmx.rom + nmmx.pSpriteAssembly + assemblyNum * 3)) + frame);
LPBYTE baseMap = nmmx.rom + SNESCore::snes2pc(mapAddr);
Even if item graphics like the heart tank, are shifted to different locations in VRAM during gameplay you don't need to compensate for these offsets in the program. It just goes to the base location and loads up that graphic for each level where the graphic is used. It's not using VRAM to display them. I'll try and make sense of this over the next few days, along with the notes I already have.
It looks like the game stores and updates the assembly number in that ram location ($7E:152E) during gameplay so I'm able to view it during emulation in bsnes. For the subtank (gfxnum 0x8c) I already had the correct value (assemblynum 0x96) by just guessing. When I published the first update I used that value.
Nonetheless, it doesn't display the graphic correctly using that number (proof below), which is why I went to all the trouble to make it look better:
For the ride armor modules the program only displays the top part of the graphic as well. For some reason it doesn't even load the tile used for bottom part. I've tried editing the frame #, size of the graphic, tileCnt variable, nothing seems to work to get the graphic to load properly. It's extremely peculiar and I've run out of ideas (except for manually loading each tile lol). Sorry for the small graphic, I think the bulletin board compresses and shrinks it, here's the full graphic for better understanding: http://i.imgur.com/joxWgD1.jpg