Coming back after years from SMW hacking. Must the custom resources (music/GFX) used in a level be created by ourselves or can I use a song ported by someone else? Feels like dumb question but I haven't seen any posts regarding this.
I've looked around and haven't seen anyone with this problem but i'm hoping it's a simple fix. For whatever reason, the frame an enemy is killed or bounced off by a spin jump, the graphic for the player's powerup in the reserve disappears. I've tested and it happens with all powerups on any level.
Hello everyone,
I'm relatively new to 65816 assembly and i've been somewhat confused about this particular area involving tables.
If I have a table like:
Code
Table: db $05, $06, $FF, $80
And i'm trying to index element 0 and load it into A. I've been led to believe that something like: $05 and $FF are pointers and #$05 and #$FF are actual hex values. So to me it seems like this table is containing a bunch of addresses and when you load one of them to A it's loading an address to A (or possibly loading the value stored at that address? I don't know That's what i'm confused about)
To start with, you can't load an address to A; you can only load values. Saying "load $19 to A" always means "load the value at $19 to A".
Tables are sequences of constants. db $42 puts the constant value 42 in the ROM. You can use db #$42 if you prefer that, it does the same thing.
Yes, it's a bit confusing. You'll just have to deal with it, computer languages sometimes do counterintuitive stuff. (More experienced ASMers will also encounter PEA and MVN, which raise similar questions, but that's nothing a beginner needs to worry about.)
I've noticed a lot of very common custom blocks I used to use have disappeared from the block repository or are only available as bin files.
Two in particular that i'm looking for are:
Sprite Only
Mario Only
Does anyone know where I can get asm versions of these blocks and possibly all the other blocks that came with the original blocktool (except in asm form).
The $86 that leod mentioned is the address that's effectively getting read read if X is $08 (because $9E + $08 = $86).
Wait, I'm a bit confused. Wouldn't $9E + $08 be $A6? This would make more sense to me because than the sprite numbers would be stored in the 12 bytes from $9E to $A9. Or are you saying that $9E + $08 = $A6 and dereferencing (dereferencing? Idk what to call it) the address $A6 has the value $86 in it.
This is probably a simple question, but I wasn't able to find any answers to it online, so hopefully someone can help me out.
If I am calling a subroutine, is it my job to push AXY (and possibly other registers like processor flags) or will it return with AXY how I left them.
Thanks
I'm trying to implement a simple health counter as uberasm code and i've run into a small problem. I have Mario set to always be small and when picking up a mushroom, rather than becoming Super Mario, he gets +1 health. The issue is that if he is always small Mario, one hit and he dies. The only way I can think of preventing this is using a patch and maybe creating a flag that I could set for specific levels in uberasm to check Mario's health when he is hurt. Ideally, i'd like to keep it all in uberasm. I have a feeling that there's a simple way to do this, i'm just not sure how.
On a side note, I do realize there are probably many health patches on SMWC, but i'm doing this purely as practice.
For what it's worth, if you really did need to check if Mario is dead through uberasm, you can check if $71 is #$09 (resetting it to #$00 will stop Mario from dying). However, since the death routine has already run by that point, Mario will be given a sudden Y speed and the level's music will get replaced by the death music.
I did actually try this and just had Mario's Y speed revert back to what it was before he died. The problem, as you mentioned, is the music changes to the death theme and when it's reverted back, the song restarts :/ I guess i'll just have to use a patch.
Thanks for the response.
Just got a quick question about patches that hopefully someone can help me out with.
If a subroutine is hijacked on a label such as "PowerDown", will this cause problems with the game. For example:
If I were to org $00F5F3 than JML to some code, wouldn't this mean the "PowerDown" label gets overwritten and subsequently, it couldn't ever be called? And if that's true, how would I fix this. Hopefully that makes sense.
Currently learning how sprites work and came across something I don't really understand. It seems in most sprites' graphics routine, right before storing the property byte, ORs it with $7E0064 and I'm not exactly sure why. I've checked a few sprites that come with sprite tool and the comment given is simply:
Code
; ORA $64 ; add in tile priority of level
Could someone please explain why this is done?
Also while i'm on the subject, could someone explain the difference between the YXPPCCCT that's stored at $16F6 and the YXPPCCCT stored at $303,y?
Thanks
Follow Us On