BlueSCSI / BlueSCSI-v2

Open source, open hardware, SCSI emulator using the Pi Pico PR2040
https://bluescsi.com
GNU General Public License v3.0
225 stars 23 forks source link

More than 10 CD images in an Image Set? #41

Closed armadillu closed 1 year ago

armadillu commented 1 year ago

Hi! I'm using the "Image Set" feature, where you can rotate through different CD images in a single SCSI ID, which is really neat. I would like to be able to have more than 10 though, and the current implementation handles IMG0 to IMG9. I guess I could just another SCSI channel and have 10 more, but that feels a little sloppy.

I looked at the source, and it seems it would be reasonably straightforward to change the way the CONFIG is handled into double digits, so that it allows setting CD images from IMG00 to IMG99, which should be enough. I would be happy to give that a try, but then I also remembered that you already have an utility that allows file transfer between the mac side and the sdcard. I couldn't find the source for it, but its existence must imply that you already have a "communication channel" in place between the mac os side and the BlueSCSI-v2.

With that in mind, maybe it would be cooler to develop a native 68k app that allows the user to choose what CD to mount next, straight from the sdcard? This way there's no need to edit tedious config files etc, just drop all CD images you want to be able to mount into a directory, and choose which one to mount. And of course you avoid the process of ejecting multiple CDs until you get to the one you want...

armadillu commented 1 year ago

Just a note, after looking at the source code it seems there's currently no upper bound checking on the number after 'IMG', it just relies on an ASCII to Integer conversion for indexing.

Looking at an ascii table, the value after '9' is ':', and then ';' and '<', etc.

I tested the first 'IMG:=' and it works, if you need more than 10 CD images, this could be an easy workaround for now.

The List goes:

IMG0=/MyCDs/cd1.cdr 
IMG1=/MyCDs/cd2.cdr 
IMG2=/MyCDs/cd3.cdr 
IMG3=/MyCDs/cd4.cdr 
IMG4=/MyCDs/cd5.cdr 
IMG5=/MyCDs/cd6.cdr 
IMG6=/MyCDs/cd7.cdr 
IMG7=/MyCDs/cd8.cdr 
IMG8=/MyCDs/cd9.cdr 
IMG9=/MyCDs/cd10.cdr 
IMG:=/MyCDs/cd11.cdr 
IMG;=/MyCDs/cd12.cdr 
IMG<=/MyCDs/cd13.cdr 
IMG==/MyCDs/cd14.cdr 
IMG>=/MyCDs/cd15.cdr 
IMG?=/MyCDs/cd16.cdr 
IMG@=/MyCDs/cd17.cdr 
IMGA=/MyCDs/cd18.cdr 
IMGB=/MyCDs/cd19.cdr 
IMGC=/MyCDs/cd20.cdr 
IMGD=/MyCDs/cd21.cdr 
IMGE=/MyCDs/cd22.cdr 
IMGF=/MyCDs/cd23.cdr 
IMGG=/MyCDs/cd24.cdr 
IMGH=/MyCDs/cd25.cdr 
IMGI=/MyCDs/cd26.cdr
erichelgeson commented 1 year ago

Ha! Nifty work around :)

So having 100 images - if you wanted to eject to go to the next one, and you wanted the 100th image, that would be quite tedious.

I do have a 68k Macintosh app that will list and allow you to set the next CD. This functionality should be in the next (or next+1) release.

Also I agree, anything in the ini file should not be for end users and only there for legacy or advanced configuration that cant be determined at runtime.

erichelgeson commented 1 year ago

I have a PR open for this now #52 - Just create a folder, eg; CD3 and put your 100's of ISOs in there - no ini/config. Note that the workaround here wont work in the latest July firmware anymore I don't believe.