Banner
Views: 993,059,378
Time:
21 users online: Alden,  Alex_X8, AnEvilGhost,  Anorakun, Children's Digest 1950-2009, CycloneS, edgar, fanfan21,  FPzero, FrozenQuills, Jazzman287, Lester_Vine, lubeeji, MarkAlarm, Murphmario,  quietmason, Retro Master HD, riobaldo, SF - The Dark Warrior, WIKIDNEZ, Ziz - Guests: 81 - Bots: 146 Users: 54,459 (2,081 active)
Latest: sanskieth
Tip: If you're using the wall-running purple triangles in your hack, remember to add Tile 1EB (or a tile that acts like Tile 1EB) underneath it. Extended object 44/45 will include this tile for you.
Not logged in.
X Dash by ComradeKirby
Forum Index - Valley of Bowser - Moderation Questions - UberASM - X Dash by ComradeKirby
Pages: « 1 » Link
File Name: X Dash
Submitted: by ComradeKirby
Authors: ComradeKirby
Type: Game Mode
Includes GFX: No
Includes Hijack: Yes
Featured: No
Description: This zip includes the X Dash asm file, a pre patched bps, and a uberasm list file.



This asm makes it so when pressing x, you spend a bonus star to dash forward killing enemies in your path.





Special thanks to Craz Xexe #4545 (mellonpizza) and kaizoman#1211 for the

code help on discord.
Screenshots:

Please do not in include an uberasm list or bps file with the submission, the .asm by itself is the only necessary file.

As it currently stands, the code will only check and decrement the bonus stars for Mario ($0F48), and not Luigi ($0F49). A simple fix for this would be to load $0DB3 (address for which player is currently in play, Mario = #$00, Luigi = #$01) into X and apply that to the address:

Code
	LDX $0DB3
	LDA $0F48,x

Code
	DEC $0F48,x



Code
	LDA $0F48 ;;check bonus stars
	CMP #$0
	BEQ notPressed

Without a CMP preceding it, BNE will automatically branch if the value in the accumulator is zero. Similarly, BEQ will automatically branch if the value is equal to 1. As an example, the code above can be reduced to just:
Code
	LDA $0F48 ;;check bonus stars
	BNE notPressed



Code
	LDA $0076
	CMP #$00
	BEQ Left
	LDA $0076
	CMP #$01
	BEQ Right
	
	Right:
	LDA #$32
	STA $7B
	RTL
	
	Left:
	LDA #$D3
	STA $7B
	

	notPressed:
    RTL

The "Left" subroutine and branch are redundant, and can instead be set like so:
Code
	LDA $0076
	BEQ Right

	LDA #$D3 ;;Left
	STA $7B
	RTL
	
	Right:
	LDA #$32
	STA $7B

	notPressed:
    RTL

Basically, if the value at $76 is 0, the branch to "Right" will just be skipped over and the rest of the code below it will still continue to be read.


Also while not really a reason for rejection, setting up defines for the speed and how long the dash lasts for would also be nice.
Originally posted by Meirdent
Without a CMP preceding it, BNE will automatically branch if the value in the accumulator is zero. Similarly, BEQ will automatically branch if the value is equal to 1.

Other way around - without a CMP, BEQ is "branch if zero" and BNE is "branch if nonzero."
Pages: « 1 » Link
Forum Index - Valley of Bowser - Moderation Questions - UberASM - X Dash by ComradeKirby

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

Copyright © 2005 - 2022 - 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