tjboldt / Apple2-IO-RPi

Apple II expansion card using a Raspberry Pi for I/O
MIT License
119 stars 13 forks source link

make apple2driver.service more user friendly #156

Closed JPT77 closed 10 months ago

JPT77 commented 10 months ago

What do suggest for improvement?

Changing the image loaded is a pain in the ***. You always have to edit the service file, reload config, restart service. Or have I missed something?

So I am searching for a solution...

I tried adding variables to the service file, or read them from an external file which does not work.

Environment=APPLE2DRIVER=/home/pi/Apple2-IO-RPi/RaspberryPi/apple2driver/apple2driver
Environment=IMAGEPATH=/home/pi/images
Environment=IMAGENAME=A2Diag.v4.1.img.po

But these variables are set for the environment of the apple2driver process only. We would need to modify apple2driver code to make it read its parameters from ENV. It won't make the service file more serviceable. Except if we use this:

EnvironmentFile=/home/pi/apple2driver.env

another way would be to directly read from a config file passed to the apple2driver process.

I will try to have a look into the source code...

tjboldt commented 10 months ago

If you want to change drives on the fly, use the rpi.command for this. It supports both dynamically generated ProDOS volumes based on the contents of a Linux folder or loading an existing ProDOS drive image file. It also supports two at a time with drive 1 and drive 2.

]-rpi.command
]rpi a2drive 2 load /home/pi/images/A2Diag.v4.1.img.po