Last month I posted a picture of a piece of needlework art in my dad's house, and remarked on its similarity to Amiga-era pixel art: hachyderm.io/@simontatham/1137β¦
I said in that post that it would be cool to digitise it back to a paletted image suitable for actually loading into Deluxe Paint. I didn't get round to doing it β¦ but someone else did! kaberett.dreamwidth.org/ put in a *lot* of effort (more than I would have dreamed of asking for) and sent me a PNG.
I thought the only reasonable thing to do with that was to convert it back to IFF ILBM, transfer it on to an Amiga floppy image, and load it in _actual_ Deluxe Paint. Tada!
But even given a starting PNG, getting it into DPaint was a challenge. (1/8)
My dad has this very old piece of cross-stitch art in his house. Every time I see it I'm struck by how much it anticipated 1990s pixel art on 16-bit micros like the Amiga, simply because the artist was working under similar constraints: a low-resolution grid of square pixels, and a strong incentive to use as few _different_ colours of yarn as possible, with much less constraint on what those colours should be β just as the Amiga and similar machines let you have a palette of 32 colours on screen at once but they could be chosen from a much larger space.And the artist has used the same stylistic tricks to compensate for those limitations as Amiga artists did, or at least some of them. I could easily imagine someone having drawn this in Deluxe Paint, and perhaps even used it as an interstitial image in the middle of a period-themed Amiga game, with some important plot dialogue subtitled on the bottom.
I keep thinking it would be kind of cool to digitise it back to pixels + palette. But for proper style the result would have to be stored in an IFF ILBM instead of any more up-to-date image format.
Simon Tatham
in reply to Simon Tatham • • •My Amiga emulator of choice is FS-UAE, which comes with a reasonably convenient GUI configuration editor and launcher. Or rather, it _did_. Since I last tried to use it, I've upgraded Ubuntu at least once, and now most of the controls are missing, the remaining ones are piled on top of each other, and if you run it from a terminal you get Python error tracebacks.
But the most important control is still there: the one that lets you double-click one of your saved configurations. And the configurations themselves live in text files, so I can still edit them even though the rest of the GUI is broken. (2/8)
Simon Tatham
in reply to Simon Tatham • • •How to make an ILBM image? The obvious way is to let ImageMagick do its thing. But I played with DPaint a bit first to get the hang of it again, and that reminded me that it uses some specific palette entries for the drawing-package furniture and the mouse pointer. So I wanted to keep _those_ palette entries sensible, and use the remaining ones for the colours from the input image.
That meant writing my own custom ILBM conversion tool. Shouldn't be a problem: the file format is on Wikipedia and looks relatively simple, especially if you don't implement data compression. (3/8)
Simon Tatham
in reply to Simon Tatham • • •To make sure I haven't misunderstood the file format, I start by drawing a sample image in DPaint, so I can check it in a hex dump.
Make a blank ADF disk image; draw a test scrawl in DPaint and save it to the disk; mount the disk image using Linux's in-kernel AFFS support to copy the file off it, and ... it's not there at all. Disk still 100% empty.
Turns out FS-UAE defaults to never writing to your original disk image; instead it keeps a delta file in another directory. Quite sensible for some purposes. But the delta file is in a more complicated format than simple ADF, and I don't want to have to make sense of it.
Eventually found the 'writable_floppy_images' config file flag. Now when DPaint saves to my disk it actually saves to my disk. Copy off a sensible-looking ILBM file. Now I have a sample file to check against the format spec. (4/8)
Simon Tatham
in reply to Simon Tatham • • •Wrote my ILBM converter and tested it against ImageMagick, which seemed happy. Mount my ADF image again and copy the file on to it. Boot DPaint and try to load the image.
"DOS IO Error."
(On the other hand, I quite like the wording "Proceed" in the button that would be marked "OK" these days. It's not OK, and it's nice not to have to click a button saying it is!) (5/8)
Simon Tatham
in reply to Simon Tatham • • •Boot the Workbench system disk and try to find out what's going on. Unexpectedly, my Workbench disk defaults to a French keymap, so the first thing I have to do is type "setmap usa1" at a shell (with some difficulty). usa1 is also not the keymap I really want, but apparently is the only other available one. Punctuation all in the wrong places, but at least the letters work.
Workbench also can't read my image file. I don't just mean it thinks it's an invalid ILBM. It can't read it _at all_, even for purposes of copying it to NIL:. Linux has corrupted the disk's filesystem. (6/8)
Simon Tatham
in reply to Simon Tatham • • •Ridiculous idea #1: maybe the problem is specific to _creating_ files (like Linux is getting some of the header metadata wrong). So I start from a disk image containing a file of at least the same size as my image, and overwrite just the data, leaving the file name and attributes as unchanged as I can.
This works better: DPaint loads the file without an error! But the results are β¦ not what I had hoped for. Some recognisable blocks of data from the original image, but it looks as if about every 4Kb of the file something weird happens. I guess Linux and AmigaDOS have a further disagreement over some aspect of the disk filesystem format. (7/8)
Simon Tatham
in reply to Simon Tatham • • •Ridiculous idea #2: well, if DPaint considered the file to be a valid ILBM at all then that suggests that the _first_ β4K of it were correct. Perhaps the Linux AFFS driver can write _small_ files successfully, and only if you try to cross a cluster boundary does anything go wrong?
So I saw the file up into 2000-byte chunks with `head` and `tail`, copy each chunk to a separate file in the ADF disk image, boot Workbench again, and glue the chunks back together with the Amiga CLI JOIN command.
Even this doesn't go smoothly. The Amiga CLI's wildcard syntax uses #? where everyone else uses * β¦ and with my keymap issues, the one punctuation symbol I can't type is #. Not sure why β when I pressed Shift+3 nothing happened. I suspect FS-UAE got confused by my British keymap on the host, but I have no proof.
So I have to hand-type all the filenames I want to join together. And then they overflow the command line, so I have to join them in two stages. But finally, after all that, success! (8/8)
Leeloo
in reply to Simon Tatham • • •Might have been easier to get workbench to read a FAT image?
Or maybe skip the disc image entirely? Can the emulator emulate a network card? Or even a serial port?
With Vice (C64), I have been able to save directly to a Linux folder, but that does not mean the same would be possible with UAE.
But these suggestions are probably too late either way.
Simon Tatham
in reply to Leeloo • • •indeed, I considered several of those things!
In my days of owning a real Amiga I did have a tool that would read 720Kb FAT floppies, but it wasn't on the standard Workbench disk, and I couldn't remember where I'd got it from. It could well have been the Fred Fish disk collection, and of course those are on the Internet nowadays β but the site I found them on had them in .lha format rather than disk images, which would have put me right back in the same problem of "have files, can't reliably get them on to a disk".
FS-UAE does emulate a serial port, but I couldn't easily dig up information on how to get the Amiga to copy from it to a file, let alone in an 8-bit clean manner.
I found a lot of information on the web about TCP/IP configuration on later versions of AmigaOS, but I only have old-school Workbench 1.3 here, and was worried that a more up-to-date version capable of networking might also want to use a more up-to-date filesystem version which (I already checked) 1.3 can't read!
Leeloo
in reply to Simon Tatham • • •Doesn't the Amiga have anything like cat ttyS0 >file? That was my plan for getting files onto a real Amiga, but I haven't gotten around to look up how.
Anyway, there's a bunch of options at pjhutchison.org/emulation/uae_β¦ - number 5 (directory) sounds like the easiest. Although that's winuae, so it may have differen features
File Transfers
www.pjhutchison.orgSarah Brown
in reply to Leeloo • •mirabilos
in reply to Simon Tatham • • •setxkbmap us
before I can use a remote GUI thingy (but then I can set the actual keymap I want on the remote).Simon Tatham
in reply to mirabilos • • •@mirabilos admittedly, I'm also not confident of what the (British) Amiga keymap actually looked like. My fingers don't remember it especially clearly, and I decided to just compensate on the fly rather than web-searching for a picture, to avoid stacking my side quests too deep.
(But when I did Spectrum coding the other week I _did_ have to web-search for a picture of the Spectrum keyboard, because that's much more important β you need to know where all the keywords are!)
Jess Robinson
in reply to Simon Tatham • • •Simon Tatham
in reply to Simon Tatham • • •Update: after I got to the bottom of all this, it turns out the glitches in this corrupted image file aren't just any old glitch. They're evidence of a security hole in that version of AmigaDOS! Some detail in followup thread: hachyderm.io/@simontatham/1140…
Simon Tatham
2025-02-21
Update: after I got to the bottom of all this, it turns out the glitches in this corrupted image file aren't just any old glitch. They're evidence of a security hole in that version of AmigaDOS! Some detail in followup thread: hachyderm.io/@simontatham/1140β¦
Simon Tatham
2025-02-21 07:57:11
Oblomov
in reply to Simon Tatham • • •Fritz Adalis
in reply to Simon Tatham • • •Sarah Brown
in reply to Simon Tatham • •like this
author_is_ShrikeTronπ πx7 and Matthew Merkovich! like this.
Dave Smith
in reply to Sarah Brown • • •Simon Tatham
in reply to Dave Smith • • •Sarah Brown
in reply to Simon Tatham • •Dave Smith
in reply to Sarah Brown • • •Sarah Brown
in reply to Dave Smith • •Dave Smith likes this.
Dave Smith
in reply to Sarah Brown • • •Sarah Brown likes this.
Sarah Brown
in reply to Dave Smith • •Dave Smith
in reply to Sarah Brown • • •Sarah Brown
in reply to Dave Smith • •Dave Smith likes this.
Turrican
in reply to Simon Tatham • • •Simon Tatham
in reply to Turrican • • •Turrican
in reply to Simon Tatham • • •Rachel Wright
in reply to Simon Tatham • • •WOMUMP
in reply to Simon Tatham • • •Mikael Lundin ππ₯¦β»οΈ
in reply to Simon Tatham • • •Matthew Merkovich!
in reply to Simon Tatham • • •The Amiga 2000 Computer (1987)
YouTubeMetin Seven π¨
in reply to Simon Tatham • • •@eobet Do you also know the authentic DPaint recreation called PyDPainter?
github.com/mriale/PyDPainter
GitHub - mriale/PyDPainter: A usable pixel art paint program written in Python
GitHubElena ``of Valhalla''
in reply to Simon Tatham • • •@Simon Tatham wow!
(and now, for a second I've been tempted to look for one of the example images that came with deluxe paint 2 for the pc and try to embroider it)
(sadly, tooManyProjectsError)