by byuu · 6y ago · 0 comments
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.)