I’m a few days into the RetroChallenge now, and still just getting things sorted out. But this seemed like a good time for a quick update.
I started by setting up the latest version of the WinUAE Amiga emulator with the specs for my Amiga 500 (plus a little bonus RAM) and an image of the real machine’s hard disk. I spent a little time getting reacquainted with how that machine is set up – by the time I stopped using it regularly in 1995 it had become highly customized. The nice thing is that it’s ready to go, and using it feels a little like coming home.
I also want to use my actual A500 for this project, but so far I’ve hit one snag. I was going to use Cloanto’s Amiga Explorer software to send my source code back and forth between machines, but I can’t find the USB to serial adapter cable for my PC. I’m sure it’s in a box around here somewhere…
One nice thing about using my original disk image is that the development environment was all set up the way I’d left it – at least once I remembered where it was. I’m using Aztec C 5.2 for the compiler, and CygnusEd for my editor. I used CygnusEd heavily back in the day, but coming back to it now I’m finding the key bindings kind of a pain to deal with. I wonder if there’s an Emacs for AmigaOS that would run on this machine?
For a build tool, I’ve got “ekam”, a tiny little make clone that I must have written back when I was first learning to code in C. It’s… cute, but it does get the job done, and using it makes the whole project feel a little more personal.
I’ve spent most of my time reading sections from the Amiga ROM Kernel Reference Manual: Libraries (3rd Edition). I’m really impressed with how good this documentation is. Think about it: For a lot of developers moving to the Amiga from, say, the Commodore 64, this would be their first exposure to concepts like event-driven programming and multitasking. A lot of care was put into explaining these ideas in depth.
As far as actually writing code, so far I’ve just produced the basic boilerplate for an application: Opening libraries, creating screens and windows, and setting up the simplest possible event loop. Oh, and tearing all that stuff down when it finishes, too, which is very important. If you leak memory in an Amiga application, that memory stays leaked until the machine reboots!
I’ve got a canvas to draw on and I’ve tried some basic drawing operations, and the next step is to look into double-buffering so I can have flicker-free animation.
One of the neat things the Amiga graphics architecture can do is have several screens open simultaneously. You can pull down the screen of a word processor running in a 640×400 screen with 4 colors to reveal a game running at 320×200 with 32 colors. In my test program, I’ve got a low-res, high color screen that I’m going to use for drawing, and I’ve got a high-res screen sitting in front of it filling the bottom of the display, with a single window in it. The idea I’m playing around with is to use the high-res screen to display debugging output and things like that, and I can move it out of the way if I don’t need it.
So it’s a start, at least. Pretty soon I’ll be ready to work on the utility functions for geometry transformations. That’s probably the place where I’m really going to start missing C++, so I’ll have to play around with it until I have a design that “feels” right.