how much this actually was, I don’t know. Burger Becky mentioned begging her boss to use Fast ROM when interplay made RPM Racing but was also denied.
The trade offs of 1991!
Edit: of course Nintendo wasn’t as cost constrained. It was never an even playing field for 3rd parties
Instead of fancy locked cache or other cache tricks, the PS1 and PS2 also had scratchpads that ran at full speed. 1K for PS1 / 16KB for PS2. Very useful.
So basically every 12 bytes, you get 4 bytes that are no longer usable before the next 12 bytes.
I haven't actually looked at this game's code, but it's certainly clever if the author found a way to avoid having to perform unconditional jumps in there that would sacrifice most of the gains in performance.
430B 3D -- -- -- -- cmp eax dead32 # only affects flags
4310 xx dowhatever
See, eg: http://www.muppetlabs.com/~breadbox/software/tiny/revisit.ht... , where it's used to skip over a mandatory header field.It should cost about the performance gain from two of the effective instructions.
$4317 mvn src,dest
$431a rts
Each of `src` and `dest` is either $7e or $7f, so this code performs a RAM-to-RAM memcpy.I guess it's easy to judge this 25 years later with all we know now. That was a very cool idea to have implemented back then! Putting the mvn there would definitely be a boost compared to having the mvn be in a slow ROM area (6 master clock cycles per byte transferred.)
The SNES supports SlowROM and FastROM but, interestingly, its internal memory is "SlowRAM". This seems like it would significantly bottleneck the system's performance. I guess "FastRAM" was just too expensive.
Another World uses SlowROM, so almost everything in the system is slow. It's a clever trick to use the DMA registers as a tiny amount of "FastRAM" and run code from there.
Something similar has been done on the Game Boy Advance - it's faster to run code out of Video RAM than directly from ROM or (the majority of) normal RAM.