Banner
Views: 925,750,922
Time:
16 users online: Ahrion, AppleBoy54321, ASSATAKKU,  Ayami,  Bench-kun, Black Goku, Enan63, Ezel, Fryinb, Galactic Spear, HammerBrother, MiracleWater, Mirann, NewPointless, pixelninetales,  quietmason - Guests: 88 - Bots: 69 Users: 51,756 (2,055 active)
Latest: gellys
Tip: Check this thread to find extremely useful diagrams and data.
Not logged in.
Posts by RedRose64
RedRose64's Profile - Posts by RedRose64
Pages: « 1 2 3 4 5 6 7 8 9 10 »
Is there a way to export a song without samples?
I'm using the SMB2 health patch in conjuction with the Restart from Last Exit Patch, now when I die using the restart patch, my health is never refilled, making me invincible. My guess is that the health patch only reloads in the OW but the restart patch starts you at the last exit you use, negating the code the health patch uses to reset my health when I die. I'm hoping all I need to do is move some code from the health patch over into the restart patch to get it to work properly.

Heres the patchs

SMB2 health patch:
Code
;@xkas
header
lorom
; -------------------------------------------
; Patches
; -------------------------------------------
; Mushroom Item
org $01C510
	db $00, 00, 00, 00 ; Disable mushroom giveing item
org $01C515
	db $00 ; Disable flower giveing mushroom
org $01C51D
	db $00 ; Disable feather giveing mushroom
org $01C524
	db $00, 00, 00, 00 ; Mushroom always trys to make you big
org $01C561
	JML Mushroom ; New Mushroom pickup code
org $01C604
	JSL GreenMushroom ; New 1up Mushroom pickup code

org $F5FC
JSL MarioFlash


; -------------------------------------------
; Status Bar
org $8FC8
	JML Healthbar ; Change Mario/Luigi text to health
; -------------------------------------------
; Map Mode Code
org $9E2C
	JML Newgame ; When starting a new game from titlescreen
	NOP
	NOP
org $0491DB
	JML Startlevel ; Whenever you enter a level
	NOP
org $A0E6
	JSL Endlevel ; Whenever you go back to the map
; -------------------------------------------
org $F5D5
	JML Hit
org $F60A
	JML Death
org $F5F8
	NOP ; Disable item box getting used when hurt 
	NOP
	NOP
	NOP
org $F600
	NOP ; Disable power up takeing when hurt (we do this elsewhere)
	NOP
; -------------------------------------------
;org $8C89 ; Status bar rearangeing
	;db $3E, $2C, $3E, $2C, $3E, $2C, $3E, $2C, $3E, $2C, $3E, $2C, $3E, $2C, $3E, $2C
	;db $3E, $2C, $FC, $38, $FC, $38, $FC, $38, $4A, $38, $FC, $38, $FC, $38, $4A, $78
	;db $76, $38, $26, $38, $FC, $38, $27, $3C, $27, $3C, $27, $3C, $FC, $38, $2E, $3C
	;db $26, $38, $FC, $38, $27, $38, $27, $38, $19, $38, $26, $38, $27, $38, $27, $38
	;db $FC, $38, $FC, $38, $64, $28, $26, $38, $FC, $38, $FC, $38, $FC, $38, $4A, $38
	;db $FC, $38, $FC, $38, $4A, $78, $2E, $3C, $2E, $3C, $2E, $3C, $2E, $3C, $FC, $38
	;db $FC, $38, $FC, $38, $FC, $38, $FC, $38, $FC, $38, $FC, $38
;org $8E6F ; Time
	;LDA $0F31
	;STA $0F0C
	;LDA $0F32
	;STA $0F0D
	;LDA $0F33
	;STA $0F0E
;org $8E8C ; Score?
;	STA $0EFC,x
;org $8F55 ; Lives
	;STX $0F17
	;STA $0F18
;org $8FEF ; Dragon Coins
	;STA $0F24,x
; -------------------------------------------
org $F2E0 ; Midway Point Healing/Powerup
	JML Midwayheal
	NOP
	NOP
	NOP
	NOP
; -------------------------------------------
org $0FFA01		; address to put code
; -------------------------------------------
db "STAR"		; Write RATS tag
dw Endcodeblock-Startcodeblock
dw Endcodeblock-Startcodeblock^#$FFFF
; -------------------------------------------
Startcodeblock:		; code starts here
; -------------------------------------------
; defines

!Health = $0DC4
!MaxHealth = $0DC5
!MarioHealth = $0F44
!LuigiHealth = $0F45
!MarioHeartsFound = $1F2C
!LuigiHeartsFound = $1F2D
!Powerup = $19
!MarioPowerup = $0DB8
!LuigiPowerup = $0DB8

!knockSpeed1 = $20
!knockSpeed2 = $E0

; -------------------------------------------
Hit:

	LDA !Health
	DEC
	BEQ Death
	STA !Health
	CMP #$01
	;BEQ Losebig ; Make you small if you are on your last hit
	LDA !Powerup
	CMP #$01
	BMI Endhit
	LDA #$01 ; Get rid of flower or cape if you have them
	STA !Powerup
	BRA Endhit
	Losebig:
		STZ !Powerup 
	Endhit:
   LDA #!knockSpeed2
    STA $7D
    
    LDA $76
    BNE Other
    
    LDA #!knockSpeed1
    STA $7B
    BRA Next
    
Other:
    LDA #!knockSpeed2
    STA $7B
Next:
		JML $00F5F3
Death:
	STZ !Health	
	LDA #$09
	STA $1DFB
	JML $00F60F
MarioFlash:
	LDA #$7F
	STA $1497
	RTL
; -------------------------------------------
Healthbar:
	LDX #$04
	HeathBarFillLoop:
		TXA
		CMP !Health
		BPL Empty
		Full:
			LDA #$3F
			BRA Set
		Empty:
			CMP !MaxHealth
			BPL Blank
			LDA #$3E
			BRA Set
		Blank:
			LDA #$3D
		Set:
			STA $0EFF,x
			DEX
			BPL HeathBarFillLoop	
	JML $008FD8
; -------------------------------------------
Mushroom:
	LDX #$00
	LDA !Health ; Mushrooms heal you...
	CMP !MaxHealth
	BPL Checkitem
	INC !Health
	BRA Checkbig
	Checkitem:
		LDA !Powerup
		BEQ Getbig ; And make you big if you are small
		LDA $0DC2
		BNE Endmush
		;INC $0DC2 ; But only gives a reserve item if you are big with full health.
		BRA Endmush
	Checkbig:
		LDA !Powerup
		BNE Endmush ; And make you big if you are small
	Getbig:
		LDX #$02 ;Set mario to expand
		STX $71
	Endmush:
		TXA
		BNE Endmush2
		JML $01C57A
	Endmush2:
		JML $01C565
; -------------------------------------------
GreenMushroom:
	LDA !MaxHealth
	STA !Health
	LDA !Powerup
	CMP #$00
	BNE Endgreen
	INC !Powerup
Endgreen:
	LDA #$08
	JML $02ACE5
	RTL
; -------------------------------------------
Newgame:
	STA $0DBE
	STZ $0DBF	
	LDX $0DB2
	STZ !Health
	STZ !MaxHealth
	LDA #$01
	STA !Powerup ; Start big
	STA $0DB8 
	STA $0DB9
	STZ $0DC1
  	JML $009E37
; -------------------------------------------
Startlevel:
	PHY
	LDY #$03
	LDA #$01
		BitCount:
		BIT !MarioHeartsFound,x
		BEQ NotSet
		INY
		NotSet:
		ROL
		BCC BitCount
	STY !MaxHealth
	LDA !MarioHealth,x
	BNE HasHealth
	TYA
	STA !MarioHealth,x
	HasHealth:
	STA !Health
	PLY
	LDA #$02
	STA $0DB1
	JML $0491E0
; -------------------------------------------
Endlevel:
	LDA !MaxHealth ; Skip this on init
	BEQ .Skip
	LDA !Health
	BNE .Alive
	.Dead
		LDA #$01
		STA !Powerup
		STA !MarioPowerup,x
		LDA !MaxHealth
		STA !Health
	.Alive
		STA !MarioHealth,x
	.Skip
		LDA #$03
		STA $44
		RTL
; -------------------------------------------
Midwayheal:
	LDA !Health
	CMP #$01
	BNE .Skip
	INC
	STA !Health
	LDA !Powerup
	BNE .Skip
	INC
	STA !Powerup
	.Skip
	JML $00F2E8
	
; -------------------------------------------
Endcodeblock:		; code ends here	
; -------------------------------------------


And the restart patch

Code
@asar
lorom
header

!RetryGM = $2A		; set this to the first game mode number for the RETRY? screen

!RestartFlag = $1934
!LastExit1 = $1936	; same format as 19B8
!LastExit2 = $1937	; same format as 19D8

org $00820D
	autoclean JML NMI_code
	NOP

org $00D0E2
	autoclean JML game_over
	
org $00D0B8
	autoclean JML before_death
	NOP
	
org $00D0E6
	autoclean JML after_death
	NOP #29
	
org $00F5AA
	autoclean JML dont_die_forever

assert read1($05D7CE) == $22, "Please, save your ROM in Lunar Magic first."
assert read1($05D8B1) == $22, "Please, save the overworld in Lunar Magic first."

; not vital for the patch itself, but SP2 won't reload until you do this
if read3($0FF160) == $FFFFFF
	print "Please, extract/insert GFX and ExGFX in Lunar Magic also."
endif

org $05DC50
	autoclean JML LM_exit_hijack
	
org $05DCEA
	autoclean JML LM_main_hijack
	
freecode

goto_008212:
	JML $008212
goto_008217:
	JML $008217
	
NMI_code:
	LDA $143A
	BEQ goto_008217
	BPL goto_008212
	
	CMP #$81
	BEQ .init_done
	INC $143A
	
	LDA #$08		; remove layer 3 priority
	TRB $2105
	
	STZ $00			; set all layer palettes to black
	STZ $2121
	STZ $4314
	REP #$20
	LDA #$220A
	STA $4310
	STZ $4312		; source address is $000000
	LDA #$0100
	STA $4315
	LDX #$02
	STX $420B
	SEP #$20
	JML $00823D
	
.init_done
	STZ $2131		; nuke color math
	
	LDA #$80		; write letters to SP2
	STA $2115
	REP #$20
	LDA #$6800
	STA $2116
	LDA #$1801
	STA $4310
	LDA #letter_gfx
	STA $4312
	LDX #letter_gfx>>16
	STX $4314
	LDA #$0140
	STA $4315
	LDY #$02
	STY $420B
	SEP #$20

	LDA $0DBE		; get lives+1 to figure out what number graphics to upload
	INC
	
	LDY #$00		; hex to dec copypasta
-	CMP #$0A
	BCC +
	SEC
	SBC #$0A
	INY
	BRA -
+	
	PHA
	TYA

	BEQ .next_digit
	ASL
	TAX
	REP #$20

	LDA.l number_ptrs,x
	STA $4312
	LDA #$68A0
	STA $2116
	LDX #$20
	STX $4315
	LDY #$02
	STY $420B
	SEP #$20

.next_digit
	PLA
	ASL
	TAX
	
	REP #$20
	LDA.l number_ptrs,x
	STA $4312
	LDA #$68B0
	STA $2116
	LDX #$20
	STX $4315
	LDY #$02
	STY $420B
	SEP #$20
	
	JML $00823D
	
letter_gfx:
	incbin "tiles.bin"
number_gfx:
	incbin "numbers.bin"

number_ptrs:
	dw number_gfx+$0000
	dw number_gfx+$0020
	dw number_gfx+$0040
	dw number_gfx+$0060
	dw number_gfx+$0080
	dw number_gfx+$00A0
	dw number_gfx+$00C0
	dw number_gfx+$00E0
	dw number_gfx+$0100
	dw number_gfx+$0120
	
	
before_death:
	LDA $1496
	CMP #$02
	BCC .right_before
	LDA #$3E
	STA $13E0
	JML $00D0BD
	
.right_before
	STZ $13E0
	JML $00D0BD
	
after_death:
	LDA #!RetryGM
	STA $0100
	JML $0084C7		; RTS in bank 0
	
	
game_over:
	LDA #$14
	STA $143B
	LDA #$C0
	STA $143C
	LDA #$FF
	STA $143D
	LDA #$15
	STA $0100
	JML $0084C7
	
dont_die_forever:
	LDA $1B95
	BEQ .no_wings
	JML $00C95B		; win the level etc
.no_wings
	LDA $0D9B
	BEQ .dead
	JML $00F5B6		; nothing
.dead
	JML $00F5B2		; kill


LM_exit_hijack:
	LDA !RestartFlag
	BEQ .not_restarting
	STZ !RestartFlag
	STZ $141A
	LDA !LastExit1
	STA $19B8,x
	STA $0E
	LDA !LastExit2
	PHA
	AND #$02
	LSR
	STA $1B93
	PLA
	STA $19D8,x
	BRA .end
	
.not_restarting
	LDA $19B8,x
	STA !LastExit1
	LDA $19D8,x
	STA !LastExit2
.end
	AND #$04
	JML $05DC55

LM_main_hijack:
	STA $0E
	STA !LastExit1
	TYA
	STA !LastExit2
	RTL


thanks in advance
When I try to insert the veggieplant.asm block into Block Tool .44
I get this error:

Don't know what "GPS" is?
Look. Is there a archive of the old block tool blocks that I can still download? Because i really don't feel like finding all the blocks I use in my hack (some are bin blocks) just to be forced to convert to yet another tool I have no interest in ATM.
So no archive?
Doesn't matter if it was out of style or not. I'm all open for change but it seems like lately this site forgets that people still use some of the old non-offensive tools like BTSD and Addmusic405. I'm 50% in my hack and don't want to convert to another tool or convert a few bin blocks that I use. I just want to finish this hack and release it. Just saying.
I think its these two files. Let me know if they work.
How do you use these? There's no instructions to it? It comes with;

collectkey.asm
collectkey1.cfg
collectkey2.cfg
collectkey3.cfg
collectkey4.cfg

....But what door does it unlock. None of these are door sprites. How do I use these?
I found and alternate way to solve my problem

Thanks for nothing as usual........
I want disable Player 2's spin jump. I created this patch first;

Code
header
lorom
	org $00D645
	db $60


Which disabled both players spinjump. But i needed it for just player 2 so I tried this;

Code
header
lorom

	LDA $0DB3					;\ Check for the current
	CMP #$00					;| player, if it is Luigi.
	BNE dontdoshit				;/ Otherwise return.
	org $00D645
	db $60
	
	BNE dontdoshit:


Which didn't work at all. Is there a better way to do this?
Whoa, I was way off...

Thanks for the code Medic. It worked just fine. Now I'll dissect this and learn from it.
Is there some way to slowdown the time Mario can cape spin attack? Similar to SMB 3 where you can't really spam the tail spin. I want to use the cape attack, but I don't like how you can just keep spinning with no cooldown.
OMG. I've been looking for something like this forever. Thank you!
Pages: « 1 2 3 4 5 6 7 8 9 10 »
RedRose64's Profile - Posts by RedRose64

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