Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ diff VirtualBox-4.3.26/src/VBox/Devices/Storage/DevFdc.cpp VirtualBox-4.3.28/src/VBox/Devices/Storage/DevFdc.cpp
- 1740c1740
- < pos = fdctrl->data_pos;
- ---
- > pos = fdctrl->data_pos % FD_SECTOR_LEN;
- 1964c1964
- < /* XXX: should set main status register to busy */
- ---
- > fdctrl->msr &= ~FD_MSR_RQM;
- 2142c2142,2147
- < if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x80) {
- ---
- > /* This command takes a variable number of parameters. It can be terminated
- > * at any time if the high bit of a parameter is set. Once there are 6 bytes
- > * in the FIFO (command + 5 parameter bytes), data_len/data_pos will be 7.
- > */
- > if (fdctrl->data_len == 7 || (fdctrl->fifo[fdctrl->data_pos - 1] & 0x80)) {
- >
- 2145c2150,2152
- < fdctrl->fifo[0] = fdctrl->fifo[1];
- ---
- > /* Data is echoed, but not stored! */
- > fdctrl->fifo[0] = fdctrl->data_len > 2 ? fdctrl->fifo[1] : 0;
- > fdctrl->fifo[1] = fdctrl->data_len > 3 ? fdctrl->fifo[2] : 0;
- 2152,2157c2159,2160
- < } else if (fdctrl->data_len > 7) {
- < /* ERROR */
- < fdctrl->fifo[0] = 0x80 |
- < (cur_drv->head << 2) | GET_CUR_DRV(fdctrl);
- < fdctrl_set_fifo(fdctrl, 1, 0);
- < }
- ---
- > } else
- > fdctrl->data_len++; /* Wait for another byte. */
- 2222c2225
- < { FD_CMD_DRIVE_SPECIFICATION_COMMAND, 0xff, "DRIVE SPECIFICATION COMMAND", 5, fdctrl_handle_drive_specification_command },
- ---
- > { FD_CMD_DRIVE_SPECIFICATION_COMMAND, 0xff, "DRIVE SPECIFICATION COMMAND", 1, fdctrl_handle_drive_specification_command },
- 2284c2287
- < fdctrl->fifo[fdctrl->data_pos++] = value;
- ---
- > fdctrl->fifo[fdctrl->data_pos++ % FD_SECTOR_LEN] = value;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement