Banner
Views: 236,207,997
Time: 2013-05-21 07:47:34 PM
26 users online: AlexanderXCIII, bandicoot, Dakras Hayashi, DPBOX, Dylancd5010, fabio, Gamma V, Jonny, Kobrah, o Ladida, leafbarrett, MarioEdit, MolSno, mrnacho04, NEX and GBX, o PatPatPat, phenolatukas, Pixels, Qwholl, Ramidalv, Rextep, ShadowFire, o Sonikku, thenextdoor, tylersuperwiigamer, o Zildjian - Guests: 35 - Bots: 12Users: 22,858 (1,284 active)
Latest: FUNKY kong ending
Tip: If you give a muncher tile custom graphics, it will still act like a coin when a silver P-switch is active, whether it looks like a coin or not. So make sure to use ExAnimation if there's a silver P-switch in the area.
FireBall disassembly- how to...
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - FireBall disassembly- how to...
Pages: « 1 »
Increase the Fireballs that mario can shoot? Actually, he can shoot only 2 on one screen, but I want to increase the amount to 3 OR 4, i bet because in the GFX00 are only 2 8x8 tiles for fireballs you can shoot only 2, but how i can change that?


However, heres the "large" code:


Code
ShootFireball: A2 09 LDX.B #$09 ; \ Find a free fireball slot (08-09) CODE_00FEAA: BD 0B 17 LDA.W RAM_ExSpriteNum,X ; | CODE_00FEAD: F0 06 BEQ CODE_00FEB5 ; | CODE_00FEAF: CA DEX ; | CODE_00FEB0: E0 07 CPX.B #$07 ; | CODE_00FEB2: D0 F6 BNE CODE_00FEAA ; | Return00FEB4: 60 RTS ; / Return if no free slots CODE_00FEB5: A9 06 LDA.B #$06 CODE_00FEB7: 8D FC 1D STA.W $1DFC ; / Play sound effect CODE_00FEBA: A9 0A LDA.B #$0A CODE_00FEBC: 8D 9C 14 STA.W RAM_FireballImgTimer CODE_00FEBF: A9 05 LDA.B #$05 ; \ Extended sprite = Mario fireball CODE_00FEC1: 9D 0B 17 STA.W RAM_ExSpriteNum,X ; / CODE_00FEC4: A9 30 LDA.B #$30 CODE_00FEC6: 9D 3D 17 STA.W RAM_ExSprSpeedY,X CODE_00FEC9: A4 76 LDY RAM_MarioDirection CODE_00FECB: B9 94 FE LDA.W DATA_00FE94,Y CODE_00FECE: 9D 47 17 STA.W RAM_ExSprSpeedX,X CODE_00FED1: AD 7A 18 LDA.W RAM_OnYoshi CODE_00FED4: F0 09 BEQ CODE_00FEDF ADDR_00FED6: C8 INY ADDR_00FED7: C8 INY ADDR_00FED8: AD DC 18 LDA.W $18DC ADDR_00FEDB: F0 02 BEQ CODE_00FEDF ADDR_00FEDD: C8 INY ADDR_00FEDE: C8 INY CODE_00FEDF: A5 94 LDA RAM_MarioXPos CODE_00FEE1: 18 CLC CODE_00FEE2: 79 96 FE ADC.W DATA_00FE96,Y CODE_00FEE5: 9D 1F 17 STA.W RAM_ExSpriteXLo,X CODE_00FEE8: A5 95 LDA RAM_MarioXPosHi CODE_00FEEA: 79 9C FE ADC.W DATA_00FE9C,Y CODE_00FEED: 9D 33 17 STA.W RAM_ExSpriteXHi,X CODE_00FEF0: A5 96 LDA RAM_MarioYPos CODE_00FEF2: 18 CLC CODE_00FEF3: 79 A2 FE ADC.W DATA_00FEA2,Y CODE_00FEF6: 9D 15 17 STA.W RAM_ExSpriteYLo,X CODE_00FEF9: A5 97 LDA RAM_MarioYPosHi CODE_00FEFB: 69 00 ADC.B #$00 CODE_00FEFD: 9D 29 17 STA.W RAM_ExSpriteYHi,X CODE_00FF00: AD F9 13 LDA.W RAM_IsBehindScenery CODE_00FF03: 9D 79 17 STA.W $1779,X Return00FF06: 60 RTS ; Return ADDR_00FF07: C2 20 REP #$20 ; Accum (16 bit) ADDR_00FF09: AD BC 17 LDA.W $17BC ADDR_00FF0C: 29 00 FF AND.W #$FF00 ADDR_00FF0F: 10 03 BPL ADDR_00FF14 ADDR_00FF11: 09 FF 00 ORA.W #$00FF ADDR_00FF14: EB XBA ADDR_00FF15: 18 CLC ADDR_00FF16: 65 94 ADC RAM_MarioXPos ADDR_00FF18: 85 94 STA RAM_MarioXPos ADDR_00FF1A: AD BB 17 LDA.W $17BB ADDR_00FF1D: 29 00 FF AND.W #$FF00 ADDR_00FF20: 10 03 BPL ADDR_00FF25 ADDR_00FF22: 09 FF 00 ORA.W #$00FF ADDR_00FF25: EB XBA ADDR_00FF26: 49 FF FF EOR.W #$FFFF ADDR_00FF29: 1A INC A ADDR_00FF2A: 18 CLC ADDR_00FF2B: 65 96 ADC RAM_MarioYPos ADDR_00FF2D: 85 96 STA RAM_MarioYPos ADDR_00FF2F: E2 20 SEP #$20 ; Accum (8 bit) Return00FF31: 6B RTL ; Return ADDR_00FF32: BD E0 14 LDA.W RAM_SpriteXHi,X ADDR_00FF35: EB XBA ADDR_00FF36: B5 E4 LDA RAM_SpriteXLo,X ADDR_00FF38: C2 20 REP #$20 ; Accum (16 bit) ADDR_00FF3A: 38 SEC ADDR_00FF3B: E5 1A SBC RAM_ScreenBndryXLo ADDR_00FF3D: 85 00 STA $00 ADDR_00FF3F: A9 30 00 LDA.W #$0030 ADDR_00FF42: 38 SEC ADDR_00FF43: E5 00 SBC $00 ADDR_00FF45: 85 22 STA $22 ADDR_00FF47: E2 20 SEP #$20 ; Accum (8 bit) ADDR_00FF49: BD D4 14 LDA.W RAM_SpriteYHi,X ADDR_00FF4C: EB XBA ADDR_00FF4D: B5 D8 LDA RAM_SpriteYLo,X ADDR_00FF4F: C2 20 REP #$20 ; Accum (16 bit) ADDR_00FF51: 38 SEC ADDR_00FF52: E5 1C SBC RAM_ScreenBndryYLo ADDR_00FF54: 85 00 STA $00 ADDR_00FF56: A9 00 01 LDA.W #$0100 ADDR_00FF59: 38 SEC ADDR_00FF5A: E5 00 SBC $00 ADDR_00FF5C: 85 24 STA $24 ADDR_00FF5E: E2 20 SEP #$20 ; Accum (8 bit) Return00FF60: 6B RTL ; Return CODE_00FF61: BD E0 14 LDA.W RAM_SpriteXHi,X CODE_00FF64: EB XBA CODE_00FF65: B5 E4 LDA RAM_SpriteXLo,X CODE_00FF67: C2 20 REP #$20 ; Accum (16 bit) CODE_00FF69: C9 00 FF CMP.W #$FF00 CODE_00FF6C: 30 05 BMI CODE_00FF73 CODE_00FF6E: C9 00 01 CMP.W #$0100 CODE_00FF71: 30 03 BMI CODE_00FF76 CODE_00FF73: A9 00 01 LDA.W #$0100 CODE_00FF76: 85 22 STA $22 CODE_00FF78: E2 20 SEP #$20 ; Accum (8 bit) CODE_00FF7A: BD D4 14 LDA.W RAM_SpriteYHi,X CODE_00FF7D: EB XBA CODE_00FF7E: B5 D8 LDA RAM_SpriteYLo,X CODE_00FF80: C2 20 REP #$20 ; Accum (16 bit) CODE_00FF82: 85 00 STA $00 CODE_00FF84: A9 A0 00 LDA.W #$00A0 CODE_00FF87: 38 SEC CODE_00FF88: E5 00 SBC $00 CODE_00FF8A: 18 CLC CODE_00FF8B: 6D 88 18 ADC.W RAM_Layer1DispYLo CODE_00FF8E: 85 24 STA $24 CODE_00FF90: E2 20 SEP #$20 ; Accum (8 bit) Return00FF92: 6B RTL ; Return


Thanks for any help
It would be incredibly hard. Everything about the fireballs revovlves around the fact that there are two- two addresses, two bytes for a table, x holding 0/1, binary commands, all of it. To have more than two? You'd best just rewrite the entire engine! You could have 3 going at one time but about half of the fuctionality would be dead.
This probably won't work and if just stab in the dark but here it goes...

The best thing I could think(and it doesn't sound very efficient) would be at the hijack the fireball check and instead have that jump to a routine you wrote for two more fireballs then duplicate the ALL of the fire flowers code into the freespace you jump to changing ram address for each fireball accordingly. This may not work very well or at all, just my hypothesis. But providing it works it would be something like this:


change:
Code
LDX.B #$09 ; \ Find a free fireball slot (08-09) LDA.W RAM_ExSpriteNum,X ; | BEQ CODE_00FEB5 ; | DEX ; | CPX.B #$07 ; | BNE CODE_00FEAA ; | RTS ; / Return if no free slots


to:
Code
JMP wherever wherever: LDX.B #$09 ; \ Find a free fireball slot (08-09) LDA.W RAM_ExSpriteNum,X ; | BEQ CODE_00FEB5 ; | DEX ; | CPX.B #$07 ; | BNE CODE_00FEAA ; | ;your code to check for two more places here ;all the code for two fireballs goes here, but modified for two separate fireballs.


If this post is way to wrong, just say so and I'll edit it out.
Pages: « 1 »
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - FireBall disassembly- how to...

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

Copyright © 2005 - 2013 - SMW Central
Legal Information - Link To Us


Total queries: 27

Menu