Previous 199869 Revisions Next

r31197 Saturday 5th July, 2014 at 17:30:20 UTC by Mike Naberezny
(MESS) corvushd: Fixed prep mode verify drive command. [Mike Naberezny]
The verify drive command (0x07) is used by the "format check" options
of both the Corvus diagnostics program and the SSE HardBox configure
program.  Previously, format check would halt with an error because we
did not return a valid response for the verify drive command.  Format
check now completes successfully and reports no bad sectors.
[src/emu/machine]corvushd.c corvushd.h

trunk/src/emu/machine/corvushd.c
r31196r31197
10201020               m_buffer.drive_param_response.status =
10211021                  corvus_format_drive(m_buffer.format_drive_revbh_command.pattern, m_offset - 512);
10221022               break;
1023            case PREP_VERIFY:
1024               m_buffer.verify_drive_response.status = STAT_SUCCESS;
1025               m_buffer.verify_drive_response.bad_sectors = 0;
1026               break;
10231027            default:
10241028               m_xmit_bytes = 1;
10251029               m_buffer.single_byte_response.status = STAT_FAULT | STAT_FATAL_ERR;
r31196r31197
12411245   corvus_prep_cmd[PREP_FILL_DRIVE_OMNI].recv_bytes = 3;
12421246   corvus_prep_cmd[PREP_FILL_DRIVE_OMNI].xmit_bytes = 1;
12431247   corvus_prep_cmd[PREP_VERIFY].recv_bytes = 1;
1244   corvus_prep_cmd[PREP_VERIFY].xmit_bytes = 0;
1248   corvus_prep_cmd[PREP_VERIFY].xmit_bytes = 2;
12451249   corvus_prep_cmd[PREP_READ_FIRMWARE].recv_bytes = 2;
12461250   corvus_prep_cmd[PREP_READ_FIRMWARE].xmit_bytes = 513;
12471251   corvus_prep_cmd[PREP_WRITE_FIRMWARE].recv_bytes = 514;
trunk/src/emu/machine/corvushd.h
r31196r31197
425425         UINT8   code;       // Command Code
426426         UINT8   pattern[512]; // Pattern to be written
427427      } format_drive_revbh_command;
428      //
429      // Verify Drive command (Prep Mode 0x07)
430      //
431      // On the real Corvus controller, this is a variable length response.  If the
432      // number of bad sectors is greater than zero, an additional four bytes will
433      // follow for each bad sector.  We don't emulate bad sectors, so we always
434      // return a count of 0.  That makes this a fixed length response of 2 bytes.
435      //
436      struct {
437         UINT8   status;       // Disk access status
438         UINT8   bad_sectors;  // Number of bad sectors (always zero)
439      } verify_drive_response;     
428440   } m_buffer;
429441
430442   // Structure of Block #1, the Disk Parameter Block

Previous 199869 Revisions Next


© 1997-2024 The MAME Team