McMartin

@mcmartin@mastodon.gamedev.place
169 Followers
43 Following
770 Posts
Professional software developer, vintage computing nerd. Some modern graphics/game-y stuff too.
Bloghttps://bumbershootsoft.wordpress.com/

This week on the blog: a more detailed look at my optimization work for my first SEGA Genesis project, seven years (!) ago. This goes a bit further than my thread last week, and also discusses the tradeoffs of some other classic optimizations that I'm *not* doing.

https://bumbershootsoft.wordpress.com/2025/06/28/re-optimizing-the-cca-on-the-genesis/

#retrocomputing #segagenesis #megadrive

Re-Optimizing the CCA on the Genesis

When I poked at developing for the SNES a year and a half ago, the capstone project was the same as it was for my much earlier Sega Genesis project: an implementation of the Cyclic Cellular Automat…

Bumbershoot Software

I tend to work a bit ahead on the blog so that the update schedule stays constant even as my free time does not, but part of that also means that there's still a marked rhythm between writing code and writing *up* that code.

We see some of that here--next week's post will be a more thorough treatment of last week's Sega-vs-SNES thread, for instance--but it's usually kept neatly under wraps.

That said: I've now gotten the *entirety* of that Sega Genesis project where I wanted it to go. Hooray!

Spectacular choice for the thumbnail, there; good work, everyone.

This week on the blog: thanks to a misclick I post the week's article 12 hours early. I finish last week's revisit of an early C64 project and push the system just that little bit harder to get some nice high-resolution drop shadows and get about as close to the NES version of this project as I expect to get.

https://bumbershootsoft.wordpress.com/2025/06/21/lights-out-c64-parity-with-the-nes/

#retrocomputing #c64

Lights-Out C64: Parity With the NES

Welcome to the final post in a 10,000-word series that was originally supposed to be a one-paragraph footnote to my post about updating my Sega Genesis development toolchain. In part 1, I improved …

Bumbershoot Software

I've been making video games in some form for 20 years, so I wrote an article about my process - and why I don't use an engine.

https://noelberry.ca/posts/making_games_in_2025/

Making Video Games in 2025 (without an engine)

Thoughts, tools, and libraries I use to make games

i find the regulatory capture of the commons (so-called "supply chain security") to be frustrating

There's apparently an old joke about how the Genesis design is cleaner but more primitive but with a vastly overpowered CPU compared to the SNES and its wild array of three-quarters-baked bespoke hardware. The SNES was "a Lamborghini with a lawnmower engine", and the Sega was "a lawnmower with a Lamborghini engine."

It's a good line, but I think there may be less justice to it than my first impressions of the platforms suggested.

/end. Thanks for reading to the end, if you made it this far!

That code ported very neatly over to the Sega; I'd already managed to jam the code into 3 registers and now I had 15. A few decisions go the other way; recomputing some values is cheaper than spilling to memory, but "spilling" to OTHER REGISTERS is cheaper still. Once it was in place? A 20-25% speedup over the original, meeting and sometimes exceeding the SNES capabilities, but nevertheless broadly at par.
That code was VERY MUCH written to just be Definitely Correct instead of fast. It had quite a few procedure calls in it. In my revisit I calculated that the call/return instructions ALONE were enough to account for an entire frame of lag, and some other individual expensive instructions added up to sizable fractions of one. As part of avoiding register spilling on the SNES, all of that code was entirely gone, thanks to, essentially, extremely aggressive induction variable optimizations.

That wasn't enough to catch up to the SNES, though, which had a full 20% advantage over the Sega... and even though it turns out that one clever little trick I did (which didn't port over to the m68k) that let me remove a loop variable turned out to save enough time to produce the whole disparity on its own. No, the major gain was in porting over the changes I made to the NON-central loop.

The one with 500 iterations instead of 16,000.

The one I could be sloppy about because it doesn't matter.