Banner
Views: 993,016,779
Time:
17 users online: Ahrion,  Anorakun, AppleBoy54321, Dan2point5, Fullcannon, George, Green Jerry, Maniek, Nanny_Skeksis, Neidave, pakkie,  PermaBan, Souldbminer, TheBiob, TheKazooBloccGosh, Wolfguy423,  xHF01x - Guests: 92 - Bots: 113 Users: 54,459 (2,083 active)
Latest: sanskieth
Tip: Check this thread for a list of SMW sound effects.
Not logged in.
Integrated Speedrun Timer by BlueToad
Forum Index - Valley of Bowser - Moderation Questions - UberASM - Integrated Speedrun Timer by BlueToad
Pages: « 1 » Link
File Name: Integrated Speedrun Timer
Submitted: by BlueToad
Authors: BlueToad
Type: Level, Game Mode
Includes GFX: No
Includes Hijack: No
Featured: No
Description: This is an UberASM which draws a timer on the status bar, which counts for how much time you have been in the level. It will pause whenever the game freezes, is paused or when a message box is active. When the level is completed it will stop and change palette to denote that the level has ended. Requires Super Status Bar patch.

You can also disable the timer in upto 5 levels. This might be useful when you don't want the timer running in Yoshi's House, or during the intro message, for instance.

Uses 7 bytes of free RAM. Use it as level ASM or use it in Game Mode 14 to apply to all levels.

Requested by DoktorGroove.

Screenshot 1: Showing the timer itself.
Screenshots 2, 3, and 4: Timer stops and changes palette when a goal tape is touched, a palace switch is hit, or when a boss is defeated.
Screenshot 5: Timer freezes when animations and sprites are frozen.
Screenshot 6 and 7: Timer does not show up during No Yoshi intros.
Screenshot 8: When started from the midway point, the timer does not show up.
Screenshots:
Moderated with:
- Lunar Magic 3.30
- UberASMTool 1.4
- Asar 1.81 + Super Status Bar v2.2
- Snes9x v1.60

The main reasons for rejecting this are from poor optimization, overlooked errors, and the fact that the timer was displayed completely wrong upon insertion. Instead of starting at 0:00.00 like I would expect, the seconds was filled with complete garbage tiles and would increment all the way until it reached 0,1,2,etc.

As for optimizations and erros, the first problem comes from the unnecessary loading of the level number, $010B. After every branch, A is still the same value so you don't need to re-load it every single time. Also, you check against !NOTIME4 twice, forgetting !NOTIME5 entirely. This occurs both in init and main.
Code
LDA $010B
CMP !NOTIME4
BNE +
SEP #$20
RTL
+
LDA $010B
CMP !NOTIME4
BNE +
SEP #$20
RTL
+
; and so on

Secondly, there's extensive use of CMP #$00, which is unnecessary if using BEQ immediately after loading the value. I'm only showing one case of it, but you might as well remove it everywhere that it shows up.
Code
LDA $1493
CMP #$00
BEQ endlevel
JMP timerdone
endlevel:

Lastly, I was thinking that since this is a speedrun clock, it should be as accurate to real time as possible. From comparing it to another timer I had going, it desynced fairly quickly. I'd recommend using NMI to get the timing accurate, since that runs exactly once per frame regardless of lag. Granted, this would require even further optimizations, but it's something to consider. Note that this point isn't necessarily reject worthy, but it would make sense to implement.
Pages: « 1 » Link
Forum Index - Valley of Bowser - Moderation Questions - UberASM - Integrated Speedrun Timer by BlueToad

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2022 - 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