Language…
5 users online: drkrdnk, ioscotty, Mauls, X11Gbyte, Zavok - Guests: 1,745 - Bots: 97
Users: 67,694 (2,005 active)
Latest user: Sable Mage

Red Coin by Friday_D0nat

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