diff options
author | 2021-08-12 15:42:28 -0700 | |
---|---|---|
committer | 2021-08-12 15:42:28 -0700 | |
commit | b8fd5660cc94461195f6e2d319394fe16b6507b5 (patch) | |
tree | dd853221a8dbfe2362b98d362410f85453ece54b | |
parent | f7c38c2fa01a0f86bea3a941ea785eb990f017ea (diff) |
ch376.cpp: fix mount status and entry formatting [Peter Ferrie]
- BOOTi can now find .DO and .PO files
- BOOTi can now boot HDVs
-rw-r--r-- | src/devices/machine/ch376.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/devices/machine/ch376.cpp b/src/devices/machine/ch376.cpp index a22005ad9c1..8c13833292e 100644 --- a/src/devices/machine/ch376.cpp +++ b/src/devices/machine/ch376.cpp @@ -197,7 +197,7 @@ void ch376_device::write(offs_t offset, u8 data) break; case CMD_DISK_MOUNT: - m_int_status = STATUS_USB_INT_CONNECT; + m_int_status = STATUS_USB_INT_SUCCESS; break; case CMD_FILE_OPEN: @@ -471,6 +471,8 @@ bool ch376_device::generateNextDirEntry() return generateNextDirEntry(); } + std::fill_n(&m_dataBuffer[1], 11, 0x20); + int baseLen = std::min(8, dotIdx); for (int idx = 0; idx < baseLen; idx++) { @@ -488,7 +490,7 @@ bool ch376_device::generateNextDirEntry() dotIdx++; for (int idx = 0; idx < 3; idx++) { - if ((idx + dotIdx) > strlen(ourEntry->name)) + if ((idx + dotIdx) >= strlen(ourEntry->name)) { break; } |