For those who want to follow along
The PC Engine (TurboGrafx in the US,) was the first widely available "16-bit" (we'll get to this,) console. It was also the first console with CD support, for what that's worth, and this'll be important later. It was the offspring of Hudson, that company who makes Bomberman, and at the time Japanese electronics giant NEC.
What are we working with?
1. A hell of a 6502. Namely the HuC6280. It runs by default at ~7MHz and includes additional hardware like the system's sound and I think IO chips. One gotcha for people who know the 6502: the HuC6280 includes an MMU and by default the zero page is mapped to $2000. Yes it's confusing. This means that most cartridges didn't have to worry about their own mappers though, which is nice.
2. 8KB of RAM.
3. A video processor which can handle higher resolutions than any of the other 16 bit consoles at its max and depending on your definition more simultaneous sprites than the SNES. That last one is a big part of why there were so many awesome shooters for the platform. It's got a beastly 64KB of video ram, on par with the Genesis/Megadrive.
4. A sound chip with 8 programmable waveforms.
One notable weakness is that the games came on "hucards", which are credit card sized PCBs, similar to the ones that were around for the Master System. These are cool bits of hardware but they hurt the system's expandability and particular no games ever included a battery for on-card saves. This brings us back to the CD addon! The CD addon included 2kb of battery backed ram for saves. Everything else needs to be based on a password. This is another reason arcadey shooters were popular.
What's development like?
Fun! There are two major development kits for the system, plus one extra. First is HuC, a C development environment that's pretty sweet. Here's a hello world for a sample (taken from https://obeybrew.com/crashcourse1.html)
Code: Select all
#include "huc.h"
main()
{
set_color_rgb(1, 7, 7, 7);
set_font_color(1, 0);
set_font_pal(0);
load_default_font();
put_string("Hello, PCE World!", 8, 13);
}
The other major development kit is MagicKit+PCEAS. This is in assembly and I don't have a hello world to hand, but this is what I plan on using.
The story here is kinda messy. The best option I've found is to get pceas from here: https://github.com/nop00/pceas , and you'll probably want the magickit demos from the magickit site: http://www.magicengine.com/mkit/download.html. As for magickit itself, the "linux" versions floating around are all kinda gross. This is my cleaned up version, I haven't tested it yet but I think it'll work: https://git.sr.ht/~tekk/magickit/tree
There's also HuDK. It seems pretty sweet but people don't seem to use it and the docs are pretty barebones. It's here: https://github.com/BlockoS/HuDK/.
All of these (as far as I've found) should compile basically anywhere, for what it's worth. Linux, OpenBSD, probably even Haiku. I bet you could get them running on Plan9 without too much difficulty even
For graphics the standard is PCX format traditionally, though newer dev tools can also include PNGs to my understanding. The PCE's PPU(s!) are actually pretty powerful and complicated so I'll be vague about the details, but the short version is that your tiles will be 8x8, 16x16, 32x32, or 64x64 depending on what you're doing. I think you can even mix and match like a 32x16 or a 64x32. Aseprite is suitable on Linux but if you can't use binary drawing programs your best bet is probably GrafX2, a clone of DPaint2:http://grafx2.chez.com/ . Unfortunately it only supports 256 colors/image so you might eventually hit a bar there since the PCE supports 512 colors, something like 492 simultaneously without trickery?
I think you're kinda screwed for sound outside of mainstream platforms. Deflemask (https://www.deflemask.com/) supports the PC Engine but outside of that I think you're writing your music routines by yourself? There might be a tool somewhere (or I might have to write one...) to try and convert some milkytracker-supported file eventually.
Last bit you'll want: the best emulator for the PCE is Mednafen. It includes a debugger, but there are some QoL problems with it. Get the PCE Dev community fork so you have things like more readable fonts: https://github.com/pce-devel/mednafenPceDev
Next up: an abridged version of my notes once PCEdev Mednafen finishes and I copy my work over from my old Linux install.