Banner
Views: 882,216,299
Time:
18 users online: AllexGG,  Anorakun, AyGaAlPa, BootaNoBijuu, cangrejo, Chef Chozo, chickaDEE Magazine, FrozenQuills, GbreezeSunset, h.carrell, KDJewl, LadiesMan217, Mariotag1, mte_95, S3TH0s, Smibbix, stu, The WHG Modz - Guests: 64 - Bots: 65 Users: 49,416 (2,448 active)
Latest: Chef Chozo
Tip: Don't place Yoshi coins near a goal post because they keep glowing when a level fades out.Not logged in.
How do I check the current level through RAM?
Forum Index - SMW Hacking - SMW Hacking Help - How do I check the current level through RAM?
Pages: « 1 » Link
I want to make some kind of patch that requires level number (so it only applies on a certain level). I know everything else except how to find the current level. Searching "current level" on the RAM map only shows up a Lunar Magic address.
UberASM and many other patches install a hack which stores the current level number into $010B. If you don't use any of them, here is one you can patch to your ROM:
Code
!addr			= $0000

if read1($00FFD5) == $23
	sa1rom
	!addr			= $6000
endif

!level	= $010B|!addr

ORG $05D8B7
	BRA +
	NOP #3		;the levelnum patch goes here in many ROMs, just skip over it
+
	REP #$30
	LDA $0E		
	STA !level
	ASL		
	CLC		
	ADC $0E		
	TAY		
	LDA.w $E000,Y
	STA $65		
	LDA.w $E001,Y
	STA $66		
	LDA.w $E600,Y
	STA $68		
	LDA.w $E601,Y
	STA $69		
	BRA +
ORG $05D8E0
	+


--------------------
Okay, my layout looks ugly.
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - How do I check the current level through RAM?

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