News:

Want an XLerator? Please participate in the market research thread: https://lisalist2.com/index.php/topic,594.msg4180.html

Main Menu

The LOS and Workshop file systems have been "decoded"

Started by TorZidan, September 19, 2026, 04:32:54 PM

Previous topic - Next topic

TorZidan

I caught the "LOS software developer" fever from the community, and decided to complete a personal project that has been hanging unfinished for many years.

Here it is: https://github.com/TorZidan/LisaFileSystemTool/

I used elbow grease and AI to decode the LOS & Workshop file system format, by peeking into the LOS open source code, and via many trials and errors on many different disk image files.

Unlike previous attempts by others, everything is complete and well documented. Note: the "add file to a disk image" feature is experimental, works only with LOS 1.0  and 2.0 disk images, for now.

Section https://github.com/TorZidan/LisaFileSystemTool/#59-protected-files-theft-protection-and-removing-the-protection-deserialization (protected files) is particularly interesting.

UPDATE:  the "add file to a disk image" feature is fully implemented and works on all versions of the file system. It can add both binary and text files properly. Needs more testing....

I am really impressed with the PI coding harness and the Qwen 3.8 AI model running locally on my video card. It decoded the B-tree "add file" implementation from the Lisa OS sources (Pascal and 68k Assembly code) , came up on its own with ways to test the "addfile" functionality, by finding disk images on my PC if the necessary file system version, copying it into /tmp, adding a file to it, then dumping the file and comparing it with the original. It even found somehow the LisaEm binary on my PC and launched it, but got stuck at the boot screen.

Enjoy!




bmwcyclist

Using my LISA for writing blogs and other work projects, and for fun and games at home.
Visit my shares on GlobalTalk! LISAGamingZone
Check out the NEW Lisa Software! https://github.com/GyroPilot
telnet theapplelisabbs.duckdns.org 1983

stepleton

That is impressive.

Would there be any chance of organising this code into a few separate modules? All in one file is convenient, but it looks like there are some handy routines here that would be nice to use from other programs. You could have a module for disk image I/O, a module for filesystem metadata, routines for traversing the FS, routines for retrieving and creating files, etc.

Either way, one thing that seems like it could be fun would be some visualisation of the sector bitmap. I'm imagining something that resembles the diagram of occupied sectors in a disk defrag tool...

Finally, now that you've got a way to write to files: can you write a script that deposits a compilable set of Lisa Office System source code files onto a hard drive image? Would be a real stress test!

Cheers,
--T

TorZidan

Quote from: stepleton on September 20, 2026, 06:06:02 PMWould there be any chance of organising this code into a few separate modules?
The code is split into two python files: the "add file" related code is in the 2nd file, and uses (imports) routines from the 1st file). If you have something else in mind, send me a pull request, I will accept your changes.

Quote from: stepleton on September 20, 2026, 06:06:02 PMFinally, now that you've got a way to write to files: can you write a script that deposits a compilable set of Lisa Office System source code files onto a hard drive image? Would be a real stress test!
Yes, this has been my end goal. The script is ready at https://github.com/TorZidan/LisaFileSystemTool/blob/main/LisaSourceCompilation/upload_files.sh . It works great and adds successfully 858 lisa source files.
The files look great in Workshop File Manager and the Workshop Editor. However, compiling them fails "midway" (after hundreds of files are being compiled), and LisaEm crashes and exits into the "debugger". I will figure it out eventually. It could be a LisaEm bug...


sigma7

Quote from: TorZidan on September 19, 2026, 04:32:54 PMeverything is complete and well documented

UPDATE:  the "add file to a disk image" feature is fully implemented and works on all versions of the file

Wow, this is really tremendous development - well done!

Quote... AI model running locally on my video card.

Was your use of AI entirely self-hosted, or did you need to use some big/cloud AI too?

If self-hosted AI is sufficient for LOS development, I'd like to do something similar. Do you have advice on what hardware & software I should collect to set it up?
Warning: Memory errors found. ECC non-functional. Verify comments if accuracy is important to you.