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

BlueSCSI.ini parity option ignored #27

Closed z80micro-mc closed 1 year ago

z80micro-mc commented 1 year ago

EnableParity option is totally ignored.

EnableParity = 0

or

EnableParity = 1

Both have the same effect. Parity checking is permanently enabled.

RM kit is an 8 bit SCSI controller whaich does not support parity. There Parity checking needs disabling.

WIKI for V2 is very sparse - no information on BLUESCSI.INI configuration options. Nor details on what the various System types do.

Peter

erichelgeson commented 1 year ago

Looks like a bad merge renamed it to Parity - I'll fix it for next release, but should be a work around for the current release.

You can find some details in the examples bluescsi.ini in the repo or an interactive builder at https://ini.bluescsi.com

WIKI for V2 is very sparse - no information on BLUESCSI.INI configuration options. Nor details on what the various System types do.

It's a wiki so contributions welcome!

z80micro-mc commented 1 year ago

Eric,

thanks.

It now claims to have disabled Pareity checking but clearly hasn't.

extract from log [10ms] Platform: BlueSCSI Pico [10ms] FW Version: 2023.04.10-release Apr 10 2023 19:08:58 Flash chip size: 2048 kB

=== SD Card Info === SD card detected, FAT32 volume size: 14776 MB SD Name: SD16G, MID: 0x27, OID: 0x50 0x48 [21ms] [21ms] === Global Config === [22ms] Reading configuration from bluescsi.ini [22ms] Active configuration (using system preset "Generic"): [23ms] -- SelectionDelay: 250 [24ms] -- EnableUnitAttention is on [24ms] -- EnableSCSI2 is off [25ms] DBG -- EnableSelLatch is off [25ms] DBG -- MapLunsToIDs is off [26ms] -- Debug is enabled [26ms] -- Parity is disabled [27ms] DBG -- ReinsertCDOnInquiry is disabled [102ms] [102ms] === Finding images in / === [103ms] == Opening /HD10_512.HDA for ID: 1 LUN: 0 [109ms] DBG ---- Read prefetch enabled: 8192 bytes [110ms] ---- Image ready [115ms] [115ms] === ROM Drive === [115ms] Platform supports ROM drive up to 1692 kB [116ms] ---- ROM drive image not detected [116ms] [116ms] === Configured SCSI Devices === [117ms] * ID: 1, BlockSize: 512, Type: Fixed, Quirks: XEBEC, Size: 41040kB [218ms] [218ms] Initialization complete! [5395ms] DBG ---- SELECTION: 1 [5646ms] DBG scsi_accel_rp2040_finishRead(0x00 0x00 0x00 0x00 0x00 0x00 ) detected parity error [5647ms] DBG ---- COMMAND: TestUnitReady [5647ms] DBG ------ OUT: 0x00 0x00 0x00 0x00 0x00 0x00 [5648ms] DBG ---- STATUS: 0 GOOD [5653ms] DBG ---- MESSAGE_IN [5653ms] DBG ------ IN: 0x00 [5654ms] DBG -- BUS_FREE [5654ms] DBG ---- SELECTION: 1 [5904ms] DBG scsi_accel_rp2040_finishRead(0x00 0x00 0x00 0x00 0x00 0x00 ) detected parity error [5905ms] DBG ---- COMMAND: TestUnitReady [5906ms] DBG ------ OUT: 0x00 0x00 0x00 0x00 0x00 0x00 [5906ms] DBG ---- STATUS: 0 GOOD [5913ms] DBG ---- MESSAGE_IN [5913ms] DBG ------ IN: 0x00 [5914ms] DBG -- BUS_FREE [5914ms] DBG ---- SELECTION: 1 [6164ms] DBG scsi_accel_rp2040_finishRead(0x08 0x00 0x00 0x00 0x01 0x00 ) detected parity error [6165ms] DBG ---- COMMAND: Read6 [6166ms] DBG ------ OUT: 0x08 0x00 0x00 0x00 0x01 0x00 [6166ms] DBG ------ Read 1x512 starting at 0 [6167ms] DBG ---- DATA_IN [6169ms] DBG ---- Total IN: 512 OUT: 0 CHECKSUM: 64268 [6169ms] DBG ---- STATUS: 0 GOOD [6176ms] DBG ---- MESSAGE_IN [6176ms] DBG ------ IN: 0x00 [6178ms] DBG -- BUS_FREE [6178ms] DBG ---- SELECTION: 1 [6428ms] DBG scsi_accel_rp2040_finishRead(0x08 0x00 0x00 0x01 0x01 0x00 ) detected parity error [6429ms] DBG ---- COMMAND: Read6 [6430ms] DBG ------ OUT: 0x08 0x00 0x00 0x01 0x01 0x00 [6430ms] DBG ------ Read 1x512 starting at 1 [6431ms] DBG ---- DATA_IN [6432ms] DBG ------ Found 1 sectors in prefetch cache [6432ms] DBG ---- Total IN: 512 OUT: 0 CHECKSUM: 25088 [6433ms] DBG ---- STATUS: 0 GOOD [6439ms] DBG ---- MESSAGE_IN [6440ms] DBG ------ IN: 0x00 [6441ms] DBG -- BUS_FREE [6441ms] DBG ---- SELECTION: 1 [6691ms] DBG scsi_accel_rp2040_finishRead(0x08 0x00 0x00 0x02 0x01 0x00 ) detected parity error [6692ms] DBG ---- COMMAND: Read6 [6693ms] DBG ------ OUT: 0x08 0x00 0x00 0x02 0x01 0x00 [6693ms] DBG ------ Read 1x512 starting at 2 [6694ms] DBG ---- DATA_IN [6695ms] DBG ------ Found 1 sectors in prefetch cache [6695ms] DBG ---- Total IN: 512 OUT: 0 CHECKSUM: 63431 [6696ms] DBG ---- STATUS: 0 GOOD [6702ms] DBG ---- MESSAGE_IN [6703ms] DBG ------ IN: 0x00 [6704ms] DBG -- BUS_FREE [17450ms] DBG BUS RESET [21265ms] DBG ---- SELECTION: 1 [21518ms] DBG scsi_accel_rp2040_finishRead(0x01 0x00 0x00 0x00 0x00 0x00 ) detected parity error [21519ms] DBG ---- COMMAND: RezeroUnit [21519ms] DBG ------ OUT: 0x01 0x00 0x00 0x00 0x00 0x00 [21520ms] DBG ---- STATUS: 0 GOOD [21524ms] DBG ---- MESSAGE_IN [21525ms] DBG ------ IN: 0x00 [21526ms] DBG -- BUS_FREE [26807ms] DBG ---- SELECTION: 1 [27059ms] DBG scsi_accel_rp2040_finishRead(0x04 0x00 0x00 0x00 0x01 0x00 ) detected parity error [27060ms] DBG ---- COMMAND: FormatUnit [27061ms] DBG ------ OUT: 0x04 0x00 0x00 0x00 0x01 0x00 [27061ms] DBG ---- STATUS: 0 GOOD [27082ms] DBG ---- MESSAGE_IN [27082ms] DBG ------ IN: 0x00 [27084ms] DBG -- BUS_FREE [29847ms] DBG ---- SELECTION: 1 [30099ms] DBG scsi_accel_rp2040_finishRead(0x08 0x00 0x84 0xE9 0x01 0x00 ) detected parity error [30100ms] DBG ---- COMMAND: Read6 [30100ms] DBG ------ OUT: 0x08 0x00 0x84 0xE9 0x01 0x00 [30101ms] DBG ------ Read 1x512 starting at 34025 [30102ms] DBG ---- DATA_IN [30189ms] DBG ---- Total IN: 512 OUT: 0 CHECKSUM: 0 [30190ms] DBG ---- STATUS: 0 GOOD [30196ms] DBG ---- MESSAGE_IN [30196ms] DBG ------ IN: 0x00 [30198ms] DBG -- BUS_FREE [30257ms] DBG ---- SELECTION: 1 [30510ms] DBG scsi_accel_rp2040_finishRead(0x08 0x00 0x3F 0x9C 0x01 0x00 ) detected parity error [30511ms] DBG ---- COMMAND: Read6 [30511ms] DBG ------ OUT: 0x08 0x00 0x3F 0x9C 0x01 0x00 [30512ms] DBG ------ Read 1x512 starting at 16284 [30513ms] DBG ---- DATA_IN [30600ms] DBG ---- Total IN: 512 OUT: 0 CHECKSUM: 0 [30601ms] DBG ---- STATUS: 0 GOOD [30607ms] DBG ---- MESSAGE_IN [30608ms] DBG ------ IN: 0x00 [30609ms] DBG -- BUS_FREE [30668ms] DBG ---- SELECTION: 1 [30921ms] DBG scsi_accel_rp2040_finishRead(0x08 0x00 0x7F 0x9A 0x01 0x00 ) detected parity error [30921ms] DBG ---- COMMAND: Read6 [30922ms] DBG ------ OUT: 0x08 0x00 0x7F 0x9A 0x01 0x00 [30922ms] DBG ------ Read 1x512 starting at 32666 [30923ms] DBG ---- DATA_IN [31011ms] DBG ---- Total IN: 512 OUT: 0 CHECKSUM: 0 [31011ms] DBG ---- STATUS: 0 GOOD [31017ms] DBG ---- MESSAGE_IN [31018ms] DBG ------ IN: 0x00 [31019ms] DBG -- BUS_FREE [31078ms] DBG ---- SELECTION: 1 [31331ms] DBG scsi_accel_rp2040_finishRead(0x08 0x00 0x19 0xF1 0x01 0x00 ) detected parity error

BLUESCSI.ini [SCSI]

Settings that apply to all SCSI ids

Select a system preset to apply default settings

Known systems: "Generic", "MacPlus", "MegaSTE"

System="Generic" Debug = 1 # Same effect as DIPSW2, enables verbose log messages SelectionDelay = 250 # Millisecond delay after selection, 255 = automatic, 0 = no delay PhyMode = 1 # 0: Best available 1: PIO 2: DMA_TIMER 3: GREENPAK_PIO 4: GREENPAK_DMA

Dir = "/" # Optionally look for image files in subdirectory

Dir2 = "/images" # Multiple directories can be specified Dir1...Dir9

DisableStatusLED = 0 # 0: Use status LED, 1: Disable status LED

Settings that can be needed for compatibility with some hosts

Quirks = 4 # 0: Standard, 1: Apple, 2: OMTI, 4: Xebec, 8: VMS EnableUnitAttention = 1 # Post UNIT_ATTENTION status on power-on or SD card hotplug EnableSCSI2 = 0 # Enable faster speeds of SCSI2 EnableSelLatch = 0 # For Philips P2000C and other devices that release SEL signal before BSY Parity = 0

MapLunsToIDs = 0 # For Philips P2000C simulate multiple LUNs MaxSyncSpeed = 0 # Set to 5 or 10 to enable synchronous SCSI mode, 0 to disable

Peter

------ Original Message ------ From: "Eric Helgeson" @.> To: "BlueSCSI/BlueSCSI-v2" @.> Cc: "z80micro-mc" @.>; "Author" @.> Sent: Friday, 28 Apr, 23 At 15:14 Subject: Re: [BlueSCSI/BlueSCSI-v2] BlueSCSI.ini parity option ignored (Issue #27)

Looks like a bad merge renamed it to Parity - I'll fix it for next release, but should be a work around for the current release. You can find some details in the examples bluescsi.ini in the repo or an interactive builder at https://ini.bluescsi.com https://ini.bluescsi.com WIKI for V2 is very sparse - no information on BLUESCSI.INI configuration options. Nor details on what the various System types do. It's a wiki so contributions welcome! — Reply to this email directly, view it on GitHub https://github.com/BlueSCSI/BlueSCSI-v2/issues/27#issuecomment-1527637564 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCK64CKTPE46AYXHF5LB6DXDPGELANCNFSM6AAAAAAXPJGMP4 . You are receiving this because you authored the thread.Message ID: @.***>

z80micro-mc commented 1 year ago

Eric,

BTW is there a way to specify the disk size in number of blocks rather than chs?

Peter

------ Original Message ------ From: "Eric Helgeson" @.> To: "BlueSCSI/BlueSCSI-v2" @.> Cc: "z80micro-mc" @.>; "Author" @.> Sent: Friday, 28 Apr, 23 At 15:14 Subject: Re: [BlueSCSI/BlueSCSI-v2] BlueSCSI.ini parity option ignored (Issue #27)

Looks like a bad merge renamed it to Parity - I'll fix it for next release, but should be a work around for the current release. You can find some details in the examples bluescsi.ini in the repo or an interactive builder at https://ini.bluescsi.com https://ini.bluescsi.com WIKI for V2 is very sparse - no information on BLUESCSI.INI configuration options. Nor details on what the various System types do. It's a wiki so contributions welcome! — Reply to this email directly, view it on GitHub https://github.com/BlueSCSI/BlueSCSI-v2/issues/27#issuecomment-1527637564 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCK64CKTPE46AYXHF5LB6DXDPGELANCNFSM6AAAAAAXPJGMP4 . You are receiving this because you authored the thread.Message ID: @.***>

z80micro-mc commented 1 year ago

There are 2 aspects to Parity:

Parity genration Parity Checking.

These should be on separate flags or Parity shoud have a state setting: Off, generate but ignore, generate and check

Peter

mynameistroy commented 1 year ago

I'm not sure if I'm understanding this correctly but does this host actually care if parity is generated?

Parity is usually referred in the target device domain as ignored or checked that I am familiar with anyways. So it would only need a toggle between 2 states.

When parity is disabled it is actually failing the transfers or is it just reporting them in the debugging log as acknowledging that parity is invalid? ie just noise?

If it's failing the transfers than that is definitely still a problem!

z80micro-mc commented 1 year ago

Troy,

The BlueSCSI log.txt file ('Debug=1') have an entry at the end of each command that says that a parity error has been detected and operations fail.

The host neither generates nor checks parity (DP) is nc. This functions fine with most drives in particular the Quantum Pro40S has a jumper 'EP', if the link is present the drive checks parity (enable parity), if the link is missing then it ignores parity.

BlueSCSI v2 code seems to still check parity despite 'Parity=0', setting to ignore it.


log.txt extract

[10ms] Platform: BlueSCSI Pico [10ms] FW Version: 2023.04.10-release Apr 10 2023 19:08:58 Flash chip size: 2048 kB

=== SD Card Info === SD card detected, FAT32 volume size: 14776 MB SD Name: SD16G, MID: 0x27, OID: 0x50 0x48 [20ms] [20ms] === Global Config === [21ms] Reading configuration from bluescsi.ini [22ms] Active configuration (using system preset "Generic"): [22ms] -- SelectionDelay: 150 [23ms] DBG -- EnableUnitAttention is off [24ms] -- EnableSCSI2 is off [24ms] DBG -- EnableSelLatch is off [25ms] DBG -- MapLunsToIDs is off [25ms] -- Debug is enabled [25ms] -- Parity is disabled [26ms] DBG -- ReinsertCDOnInquiry is disabled [88ms] [88ms] === Finding images in / === [88ms] == Opening /HD10_512.HDA for ID: 1 LUN: 0 [95ms] DBG ---- Read prefetch enabled: 8192 bytes [95ms] ---- Image ready

...

[202ms] Initialization complete! [5462ms] DBG ---- SELECTION: 1 [5613ms] DBG scsi_accel_rp2040_finishRead(0x00 0x00 0x00 0x00 0x00 0x00 ) detected parity error [5614ms] DBG ---- COMMAND: TestUnitReady [5614ms] DBG ------ OUT: 0x00 0x00 0x00 0x00 0x00 0x00 [5615ms] DBG ---- STATUS: 0 GOOD [5621ms] DBG ---- MESSAGE_IN [5622ms] DBG ------ IN: 0x00 [5623ms] DBG -- BUS_FREE [5623ms] DBG ---- SELECTION: 1 [5773ms] DBG scsi_accel_rp2040_finishRead(0x00 0x00 0x00 0x00 0x00 0x00 ) detected parity error

...

[5937ms] DBG ---- COMMAND: Read6 [5938ms] DBG ------ OUT: 0x08 0x00 0x00 0x00 0x01 0x00 [5938ms] DBG ------ Read 1x512 starting at 0 [5939ms] DBG ---- DATA_IN [5941ms] DBG ---- Total IN: 512 OUT: 0 CHECKSUM: 64268 [5941ms] DBG ---- STATUS: 0 GOOD [5950ms] DBG ---- MESSAGE_IN [5950ms] DBG ------ IN: 0x00 [5952ms] DBG -- BUS_FREE [5952ms] DBG ---- SELECTION: 1 [6102ms] DBG scsi_accel_rp2040_finishRead(0x08 0x00 0x00 0x01 0x01 0x00 ) detected parity error

...

[113786ms] DBG ---- COMMAND: Write6 [113787ms] DBG ------ OUT: 0x0A 0x00 0x7E 0x07 0x01 0x00 [113787ms] DBG ------ Write 1x512 starting at 32263 [113788ms] DBG ---- DATA_OUT [113876ms] DBG scsi_accel_rp2040_finishRead(0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ... (total 512)) detected parity error [113879ms] DBG scsi_accel_rp2040_finishRead() detected parity error [113879ms] DBG ---- Total IN: 0 OUT: 512 CHECKSUM: 0 [113880ms] DBG ---- STATUS: 2 CHECK_CONDITION, sense 0x00004700 [113888ms] DBG ---- MESSAGE_IN [113888ms] DBG ------ IN: 0x00 [113890ms] DBG -- BUS_FREE [113894ms] DBG ---- SELECTION: 1 [114045ms] DBG scsi_accel_rp2040_finishRead(0x03 0x00 0x00 0x00 0x00 0x00 ) detected parity error

Peter

------ Original Message ------ From: "Troy" @.> To: "BlueSCSI/BlueSCSI-v2" @.> Cc: "z80micro-mc" @.>; "Author" @.> Sent: Sunday, 30 Apr, 23 At 01:42 Subject: Re: [BlueSCSI/BlueSCSI-v2] BlueSCSI.ini parity option ignored (Issue #27)

I'm not sure if I'm understanding this correctly but does this host actually care if parity is generated? Parity is usually referred in the target device domain as ignored or checked that I am familiar with anyways. So it would only need a toggle between 2 states. When parity is disabled it is actually failing the transfers or is it just reporting them in the debugging log as acknowledging that parity is invalid? ie just noise? If it's failing the transfers than that is definitely still a problem! — Reply to this email directly, view it on GitHub https://github.com/BlueSCSI/BlueSCSI-v2/issues/27#issuecomment-1528907451 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCK64G5LSF3CCM5NEFDLLDXDWYO7ANCNFSM6AAAAAAXPJGMP4 . You are receiving this because you authored the thread.Message ID: @.***>

mynameistroy commented 1 year ago

Alrighty, thanks for the clarification! So definitely still a bug and I can test it on a MegaSTE which is very dependent on parity being disabled.

I'll look into it and hopefully have a fix in place soon.

mynameistroy commented 1 year ago

I have an experimental build for you to try if you don't mind. The error message is still printed in the log but the error is ignored as expected. I've test it on my MSTE which requires disabled parity to function.

https://drive.google.com/file/d/1jUg6Oe0Ve-gWagrlIb5mWyBWLB1wHTXi/view?usp=share_link

z80micro-mc commented 1 year ago

Troy,

Many thanks it would now appear to be working on RM Nimbus.

It still logs the parity in the log when 'Debug=1' but nolonger fails the operation and does not report an error to the host.

When is it likely to be fully fixed including the debug o/p in a release version?

Again many thanks for the prompt fix.

Peter

------ Original Message ------ From: "Troy" @.> To: "BlueSCSI/BlueSCSI-v2" @.> Cc: "z80micro-mc" @.>; "Author" @.> Sent: Sunday, 30 Apr, 23 At 23:18 Subject: Re: [BlueSCSI/BlueSCSI-v2] BlueSCSI.ini parity option ignored (Issue #27)

I have an experimental build for you to try if you don't mind. The error message is still printed in the log but the error is ignored as expected. I've test it on my MSTE which requires disabled parity to function. https://drive.google.com/file/d/1jUg6Oe0Ve-gWagrlIb5mWyBWLB1wHTXi/view?usp=share_link https://drive.google.com/file/d/1jUg6Oe0Ve-gWagrlIb5mWyBWLB1wHTXi/view?usp=share_link — Reply to this email directly, view it on GitHub https://github.com/BlueSCSI/BlueSCSI-v2/issues/27#issuecomment-1529152431 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCK64GCC3QCQCV2OWWULI3XD3QMLANCNFSM6AAAAAAXPJGMP4 . You are receiving this because you authored the thread.Message ID: @.***>

mynameistroy commented 1 year ago

I suspect the fix itself will be in shortly however I don't believe in removing the error from being displayed at this time. As it is a parity error, it's just being chosen to ignore it at the time.

mynameistroy commented 1 year ago

PR #30 Is now ready

Thanks again for finding and testing it out Peter.

z80micro-mc commented 1 year ago

Troy,

I would prefer the error log to reflect the actual. However, as you prefer to report the parity error. When the reporting is updated I sugest that the log entry should change to say 'Parity violation detected but ignored' when Parity=0

Peter

------ Original Message ------ From: "Troy" @.> To: "BlueSCSI/BlueSCSI-v2" @.> Cc: "z80micro-mc" @.>; "Author" @.> Sent: Tuesday, 2 May, 23 At 02:29 Subject: Re: [BlueSCSI/BlueSCSI-v2] BlueSCSI.ini parity option ignored (Issue #27)

PR #30 https://github.com/BlueSCSI/BlueSCSI-v2/pull/30 Is now ready Thanks again for finding and testing it out Peter. — Reply to this email directly, view it on GitHub https://github.com/BlueSCSI/BlueSCSI-v2/issues/27#issuecomment-1530747866 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCK64FZS6OTVUXPSGCNA2LXEBPQBANCNFSM6AAAAAAXPJGMP4 . You are receiving this because you authored the thread.Message ID: @.***>

z80micro-mc commented 1 year ago

Troy,

Again, many thanks for the speedy response, I can now proceed further with my testing.

Peter

------ Original Message ------ From: "Troy" @.> To: "BlueSCSI/BlueSCSI-v2" @.> Cc: "z80micro-mc" @.>; "Author" @.> Sent: Monday, 1 May, 23 At 22:59 Subject: Re: [BlueSCSI/BlueSCSI-v2] BlueSCSI.ini parity option ignored (Issue #27)

I suspect the fix itself will be in shortly however I don't believe in removing the error from being displayed at this time. As it is a parity error, it's just being chosen to ignore it at the time. — Reply to this email directly, view it on GitHub https://github.com/BlueSCSI/BlueSCSI-v2/issues/27#issuecomment-1530383580 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCK64GLW3MACEY6CEC4HHDXEAW53ANCNFSM6AAAAAAXPJGMP4 . You are receiving this because you authored the thread.Message ID: @.***>

mynameistroy commented 1 year ago

re: the logging - Agreed, something like that would be more appropriate so in time I could see some changes around it in the future.

Glad it works and keep us posted on any further issues and hopefully they'll get resolved just as easily 😄