Banner
Views: 778,923,607
Time:
11 users online: Adryel, AntiDuck, FailSandwich, Flippn'Fences, Golden Yoshi, Matheus2653,  Ninja Boy, Orphen Nightford, SammmUuU, sss cs, TheBiob - Guests: 43 - Bots: 191 Users: 40,836 (1,680 active)
Latest: Valreid1989
Tip: You can edit the properties of the original sprites using Tweaker.Not logged in.
Help with custom sprite
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Help with custom sprite
Pages: « 1 »
I am trying to make a generator that shows level message 1 if the extra bit is clear and level message 2 if the extra bit is set.
For some reason it always displays message 2. I have read through the code several times but can't find what I did wrong. The code is pretty short so I just pasted it in the post.
I saved some of the data to $58 since the RAM map said it was unused. I don't know if you're supposed to do that...

I'm also pretty new to ASM, so maybe I am missing something really basic...
Code
dcb "INIT"

	RTL


dcb "MAIN"

	LDA $7FAB10,x
	AND #$04		;Checks if the extra bit is set, determing weither message 1 or 2 should show
	BNE Message2

;Message1:

	LDA $58
	AND #$01		;Checks if message 1 has already been shown
	BNE MessageShown
	LDA #$01
	STA $1426		;Spawns a message box containing message 1
	LDA #$01
	TSB $58			;Sets bit 1, flagging that message 1 has already been shown
	RTL

Message2:

	LDA $58
	AND #$02		;Checks if message 2 has already been shown
	BNE MessageShown
	LDA #$02
	STA $1426		;Spawns a message box containing message 2
	LDA #$02
	TSB $58			;Sets bit 2, flagging that message 2 has already been shown
	RTL

MessageShown:

	RTL

We’re looking for level designers to work on Extra Mario World!
Generators don't actually have an extra bit -- only regular custom sprites use them.
Originally posted by MarioE
Generators don't actually have an extra bit -- only regular custom sprites use them.


So I was missing something really simple... Thanks a lot, I was going crazy over this :D

We’re looking for level designers to work on Extra Mario World!
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Help with custom sprite

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

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


Total queries: 7

Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented