Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in SMW Hacking. |
Acmlm's Board - I3 Archive - SMW Hacking - CPU usage meter! | New poll | | |
Add to favorites | Next newer thread | Next older thread |
User | Post | ||
BMF54123 Since: 11-18-05 From: MOOGLES Last post: 6276 days Last view: 6275 days |
| ||
cpumeter.ips (WARNING: open your ROM and make sure that $819C-$81BF is empty (all FFs) before applying this patch!) What this patch does is add some visual indicators of how many CPU cycles your hack is using per frame, which quickly tells you how many sprites and/or custom blocks you can have in an area before slowdown will occur. Similar systems have been used in many commercial games during development, for the same purpose (ex: StarTropics, Gunstar Heroes beta, Super Mario 64). By default, the patch will show a yellow star and dim the screen at the point where the CPU enters its main wait loop (when there's nothing left to do before the frame is drawn). The lower the line, the more work the CPU has done in that particular frame. If the line hits the bottom of the screen, it means there is no more time to process the current frame, and the previous frame is displayed again (which causes slowdown). If slowdown is severe enough, the star may wrap back to the top of the screen and the brightness may flicker. This is particularly noticeable during the palette fade after you pass the goal point (it's a really long, slow process!). This patch is easy to disable, and can be permanently left in your ROM with no ill effects (unless some future hack overwrites the space it occupies). To disable it, simply change $81A0 to 1E. If you just want to eliminate the screen-dimming effect, change the same address to 05 instead. Enjoy! (edited by BMF54123 on 10-17-06 07:20 AM) |
|||
Kailieann Since: 11-18-05 Last post: 6275 days Last view: 6275 days |
| ||
Snazzy. I can definately see this being useful. | |||
rubixcuber Mole Since: 09-08-06 From: St. Louis, MO Last post: 6385 days Last view: 6385 days |
| ||
Ooh, nifty! I haven't had much problem with slowdown, but this will be fun to mess with. I was about to ask what method you used to dim the screen, but I'll just disassemble it. I like figuring things out for myself. | |||
Kiwisauce Red Goomba Since: 09-23-06 Last post: 6278 days Last view: 6277 days |
| ||
Wow! Thanks! This is sure to come in handy. | |||
3.14159265358979323846 Red Paragoomba Since: 05-30-06 From: China Last post: 6285 days Last view: 6286 days |
| ||
It's an interesing yet useful patch. Everybody(especially SSM and me)will find this very useful. Good work, BMF
*download as soon as I see this thread* (edited by 3.14159265358979323846 on 10-17-06 09:51 AM) |
|||
Smallhacker Super Koopa I AM A Group Of Officially Frustrated Younglings, G.O.O.F.Y. MEMBER |
| ||
wtf
...brilliant! |
|||
Raccoon Sam Boomerang Brother Custom Title Since: 11-20-05 From: Correct Last post: 6276 days Last view: 6275 days |
| ||
Hey! The Super Metroid has a similiar option in the debug mode!
I always wondered what the rising and falling dark thing was. Thanks. |
|||
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 6276 days Last view: 6275 days |
| ||
Whoa... I am so downloading that when I get home | |||
MathOnNapkins 1100 In SPC700 HELL Since: 11-18-05 Last post: 6275 days Last view: 6275 days |
| ||
I haven't sat down and disassembled this patch yet, but simply want to know whether this restores existing code in the ROM, or adds in the functionality itself. It seems quite a lot to accomplish in just $24 bytes from scratch. | |||
BMF54123 Since: 11-18-05 From: MOOGLES Last post: 6276 days Last view: 6275 days |
| ||
It really wasn't that complicated.
My routine hooks a JSR right before the idle loop. All it does is write #$0B to the brightness register and set up a single sprite in OAM. The sprite's attributes are fixed, aside from the vertical position, which is obtained by reading the V-counter from $213D. Although the sprite has a delay of 1 frame (due to the way OAM is handled), the brightness change takes effect immediately. All in all, the code performs two reads and five writes, which fits nicely into 36 bytes. JSR $9322 ; "master index" handler
(edited by BMF54123 on 10-19-06 06:05 AM) |
|||
MathOnNapkins 1100 In SPC700 HELL Since: 11-18-05 Last post: 6275 days Last view: 6275 days |
| ||
Ah... figured it was something like that. I was only weirded out b/c I thought you included your own data for the star's graphical data, etc. But since it used existing graphical data I'm not all that surprised. Trying to think if this would be easy to put into LTTP... probably. I've got enough room. |
Add to favorites | Next newer thread | Next older thread |
Acmlm's Board - I3 Archive - SMW Hacking - CPU usage meter! | | |