Skip to content

Quirks for PC-9801-55 and derivatives #360

@s-rakowski

Description

@s-rakowski

Hi, and thank you for working on this great project.

Recently I've been trying to get BlueSCSI v2 to work with a NEC PC-9801FA, with its dedicated PC-9801FA-02 SCSI-1 controller. The original HDD is missing. Apparently, the dedicated controller is internally the same as the PC-9801-55 board, but I don't have that one, so I can't confirm if, for example, its ROM is different. Nevertheless, both controllers require putting Vendor=NEC in the INI file, as well as specific geometry settings.

However, even after configuring the documented settings, I couldn't get the emulated HDD to be detected.

When I made the BlueSCSI debug all the commands, I have noticed that the initiator sends a single Mode Sense 6 command, allocating 64 bytes for the answer: 0x1A 0x00 0xFF 0x00 0x40 0x00. With the current firmware, even with Toolbox disabled, the "Rigid disk geometry page" was never actually sent, and the controller would never try again.

I've noticed that this project has a separate Mode Sense implementation for PC-98: https://github.com/ztto/ArdSCSino-stm32/blob/master/src/ArdSCSIno.cpp#L1434

So I tried hacking on BlueSCSI, using the source above as a reference, and doing all of the following made it work:

  • Commenting out Disconnect-reconnect page
  • Commenting out Vendor page (0x00)
  • Setting Interleave value in Format Device page to 0
  • Explicitly setting block count in Block Descriptor to scsiDev.target->cfg->scsiSectors
  • Setting bytes 2 and 3 (Tracks per zone) of Format Device page to scsiDev.target->cfg->headsPerCylinder (I don't really get this one, but that's what the ArdSCSino code above does, and leaving this field set to 0 prevents the HDD from being properly detected)

With all of the above, all returned Mode Sense pages now fit in 64 bytes, and everything seems to be working fine.

Of course, none of this is probably supposed to be the default behavior, but I think about making a PR that would add a dedicated Quirks flag to enable those hacks. Do you think it would be a good idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions