Ok so I have an ASM that wants to check if you bonk your head so I want to read $77 and check if the up bit is set but when I run my code the accumulator is always set to 0 when I do a LDA $77 no matter what the actual value of $77 is, I checked the memory in real time and even when standing on the ground the value is always 04 in the memory as it should be but the accumulator still always returns 00 for some reason.
At this point I have the code running all the time and even on the ground it returns 00 which confuses me.
I'm basically trying to have diagonal up pipes, so far the code is just a custom block I put in with GPS, after some testing with someone else I figured that code is ran after the STZ $77 and before it sets the value every frame.
That is the case except in one edge case when I hit the slope helper block in the middle of the 2 slope ceiling blocks in which case $77 is 08 as expected at that moment and then it does what I want.
For reference I'm just throwing the value in the coin counter which does increment my coins as it should when it works.
I'm guessing I'm gonna need to learn uberASM to just store the value somewhere else for what I need.
EDIT : I was also trying to debug this with the block on the ground and just being in the block which is why I had the code with the 04 that was just to try to know why $77 wasn't working which then always returned 00 no matter what I did
EDIT 2: fixed my problem by hijacking some code to read the value when I needed to
Yeah makes sense, just still new to all this so didn't know if someone already worked with that or anything, patch works fine so there's that, thanks for answering though.
From what I can read about 8F and testing that's a backup of 72 which is the "in the air" flag which basically tell you if you'Re going up, down, or are standing on the ground.
I can't really use that 'cause that changes to same values whether or not you bonk somewhere or are just at the top of your jump.
Unless I'm missing something ehre?
Ok so I was making some ASM and wanted to check the "act as" value of a tile while in game. Turns out I couldn't find that information anywhere and had to figure it out myself. Now that's not really a problem I just guessed no one submitted it anywhere yet or something.
Problem is that it's stored outside of the range of RAM address you can submit to the SMW RAM map in here.
So huh, not sure where to have that info.
For reference the "act as" table is stored from $128000 to $12FFFF so from block 0000 to block 3FFF in low/high byte format. Switch that to $2F8000 / $2FFFFF with SA-1. Not entirely sure if the other 40 pages are stored somewhere else or what, haven't found it yet.
So ya, any insight on that?
EDIT : second half of the table sits at $188000
So I made another post about the "act as" table in memory to access within the game, made another post about it and turns out the table in lorom is in 2 places, $128000 for pages 0 to 39 and $188000 for pages 40 to 79.
When looking for it in an SA-1 rom I found that the first half is at $2F8000 and then the game tries to look at $FFC000 for the second half which is not there and the game will always return a 0000 for the act as so any tile from page 40 and over just acts as water. I don't have original hardware that's able to run a rom so I only tested this on emulators (snes9x, bsnes plus, bsnes mercury accuracy, bsnes mercury balanced)
I am not sure where to report bugs or if this is a problem with all emulators I tried or if it's from LM or the SA-1 patch but figured I'd tell people about it.
Thanks for the reply
I did create one though and and placed it in a level, made it act as 130 and when I jumped on it it acted as water.
Also then is there any reliable way to access that table from some code?
EDIT : ok retried on a new ROM and this time it worked fine, I must have done something wrong the first time but I did place blocks from page 40 in a level and they all acted as water
EDIT 2: alright never mind the question, figured it out.