Saturday, 12 February 2022

Will Doom or Wolf 3D run on the Ultimate 64 or Turbo Chameleon

As you may already know, Mathias "AmiDog" Roslund has ported two classics from iD Software, being Doom and Wolf 3D, and both require a CMD SuperCPU to run, as well as a higher capacity Commodore C64 disk drive, such as a CBM 1581 or [CMD] FD2000/4000. If you have a Ultimate1541 II, which emulates a Commodore Ram Expansion Unit schema up to 16MB, you may pre-load either the Doom or Wolf 3D "REU" image into that memory, and use a simple 1 block boot program to very quickly load either game into the SCPU. This may also be done with the VICE emulator, and I suspect this is the main way that people load each game on the XSCPU64 emulator on the PC.

Let's have a quick recap of what the SCPU does for a moment. This is a turbo cartridge that plugs into the C64 or C128 and runs approximately 20 times faster than a stock C64, and around 20 or 10 times faster on a C128 (depending on which mode you are in, as the C128 itself runs at 1 or 2Mhz). This is possible due to the (overclocked) and 6502 compatible processor in the SCPU, which is a WDC65c816S, running at 20Mhz. Aside from the extra speed, and built-in JiffyDOS (which in itself makes using all Commodore compatible drives much easier), you may add up to 16MB of RAM by using certain types of 72-pin SIMM RAM (fairly popular in PCs around the late 1990s), which can be 1MB, 4MB, 8MB or, of course 16MB. To add the extra memory, you will require a SuperRAM card on your SCPU - it does not do this as standard. Of course, some people would be perfectly happy just with the performance increase, especially GEOS users, or owners of other CMD hardware such as the RAMLink (still an excellent mass storage drive today).

So, here's a question that some people ponder. On the face of it, requiring 16MB and a faster processor, wouldn't either Doom or Wolf 3D work on the Turbo Chameleon or Ultimate 64? Well the short answer is "no" - but why?

Firstly, neither the TC, nor the U64 (or U64 Elite) have the right sort of memory. The builds of Doom and Wolf 3D we're discussing here runs in memory above 64K, the 6502 processor (no matter how fast it's running) can only address (or see) 64K at any one time, and the REU can only send memory to, or copy memory from, the C64's internal memory. This is unlike the SuperRAM described above, which allows the SCPU to see up to 16MB of RAM and therefore directly read from it, write to it, or execute code within it.

Secondly, both Doom and Wolf 3D are recompiled to native 65816 machine code on the SCPU. When you switch on the SCPU, you're running in emulation mode, which is actually a 65c02. Whilst this is largely compatible with the 6502 and 6510 processor, the 65816 does not do undocumented features that some C64 games and demos use, just like the 6510 does not understand the extended instruction set of the 65c02 or 65816.

I've spoken to Gideon Zweijtzer who designed and built the superb U64 and Elite (as well as the very excellent U1541 range) and he has ruled out the U64 ever having a 65816 option. This was also ruled out from the start by the guy who designed and created the TC, because as far as he was concerned, being able to perform the undocumented instructions of the 6510 was much better than having the extended instruction set of either the 65c02 or the 65816. I know that there are plenty of 65816 protagonists out there, for rather dry technical reasons.

The question is, would either game be possible in 6510 with REU support (like Sonic was possible with the REU)? I'm guessing that Wolf 3D would be, but I think a true port of Doom would be a step too far. Maybe. As the U64 Elite (an excellent machine which I own) can run up to 48Mhz, and you can even switch off the bad-line timing (where the VIC-II steals cycles from the 6510), someone might find a way, but as with everything on old 8-bit computers, you're largely dependent on other people's good will, time, effort and expertise. And this last point is why I really do appreciate new 8-bit software, because most developers making 8-bit games do it for the love of it.

No comments:

Post a Comment