Getting Started

First post!

I figured I’d document this journey into not only learning 6502 assembly, but figuring out what it takes to program for the NEC PC Engine (aka TurboGrafx 16). Information on both of these topics is somehow both plentiful and confusing, and I’m still learning! Hopefully, by journaling my progress, I’ll not only make things more clear for myself but for anyone who has found themselves here as well.

I’ve populated the links section of this site with the resources that have helped me up to this point. I’ll keep that updated as I go along.

What I’ve done so far

Okay, so where am I? Well, I’ve done a lot of things out of order:

  • Compiled the pce-devel/huc project and ran some of the demos
  • Went through the Easy 6502 tutorial and managed to write a loop that filled the screen with colors
  • Downloaded a ton of 6502 programming books from the 1980s (archive.org is your friend)
  • Watched hours… hours of PCE programming YouTube videos

What I should’ve done

Jumping into the deep end with all of the PCE-specific stuff was information overload. I should’ve focused on plain ol’ 6502 assembly at first. Despite the name, Programming the 65816 covers the whole 65xx family, including the 6502 and the 65C02. The HuC6280 is derived from the latter. But whatever! We’re not thinking about that yet! I’ve found that it’s just a helpful book. :)

To put all of that book learnin’ to good use, practicing doing things with a 6502 simulator will help reinforce what I’ve read. There’s the Easy 6502 page I mentioned above, but there seem to be plenty of these things online. Here’s one that I think I’ll use– even comes with some example programs.

What I’d like to do in the future

The default ASM syntax highlighting in vim is generic (which makes sense). Maybe I should write an ftplugin for the 6502 family…

This StackExchange post asks, Is there a standardised 6502 assembly syntax?. Well… the answer is no! It was a shocking revelation to me that assembly isn’t really a language like we’d think of one today. Sure, you get your three columns of Label, Opcode, and Operand but anything beyond that– all of the syntactical goodies like defining constants or using directives are specific to the assembler that you choose to use.

The de facto assembler for PCE dev, PCEAS, is largely undocumented compared to something like VASM or WLA-DX. The thought of poring over the C sources and example programs in order to work out how to write for the thing seems like a painful experience. Might not be that bad… we’ll see.

Overall, I’m very excited to start on a new project/hobby. Let’s just hope I don’t get analysis paralysis or become too obsessed with building the perfect dev environment! Lemme get some little guy jumping around the screen or SOMETHING!