Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
08751 Media Support Major Always Sep 1, 2023, 15:02 Jan 5, 2024, 11:30
Tester Wayder View Status Public Platform MAME (Official Binary)
Assigned To Resolution Open OS Windows 10/11 (64-bit)
Status [?] Acknowledged Driver
Version 0.254 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 08751: x68000: If a SCSI hard disk is loaded, the floppy disk cannot be accessed.
Description If a SCSI hard disk (.hds) is loaded, the floppy disk cannot be accessed.
It worked until Ver. 0.253.
Steps To Reproduce
Additional Information
Github Commit
Regression Version
Affected Sets / Systems x68000
Attached Files
png file icon 0253_nofd.png (20,027 bytes) Sep 8, 2023, 13:07 Uploaded by Wayder
png file icon 0253_infd.png (32,840 bytes) Sep 8, 2023, 13:07 Uploaded by Wayder
txt file icon req_sense-error.log.txt (508,738 bytes) Jan 5, 2024, 11:29 Uploaded by grantek
Verbose log with mostly vanilla MAME (REQUEST SENSE hooked up)
[Show Content]
txt file icon reverted-mb89352-error.log.txt (173,820 bytes) Jan 5, 2024, 11:30 Uploaded by grantek
Verbose log from MAME HEAD with mb89352.cpp restored and hooked up
[Show Content]
There are no relationship linked to this issue.
User avatar
Sep 4, 2023, 08:39
Corrected some entries.
User avatar
Senior Tester
Sep 6, 2023, 15:01
edited on: Sep 6, 2023, 15:14
Unable to confirm, because "Steps to Reproduce" info is missing.
User avatar
Sep 8, 2023, 13:08
edited on: Sep 8, 2023, 13:12
ex: x68ksupr
(Same for X68000 (via cz6bs1), x68kxvi and x68030)

Set (Load) hard1 (SCSI HDD Image) and reset

Version 0.253 or earlier
Displays Message prompting insertion of floppy disk.

Version 0.254 or later
Nothing displayed.

Set (Load) hard1 (SCSI HDD (.hds) Image), frop1 (.xdf Image) and reset

Version 0.253 or earlier
floppy and hard disk are loaded.

Version 0.254 or later
Not working.
User avatar
Sep 8, 2023, 21:25
edited on: Sep 8, 2023, 21:27
Can confirm that something's wrong with the File Manager in this driver.

For example:
-Load x68000 strider
-Once inside the emulation, go to the File Manager and load a floppy to `floppydisk2`.
-The disk which was loaded to `floppydisk1` will be gone now.
User avatar
Senior Tester
Sep 9, 2023, 01:39
I still can't confirm, because I don't have any .hds files.

x68ksupr and x68kxvi are marked as not working.

Tried a few games and disk swaps with the x68000, no notable problems found.

With strider specifically, it unloads the system disk by itself at start then complains about it. I was not able to get it to load again as the file manager seems to be not working as I'd expect at this point.

I'll set this report as acknowledged.
User avatar
Sep 9, 2023, 22:56
It ejects the system disk as a prompt to insert disk b/3 into that drive.
User avatar
Jan 5, 2024, 11:27
I looked at this a bit from the CZ-6BS1 ("external" SCSI, which conflicts with the "internal" SCSI on models that have it), it started on the switchover from a scsihle implementation of the MB89352 to an NSCSI implementation in mb87030.cpp:

I reverted back to the scsihle implementation at HEAD and it works, but I don't know how willing the devs are to restoring a deleted file:

(I reverted the implementation in the internal-SCSI models as well because the implementations use the same device name, but they could technically be split out).

From what I can see it's the external SCSI ROM (0xEA0020-0xEA1FFF) hanging on initialisation of the drive before the boot process starts.

The NSCSI implementation seems to basically work, I enabled verbose logging on both and got stumped when I saw the X68K is doing a different sequence of SCSI commands on the different SCSI controllers:

Old working mb89352.cpp before the switch, as well as with the old file restored into HEAD (reverted-mb89352-error.log):

- INQUIRY, requesting 0x20 bytes (up to "ST225N" in t10sbc.cpp)
- READ CAPACITY, returning last sector 0x0018494F and 512 bytes/sector
- READ LBA 0x00, 1 block
- READ LBA 0x04, 1 block
- READ LBA 0x40, 1 block

NSCSI implementation in mb87030.cpp, with the REQUEST SENSE command hooked up in nscsi/hd.cpp (req_sense-error.log):

- TEST UNIT READY once only
- REQUEST SENSE, requesting 3 bytes of sense data (this isn't hooked up in MAME head but hooking it up doesn't change anything)
- INQUIRY, requesting 0x24 bytes (including the 4-byte version field "1.00")
- READ CAPACITY, returning the same last sector 0x0018494F and 512 bytes/sector
- READ LBA 0x04, 2 blocks
   - SCSI Transfer Counter is set to 1024 but stops when it gets down to 728 (296 bytes)

Some things I've tried while troubleshooting this:

- Hooking up the DMA read and write callbacks - _Outside X68000_ says the CZ-6BS1 uses DMA channel 1, but the old implementation worked without DMA at all.
- Hooking up the DMA request line - the schematic on _Outside X68000_ shows this doesn't even connect to the expansion slot, it's only routed through some logic on the board to enable the data path.
- Hooking up the REQUEST SENSE command in the NSCSI hd.cpp.

None of these really had an effect even though the REQUEST SENSE actually returned some data, but my patches for it are at:

Some other things I tried:

- Changing the "version" byte in the INQUIRY response to match t10sbc.cpp.
- Changing the first byte in the INQUIRY response to something other than a SBC direct-access drive.
  - This seems to break out of the ROM initialisation and the floppy starts to boot, but the SCSI driver on the floppy fails with "Format differs".
  - The INQUIRY command gets run again from the SCSI driver on the floppy, requesting 0x20 bytes this time.
  - Detecting this and sending the correct INQUIRY the second time, the SCSI driver just hangs on initialisation after the INQUIRY and no further commands are sent.
- Removing all low level delays and bumping the SELECT timeout in nscsi_bus.cpp.

The command I used to launch MAME across all of these tests was:

./x68000 -inipath . x68000 -window -flop1 ~/MasterDisk_V2.xdf -exp1 cz6bs1 -hard1 ~/X68000.hds -log [-debug]