Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic while formatting floppy in Windows 2000 #123

Closed
Vort opened this issue Nov 7, 2023 · 10 comments
Closed

Panic while formatting floppy in Windows 2000 #123

Vort opened this issue Nov 7, 2023 · 10 comments

Comments

@Vort
Copy link
Contributor

Vort commented Nov 7, 2023

When I execute command format a: in Windows 2000 (or Windows XP), Bochs shows error could not perform lseek() to -512 on floppy image file.

bochs_format_panic

Version: 75d076b.

@fysnet
Copy link
Collaborator

fysnet commented Nov 7, 2023

I had some issues with the FDC code on older Guests, so I went investigating. I found a few errors and one thing led to another and I have a considerable update for the FDC emulation. The Format function was my next focus. I will look into this.

Thanks.

@fysnet
Copy link
Collaborator

fysnet commented Nov 8, 2023

I can confirm this error. However, with my new updates, this error has been remedied. As soon as I do some more testing and verify that my new updates work on all disk types and sizes, I will post a PR.

@Vort
Copy link
Contributor Author

Vort commented Nov 8, 2023

@fysnet do you know about OmniFlop program? May be useful for testing.

@fysnet
Copy link
Collaborator

fysnet commented Nov 8, 2023

I had not. I will have a look. Thank you.

@fysnet
Copy link
Collaborator

fysnet commented Nov 16, 2023

@Vort, please have a look at PR #135. It drastically enhances the floppy emulation, which should fix the issue you show here.
While you are at it, please test the new emulation and let me know if you find any errors.
I tested it with many guests in many instances and different types and disk sizes, however, since it is a drastic change, all the testing I can get will help.

@Vort
Copy link
Contributor Author

Vort commented Nov 16, 2023

should fix the issue you show here

I confirm fix for lseek() to -512 problem, thanks.

please test the new emulation and let me know if you find any errors

I'm not that experienced to test properly such huge change.
But I made few tests and found two problems.

  1. Not related to your changes, it was like that before. If I press Reset button in UI while floppy is accessed, "green light" stays on after restart.
  2. Partially related to your changes. I tried to use 360K floppy in 1.2M drive. DOS was working fine with it, but when I booted to WinXP, and tried to access floppy, OS displayed controller error or something like that. Before your changes, it asked to format floppy - not better. I decided to check this scenario on real hardware: floppy drive was producing weird noises for quite time, but eventually WinXP showed correct files on disk.

@fysnet
Copy link
Collaborator

fysnet commented Nov 17, 2023

  1. I can confirm this. It should be a quick fix in the gui code. I will see about adding a PR for it.
  2. Disks of 360k and smaller never really worked well in WinXP and newer. Somewhere around WinXP SP1, Microsoft "divided" the floppy driver into two, a FDC driver and a floppy disk driver, to accommodate USB floppy drives. This is when 360k disks stopped working. Depending on the version of WinXP and the drive (a 1.2Meg drive or a 360k drive), you would either get a "format drive" response, as your 'before' note, or a 'disk i/o error', as the 'after'/current response.

I don't wish to find out why 360k disks don't work on WinXP. They work just fine in Win98 and before. (where the floppy driver was still a single driver)

Thank you though for the comments. I will look into the first one. (See PR #136)
Ben

@Vort
Copy link
Contributor Author

Vort commented Nov 17, 2023

This is when 360k disks stopped working.

Not in the best way, but they work on my real hardware.
I checked - XP SP3 is installed there, same as in virtual machine.
However, I'm not sure if original driver is used on real hardware or driver from OmniFlop.

I don't wish to find out why 360k disks don't work on WinXP.

I can agree that this is low priority problem.

stlintel pushed a commit that referenced this issue Nov 17, 2023
When the user presses the "Reset" button on the gui ribbon, we need to
clear the active status of all statusbar items or they remain set after
the reset occurs.
This is mentioned in issue #123
@fysnet
Copy link
Collaborator

fysnet commented Nov 21, 2023

I believe this issue can be closed? Thanks again for your efforts. They are appreciated.

@Vort
Copy link
Contributor Author

Vort commented Nov 21, 2023

Can be closed after merge of #135.

stlintel pushed a commit that referenced this issue Nov 21, 2023
This improves and enhances the floppy emulation.
This adds the ability to specify a controller type.
This adds all but one, known, controller command.
This fixes the format command. Issue #123 
This fixes the error with older Windows guests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants