Views: 993,144,521
2 users online: Ladida, Lsh0426 - Guests: 39 - Bots: 104 Users: 54,459 (2,078 active)
Latest: sanskieth
Tip: Try running your hack on various SNES emulators to see if anything is incompatible.
Not logged in.
Posts by MiracleWater
MiracleWater's Profile - Posts by MiracleWater
Pages: « 1 2 3 4 »
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.

Any help would be appreciated.
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:

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 #tb{:?} That's what i'm confused about)

Anyway, help is much appreciated.
Originally posted by Alcaro
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.)

Ok, I understand now. Thanks for clarifying.
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).

Wow, okay this seems to be a very helpful tool.
Thank you both for the quick response.
I'm still quite new to assembly and was hoping someone could clarify some things about bitwise operations.

Let's say I have some data stored in memory that contains the player's points and lives (not smw specific) and I want to check if bit 1 is set.

LDA $0186      ; Loads the byte that contains points and lives
AND #$01       ; AND #$01 with whatever is in $0186 
??????         ; Some branch operation

This is where I become confused.

0100 1011 <---- This is in A
0000 0010 <---- AND with this

This becomes...

0000 0010 <---- Does this thing here get stored to A?

Also what is now being compared if I were to BEQ or BNE?

Any clarification would be helpful.
Originally posted by Vitor Vilela

BEQ -> branches if the result IS zero (if the output is all zero, the it's because the bit(s) you want to check *is not set*)

So for BEQ, I understand that would mean to branch if the bit i'm checking is not set, but i'm still not sure why.

If you have something like:

LDA $0186
CMP #$01
BEQ somelabel

Here BEQ branches if the value in A is equal to the value $01.

But in the code I used in my original post:

LDA $0186      ; Loads the byte that contains points and lives
AND #$01       ; AND #$01 with whatever is in $0186 
BEQ some label ; Branch if equal

BEQ branches if what value is equal to what other value?
Ahhhhhh, I understand now.
Thank you Vitor for the help.
Would someone be able to explain to me in more detail what the purpose of the address $7E009E is and why it's 12 bytes? The description is:

Originally posted by SMW RAM Map
Sprite number, or Acts Like setting for custom sprites.

I'm still learning assembly and looking through people's code seems to help, but I keep seeing this address and still can't grasp what it does.
Originally posted by leod

The ,x tells the SNES to load the byte at $9E PLUS whatever is in x. So, in this case, it'd load $86 instead

So LDA $9E,x says take the value at address $9E + x and store it to A? Is the $86 you put just an example here?

Also would that mean that the game can only process a maximum of 12 sprites at once?
Originally posted by telinc1
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.
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.

Originally posted by Thomas
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:

PowerDown:          A0 04         LDY.B #$04                ; \ Play sound effect 
CODE_00F5F5:        8C F9 1D      STY.W $1DF9               ; / 

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.
Perfect, thank you.
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:
; 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?
Pages: « 1 2 3 4 »
MiracleWater's Profile - Posts by MiracleWater

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

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


Follow Us On

  • YouTube
  • Twitch
  • Twitter


  • Super Mario Bros. X Community
  • Mario Fan Games Galaxy
  • sm64romhacks