PiSCSI / piscsi

PiSCSI allows a Raspberry Pi to function as emulated SCSI devices (hard disk, CD-ROM, and others) for vintage SCSI-based computers and devices. This is a fork of the RaSCSI project by GIMONS.
https://piscsi.org
BSD 3-Clause "New" or "Revised" License
545 stars 82 forks source link

Honor sector size change via ModeSelect6 in scsicd #1406

Closed kkaempf closed 10 months ago

kkaempf commented 11 months ago

DEC's VMS can't handle 2k sector sizes.

Fixes #1397

rdmark commented 10 months ago

@kkaempf The logic looks reasonable to me!

Since you've gotten the hang of the googletest unit tests now (to some extent at least ;) ), have you thought about how SCSICD::ModeSelect can be tested?

kkaempf commented 10 months ago

Since you've gotten the hang of the googletest unit tests now (to some extent at least ;) ),

🤣

have you thought about how SCSICD::ModeSelect can be tested?

Working on it ... I'd need to test ModeSense (check if scsicd sector size is 2048), ModeSelect (set to 512), and ModeSense again (verify sector size is 512).

kkaempf commented 10 months ago

Now with test 🤡

Requires #1405 to be merged first !

rdmark commented 10 months ago

@kkaempf The other PR has been merged now so please rebase this one!

Also, note that I changed the base branch from main to develop. All new development happens in the latter. You may need to do some resetting of HEAD and force pushing to get back to a clean changeset.

kkaempf commented 10 months ago

Well, that escalated a bit. 🤯 Changing the sector size also affect CD track and Disk cache sizes. Re-create both when changing the sector size.

sonarcloud[bot] commented 10 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
94.7% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud