Banner
CLDC 2020's submission period is over and judging will begin soon! Thanks for participating!
Views: 826,907,809
Time:
31 users online: badummzi, chickaDEE Magazine, Digidude, Dispace, ExONightZ, GMCHacker91, HammerGuy, JamesD28,  KevinM, Knucklesfan, LOLRyan2006 Mario Fan, Lord Avadar 5355, lucoshi, lx5, NicoTheKaizoer, NoobNinja1, OrangeBronzeDaisy, Oxidia, Pizzabusive, PlagueRatofDoom, Ragey, RollingRigatonis, RPG Hacker, santhiagolucas, Seike kun, SquidBoy20, SquidMan_Raps, TheMorganah, Tsutarja, WhiteYoshiEgg, Wind Fish - Guests: 76 - Bots: 80 Users: 44,187 (2,521 active)
Latest: santhiagolucas
Tip: Don't place Yoshi coins near a goal post because they keep glowing when a level fades out.Not logged in.
X Dash by ComradeKirby
Forum Index - Valley of Bowser - Moderation Questions - UberASM - X Dash by ComradeKirby
Pages: « 1 »
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 »
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 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 16

Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy