Views: 944,412,362
17 users online: AlexRex, Anas, Angel Miranda, binavik, bravetoaster, Bullymario, chickaDEE Magazine, Easy Difficulty,  idol, Kevin, lx5, NGB, PeachBomber, Sagebee,  Sayuri, snoruntpyro, TCgamerboy2002 - Guests: 116 - Bots: 84 Users: 52,514 (2,009 active)
Tip: The music in SMW's default castle/ghost house intros and boss battles can be changed by hex editing. See $0584DB and $0584E2 in the ROM map.
Not logged in.
Details for Timer
UberASM Repository - Timer Link - Show random
File Name: Timer
Authors: imamelia
Type: Level
Includes GFX: No
Includes Hijack: No
Featured: No
Description: This code will create a timer on the status bar that ticks up or down depending on its settings. You can also set "effects" that happen when the time drops to 0, such as teleporting or killing the player.

Credit to Iceguy for the idea, even though I didn't use his code.
Tags: clock, effect, lorom, sa-1, status bar, stopwatch, timer
Rating: No rating
Download: Download - 3.33 KiB
Just to warn you, the timer does not display the approximate centi-seconds, but rather a “jiffysecond” (1/60th of a second, AKA the game's frame within a second), thus only display numbers 0-59 instead of 0-99 (99 excluded because 59/60 is 0.983 (underline is repeating decimal)).

This timer is geared towards simplicity to use, mine, however is geared towards advance use of it that most other users are unlikely to use this (it's less user-friendly because it requires learning how to code).

Mine is mainly based on converting a single number, which is the 4-byte (32-bit) frame counter into HH:MM:SS:CC format via a routine (this routine alone merely converts, it does not increment or decrement the frame counter), the input is scratch RAM, so you can have a frame counter stored that is less than 32-bit. The benefit of this is in rare cases you wanted to add a gimmick you can add/subtract time (add 20 seconds, for example), this is much easier to handle a single number than every “time unit” should you exceed the 0-59 range of all units. Once the routine is done, you then need to take the outputs in !Scratchram_Frames2TimeOutput+0 to !Scratchram_Frames2TimeOutput+3, convert the number to decimal (HexDec), and write them to the status bar (I recommend using the colon for all numbers, but before the centisecond, put a period symbol).

2020-09-03 Edit: This tutorial covers on how to make a 32-bit timer (and a proper display).
Posted by: HammerBrother - | Link
A very customizable and flexible timer, however, it is quite hard to use without some amount of ASM knowledge. You could have made it a lot more user-friendly.

During the moderation, I fixed a mathematical expression in the level code which made the defines at the top pretty much useless and I added SA-1 compatibility. For future references, Asar does math left-to-right (a leftover quirk form xkas), but the expression relied on proper order of operations (and also inverted only one of the defines when it made sense to invert both). While correct behavior for can be turned on with math pri on, I wouldn't recommend it as it might break code which expects Asar's normal behavior.
Posted by:  Telinc1 - | Link
oh I didn't notice, I was hypnotized by it lol
BTW, can this work with the UberASM patch?
Posted by: TheJullasicFox - | Link
That gif is like 5 seconds long lol
Posted by: TheBiob - | Link
did anyone else watch the entire gif?
man I live a sad life
Posted by: TheJullasicFox - | Link

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


Follow Us On

  • YouTube
  • Twitch
  • Twitter


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