Banner
Views: 778,926,999
Time:
13 users online: 0Zerp, Diego Kaizo, Flippn'Fences, Isikoro, jona255, K.T.B., Knight of Time, nesta_,  RPG Hacker, SiameseTwins, Slash Chen, sss cs, tomato jonson - Guests: 49 - Bots: 183 Users: 40,836 (1,680 active)
Latest: Valreid1989
Tip: Check this thread for a list of SMW sound effects.Not logged in.
Details for Yoshi swallow timer fix
SMW Patches - Yoshi swallow timer fix
File Name: Yoshi swallow timer fix
Added:
Authors: GreenHammerBro
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
161 downloads
Screenshots
Image
GreenHammerBro
You mean this:
Code
if read1($00FFD5) == $23
	sa1rom
	!SA1 = 1
	!Base1 = $3000		;>$0000-$00FF -> $3000-$30FF
	!Base2 = $6000		;>$0100-$0FFF -> $6100-$6FFF and $1000-$1FFF -> $7000-$7FFF
else
	lorom
	!SA1 = 0
	!Base1 = $0000
	!Base2 = $0000
endif
Posted by: GreenHammerBro - | Link
JackTheSpades
Well, the patch works, so there's that.
However, in the patch this line is complettely unneccessary.

Code
	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 :>

Code
if read1($00FFD5) == $23
	sa1rom
	!Base1 = $3000		;>$0000-$00FF -> $3000-$30FF
	!Base2 = $6000		;>$0100-$0FFF -> $6100-$6FFF and $1000-$1FFF -> $7000-$7FFF
else
	lorom
	!Base1 = $0000
	!Base2 = $0000
endif
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 - 2019 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 7

Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented