psycopathicteen wrote:I was bored yesterday night so started the "ASM optimizations" page on wiki.superfamicom.org, and went nuts ranting about programmers who write 65816 code, like they're writing 68000 microcode.
I wouldn't say 68k so much, as just a processor that's not Accumulator based. But stuff like
that wreaks of macros. Yeah, they might be slow, but lets be honest here - 65x source code gets a bit too expanded and affects the readability. Macros clean this up and make things easily readable/understandable/compact/etc, as well as some other benefits. They waste a little space and waste some cycles, but if the code is in a
non critical area - then no harm no foul. I mean, if the example you posted only represents about 0.1% cycle usage per frame - then does it really matter? I would be more concerned with how they optimize high level stuff to function faster on the processor's design (the organization/layout of data, how it can be accessed, etc); how it can be tailored or tweaked to function faster on this specific ISA. As a developer, I'd probably only start cycle counting on code/loops/etc that have a real impact.
I used to think similar; why did developers write crappy or unoptimized code - when they could have easily done
this or that. But I came to realize, developers had different priorities and constraints. As a homebrewer or hacker, I have the time and dedication to highly optimize my code. I'm not so much worrying about deadlines, or that the game design more take a drastic internal design change that negates my previous optimizations. And even if those designs did change, I have the time to easily re-optimize.
In my opinion, this is where the real difference lays between the 68k and the 65x ISA. While you can theoretically highly optimize both, the
median performance of average code will almost always perform better on the 68k; you get really nice performance for
no optimization .
On a side note to this, it seems developers were way more opt to optimize for graphics than optimizing cycle counts/code. Visuals just have more of an impact; more bang for the buck. Well, at least with Japanese developers. Euro developers at the time, seemed to be concerned with both - they just lacked in game design (IMO).