Banner
Views: 934,372,254
Time:
20 users online:  Alex_X8,  Anorakun, bd90492, cangrejo, EMBEAM, Golden Yoshi, Hwailaluta,  icrawfish, kuroki, marc1999, Marcozzo Daro, OrangeBronzeDaisy, PixlBitNick, Romano338, semiblind,  shovda, SuperKitty96,  Telinc1,  TickTockClock, WhiteYoshiEgg - Guests: 87 - Bots: 175 Users: 52,123 (2,121 active)
Latest: Tommy89
Tip: Keep in mind that capes often allow players to break or skip levels, such as by flying over them!
Not logged in.
Sign block help
Forum Index - SMW Hacking - SMW Hacking Help - Sign block help
Pages: « 1 » Link
Hi, I'm recently making a new hack, I'm using 1524's sign block that displays messages from other levels when pressing up. the thing is, it doesn't display messages above 24, and there's this not in the asm file: "if greater than 24, subtract #$DC", and I don't understand what does it mean.
I really need help about this.

--------------------
Yo, it's been a while.
It's how overworld numbers are stored. You can only assign messages to levels 0-24 and 101-13B but it's stored as a single two digit number. So for numbers 101 and above you subtract hex DC.

One example: level 105 would be 105-DC = 29.
Alcarobot has a command to convert between the two formats you can use. Just put 13bf <your level number> and press submit and it will give you the number you have to enter there.
OK, now I understand, thank you.

--------------------
Yo, it's been a while.
I have another problem, when I subtracted #$DC with using level 102, the game crashed,here's how I proceeded:

! Level = $102 - $DC.

What should I do?

--------------------
Yo, it's been a while.
Perhaps you're formatting it wrong? Asar (the program that inserts ASM into the ROM) doesn't like spaces in calculations. Maybe try this instead:

Code
!level = $102-#$DC


(no guarantee though, didn't test it)

If that also fails, you can still calculate it yourself and put it there ($26 in this case).

--------------------


 


Originally posted by WhiteYoshiEgg
Code
!level = $102-#$DC


(no guarantee though, didn't test it)

If that also fails, you can still calculate it yourself and put it there ($26 in this case).

That won't work, as Asar will throw an error from the "#" character. You sould use this instead:

Code
!level = $102-$DC


That said, there is a small risk with doing assembler math like this. Asar may assume the result of this math is supposed to be a 16-bit number rather than 8-bit number, which can cause issues with certain commands. To be safe, find this line in the sign block:

Code
LDA #!level

and change it to this:

Code
LDA.b #!level

The ".b" after the opcode ensures that Asar interprets the length of the number correctly.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Originally posted by Thomas
That won't work, as Asar will throw an error from the "#" character.

Oh right, yeah, messed that one up.

--------------------


 
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - Sign block help

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

Copyright © 2005 - 2021 - 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
  • sm64romhacks