Loading

Old Amiga Source

Following up somewhat on comments about the Amiga 30th birthday…I actually managed to obtain a brand new, but old (unsold) stock late model Amiga 1200 towards the end of last year. It came with a 40mb hard drive, which I eventually pulled out and replaced with a 8GB compact flash card partitioned into three – enormous for an Amiga. This week, I put source code disks in and pulled archives of my now 25 year old work to the compact flash. I had actually done this to the 40mb hard drive when I first got this A1200 last year, but it was more of a ‘do the disks still work’ and when figuring out they did, a desperate backup measure in case they stopped working the next day. Getting the compact flash up and running came after this desperation and indeed, getting the source on the compact flash was a lower priority because with a backup in place on the 40mb…I could undertake this rest of the work whenever the I liked.

The source code to my first Amiga games (unreleased and about 90% finished) are intact. I assembled and ran it, fixing source up (include paths) to do that as I did on the 40mb drive last year. I knew at that point I had to boot the Amiga in PAL and ‘Original Chipset’ to make it display somewhat correctly. Yes, it was developed on a PAL A500 so I was kind of trying to put the A1200 into a similar mode to make things easier. Last night, I shoved the compact flash card in my PC using WinUAE emulator to more quickly switch between different Amiga types in order to check it was running on an even older Amiga as I might expect, and confirm the problem on the emulated A1200 – basically, recreate the problem in a more up to date development environment…and maybe fix. Maybe.

Now everything about corrupted display on the Amiga is to do with registers, especially when you can vaguely see a game running with colors and make out very rough corrupted versions of bitmaps you expect to see (basically a load of shit on the screen that vaguely looks recognizable to you). This I recall. I also recall setting these things via a ‘Copper List’. A Copper List is a series of instructions to set registers on the Copper co-processor – basically Amiga hardware used for displays and behind quite a lot of the effects people were putting in those games at the time. I booted up my old Video Poker game and started fiddling around with the copper list then. Last time I did this was 1991 and I was immediately surprised by how complicated it felt. This used to be second nature to me…I used to know what all these numbers did and what the settings should be. The idea of doing things like scrolling and manipulating these numbers in unison was like navigating the back of my hand back then, but last night the possibility seemed like orchestrating chimps to replace the mormon tabernacle choir. While you have to do many complex things to make a game today, some of the older games have seemed easier to make. Getting the hardware to sing back then was not so easy though and the equivalent today is as simple as downloading Unity, a few mouse clicks and a few keystrokes. In some ways, operating systems of today AND game development packages of today are really dumbing us down…but maybe that’s a topic for another day.

Anyway, I looked up some copper list references and tried to fiddle with PAL/NTSC settings. Whenever I did get it to work on the real A1200 last year, I had booted it in PAL mode and given I never created NTSC modes for my games to run in the US (and neither did many others apparently) it seemed logical that might be the problem. I live in the US now, have a US Amiga and the screen is NTSC. Worked on all my UK stuff so surely this is the problem? Makes sense to be an NTSC problem then, right?

I began to notice once familiar numbers in the copper list ddfstrt=$38, ddfstop=$D0, diwstrt=$2C81…long forgotten, once memorized numbers flashing back to me. I was looking at the settings that in conjunction with other (more obvious) settings to point to screen memory, positioned the screen, defined the size of it and kicked of the reading of that memory, resulting in it’s interpretation and display for human consumption…or in other words, putting things visibly where I wanted it on the screen. Now like everyone else (again), while I often didn’t develop for NTSC my screens (even in PAL) were an NTSC size – 200 pixels high instead of 256. We did this to reduce the amount of data being processed…make the games run faster and be able to do more. What I was looking at therefore isn’t exactly NTSC incompatible and I began to see really that there was nothing specifically ‘PAL’ about it. Seriously…nothing in that Copper List that said ‘PAL only’.

I turned my focus then to the other ‘Original Chipset’ setting I’d been booting into to get stuff to work. The Amiga was basically released with certain chips in it. At some point, they released new and improved versions ‘Enhanced Chipset’ and eventually ‘Advanced Graphics Architecture’. Or all three known as ‘OCS’, ‘ECS’ and ‘AGA’…my Amiga 1200 being AGA. Now all my stuff was authored for OCS, with ECS compatibility in mind. AGA I had never had to deal with as it was released in 1992 – after my last touch of Amiga development. Nothing odd about this- there are plenty of games authored before that time that were not compatible, hence why they added options to boot using OCS allowing people to reliably play even recent two year old games.

I turned to googling for AGA references, looking up ‘registers’ they added for new chipsets. Now for the most part, it was backwards compatible – they designed the original stuff with expansion in mind so the expansion would kind of default to how things should be, if utilized. Nevertheless, after trying a couple of different things I found one AGA register that I set to 0 with a new copper list instruction and ‘ping’ the lights went on. There it was – the game, running in the emulator in NTSC AGA mode.

I tried another game I had source to. Ping! It worked too. This time it was another unreleased game and actually one I forgot to mention last week. Turns out I worked on 4 Amiga titles and just forgot of this ‘contract work’ that really only got to a prototyping stage. Nevertheless, a prototype of a game that never came to fruition 25 years ago was on screen. Can’t remember how to play the fucking thing mind and to some extent, it’s not wholly interesting being a proof of technology concept. When work on this was stopped I was in the stages of putting all the pieces together to make developing the gameplay easy.

Now, the sad part. The game I really wanted to get running was one I mentioned last week, which had a history where I was working on that project and diverted to something else when a programmer rage quit. While that happened, someone else picked up my work and I never got chance to finish something I was really interested in. The programmer didn’t use my source. It was common to do that back then and frankly, my source was probably shit anyway (yes…there’s a massive difference between the structure of it and my last/4th project). What was released was his version of the game and mine got shelved. I had a working demo disk of mine, but it runs today on my A1200 with graphics corruption so I hoped to get access to the source, rebuild the game and fix it up. See ‘my version’ again but without the bugs.

No, not going to happen apparently. Turns out that while I have the source code, it was literally a source backup and not a build backup. Assets (pictures and sound effects) were missing. Unlike the 4th Amiga game of mine where everything is better organized, this source is a terrible example of how things were done before one became enlightened and instead the assets were very much mixed in with the code rather than loaded from disk. I say ‘enlightened’…actually this is how games were made for tape and cartridge at the time where the system would ‘load’ one big file and you just kind of did this. You could certainly do things different on the Amiga, but it was still common not to (or at least that’s my excuse). Either way, source being dependent on assets to build the game means I can’t pull loose file assets from the demo disk and fill in to re-create a working build. I just can’t build this game from source, not without a bunch of hacking I can’t be bothered with. I have a vague recollection of backing up the source more to keep hold of my code and at the time building the game didn’t seem so important, so IIRC…that’s why I don’t have the assets.

I have however, backed up the demo disk. I had three disks of the same demo. One of them was vaguely corrupt and some files didn’t copy over but I was able to copy and backup the demo by filling in the missing parts from the other disks. It might flicker like a bastard and not run as I thought I’d left it…but I do have that demo and at least I can try (using the emulator) to play around with it and recreate the hardware setup I developed the game on, which it should be compatible with and hopefully won’t run while looking like noise from an off air TV signal. I am hoping that I will be able to see my own version of that happy little game soon.

Shame I wasn’t credited on that release. This sort of shit happened back then and persists today even. My version of the game was maybe 75% complete and while the game wasn’t ‘my idea’, being the sole programmer on it up to where I got to involves turning a lot of blue sky into reality and in those days, design was very much blue sky concept and the implementer did the real work of filling all the holes. You would think really that someone involved in working with the concept guy, trying things and changing things so they work might at least be credited in ‘special thanks’, if not ‘design’ or ‘additional programming’ even if none of my actual programming went into the released game. Whatever way you look at it, I helped create the reality of that game – a lot of the finalized implementation was based on my sweat and iteration.

Either way, who would’ve thought it? 2015 and I am fiddling around with ‘Copper Lists’ to set hardware registers and fix up old work.

The downside is that with all this Amiga fiddling, I’m typing ‘dir’ in the shell today instead of ‘ls’.

BTW: The Amiga is ace. At the time I thought it was a fucking super computer. Nowadays, all this register trickery makes it seem a little more just an evolution of something like a C64…but I still like it very much.