General Category > LisaList2
Cameo/Aphid selector
stepleton:
Hi all,
I'm very pleased to announce the near-completion of a project I've been working on for a very long time --- nearly the entire COVID crisis so far! It's a program for my Cameo/Aphid hard drive emulator that allows you to select and manage drive images from an Apple Lisa, and while that may not be very useful for most people (there aren't that many Cameo/Aphid devices out there in the world), some of the parts that went into it may be handy for something you're working on.
The program, which I'll call the Selector, is up on GitHub now. It's what I was "previewing" in that earlier thread. I said "near-completion" because there are still some more documents to write and disk images to make, but if you made yourself a Cameo/Aphid at some point --- first of all, why not let me know? --- you can check out the new software at https://github.com/stepleton/cameo/tree/master/aphid/selector. There's also a manual that tells you everything the Selector can do.
I hope you won't mind if I geek out a bit about what I've made; maybe you'll find it interesting.
Up until now, a Cameo/Aphid has basically behaved a lot like an ordinary ProFile: you turn it on, and (once it's ready) it pretends to be a hard drive. This has always seemed like a bit of a waste, since the PocketBeagle computer that powers it is a Linux computer with a 1GHz ARM, a ton of RAM, and as much storage as your microSD card allows. The least it could do is give you a menu to let you switch between drive images now and then, so you could boot the Office System for a while and then play with MacWorks after that without much hassle.
I had a pretty good idea of how to build this kind of feature. The code on the Cameo/Aphid that shuffles block data between the drive image file and the PocketBeagle's I/O processors is just a big-ish Python script, so it would be easy to modify it to make some blocks "magical" --- reads and writes to those blocks could do things like create and manage hard drive image files, or really just about anything else you might imagine. So, I gave the script a plugin system, and most of those "magic blocks" behaviours I described in yesterday's thread are these little Python module plugins, like this one for the key/value store that my Selector program uses to store configuration information. I implemented this first, since it was easy for me, and while I didn't have any code on a Lisa that could use this new functionality, it was easy to test with the help of Dr. Schaefer's UsbWidEx gadget.
The next step was harder. I needed to write a bare-metal program that talked to the hard drive, showed text on the screen, and took input from the keyboard, and since I wanted it to work on as many Lisas as possible (and since I also wanted to be able to display lowercase letters), I couldn't use my cheap NeoWidEx trick of jumping into private routines in a specific version of the ROM. I'd have to write everything from scratch.
This is what led me to make the lisa_io library in March and April. Ray egged me on to make an OS, and while I might do that if COVID lasts for too much longer, this is what I was really up to that whole time. I had a good head of steam for a while making some neat UI components, and besides lisa_io, these may be some of the most useful spin-off products of this project. There's
* a single-line textinput box (think of your basic HTML <input> tag),
* a scrolling menu for selecting an item from a list of items,
* and some routines for UCSD p-System style menus like what you find in the Workshop.I've forgotten to mention that this is all in 68K assembly language (targeting Ray's EASy68k-derived standalone assembler), and like most of my Lisa stuff, it's released into the public domain. I don't trash a lot of registers in this code, so it may not be hard to call it from C or what have you.
Anyway, this was a good start, but I got distracted for a few months by work and by a weird old Whitechapel MG-1 workstation I've had on a (thanks to COVID) very extended loan. As autumn arrived I picked up the project again, and in the usual manner of the last bits stretching out longer than you expect, it eventually reached a state where it could be released. The usual silly feature creep started to take hold, and so now we have
* a built-in editor for items in the key/value store (also, there's a key/value store --- did my project really need a Windows Registry?),
* a cheesy scripting system,
* plus one or two more features that are still dormant for now.Eventually I stopped adding more bugs by adding more features while I was fixing the bugs, and here we are. I had always hoped to finish it by the time COVID was over, and although I've succeeded, that's only because my plan contained two underestimates instead of just the usual one.
Well, that's it --- thank you if you've read this far! I hope some of this project may be useful; since not many Cameo/Aphid devices exist out there, I'll probably make a video someday for a more vivid show-and-tell than a bunch of text documents. I hope you all have been well for the past months --- here's hoping for a better year this year!
jamesdenton:
Tom - thanks for the write up on this awesome project! I saw the teaser on Twitter the other day and am finally glad to see more about it. Looking forward to kicking the tires on it. Nice job!
blusnowkitty:
I don't think I've asked or seen - can the images created by Aphid be loaded into LisaEm or IDLE, or vice versa? This would be a huge game-changer if they could, especially with the work Ray's been doing to get Workshop able to compile in LisaEm and what Al Kossow has been working on.
rayarachelian:
--- Quote from: blusnowkitty on January 17, 2021, 09:44:30 pm ---I don't think I've asked or seen - can the images created by Aphid be loaded into LisaEm or IDLE, or vice versa? This would be a huge game-changer if they could, especially with the work Ray's been doing to get Workshop able to compile in LisaEm and what Al Kossow has been working on.
--- End quote ---
I'm guessing they can be transferred with BLU just like any ProFile, but yeah, if there's documentation about the native format of how the individual ProFile disk images are stored on the SDXC, and maybe access to a sample dd of the SDXC itself, one that has several images on it, I can take a look and write a translator tool, after which you can "sneakernet" the SDXC card to your mac/pc and run a tool to move the data to/from LisaEm, and by extension IDLE (I think it's using either rraw or raw formats for which I have a translator to/from dc42.)
If it's just a bunch of disk image files on a FAT32 file system that makes it easier, then I'd need to know the file format of each image and where the tags are, but if it's a muxing partiton, similar to what the X/ProFile has odd/even stars, it would need slightly more work.
stepleton:
The disk images are not .dc42 disk images, but they will be easy to convert.
They're just ordinary files on a FAT partition on the microSD card. The way you make the files is very simple: you just take block $000000, write its 532 bytes to the file, then take block $000001 and write its 532 bytes after that, then block $000003, then $000004, and so on until you run out of blocks. Like a real ProFile, the drive emulator doesn't know about the structure of the blocks --- tags and data and so on --- it just treats them like 532-byte chunks.
There is no header or footer information --- it's just the drive data and nothing else. There is no interleaving either: all blocks are arranged in sequential order. This program by Ray may already be capable of converting them into .dc42 format:
https://github.com/rayarachelian/lisaem/blob/master/src/tools/src/raw-to-dc42.c
This is a convenient format for the emulator, which just `mmap`s the entire file and does reads and writes to something that looks to Python like a big list.
Anyhow, you can pull the microSD card out of the Cameo/Aphid, plug it into a modern computer, and just copy these disk images to and from the FAT partition like any other file.
(ETA: It is good manners to unplug the Cameo/Aphid first.)
Navigation
[0] Message Index
[#] Next page
Go to full version