General Category > LisaList2

An Arduino-Based Parallel Port Hard Drive Troubleshooter

<< < (9/10) > >>

rayarachelian:

--- Quote from: stepleton on May 08, 2022, 12:59:40 pm ---
--- Quote from: rayarachelian on May 08, 2022, 12:02:11 pm ---This triggers another thought: it might be useful to also save the portion of the 1K floppy RAM that maps to PRAM to the SDXC card and load it back in when the selector profile (or other profile) is loaded. This will likely help with MacWorks, perhaps it can be a switchable option for the end user if desired?

--- End quote ---

This sounds like a great idea --- the first step of course is to determine what portion of the RAM that is and how to tell when it's initialised vs. uninitialised.

--- End quote ---


I vaguely remember seeing it somewhere in the HWG, but it doesn't say what MacWorks uses, so it's fairly safe to save the whole 1K of RAM, but maybe exclude the lower values that include the IOROM version (incase you move the Aphid from one machine to another.)



Edit: this is what I save in LisaEm, but don't recall where I got the values from:

--- Code: ---    fwrite(&floppy_ram[0x180/2],(0x200-0x180)/2,1,F);
--- End code ---

So the floppy_ram block is presented to the Lisa on the low bytes in words only hence the /2 and looks like the range is 0x180-0x200=0x80 (or 128 bytes) and the address range should then be double that. So it's the high 128 bytes that are saved as PRAM.  From the M68000 point of view, this is the range from 0xFCC301-0xFCC3ff (odd bytes only).

Note: Looks like MacWorks II+ uses double that and has a serial EEPROM for this as part of the PFG so it can support System 7 - https://lisafaq.sunder.net/single.html#lisafaq-sw-mw



The other problem is going to be how to save those at shutdown, so would need a MacWorks MacOS extension/app that runs in the background and on shutdown saves those values to the Aphid.



--- Quote from: stepleton on May 08, 2022, 12:59:40 pm ---Oh hey, speaking of switchable options, I forgot altogether: the Selector has the ability to display a little 128x32 bitmap logo when it starts up, kinda like the little picture you see with old Sun workstations. I forgot that I put that feature in there, and in fact I never tried it. Here's the code that does it. Who knows, maybe it even works! :)

--- End quote ---

Neat! I am a fan of the old SPARC v8s.

blusnowkitty:
I don't have an Aphid and I haven't looked at the code, but could you not make the Selector a chainloader? Effectively, give it 3-5 seconds on a splash screen waiting for user input if they want to load into the config menu, then set up the I/O RAM (Beaglebone's a full-blown ARM SBC, no? How hard would it be to use NTP to set the date/time automatically?), and finally load the Profile image the user wants to boot from (either saved in a config file as a default boot option or whatever image the user selected from the menu).

stepleton:
I'm not sure I fully understand the proposal, but something very close to what you propose can happen with the Selector's autoboot feature: if enabled, you have three seconds (ish) before it

* switches the drive image from the Selector's own boot volume to whichever drive image is configured for autoboot
* then boots from that drive.
The Selector program itself is fairly simple: when it starts up, it loads itself in its entirety into RAM and never touches its boot volume again. The reason for this is because the Selector can change the Aphid's current hard drive image at any time, so suddenly the data on the hard drive image it booted from may no longer be available.

If you wanted to dynamically load bits of the Selector only when you needed them (apologies if this is not what you're proposing!) then you'd want to do that dynamic loading using commands to the Aphid that are different from regular hard drive reads and writes. This is because the Aphid doesn't know whether it's the Selector talking or some other Lisa program or OS, and you probably only want the Selector to load up bits of the Selector (other Lisa software has no use for it and would only be confused by it --- or worse, it might just try to overwrite it or something). The key/value store would be the easiest option for some kind of "out of band" loading, but as Alex has noted, not all implementations of the Aphid key/value store are feature complete :-)

BeagleBone is a line of SBCs, but some are bigger and more feature-packed than others, and the one I've gone for is the smallest of them all: the PocketBeagle. Size is the main feature there; many other conveniences are missing. To talk to an NTP server, you'd need to get a network connection out of it, and there are certainly options for that. There is no built-in ethernet port or WiFi on the board itself, though, so the easiest option is to use the USB cable and tunnel TCP/IP over that (something the board sets up out of the box --- you can SSH into your Cameo/Aphid that way).

But if you don't want to use another computer as a network gateway for your tiny computer, you'll need to do something like adding an ethernet port or a USB host that you can plug a network dongle into. The PocketBeagle's SOC has built-in support for such ports if you attach their connectors to some of the I/O pins, but you'd need to hope that the I/O pins that those features use aren't the same as the I/O pins that the Cameo board uses. Could I change the I/O pins? Yes, but I don't want to --- the 16 that I chose are the ones most directly connected to the SOC's built-in I/O coprocessors. Plus I'd have to respin the Cameo board itself :-)

Other architectures may not have the same constraints that the PocketBeagle does --- maybe ArduinoFile can work differently, or maybe you can use one of those WiFi-enabled ESP32 things for yet another emulator. I saw somewhere that someone had made a ProFile emulator using a Raspberry Pi Pico... yes, here it is. Coming up with your own emulator is a fun project and I suspect Patrick's excellent documentation is a big part of what's made it possible.

Anyway, without a way of getting the time from the outside world, it's more-or-less Groundhog Day for the PocketBeagle: it boots up and the time is whatever time it was when the kernel was built. At least I think that's how it works; there may be a cached time sort of scheme like the mechanism I've proposed for the Selector, but I forget whether that's the case.

Not sure if this is useful information, but there it is!

blusnowkitty:
Sounds to me like Aphid Selector already does what I was thinking then.

stepleton:
But wait, there's more! You can even set a password on the autoboot feature so that visitors to your computer museum won't monkey with your hard drive images! :D

(They'd have to come to the museum with their own floppy disk with the Selector on it to work around the password.)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version