Banner
Views: 934,409,062
Time:
17 users online: Anas, crocodileman94, Darolac, dougeff, Hwailaluta, Infinity, LucasRCD, Luis Carrasquero, nicknicknick2020, OrangeBronzeDaisy,  RussianMan, SAMYR DUTRA ARAUJO, Superwan, TCgamerboy2002,  ThirdWall, Truxton, yogui - Guests: 95 - Bots: 118 Users: 52,124 (2,115 active)
Latest: AmnesiaSilence
Tip: Use this patch to fix the bug where editing the upper right 8x8 tile of the sideways walking Koopa Troopa in GFX01 makes the coin sparkles look glitchy.
Not logged in.
Red Coin by Friday_D0nat
Forum Index - Valley of Bowser - Moderation Questions - Blocks - Red Coin by Friday_D0nat
Pages: « 1 » Link
File Name: Red Coin
Submitted: by Friday_D0nat
Authors: Friday_D0nat
Act As: 025
Includes GFX: No
Description: A red coin that gives a powerup when all 8 of them have been collected (default powerup is flower, but it can be changed in the .asm file). It plays a sound effect when collected. It doesn't overwrite the item box.

(Inspired by NSMB's red coins)



It uses $7E0058 which is unused, but in the case it is used, it can be changed.



First .asm related submission, yay!
Screenshots:
The block almost works properly, but there's a few issues that need to be fixed before it can be accepted.

The first issue is that the sound effect affects how many coins are needed to get the powerup. This is because you're adding the freeRAM to the SFX value, then checking if it's equal to #$1A (which only works for 8 coins if you're using SFX #$13).

The second issue is that the default freeRAM $58 is not cleared on level load. This means if you collected 7 coins in a level, went to a sublevel, then returned to the main level and collected another coin, it would register as the 8th coin. Since tiles inserted from direct map16 always respawn, this could be used to farm powerups.

Finally, there are some optimization issues with the code which I don't think can be ignored. You're using BRL to jump from Mario labels to the "Collect:" label, which wastes cycles and bytes. You can simply re-order the labels so that all the labels you want to run the code for, are placed above the code. For example:

Code
MarioAbove:
TopCorner:
BodyInside:
HeadInside:
MarioBelow:
	Collect:
	code


Alternatively, you can edit the JMP instructions themselves, replacing the "JMP MarioAbove", "JMP MarioBelow" etc. with "JMP Collect" for all the labels you want to run that code.

Likewise, you don't need to put RTL under every label which you don't want to run code. You can simply re-order them like I mentioned above, and have them all converge on a single RTL.

While not a rejection reason, it would be nice to add SA-1 compatibility (this is why it wasn't working for AyGaAlPa, btw). All you need to do is put "|!addr" without quotation marks on the end of every 4-digit address (e.g. $0DC2|!addr). You can also put "|!bank" on the end of $028008 to give a tiny speed boost for fastROM users.

As a nitpicky sidenote, please don't include defines which aren't used (!Amount in this case).

Tested with:

• Lunar Magic 3.21
• GPS V1.4.21
• Snes9x v1.60
• bsnes plus v05
Pages: « 1 » Link
Forum Index - Valley of Bowser - Moderation Questions - Blocks - Red Coin by Friday_D0nat

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