View Single Post
Old 08 June 2007, 01:26   #4
Registered User
Join Date: Dec 2002
Location: California
Posts: 943
Here's a very quickly put together demo disc:

At the moment it's only got three demos on:

- Sanity - Arte
- Andromeda - Mindriot
- Sanity - World of Commodore

I've only tested it with WinUAE in Parallels so far, so I'm not certain how it will behave on the real hardware, but it will:

- Boot in an emulated CD32
- Load a joypad-driven menu system (that I cobbled together quickly in AmiBlitz)
- Allow you to choose one of the demos
- Return to the menu system once the demo ends (ie. if you've got a keyboard attached and hit F10)

Things it doesn't do yet/things I need to check:

- Is there some way of using the joypad to exit from WHDLoadCD32?
- Sound is a bit strange on my Mac; might just be down to the emulation
- Shows the standard Workbench title bar when switching from demo back to the menu system - need to work out some way of stopping this (using WB1.3 to create a prefs file with all colours set to black would probably do it)

Putting this together was quite astonishingly frustrating. If you want to test something with WHDLoadCD32, you have to:

- Load your usual WinUAE environment
- Put together a bootable file structure (startup-sequence, setpatch, diskfont.library, etc)
- Add the WHDLoad slave you want to test
- Load up ISOCD from the developer CD
- Create an ISO of the file structure
- Mount the ISO as a disk (for me, this entailed writing the ISO to the PC drive, then dragging it to the Mac desktop, then mounting it in Parallels)
- Load up a CD32 config in WinUAE
- Reset
- Wait for WinUAE to boot the disk
- Repeat until you get the file system correct
- Repeat for every WHDLoad slave you want to test.

It's taken me an hour and ten minutes to put together a disk that boots properly with a set of demos that work correctly with WHDLoadCD32, and that's *after* I'd already got all of the installs prepared and the menu system written.

Anyhoo, probably not worth wasting a CD on this yet, as there's so few demos in the ISO, but if anyone wants to test this in WinUAE and let me know if they encounter any problems I'd appreciate it.

I got around the problem of returning to the menu system after WHDLoad quits by using shell scripts. Instead of running WHDLoadCD32, the menu system writes out a script (called "launch-script") to RAM that looks like this:

cd SYS:Demos/Arte
C:WHDLoadCD32 Arte.slave
execute S:launcher-startup
This will:

- Change directory to the correct demo folder
- Run the demo
- Wait until the demo has finished (as the shell is single-threaded)
- Run a second script

The second script (called "launcher-startup") runs the menu system again, and then calls the first script:

Execute RAM:launch-script
This means that a demo always launches after the menu exits, and the menu always launches after a demo exits. It also means that the menu system exits before the demo starts, so it doesn't take up valuable RAM.

The menu system is controlled by a file in the S: directory called "launcher.config". It is structured like this:

- First line is the name of an option
- Second line is the directory to change to before running the option command
- Third line is the DOS command to run for this option
- Fourth line is blank

Repeat for as many options as you need (until you run out of screen space, that is, as it doesn't scroll). Full AmiBlitz sourcecode is included in the Launcher directory.

Oh, also: If anyone's interested in this, are there any requests for demos to include? Note that they should be around 1.5MB *max* or they won't work on the CD32.

Last edited by ant512; 08 June 2007 at 01:55.
ant512 is offline  
Page generated in 0.04041 seconds with 10 queries