Views: 865,282,851
18 users online: 0ne_bins211, BananaJellyYT, BreadEater, buggy789,  DeppySlide, ExONightZ, Ezek.The Square Remixer, Golden Yoshi, Green Jerry, jardeson01, MegaSonic1999, Pedro156, Potions315, RPG Hacker, Sping bot, SuperK1234, Ultima,  xHF01x - Guests: 48 - Bots: 61 Users: 47,923 (2,072 active)
Latest: maddawg
Tip: Verify your ROM is unedited by using ROMclean.Not logged in.
Details for Yoshi Swallow Timer Fix
SMW Patches - Yoshi Swallow Timer Fix Link - Show random
File Name: Yoshi Swallow Timer Fix
Authors: HammerBrother
Tool: Asar
Requires Free Space: Yes
Bug Fix: Yes
Featured: No
Description: Like the star fix patch, Nintendo made a similar mistake with the yoshi swallow timer: if the freezable frame counter ($7E0014) is divisible by 4 (that MOD 4 = 0), AND the lock flag ($7E009D) is set, will cause the timer to decrement every frame rather than every 4th and freezing with it.

In the image below, the hex value in the heads-up display's item box represents the frame counter, and next to the coin is the yoshi swallow timer. Since #$2C is divisible by 4 (4*11 = 44 or 44/4 = 11, R = 0), the swallow timer decrements each frame.
Tags: lorom, needs remoderation, sa-1, timer, yoshi, yoshi swallow
Download: Download - 983 bytes
You mean this:
if read1($00FFD5) == $23
	!SA1 = 1
	!Base1 = $3000		;>$0000-$00FF -> $3000-$30FF
	!Base2 = $6000		;>$0100-$0FFF -> $6100-$6FFF and $1000-$1FFF -> $7000-$7FFF
	!SA1 = 0
	!Base1 = $0000
	!Base2 = $0000
Posted by: HammerBrother - | Link
Well, the patch works, so there's that.
However, in the patch this line is complettely unneccessary.

	LDA $18AC+!Base2	;>Load the "before decrement" into A

Why? Because you use DEC on the same address afterwards which changes the zero flag in the processor register, which is later checked with BNE.
You then use JML to return to two possible codes, one being $01F1B2 which runs into an LDA #$00 before ever making use of A and the other ($01F1C6) begins with an LDA $18AC itself.

I didn't test to see if, for some magic that only the coding gods know reason, the code doesn't work if you remove the LDA, but, if you ever submit an update, check the possibility.
NOTE!!! I'm not saying you have to submit an update. IF you make an update.

Also, on another side note, I see this in all your patches with sa-1 support (which are literally ALL your patches (which is good btw)), that you use an if to check if the ROM is sa-1, then set a define, and then later use an if to check the define. You can just throw it all in one. It has no actual impact on the assembled code size, but it makes the ASM file a little shorter :>

if read1($00FFD5) == $23
	!Base1 = $3000		;>$0000-$00FF -> $3000-$30FF
	!Base2 = $6000		;>$0100-$0FFF -> $6100-$6FFF and $1000-$1FFF -> $7000-$7FFF
	!Base1 = $0000
	!Base2 = $0000
Posted by: JackTheSpades - | Link

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


Follow Us On

  • YouTube
  • Twitch
  • Twitter


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