I was inspired by the GSU-test from nocash and the op_timing_test by Sour to make this test.
Here is a test for the Super FX that measures how long it takes for an instruction to complete. It counts in a loop until the SFX is stopped so higher numbers mean it took longer. Small differences don't matter so much. One 21MHz cycle results in a difference of around $66 (102) loops. For example nop is $0134 in 21Mhz cache mode which is 1 cycle. add # is 2 cycles and results in $0199 loops.
It can be run on an original Super FX cart by swapping the cartridge while the console is on. The code runs in WRAM on SNES and Cart RAM/Cache on Super FX.
The Mario Chip (v1) is unstable with reading/writing to Cart RAM. Some tests timeout which doesn't happen with the GSU chips.
Another difference with the Mario Chip is that the cache opcode will work immediately with GSU while it seems the Mario Chip needs 16 bytes to fill first so not all instructions are faster in this test with the StarFox cart.
The ljmp instruction is also quite weird. It takes much longer on the GSU chip than on Mario Chip. Not sure what's going on there.
Buttons:
Left/Right: Switch to different tests
Select: Toggle 10/21Mhz
Y: Toggle High speed multiplier
B: Toggle Cache
The code and binary is here. There are also captures from a StarFox, Stunt Race FX, and Yoshi's Island cart that can be used for reference.
https://github.com/paulb-nl/sfx_speed_test
Super FX speed/timings test
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
- jeffythedragonslayer
- Posts: 344
- Joined: Thu Dec 09, 2021 12:29 pm
Re: Super FX speed/timings test
My Yoshi's Island cart says this on the back:
How do you know it's safe to run this test?POWER MUST BE OFF BEFORE LOADING OR REMOVING A GAME PAK
Re: Super FX speed/timings test
From what I understand (and I'm not an expert on this subject), it is mostly safe, and should work most of the time. That said, it can potentially cause damage to the cartridge and/or the system, but I believe this is extremely rare. That is why Nintendo advised against it, and why some SNES systems have a cartridge lock that engages when the power switch is on. Personally I wouldn't do it regularly, but on occasion (for something like this) its fine.jeffythedragonslayer wrote: ↑Thu Jun 30, 2022 9:13 pm My Yoshi's Island cart says this on the back:
How do you know it's safe to run this test?POWER MUST BE OFF BEFORE LOADING OR REMOVING A GAME PAK