Friday, 23 August 2019

Atari Falcon SD-IDE

The Falcon August continues!

After establishing the basics of file transfer between Falcon and Linux, I wanted to replace the physical hard disk with a IDE-compatible SD card reader. There was one CF-IDE adapter lying around but my CF cards were exactly those "nameless" brand cards people always warn about so I avoided using that.

I ordered a IDE/SD card reader "SECURE DIGITAL 44 PIN 2.5 MALE IDE TO SD CARD ADAPTER AMIGA 600" off eBay. Seeing that it was advertised as fitting for Amiga sounded good enough.

When the item arrived, I thought it wasn't the correct 2,5 inch as "promised", but smaller. But after opening the Falcon (the first time) it turned out this was exactly right for the IDE cable/connector that was inside the computer.

IDE cable at centre. Note the absence of a cradle for HD.
So, I couldn't even have used my CF-IDE adapter without another adapter.

Possibly, a doohickey 90-degree adapter might exist somewhere that would get rid of the cable entirely.

For the SD card I used a Kingston 8gb HC "20x" card.

For setting up the disk I simply followed instructions, and here I'm largely just repeating what people have said elsewhere, mostly the second option in this Youtube video.


Opening the Falcon and fitting the card adapter

The Falcon cover is held together with a bunch of screws. Underneath, there is a metal panel that needs to be removed. The second metal panel (under the keyboard) can be left attached.

The topmost metal part should come off by creatively bending and wiggling it, even if it at first looks like it might not.

This Falcon did not have the original cradle for the hard disk, so I can't really comment about that.


This also meant I'm somewhat out of options as to where to put the card reader. It's so light it could just dangle at the end of the IDE cable, but the danger here is that it might hit something delicate on the motherboard.

I feel that the creators of SD card readers could make the circuit boards a bit larger just to make them easier and safer to attach inside the computer. I mean if it's supposed to replace a 2,5 or 3,5 inch hard drive, it doesn't need to be the size of a postage stamp...

For a while I kept the card like in the image below, but then I felt it might hinder the air flow. Probably not, but anyway it ought to fit more firmly into place.


In the end I turned the cable and the card "upside down" on itself and fastened a wire around the IDE cable so although the adapter isn't screwed or fastened in, it won't sail away on its own accord.


Partitioning the drive

After physically connecting the card reader using the IDE cable, the card needs to be partitioned using the Atari (not formatted).

I went for the ICD driver route, as people have reported it should work just fine with the CF cards and like. "Somebody" said SD cards might be more reliable so that's why I went there too.

I downloaded the ICDP655A.ZIP on Linux, likewise unpacked it on Linux and copied the resulting folder to a HD floppy disk that I had formatted on the Falcon.

Using ICDBOOT.PRG the relevant driver becomes present (it ought to recognize the card and  display its name even at this point). Then, using the ICDFMT.PRG the card can be partitioned.

Note again that "format" has no relevancy here. Instead, "Clear" the suggested default setting, and then use the "split" command to give a suitable number of portions.

The suggested GEM partition size tends to be overtly small, I suppose there's no sense to keep it smaller than the other partitions. Still I kept it at 20mb just to avoid cramming files there.

The partitioning should be almost instantaneous, but the program will check for bad sectors and this will take some time. After this the system will be rebooted.

You should be able to see the partitions on the desktop after running ICDBOOT.PRG and using Install Devices from the GEM menu.


Making the drive bootable

As the computer can't boot from the drive yet, you'll still have to rely on the floppy.

To make Atari drive C bootable, run the ICDBOOT.PRG again to activate the driver and then use HDUTIL.PRG for enabling the boot.

I bothered to snapshot the desktop on the Atari, a hilariously long-winded process
This part was a bit confusing, and I didn't get it right the first time, possibly because the floppy behaved a bit badly.

You can choose a partition for the boot drive, then the drive should be set for booting and the driver will be installed on that partition. It's possible to fiddle with the boot options, and I did some too.


Not sure about these. I guess I checked the "Falcon" for Boot Res and that's it.

Don't copy the ICDBOOT.PRG to the AUTO folder of the hard disk, it does nothing there.

After the boot works, You can Install Devices from the desktop menu and then Save Desktop. The Falcon should now boot to the system and show the partitions on the desktop.


Reaping the rewards

Strangely enough the disk drive (or the floppy) started working erratically during the process. But I managed to get the XYZ.TTP onboard after which I could leech off everything over the serial on 9600 speed.

After getting DRVIN.PRG, SCC.PRG, XCONTROL.ACC and SERIAL.CPX I could get the faster 57600 speed. The DRVIN.PRG, SCC.PRG and FPATCH2.PRG are to be placecd in the AUTO folder whereas the ACC files belong to the main folder. Make a CPX folder for the SERIAL.CPX, although you probably have to config the XCONTROL.ACC to find the files from there.

I've been toying around with this setup for a few weeks now, adding and adjusting things, and the card appears to work ok. More about Falcon later...




Thursday, 8 August 2019

Linux->Falcon serial transfer

After having a look at the Atari Falcon 030 and using the cumbersome floppies for moving files about, I wanted to move files over the serial.

I had lost my null-modem cable and could only find a mirrored 9-pin cable with M-F connectors (what is that for anyway?). The proper null modem cables were still sold at Clas Ohlson in Helsinki. Thanks, Clas Ohlson!

Serial is quite fast for sending a few megabytes or less, which is enough as Falcon files are not that huge.

Obviously, the ports have to be set for the same speed. 115200 proved to be a bit too much, so I went for 57600, which gave a healthy ~5500 bytes per second.

First, I need to set the serial port parameters using the Control Panel. This requires the Control Panel accessory (XCONTROL.ACC) in the boot drive folder and the serial control panel extension (SERIAL.CPX) on the system, at C:\CPX\ for example.

DRVIN.PRG needs to be at the AUTO folder to gain these high speed connections for "Modem 2", otherwise you'll be stuck with the 9600. Edit: It seems the SCC.PRG should be there too. Not sure which of them or both?

If DRVIN is not there, the ACC is likely to bomb if you try to fiddle with the modem 2 parameters.

XYZ on a command line shell at Atari end

To receive files using the ZMODEM protocol, you need XYZ.TTP.

Although the xyz can be run from the desktop, I prefer to use these TTP (TOS-Takes-Parameters) programs from inside a command line shell. It's a bit neater that way and I get to see the program results and recent actions better. Moving files around the system becomes quicker too.

Still testing at 9600, hence the slow speed...
Okami shell is reasonably featured, and you can use some Unix-style parameters, like directing output to a file or a serial port. It's not developed with a Falcon in mind, but using a 2-color video mode it's pretty fast. "mupfel" is another shell, but setting it up seems a bit more involved so I'll look at it later.

I added the following line inside the Okami "profile" file, so the shell will execute it on running. This way I can run the xyz from wherever I happen to be:

xyz=c:/xyz202b/xyz.ttp

Afterwards, using

$xyz

the xyz.ttp will run and wait for a file to be sent. Yes that $ is not exactly as effective as an alias or a proper PATH but it's still far better than working every time from within that folder.

As an aside, editing that profile file is bit of a chore as there are very few choices of a shell-run text editor. I'd hate to jump between a GEM editor and the command line shell now that it's in place. I ended up using something called pro_edit for now, which is rather poor and assumes the display height is 400. ST video modes to the rescue.

But if it's only a matter of adding one line to the profile, then appending that line with echo xyz=c:/xyz202b/xyz.ttp>>profile will work.

Obviously, after the file transfer is in place text files could be transferred from the Linux... But as the point is to toy around with the Falcon, why move over all the tasks to some other computer?


sz at Linux

Unlike Atari, Linux doesn't have an abundance of strange 'terminal emulator' programs, possibly because the terminal is so integral to the system.

There's minicom, but practically minicom (or anything else) uses rz and sz for file transfer protocols, so it's better to use these from the Linux terminal command line directly.

These need to be installed first. If there is a permission problem with the serial port then the user has to be added to the dialout group.

I followed a suggestion of calling sz from a tiny script (named zsend in the example) which ensures the serial port speed is correct:

#!/bin/sh

DEV=/dev/ttyS0

stty -F $DEV 57600
sz $1 > $DEV < $DEV

The ttyS0 is the device for the serial port, in my case it's already a part of the motherboard. An USB->RS232 port is often called ttyUSB0. dmesg | grep tty reveals the device names.

Saving this script as zsend, it can be made into an executable with chmod +x zsend, after which ./zsend filename should start the transfer. If Atari is running the xyz.ttp and waiting, then the file should transfer.

A version for receiving files from the PC end, use rz instead of sz.

At TOS, xyz -u filename will upload a file, defaulting to ZMODEM.

I also tried batch uploading with *.* and although everything went fine for a file, the XYZ.TTP at Atari end complained about too many handles or something after about 16-17 files. So, for moving a lot of files it's better to zip things at that end first, no matter how slow it is.

Strangely, uploading from Atari was a bit slower, some times less than 4000 bps on average. File permissions may need altering on the Linux end and the filenames tend to be uppercase which can be a bit annoying at Linux. -LL option on zip ought to force filenames to lowercase, though.

Backing up AUTO folder and your essential system files with this method is a good idea I think!



At Atari again

Transferring zip files is much more handy than trying to send files with a folder structure, and they are obviously compacted too.

Working with the Okami shell, for added comfort I also added the zip unpacker to the Okami profile:

zip=c:/packers/stzip/zipjr.ttp

...for example. The zipjr.ttp comes out of the stzip.tos self-extracting archive, found here.

$zip -xr file.zip

In Okami, this then becomes the equivalent of running zip from its folder. It appears the zip version I have it likes explicit -xr parameters for extracting and preserving the folder structure.

Lharc (lzh) is another often seen archive format, and jaymsa18 may be used for recovering files out of .msa and .st disk images on the Atari end, if the disks play nice with file structure that is.

After all this, I can finally look at Llamazap, an apparently unfinished game by Jeff Minter that can't even be started without a very specific controller. Oh, well.


Sunday, 4 August 2019

Atari Falcon 030


As an Atari STE owner back in the day, I was one of those people who drooled at the Atari Falcon before and around the time of its release in 1992. I read ST Format reports and snippets of information from Atari newsletters with great interest. The Falcon was promoted as a really bad-ass multimedia computer, beating Amiga at its own game.

When the computer finally came out, I had little chance of acquiring one, and already the magazine reports made it sound a little less than it ought have been.

Now, finally, I have some first-person experiences of this rarity.


The first physical impressions are that it weighs a ton, doesn't look that different from an ST, there's a noisy, monotonous fan inside, the keyboard is not that great and the port for the bad mouse is still below the computer (and upside down).

It also turned out that 16Mhz is not a huge leap when the new graphics modes would have needed some more heavy lifting. This is already something I recall from using a plain Amiga 1200: "Is this really it?"

Plain ST games would not demonstrate a monstrous speed increase, Frontier is now about bearable but that's it.

Frontier, one of the go-to games for testing Ataris.
The Digital Signal Processor was a saving grace for direct-to-disk recording, and with the already-established in-built MIDI ports the Falcon became a bit of a cult among musicians.

The DSP could deliver the needed punch for many kinds of games and applications, but it was not very simple to program and apart from the audio applications there was not much productivity software or games for it anyway.

More recently, skilled people have showed what can be done and there's a rather wicked-looking engine for displaying Quake 2 and Half-Life 1 levels, utilizing the DSP.

When the Landmine tried to play a sound the MP3 player messed up and did not recover.
Also, mp3 songs can be played in the background while still using the desktop. How's that for a 1992 computer?!

Theoretically, for a fleeting period in time, all the power for an Amiga-beater was inside that casing, but nothing helped people exploit the better parts of it around 1992. Then Atari computer division went down and adios, Falcon.

Oh, about the crappy photographs: I could have used a desktop accessory for making snapshot images out of the desktop at least... but I was not prepared to move and convert them around for the time being.


First things firST

Nice that I can use the VGA monitor adapter block to connect the Falcon to a modern display. The picture is not especially sharp on my display but I can live with it.

I got rid of the Atari mouse and connected a PS/2 optical mouse through a micromys adapter. (One that has C64, Amiga and Atari ST modes)

This Falcon came with IDE harddisk and 4MB of memory. I intend to look into using a Compact Flash/SD-IDE adapter but it'll have to wait a bit. Doing that and swapping the 1.44Mb disk drive to a Gotek might not only improve the computer but help reduce the weight somewhat... not that it's meant to be moved a lot.

Which brings me to a point. These days I'm a bit frightful about a computer that has physical hard drives but no "software shut down" to ensure the drives are stopped! (Ok some drivers come with head park software).

Universe-on-a-floppy
Luckily the Falcon floppy drive was in working order. After formatting a HD disk on Falcon I could copy files to it on the floppy-drive equipped Linux Mint.

I could also copy the aforementioned Frontier over to the Falcon. It didn't run just like that, I had to CONTROL-ALT-DEL from the desktop with holding CONTROL down.

Then, if you're lucky the Falcon will boot without any drivers and there will be sufficient "low" memory for running Frontier.


TOS, utter tosh?

Looking at GEM/TOS I am surprised how little has changed from the Atari STE days.

As I had a "bundle" of software ready on the IDE drive, I could have a head-start in exploring different kind of programs without having to install much.

The first impression is that the GEM/TOS is perhaps even slower than before and not that much has been done to improve it. Switch on the software-based MultiTOS and it'll get even slower.

The early-to-mid 1990s desktop experience, complete with a modplayer.
I could get the modplayers and mp3 player up an running, trying out some utility software in the meantime. It was a nice moment, but the environment did also crash and glitch a lot. The sound tended to conflict between applications like the FalconAMP and Landmine (minesweeper clone), keyboard clicks got stuck in a loop one time and so on and on.

But I have to recall that using the Workbench of the Amiga was a long process of weeding out software that didn't work, and learning my way around situations that could potentially crash the computer. So the same likely applies here: if I really had a motivation to use the Falcon for months and months the software collection and my practices of using it could develop and I wouldn't encounter these problems.

The 4MB of memory is not luxurious when it comes to using the multiTOS, I saw that at times much less than 2MB was left available when trying to run a couple of apps together.

Turning off the new-fangled GEM options using the CONTROL reset trick does show the desktop can be faster compared to an Atari STE.

Apparently more flexible video modes are possible but the desktop allows only a few combinations. Note that the Falcon modes easily eat up far more memory and speed than the 32k of ST modes. The difference between a 256-colour 640x480 and 16-color mode was about 300 kilobytes.


Instead of descriptive or explicit resolutions a somewhat confusing "40 columns/80 columns" and "double line" terms are now in use:

40 columns: 320 pixel wide
80 columns: 640 pixel wide
Double lines on: 240 pixel height
Double lines off: 480 pixel height

The higher resolutions are available as 2 or 16 colour modes, whereas the lower resolutions support 256 or even 65536 ("true") colour modes.

I recall the day when the prospect of having such a luxurious amount of colours in an image was in itself fascinating and something to be desired!

The ST-compatible legacy modes are Low resolution (320x200x16), Medium resolution (640x200x4) and High Resolution (640x400x2).


Yet...

It may sound I'm very negative about the Falcon, but in truth it's kind of growing on me.

The computer has that Atari ST feeling, a kind of simplicity and straightforwardness. Bit like when you look at MS-DOS and think "why wasn't this enough?" except it's graphical.


What I am glad about is the amount of options for connecting and transferring files. PC-compatible HD floppy, RS-232, IDE...  I'm thinking about the Apple Macintosh where you have a quite closed system and very limited choices for transferring data into it.

I also got over the somewhat clunky-looking and slow desktop, especially when I noted that using the ST compatibility modes makes it faster.



Monday, 29 July 2019

Some C64 stuff at Vammala Party 2019

I've not released anything for the Commodore 64 during this year, and I got to rectify this situation by making a couple of works for the Vammala Party demoparty:


A Small PET for Man (C64 PETSCII)


I don't usually base my images on photographs,  but in this case I did use more or less three different photographs as some kind of reference for the different picture elements. Especially the landing module.

I resisted the temptation of adding any 'moon hoax conspiracy' elements, that is getting really stale.


Fixertron (C64 Hires)


A sorts of sequel to Remote from last year, I heavily reworked an old work-in-progress image. During the process it got a character-graphics vibe, it could almost be done as a PETSCII.

This somewhat benefited from a new feature in (yet to be released) Multipaint, the quick mirroring of the whole page. As is well known, mirroring a drawing/painting/image can reveal mistakes that were not apparent from overt familiarity.


PET McKracken (C64 "demo" using PETSCII)


I discussed this triple-wide PETSCII already a while ago, but now it's available as a C64-running version. The landscape simply scrolls left and right, playing an atrocious rendition of the first few bars of the Zak theme.

Admittedly more could have been made to work it into a proper demo, however I was already struggling to get the pixel scrolling working.

That's it, nothing else, no hidden parts, no interactivity and no, I'm certainly not going to remake Zak as a PETSCII game. There might be a tiny chance I could work the technique into some other type of a game, though.

Other C64 Vammala party 2019 stuff at CSDb

Wednesday, 10 July 2019

Proton, Steam, Elite: Dangerous on Linux

I've been bit more interested in Steam/Linux gaming recently, but although the number of native Linux steam games has been on the rise, some interesting recent Windows games have been missing.

For some time, there has been an initiative called Proton, derived from wine, and this helps launch Windows-native games on Linux after installing them legitly from Steam. As this project is maturing, even mere mortals like me can get Windows games up and running on Linux.

After enabling Steam Beta, it's even possible to run games that are not even white-listed.

There's a collective effort to list experiences of working games at https://www.protondb.com/ with tips on how to get them running.

Promises of having Linux versions of Witcher 3, GTA V, No Man's Sky etc. made this look credible and I felt need to get on board too despite not wanting to play exactly these games.

Xpand Rally, perhaps a bit lame title, but it's a Steam-purchased Windows title running smoothly on Linux! 
I had a couple of Steam games from my Windows days, and Xpand Rally was one that worked immediately through Proton.

This was an encouraging experience, and although Lara Croft and the Guardian of Light did not work, learning it was a DRM issue was also reassuring.

Titan Quest
Edit: Titan Quest Anniversary Edition worked straight out of the box.

Prey
Edit 2: Prey seems to work too, and quite smoothly at that. That's nice!



Elite: Dangerous

One of the games that got me interested in gaming in the 2010s was Elite: Dangerous, the ambitious, Kickstarter-famous sequel to Elite and Frontier. But I never got around to playing it as I did not have a suitable Windows computer.

But now, with Proton it's possible. Elite is not one of the whitelisted games and judging by the community's efforts, it was not one that would run very easily, despite comments:

https://www.protondb.com/app/359320

But the bottom line here was that Proton itself need no longer be built from scratch for ED and the game itself can be run through Steam.

The game launcher window, prior to launching the actual game client window.
My initial experiences were not too promising. After installing wine and protontricks, although the game launcher, game intro and menus seemingly worked, the game itself started with a screen that quickly faded into black and I could only hear the game audio.

After I updated the nvidia drivers to version 430 (from 3xx), I could get something visible:

No, that's not a sun, just a ringed planet.
The joy was a bit premature, as the graphics were somehow too bright, and not consistently either. The over-bright gfx flickered on and off semi-randomly.

However at this point I was quite certain the game could be made to work. The above screen was a result of having a wrong (sub-4) version of wine installed, and generally not paying too much attention to the tips.


Sidetracked

In the meantime I messed up my Linux Mint 19 installation, wrecking Python 2.7. This I found out when trying to fix something that prevented 'apport' from upgrading in the update manager, losing the Mint main menu in the process.

I doubt it was the result of following the ED install instructions, it's probably I got the bright idea of removing some crucial package at some point.

At the darkest moment I considered reinstalling the whole system, but eventually I was able to remove and re-install enough packages by hand and with synaptic, to get the system on rails again.

What I learned from this that Linux Mint is quite dependent on Python in many places.


Getting it to work

After this, I went back and followed the instructions (https://github.com/redmcg/wine/wiki) more precisely, getting the right versions of stuff.

I installed wine-staging instead of wine, and then winetricks, needed by protontricks. I then ran protontricks 359320 dotnet40 win7 again in the terminal and now I got much better results:

Windowed, lower resolution
After this it was more a matter of adjusting the graphics parameters (there are many).

In its 1920 x 1200 glory, the game appears to work very well and smoothly on the 1050 GPU. Possible exceptions are some of the station/docking scenes where there is more stuff on-screen.

But Elite is by no means a new game anymore, so such good results could be expected. I'll probably talk about Elite: Dangerous more in the future, given that I can now compare it to my experiences with Everspace.

Full screen 1920 x 1200 resolution
So, whereas I would not agree ED "works out of the box" from Steam/Proton, it still can be run via Steam and when it works there have been no hiccups. Only thing is that it tends to refuse to run the intro some times, preventing the game from loading.

It may be helpful to reboot the computer but then again not, sometimes I felt I just needed to kill the process and run it again from the launcher. This is just to say that the "black screen" after the game launcher screen might not be decisive.

I wish I could have included a step-by-step history of all the tiny things that needed to be done to get this up and running, but I just can't remember it all anymore.

The instructions at the wiki seem innocent enough at first, but in order to install something, often a couple of other things needed fixing, installing or re-installing. This would initiate a cascade of activities that all needed to be done before the first step could be completed. But I can't stress enough that the instructions need to be followed quite precisely, or you may end up wasting time on a half-made install.

Thursday, 13 June 2019

ZX Evolution joystick port




A tiny upgrade for my ZX Evolution computer, housed inside an Antec mini-ITX case.

As an aside, when I opened the case from the wrong side I noticed there's room for a drive below the motherboard. This has nothing to do with the joystick but I thought I'd add this memo to self here too.




Anyway, the joystick

Sinclair ZX Spectrum had no definite joystick standard, even though Sinclair had provided their own with the Interface I/II. Many games offered the selection between Keyboard, Cursor(joystick), Interface II/AGF/Protek, Fuller, Kempston/12L...

I suppose most if not all, accepted an Atari 9-pin standard one-button joystick. How the inputs were read by Spectrum differed. The interfaces were produced by third parties, and some did not interfere with the keyboard input unlike the Sinclair solution.

Not an unlikely choice
Kempston was the most popular and became a de facto standard. As a child I didn't have a clue what the word meant, but now it's easy to check that Kempston is a town in the UK, and Kempston Micro Electronics is the company that produced these interfaces. They also made some joysticks of their own.

Even after other companies produced compatible interfaces the name somehow stuck. I guess British video game companies and Sinclair also preferred not to have the name 'Atari' shown around so it made common sense to call it something else.

The publisher Ultimate could have helped cement the name and the standard, as they supported Kempston in their games and their games were hugely popular of the early lot.


Making the port

ZX Evolution supports the Kempston IN 31 standard with on-board pins, so there's no need to solder anything. I could also connect to the suitable keyboard rows to make a cursor joystick, but I went for Kempston/Atari.

I had a COM-port extension back panel for PC lying around, and after salvaging the actual connector it could be used as the joystick port.

I had previously connected a transparent acrylic panel to the backside of my ZX Evolution case, which houses the likewise DIY connector for RGB.

This kind of plastic is a bit too hard and tends to break when mistreated. At least the two holes on both sides of the connector are smooth.


I then continued to drill holes to cut out the shape for the interface.

I turned the drill along the direction of the cut to get it behave bit like a saw. This is something I should not have done, but I had no other solution at hand and the whole piece of acrylic might have fractured had I used a larger drill.



I finalized the cuts with a small saw and the center piece fell out. The result was smoothed a bit with a file.

It's a bit crude as the connector is attached from behind and doesn't have the covering piece of metal the RGB connector (that DIN a bit further off) has. However it stays in place firmly and that's enough.


At the top, the new 9-pin Joystick port and the RGB connector. Below: SD, RS-232, micro-USB, VGA and audio/tape plugs.

I had a go at Atic Atac using a TAC-2 joystick. This is the first Spectrum game I recall playing with a joystick, and to my surprise I could now complete it easily. Just remember not to eat every 2nd food so you'll have more spares later :)




Friday, 31 May 2019

Sinclair QL SMSQ/E experience on Super Gold Card

What makes QL literature near unreadable is that there is a long tradition of naming everything in an obfuscated manner :) So, we have QL, SMSQ/E, MDV0_, TK2, QL-SD, WMAN, PENV blah blah blah.

For text-based environment it's handy to have somewhat shorter names for things but damned if it ain't difficult sometimes to remember the keywords.

So welcome again to the Sinclair QL world both wonderful and strange (to borrow a phrase).

What I am mostly looking at is the SBASIC with the Sinclair QL SMSQ/E operating system.

I realised SMSQ/E can nowadays be downloaded freely as a binary and made to work on a Goldcard or Super Goldcard-equipped computer. It's not possible to have a replacement ROM, but the loading time is bearable with Super Gold card and QL-SD card reader.

To distinquish from SuperBASIC, the BASIC in SMSQ/E is called SBASIC. I think in the past I may have used "SBASIC" or "Sbasic" as a shorthand for SuperBASIC but it really is a bit different thing.

I usually feel it's more interesting if the BASIC is contained in ROM, because that is what makes it the standard for that machine, part of the experience of that machine. However, SBASIC doesn't differ that much from SuperBASIC, it's more of an extension than an alternative. So I feel like I'm not violating a huge principle here.

The SMSQ/E integrates the Pointer Environment, Window Manager and the Hotkeys System 2, so I'll touch on these topics too.


Getting SMSQ/E to run and boot

Download the goldcard.bin and rename it for example as SMSQGC_BIN

It's one kind of ordeal to transfer files over to the QL. I used my own solution for transferring files using the HxC Floppy Emulator hfe disk format.

When the file is on your QL disk, it can then be LRESPR'd. (Here we go again with the handy keywords)

I needed the Toolkit 2 to get the LRESPR command. It's a pity that although TK2 is also integrated in the SMSQ/E, it has to be invoked before it can be loaded? Handily the extension is part of the Super Gold Card, although it's curiously slow to activate. But anyway, TK2_EXT is the command.

Then, use LRESPR FLP1_SMSQGC_BIN (or SDC1 if the file is on QL-SD) and the file will be loaded and run like a resident extension.

Well, I can use

a=RESPR(240*1024)
LBYTES sdc1_smsqe_bin,a
call a

...to run the SMSQ/E file without resorting to TK2. I'm not sure if there are any downsides, seeing as the new system discards everything that happened at that point. At least this way I save a few seconds of boot time.

Using JOBS and HOT_LIST after booting through various files
Now we have the familiar divided red-white-black screen. The WTV command might be the first remedy if the image does not fit the screen.

I found I can't use the SDC1_ to reboot to a boot file on that drive after the SMSQ/E has started. The BOOT file has to be on FLP1_ so for the purposes of writing boot files I have my HxC connected to the disk interface of the Super Gold Card.

For example, as suggested above, the boot has to first activate TK2_EXT, then LRESPR the SMSQE_BIN. But after this has been done, the boot will not continue executing the lines, but SMSQ/E will boot again the BOOT file from FLP1_ drive.

So, in the worst case it will simply start reloading the SMSQ/E binary file again! This can be avoided by using

IF VER$<>"HBA" THEN TK2_EXT : LRESPR SDC1_SMSQE_BIN

...which means the file will not load if we are running the boot from inside that version of the system. Obviously the correct version string has to be checked from within the SMSQ/E by PRINT VER$.

After this my system will turn over to the SDC1_ as it is faster than the floppy emulator.

I've understood SMSQ/E uses many of the screen and graphics speed-up routines similar to what used to be in separate extensions over the years. This is not especially noticeable when drawing lines, but the BLOCK command is indeed lightning fast compared to normal SuperBASIC. It might be the Minerva ROM already speeded the lines up, if anything.


Multiple SBASIC interpreters

The Pointer Environment does not mean that on running SMSQ/E you'll automatically see a mouse pointer and menus, it is up to the programs to do all that. But what the PE does do is that the multitasking SBASICs will handle the screen area in a more ordered manner when switching between jobs. Let's look at multitasking SBASIC.

Ineffective, but there it is: Two SBASICs drawing on their windows, on the same screen.
A new multitasking interpreter can be invoked by simply typing SBASIC. You might make a couple of interpreters, and put a program looping in each one of them. It's possible to switch between these jobs with CTRL-C.

QUIT exits the current job. RJOB removes a job with name. JOB_NAME "kekkonen" gives that name to the current job. JOBS lists to jobs as with Toolkit 2, with the job names given.

Sometimes I've experienced that a stopped program may be 'unfinished' so that it can't be removed with QUIT or RJOB. Could it be that files have been left open, I don't know.

On a whim I created a program I called 'jobkeeper', that simply clears the screen, prints the DATE$, lists the existing jobs using the JOBS. It also shows the remaining memory. The contents are refreshed every 5 seconds or so. PAUSE is used for timekeeping.

This way very little resources are taken from the other jobs. It was educational in looking how multiple SBASICS could be set up and viewed from this little 'jobkeeper'.

I notice there are not many ways the jobs can interact with each other via BASIC, I suppose switching to another job screen through a command is a no-no, and can only be achieved with the CTRL-C key or a Hotkey.

I've not looked too much into how jobs might communicate with each other. I've understood they can share channels. In recent versions SEND_EVENT and WAIT_EVENT can be used to send bits between SBASIC jobs. The program that is on x=WAIT_EVENT will be on hold, and after receiving an event the x will contain the information.

Screens grabbed on a real physical QL. I'm so proud! The date is printed by a different job.
As I said the integrated Pointer Environment helps keep the screens clean when switching between jobs. If the different BASIC jobs don't have overlapping windows, you can see the jobs using the screen at the same time. In the above example another SBASIC job prints the clock on top of the screen, above the default window area supplied by WTV. The clock stays visible and be updated while I work on the BASIC program that displays a chessboard.

Messing with multiple windows at the same time can get quite slow quite quickly even on 68020, but by managing time and pauses a couple of SBASICs can happily coexist on the same screen. Jobs that work completely on the background don't slow the computer that much.

One nag I have is the screen MODE is forgotten when switching between the jobs, which results in messy screens when changing to a job that was originally on a different MODE. However this may be intentional and there are situations where it might be impossible to resolve the correct MODE in a satisfactory way. So better try to stick to one mode.


Hotkeys


This is one of the neat extensions integrated to SMSQ/E. You have to HOT_GO to activate it. A new job will remain resident and keyboard can be aliased into commands that should work throughout your system. The normal ALTKEY would just push the commands into current keyboard buffer, which is not that useful. The hot keys can activate other programs and BASIC commands even if you are not on the BASIC console.

This does not mean you can simply activate a compiler via a BASIC command, though.

Normally in basic, supposing I have copied both my compiler, linker and sources to RAM1_ I can do this:

EXEC_W ram1_qmac;ram1_source: EXEC_W ram1_qlink;ram1_source

and make it into an altkey, which again will not work from inside the QED editor as it would simply paste the command there.

QED job window on top of BASIC windows
And, although the above can be run as a BASIC command with the hotkeys HOT_CMD, as far as I see it won't really fly.

Instead you could associate the compiler and the linker to two hot keys, r and t respectively:

PRINT HOT_LOAD ("r","ram1_qmac";"ram1_source")
PRINT HOT_LOAD ("t","ram1_qlink";"ram1_source")

...passing the source file name trunk as a parameter.

Now I can work on a source inside QED editor, and use the hotkeys to compile to check it for errors, without exiting the editor. The fact that I've removed the wait time from my compiler end results becomes harmful; it goes back to QED so quickly I can't really see what the result is!

The HOT_LOAD won't simply accept a raw output binary, and it might be wiser to call the binary outside the QED editor anyways.

Although I can't run the compiler by a BASIC command through the HOT_CMD call, I can get around this by setting a separate, parallel SBASIC program that can be invoked using HOT_PICK. This program could then call the assembler, linker and even execute the result.

I used a bit similar technique for getting the above screengrab from QED. A separate basic job waits for keypress, then waits 5 seconds (for me to switch to the QED job) and stores the screenbuffer using SBYTES ram1_screen,131072,32768. Because this happens no matter what is on the screen at that point, the QED job screen can be grabbed.


Afterword

Years ago, when the standard QL was the only thing I had tried, I asked what would have happened if the Sinclair QL approach got to mature over the years? Well, SMSQ/E and SBASIC is one step in that process.

SMSQ/E and SBASIC powered with the Pointer Extension and Hotkeys shows how cool the original Sinclair QL environment can be when some more thought and development has been put into it.

I like that with Sinclair QL, there is less distinction between using the machine and programming it than in computers like Apple Macintosh (and pretty much everything that came after). This makes it it interesting to tinker with.

I have not really compared the role and functionalities between the Minerva ROM and SMSQ/E.  Minerva functions would deserve a blog post in itself, perhaps some other day. The one thing I notice the dual-screen boot option of Minerva does not seem to mean anything after the SMSQ/E has been launched. This means the code I wrote utilizing page flipping on the assumption of Minerva being present, won't work. The lesson is perhaps: don't assume the presence of Minerva.


After-afterword:

This was the first time I started experiencing hiccups with the QL-SD card reader. At one point the card simply refused to write or delete anything, instead locking up the entire machine at that point, jobs and all.

I tried to re-format the card and copy the BDI disk image there, and this worked for a bit but alas the problem reappeared. I've been told QL-SD is not very compatible with Gold Cards, but as I had so far had no problems I felt I might be lucky. Alas, apparently no. Some more investigation is in order.

Wednesday, 15 May 2019

Linux games test

I noticed there's quite a lot of "big" games available for Linux on Steam. Partly inspired by this, I switched my computer setup to a slightly more able 1050 GPU-based system.

Now I don't have to resort to playing Half-Life 2, Portal or 2D indie games.

Here's a few more 3D-intensive games I've tried, with some completely unscientific notes on how they performed on my 64-bit Linux Mint 19, i5 3.00GHz × 4, 16 GB, 1050 GPU computer.

The native resolution of my display is 1920 x 1200 which is bit too optimistic for recent games.


Tomb Raider (2013)

Already somewhat old game, I could bear to play this through last year on my old setup. This was possible because the play doesn't need to be that smooth.

I recall that I lowered the resolution quite a lot, and turned off the more involved hair simulation(!) that brought the speed down.

At native 1920 x 1200
What was left for me to try how Tomb Raider benefits from the 1050 GPU.

At first I experienced surprising slowdown and tried to remedy the situation by lowering the resolution to 1024 x 768. This resolution can even look a bit crude without the anti-aliasing as the environments are quite detailed at times.

But then I found out that "somehow" it does work quite nicely with 1920 x 1200 by changing various settings, especially when using the FXAA anti-aliasing, which is what you might expect from a 5-year old game. It didn't seem to need the triple-buffering either for syncing.

at 1024 x 768, no AA, scaled to 1920 x 1200
2013's Tomb Raider is a well balanced combination of exploration, climbing and action shooting with some roller coaster type run/jump sequences thrown in.

The puzzle elements are now in optional sub-quest tombs which I felt was a good idea.

Besides the main quest there's bunch of things to do and collect, different weapons and equipment to wield and stats and items to upgrade. Instead of toting the dual-pistols, Lara's main weapon of choice now seems to be the fashionable bow.

1920 x 1200


Everspace (2017)

If there's one game that inspired me to upgrade my computer a bit, it's Everspace, because without 1050-level GPU it just quite didn't work.

Even now I went for 1440 x 900 to make it faster. Strangely I could not get the in-game resolution switcher to work so I pre-set the resolution through desktop.

Gorgeus locations at 1440 x 900
The play requires quite fast frame rate, otherwise maneuvering in the battles becomes too confusing. However, a better resolution would be helpful as you want to sort out details from far off so a balance needs to be struck.

A long time ago, I wanted to play Elite: Dangerous, but as that game is not available for Linux I turned to this as a consolation. In some ways Everspace is really closer to the original Elite, although in many ways it's not. It's been described as a rogue-like in space, which is quite nice description.

The Gunship
The universe is structured as a sequence of bounded small locations, accessed through jump points and jump gates. If you think about it this is not unlike the original Elite, except here the galaxy is not open for free exploration.

The locations are most often filled with detail, multitudes of asteroids and derelict spaceships and other wrecks. Realism and space simulation has been thrown away in favor of condensed situations, again, much like Elite.

Combat can get intensive with drones and auto-turrets blazing.
You'll often encounter hostile ships, either outlaws or the dreaded Okkars, but sometimes you can manipulate different factions to fight each other and only enter the fray at a more opportune moment.

Again, as in most modern games, it's possible to customize and upgrade your ship endlessly, switch weapon systems and acquire special one-off items.


The Long Dark (2014)

Another "oldie", and not too big either, this game would have worked rather nicely on the old setting, as the 3D is not very complex. Now I can play it on 1920 x 1200 resolution with all detail on.

I've not looked at the story mode, as the plain survival mode felt more interesting to me. The game places you somewhere in the wintry northern Canada, and a geomagnetic (read "magical") storm has broken all electrical equipment. You'll simply have to find a ways to stay alive in the harsh environment.

That fog isn't there to clip the view distance... it's there to kill you.
Some of the first moments with the game were quite intense. A lot of effort has been put into producing dynamic weather effects, literally the most atmospheric part of the game.

There's something satisfying in wandering desperately in a snowstorm and then finding refuge in an old cottage in the middle of nowhere. Then you try to get a fire up and running and arrange food and drink before opening the bedroll.

The Maintenance Yard. Those planks will be transformed into firewood.
The illusion begins to break for me as I realized the areas are meticulously designed to have certain amount of exits and inroads to other areas. (Possibly to facilitate the story mode) You really can't get that lost, and the cliffs are really un-climbable, ultimate constraints of the maze.

It turns out that as an abandoned national park, the neighborhood is filled to the brim with equipment, buildings and pathways to follow. A somewhat more generative universe would have been welcome for the survival mode.

Yet again, stuff to be crafted, broken apart to component pieces, repaired and so on and on, but in this game concept this seems more justified.

Saturday, 27 April 2019

Larn Volcano Lottery and Becoming Creator


Spoiler alert! For a 30 year old obscure game!

What's the Larn Volcano Lottery?

Well, it's already described more than a decade ago here. My take is more about winning the easy level fast, whereas the advice on that blog post might be more generally useful for different difficulty levels.

The usefulness of this strategy and the values/costs of items may vary depending on the version of Larn. I tend to play only the online version at larn.org, which has been tweaked a bit, there the LVL works really well only on the easy level.

In short, the aim is to get to the Volcano and grab books and chests, as these sell for amazing prizes. After getting near to 100000, the money can be put into bank. Go through all the classes in the College of Larn and behold, you have enough money for the Lance of Death without having to go deeper than L1 in the dungeon.

It's not really about cheating or circumventing the game, the fun thing about the "lottery" is it is almost like another game inside the game of Larn.

Normally, you would get killed almost instantly in the Volcano, but the Scroll of Stealth prevents that from happening, as the monsters simply won't notice you. However, that scroll alone isn't so useful, as you probably can't find the exit before the scroll effect wears out. So, instead of crawling the dungeons, it becomes a more intense game of route-finding, invention, cleverness, business sense and luck.

The approach also gives a good shot at becoming a Creator, which I'll discuss further below.


Getting the initial funds

So you need to buy these three objects:

  • Scroll of Stealth, because handily the monsters won't move or attack you at all.
  • Scroll of Magic Mapping, because this gives the level map and you can plan your way in and out.
  • Scroll of Pulverization, because a wall or a monster may block your way.

You need roughly 13000 gold to get this holy trinity. Clear the first dungeon level and bring back any scrolls and potions you might come across, never reading or drinking them. Chests and books are always sold, never opened or read, because they can be sold for money.

Don't do anything that might Aggravate Monsters or risk teleportation etc. Trying to get effects from random potions and scrolls is not a good idea with this strategy.

There's nearly always a book and a chest on the first dungeon level, or something that is equally valuable. After selling them you can buy the book from the DND store. This can be sold for good money. After that, buy the chest from the DND store and sell it. You should have above 13000.

If you find a really rare artefact, such as a Device of Theft Prevention, you are in luck as these often sell for more than 10000 and you can stop scavenging instantly. These are rarely very useful in itself.

The scrolls and potions are not brought home for money, as unidentified objects can't be sold. But there is a very rare chance that one of the scrolls turn out to be duplicates of the Three, which increases your chances in the Volcano. You'll identify the scroll types after buying them. Gems are also sold and this is necessary if you don't find anything else of value.

If you have enough surplus money for the Scroll of Identity, you can make sense of your scrolls and potions and perhaps sell them for more than the scroll was worth (fat chance). Not many of them are that useful in the Volcano Lottery anyway.

The Scroll of Hold Monsters is one that can be useful. Expanded Awareness, Enlightement, Object Detection and Treasure Finding might work as poor substitutes for the mapping spell should you need to explore further volcano levels.

Should you try to clear more than the first dungeon level? It takes a bit more time, there's a bigger chance of getting teleport-trapped further down, you might drop into a room full of monsters, and you may encounter monsters that sap your strength, and so on and on. So if you have enough gold, why risk it?


Inside the Volcano

The Scroll of Stealth should be read just before you enter the Volcano, otherwise it won't have any effect there. Immediately after entering, you should read the Scroll of Magic Mapping. Now, take a deep breath and look around for the V sign, which is the exit, and take note of any books (B) and chests (C) you might spot on the way.

My Volcano level V1
In this case, I've been fairly lucky: The volcano exit is near, the staircase to second level is near, and there's a statue (&) at the bottom. (These can be pulverized for the book inside)

I pulverized the Dragon guarding the book at the top, got the book from bottom, and returned, all well within the lifespan of the stealth scroll. I also came up with 10 levels of experience and 50000 gold, not too bad. The books on V1 are not especially valuable, though.

When moving you should take care, as monsters still appear from nowhere on your way and might block a passageway you thought was empty. This is one reason not to linger too long inside the volcano.

With the 50000 I could easily again buy stealth and magic mapping, and a Scroll of Hold Monsters. Greedy, I went to volcano level 2, and was rewarded. I saw a chest and a book for taking, and I didn't need to resort to teleporting at all.

My Volcano level V2
I accidentally hit a gnome king the way back, but luckily this turned out to be not fatal (My character was at level 11 after all) and I could flee. With the chest and book from V2 I became truly rich.

If there's no exit route at all, and the scroll of Pulverization is not enough to clear the way, you can kill a monster with the Pulverization just as in the example above. Make sure it's something that takes you immediately past level 10, as then you can use teleportation with shift+Z. After this it really becomes down to luck, as the teleport can easily take you to any of the three volcano levels, but hopefully it will take you near the exit.

Teleporting, you may find yourself stuck inside a rock and that's it, game over. Additional scrolls of stealth and magic mapping become more valuable here, as you can scan the levels below too.

You can also tickle the monsters with the magic missile spell you already have from the start. This will take the one monster out of the stealth status, and it will start chasing you. If you are clever and the floorplan permits it, you can get around a monster this way.

If the exit (V) can't be seen at all, it could be hidden under an array of monsters. This is nearly always a fatal outcome, but not all is totally lost. Pulverize a monster to get the character past level 10 for the teleport skill. Wait for the stealth effect to dissipate, the monsters begin to move and you might spot the exit and have a snowball's chance in hell of finding your way there. A scroll of Hold Monsters can be a lifesaver. Reading the Books might give you an useful spell, too.


Shopping

Even after getting a couple of books or chests out of the Volcano, you are rarely filthy rich. The money has to be invested.

The College of Larn does absolutely nothing to your stats, it is only for spending time so your money grows in the bank. I only recently understood that this is a satirical joke, probably tied to a very specific time, social class and locality in the history of US. Well, anyway, take all courses, and keep all the other money in the bank.

If even after the courses have run out you still don't have quite enough funds for the Lance of Death, you can walk around the surface to spend some more time. Walking 100 squares takes one mobul, the time unit in Larn. Each mobul spent increases your funds 1/250th. 125000 in the bank, and your funds increase by 500 each mobul. Note that running around with shift-key, won't spend mobuls faster, but will wear out your spells faster. (Larn's time is weird like that)

After you get the Lance of Death, if you can still buy another Scroll of Stealth you can return to the Volcano with a vengeance and simply kill everyone you meet without them knowing you hit them. If you didn't have money for the Stainless Steel Armor the first time, this stealthy rampage will ensure you'll get the funds.


How to become level 100, The Creator

This is something I bothered to do only very recently.

A combination of Stealth and Lance of Death is helpful to up your levels in the volcano. With the Lance, go through the dungeon levels. The only intent is to get your spellbook filled (shoot those statues) and any rings of protection & scrolls of Enchant Armor and Weapon.

If you wield your shield as a weapon, it can be improved with Enchant Weapon. When your AC is 40-50, the volcano monsters cease to pose a threat.

Ramp up your armor and keep any rings of protection and regeneration for the cumulative effect, eventually throwing away other types of rings if necessary. After a certain point energy rings will no longer be useful as your spell count never diminishes.

If you encounter the genocide (gen) spell early enough, it might be handy to wipe out all Spirit nagas (n) as they can still be missed and may produce some nasty random effect.

The end game: You can use Vaporize (vpr) to tease out a Demon Prince out of the altars, each time, preparing each kill with a Hold Monster (hld) or Stealth. But this route is stressful and slow as you have to take care not to step on the altar square.

There's so much junk and trinkets the larn.org reality begins to crack.
When you find a Permanence (per) spell, you can make your stealth and other effects permanent. Combined with Create Monster (cre) spell, you can generate masses of non-moving Demon Lords and Demon Princes at the bottom of the volcano, and then kill them for xp.

After creating 9 monsters around you, you can move down and across to destroy the whole bunch. With Wall-Walk (wtw) you can move inside a solid wall and create the demons alongside the wall as you move slowly within it. Then you come out of the wall, hold the move key to kill a whole row of demons, which I believe is the most time-effective way of gaining xp at this point.

After a mind-numbing repetition and time (watch those mobuls), you'll eventually climb up to level 100. The experience limits do not raise exponentially after a certain level which makes this more bearable.

To me there was no apparent advantage of being The Creator, it seems to be just a title. After all you need to "create" a bunch of stuff to achieve this level, so it's apt. Ha, ha. I did not check if there are any special commands for that status, though.

The character is quite un-killable around level 25 anyway, and especially after the permanence spell almost nothing can threaten you anymore. Funnily enough you as The Creator can still get hit by traps, you can slip when exiting the volcano, fall into the infinite pit, your spells can still fail etc.

Sunday, 14 April 2019

ZX Spectrum ULAplus mode, Multipaint etc.

I was asked to do ULAplus extended ZX Spectrum graphics mode support for the Multipaint painting software.

I was initially reluctant. Multipaint supports only the most established and "culturally recognized" modes, and I've not bothered to make C64 FLI/AFLI modes either, and they don't even require new hardware.

But I then saw that some images might actually come out of it, and seeing as I already own hardware that can display the mode (ZX Evolution) my curiosity grew. It's a challenging mode to work with, and Multipaint might help here.

I suppose a fairly huge proportion of currently active ZX Spectrum enthusiasts would be at least aware of the ULAplus mode. Although there are many modded and patched games and converted images that use the palette, the lack of editors and paint programs means Multipaint could even fill a niche here.

I'd usually prefer to release things before discussing them, but here I'll make an exception as there's a bit more to digest than usual.


ULAplus hardware?

In addition to the already mentioned ZX Evolution, I know about a ZX-UNO computer that has it. Then there is the SLAM drop-in ULA replacement which works on 128k or a +2.

A HDMI video board called the TK-Pie appears to promise these modes too.


Emulators also support the mode. I couldn't get my Linux Fuse patched to support it, but I have the mode working on ZX-UNO emulation within the ZEsarUX emulator. There I have to switch the mode on in the Display segment of the settings menu.



ULAplus and ZX Evolution

I had to update the firmware of my ZX Evolution to make this mode work. The firmware you get from one of the nedopc pages is not recent enough, so I went to GitHub and downloaded the latest zxevo_fw.bin and zxevo.rom. (Go look for the ROM at pentevo/rom/bin/)

I cannot guarantee this is the best option for your ZX Evolution, but at least I have my ULAplus mode working on a hardware speccy.

Upgrading the firmware was easy as I have my Evo inside a mini-ITX case. Wired correctly, I can then copy the zxevo_fw.bin to the SD card, and simply hold down the "soft" power button while plugging the cable in. The power LED flashes a bit and the firmware has been upgraded. These days the ZXevo ROM can be updated from within the baseconf service and it is a good practice to have both the ROM and the firmware updated at the same time.

ZX Evolution does not have a full ULAplus mode, it omits the difference between 6th and 7th level of the Red and Green components. So it might be something to consider when making graphics on the ULAplus.




ULAplus mode in Multipaint

Here I focus on how ULAplus works in practice and what it might mean for someone using Multipaint, although it's not yet definite how it will work.

ULAplus is clever in that it does not make the Specrum incompatible, it simply changes what is done with the memory bits that make up the display file. So, I'm only talking about the most standard mode, which has the same old resolution of 256 x 192 and the 32 x 24 attribute resolution with 256 colours to choose from.

The attribute "clash" is not removed, there are still two colours inside an 8x8 area, and much like with the ZX Spectrum there are rules to how these colours can be chosen.

But as there are more colours and they can be combined in more flexible ways, the look of the graphics can be changed quite radically. I'd go as far as to say the ULAplus experience proves the colour clash wasn't such a huge problem with the original ZX Spectrum, the limited colour palette was.

Here's a diagram that may be more confusing than helpful, but let's try it out:

From Multipaint painter's perspective:

-There is an index of 64 colours.
-These 64 colours can be adjusted with RGB sliders from a total of 256 colours. It is a kind of semi-9-bits RGB palette.
-The 64 colours are really four sets of 16 colours. No colours from two different 16-colour sets can be mixed inside the 8 x 8 area.
-Each of the 16-colour sets are further split into two subsets of 8 colours. The colours inside the 8x8 must be from a different subset. ("INK" and "PAPER")

Just as in the normal ZX Spectrum mode, Multipaint does not care which colour is INK or which is PAPER. This is why I have described the mode in a bit idiosyncratic way.

The internal workings can be partly forgotten by the artist, but still ULAplus is more complex than the ZX Spectrum limitations and it would be better if the artist understood these rules.

My starting point for the ULAplus Multipaint engine was to first prevent any pixel drawing operations that cannot be done, and then attempt to fill in the gaps with some helpful intelligence, without going overboard with this "helpfulness".

An early test of the TAP export, shown on the screen of a ZX Evolution computer.
The 16-colour set is technically called a Colour Look-Up Table (CLUT) and I will now follow that terminology here.

So, if the pen colour is from another 16-colour set (CLUT) than the colours underneath, then Multipaint likely won't allow you to draw on it.

If there is no diversifying pixel information at all within the 8x8 cell (it is filled with 64 pixels of the same colour) and it is not legal to draw with the current pen colour, it will be "primed" by Multipaint with the chosen colour. The area will also belong from that point onwards to that CLUT.

However, if the pen colour is legal the pixels will be added on that square and from that point on it will have two colours in it.

So, two different halves of a CLUT combine to make the colours on the same 8x8 area. It doesn't matter which colours or bits are there internally, just as long as you use the same pen colours that already exist on the area, it will work.

Multipaint allows a small detour here: If there is a way to resolve the drawing operation by using different colours from the same CLUT, this will be attempted. If this won't work, a possible combination will be sought from another CLUT.

For example you might have the colour black (0,0,0) in both sides of the same CLUT, this would facilitate drawing black easily on any colours that belongs to that CLUT without having to pick the correct colour everytime.

If the colour black is present at all sides of all four CLUTs, you can freely draw with the colour black over any portion of the picture, the 2-colour rule of course applies.

Also, if you want to breathe freely and have 8 colours that behave like the Spectrum with no CLUT nonsense, define the colours 8-15 same as the colours 0-7, and draw away!

Powerdrome pitstop from Atari ST/Amiga. An adaptation, not a conversion.
Importantly, the palette will be visually separated to show the 16-colour sets as rows. The artist ought to internalize the idea that the colours within an 8x8 area have to be from within the same CLUT, and from different "sides".