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

When using the CDX folder, disk initialization fails #64

Closed aaronjmajors closed 11 months ago

aaronjmajors commented 1 year ago

When using the CDX folder with a set of disk images, initialization fails with the following error (3x):

WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)

This is on an LCIII w/ 7.6.1 installed. I also am using the Pico W with the binary from pull 59.

erichelgeson commented 1 year ago

Can you provide more details? Provide the full log.txt and err.txt if present Provide a link to the disk images if possible Does this happen on the latest release? (remove beta from the equation)

Does this warning actually cause the CD to not work?

If you use all of these disk individually (eg the "normal" way by naming them CD3 .. etc) do you get the warning/do they work?

FWIW I've been using this CDX method exclusively since I wrote it and haven't had an issue. My best guess is one of the disks may not have proper padding (is common).

erichelgeson commented 1 year ago

Any update?

aaronjmajors commented 1 year ago

Should be able to look at it again today or tomorrow, sorry for the delay!

aaronjmajors commented 12 months ago

Ok here are a few more details... All of the disks eventually will mount after ejecting the first set. They're all showing up with an underscore ahead of their name, almost like hidden files (which aren't there) or an indexing issue. Full log below... in this instance I ejected all of the "failed to initialize" disks, then cycled through the ones that mounted, then it looped back to failing again...

[12ms] Platform: BlueSCSI Pico
[12ms] FW Version: 2023.07.08-dev Aug 26 2023 21:35:31
Flash chip size: 2048 kB

=== SD Card Info ===
SD card detected, exFAT volume size: 30534 MB
SD Name: SD32G, MID: 0x28, OID: 0x42 0x45

=== Global Config ===
Reading configuration from bluescsi.ini
Active configuration:
-- SCSI ID: 2 using Optical image directory 'CD2'
-- Opening 'CD2/._Game1.toast' for ID:2

=== Finding images in / ===
== Opening /HD50_512 Apps 2000MB.dsk for ID: 5 LUN: 0
---- Image ready
== Opening /HD60_512 Macintosh LC III 80MB.dsk for ID: 6 LUN: 0
---- Image ready
== Opening /NE4.hda for ID: 4 LUN: 0
---- Configuring as network based on image name
---- Image ready

=== ROM Drive ===
Platform supports ROM drive up to 1692 kB
---- ROM drive image not detected

=== Configured SCSI Devices ===
* ID: 2, BlockSize: 2048, Type: Optical, Quirks: Apple, Size: 4kB
* ID: 4, Type: Network, Quirks: Apple
* ID: 5, BlockSize: 512, Type: Fixed, Quirks: Apple, Size: 2048064kB
* ID: 6, BlockSize: 512, Type: Fixed, Quirks: Apple, Size: 81984kB

=== Network Initialization ===
Wi-Fi MAC: 00:80:19:08:43:45
Connecting to Wi-Fi SSID "XXXXXXXXX" with WPA/WPA2 PSK

Initialization complete!
INFO: Pico Voltage: 3.207V.
Successfully connected to Wi-Fi SSID "XXXXXXXXX"
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/._Game2.toast
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/._Game3.iso
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/._Game4.iso
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/._Game5.toast
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/._Game6.toast
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/Game1.toast
Switching to next CD-ROM image for SCSI ID: 2: CD2/Game2.toast
Switching to next CD-ROM image for SCSI ID: 2: CD2/Game3.iso
Switching to next CD-ROM image for SCSI ID: 2: CD2/Game4.iso
Switching to next CD-ROM image for SCSI ID: 2: CD2/Game5.toast
---- WARNING: file CD2/Game5.toast is fragmented, see https://github.com/BlueSCSI/BlueSCSI-v2/wiki/Image-File-Fragmentation
Switching to next CD-ROM image for SCSI ID: 2: CD2/Game6.toast
---- WARNING: file CD2/Game6.toast is fragmented, see https://github.com/BlueSCSI/BlueSCSI-v2/wiki/Image-File-Fragmentation
Successfully connected to Wi-Fi SSID "XXXXXXXXX"
Switching to next CD-ROM image for SCSI ID: 2: CD2/._Game1.toast
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/._Game2.toast
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/._Game3.iso
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/._Game4.iso
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/._Game5.toast
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/._Game6.toast
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
WARNING: Host attempted read at sector 16+1, exceeding image size 2 sectors (2048B/sector)
Switching to next CD-ROM image for SCSI ID: 2: CD2/Game1.toast
erichelgeson commented 12 months ago

It does appear there are hidden files there - on a Mac open the CD2 folder then press Command + Shift + . (the period key) to show the files. Remove the hidden ones. I will improve the cycling to skip hidden files.

erichelgeson commented 12 months ago

Can you try this firmware and see if it resolves your issue? https://github.com/BlueSCSI/BlueSCSI-v2/suites/15855293814/artifacts/904712238

aaronjmajors commented 11 months ago

Hey @erichelgeson - this version isn't initializing the files from my SD card at all it seems. Here's the log it's spitting out:

[10ms] Platform: BlueSCSI Pico
[10ms] FW Version: 2023.09.05-dev Sep  5 2023 21:28:02
Flash chip size: 2048 kB

=== SD Card Info ===
SD card detected, exFAT volume size: 30534 MB
SD Name: SD32G, MID: 0x28, OID: 0x42 0x45

=== Global Config ===
Reading configuration from bluescsi.ini
Active configuration:
-- 
erichelgeson commented 11 months ago

Can you please turn on debug and show the exact contents of your SD card?

aaronjmajors commented 11 months ago

Scratch that, it worked after I removed my bluescsi.ini file and also changed the name of my main boot drive from .hda to .dsk. Here's the full log:

[10ms] Platform: BlueSCSI Pico
[10ms] FW Version: 2023.09.05-dev Sep  5 2023 21:28:02
Flash chip size: 2048 kB

=== SD Card Info ===
SD card detected, exFAT volume size: 30534 MB
SD Name: SD32G, MID: 0x28, OID: 0x42 0x45

=== Global Config ===
Config file bluescsi.ini not found, using defaults
Active configuration:
-- SCSI ID: 2 using Optical image directory 'CD2'
-- Opening 'CD2/X1.img' for ID:2

=== Finding images in / ===
== Opening /HD60_512 Power Macintosh 7200-90 500MB.dsk for ID: 6 LUN: 0
---- WARNING: file /HD60_512 Power Macintosh 7200-90 500MB.dsk is fragmented, see https://github.com/BlueSCSI/BlueSCSI-v2/wiki/Image-File-Fragmentation
---- Image ready
== Opening /HD50_512 Apps 2000MB.dsk for ID: 5 LUN: 0
---- Image ready

=== ROM Drive ===
Platform supports ROM drive up to 1692 kB
---- ROM drive image not detected

=== Configured SCSI Devices ===
* ID: 2, BlockSize: 2048, Type: Optical, Quirks: Apple, Size: 76720kB
* ID: 5, BlockSize: 512, Type: Fixed, Quirks: Apple, Size: 2048064kB
* ID: 6, BlockSize: 512, Type: Fixed, Quirks: Apple, Size: 512064kB

Initialization complete!
INFO: Pico Voltage: 3.239V.
Switching to next CD-ROM image for SCSI ID: 2: CD2/X2.toast
Switching to next CD-ROM image for SCSI ID: 2: CD2/X3.toast
Switching to next CD-ROM image for SCSI ID: 2: CD2/X4.iso
Switching to next CD-ROM image for SCSI ID: 2: CD2/X5.iso

Looking into the fragmentation issue now as well...

erichelgeson commented 11 months ago

File extensions are not considered when opening the drive (except for ignoring compressed files). Could you put it back to hda and retest. If it fails please include a debug log.

aaronjmajors commented 11 months ago

Yup, looks like that worked as well for me... Thanks!