Automation notes

I’ve just spent the vast majority of yesterday writing a script that amounts to less than 50 lines in order to get GD Workshop ready with an emulated disc. It would have taken much less time if the documentation was accurate and the samples worked. It may be because I’m using Windows 2000, but I doubt it. The issue was that when the drive door was closed after the script which describes the layout of a GD-ROM was loaded, it throws up an error about a possible caching issue. Caching in what context? Memory? Mass storage? No idea. It wasn’t very specific. I ran one of the sample scripts which worked. It would populate a GD script file and then the drive would close without issue. I thought it was my GD script. After double-checking that, I ran a version of the script which should, according to the sample itself, work when launched from CodeScape. This was an exaggerated truth.

Many hors later, I figured out that the cause was due to the disc number not having been set. It may be that the value internally is just pointing to something random and hadn’t been initialised. To be on the safe side, there were two calls I made, one to set the emulator to 0, and one to set the disc to 0. Like magic, it just worked. I haven’t yet comitted the script as I need to programatically create the GD script. It’s a bit messy and I don’t like that I’m including the IP files. For now, I think I’ll include the IP files and generate the GD script content programmatically. I’ve already written a command-line version of the IP maker tool, which I don’t really want to include like I do with the auto dependency tool. The auto dependency tool is slightly broken with tests, too, as it wants to only use one include directory to look through. I’m not sure how to handle that, yet.

CodeScape also has an issue with its documentation. Passing parameters to scripts is written as:


This is wrong.

It should be:


The square brackets indicate optinal parameters, so in my case it’s:


forcegd is set when GNU Make is run with FORCEGD=1 as an argument.

I also found out that GD Workshop has a hard-coded time lock of January 18 2038, so that’s something to bear in mind.