News:

I've successfully built LOS from source!: https://lisalist2.com/index.php/topic,644.0.html

Main Menu

Utility for adding files to Lisa disk images

Started by fri0701, May 13, 2025, 10:18:31 PM

Previous topic - Next topic

fri0701

Hi everyone,
I wanted to share some code from a project I've been working on recently.

Now that we have the actual Lisa source code to reference, I thought it would be a worthy challenge to try and write a utility program to programmatically add files onto a Lisa disk image. It took about a month of fiddling with code and combing through the Lisa source for me to understand all the moving parts, but I finally have a version that (mostly) works! (I also wrote the corresponding read code, which will extract all files from a given disk).

Code is here, under "srcBuilder". The README will explain more about how to set things up: https://github.com/tfrikker/lisa_utils

(Right now I only support 5MB images in B-tree FS format, but perhaps more will come later. I also still have a significant bug that shows up sometimes when writing the catalog entries; sometimes adding files makes others disappear)

I wrote this in the hopes that I could compile at least *something* from the Lisa source release in Lisa Pascal Workshop (and, spoiler alert, I was - the "STUNTS" hardware demo. See attached image). After fixing some of the above issues, it'd be really great to ingest many more files and see if we can get a full app built.

I hope someone here finds this useful (or at least technically interesting!). I learned a lot from this project, and I hope to contribute some code to lisafshtool soon as well.

Questions, comments, or PRs would be much appreciated  :)

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

AlexTheCat123

Thanks, this is awesome! I wish I had something like this when I started compiling all the source code a couple months ago. I decided that it would be quicker to transfer the files to the Lisa via serial instead of taking the time to write a filesystem tool (not sure if I was right about that or not), but the serial transfers obviously ended up being really painful for the full 20-something MB of code.

TorZidan

Quote from: fri0701 on May 13, 2025, 10:18:31 PM
... and I hope to contribute some code to lisafshtool soon as well.

Nice! Yes, ideally, this should be merged into lisafsh-tool at  https://github.com/arcanebyte/lisaem/blob/master/src/tools/src/lisafsh-tool.c .
I had a similar idea and studied the lisafsh-tool code, and I realized that the code needs a complete rewrite and documenting before it can be enhanced.
So I rewrote it, but did not have a chance to submit it through a pull request . Perhaps I should do that...