Rant: Emulators
Re: Rant: Emulators
The mount -> copy -> unmount way does work, but it's still pretty lame that QEMU can't just recognize any boot floppy from virtual floppy drive (and I have no idea why, as it worked perfectly before and why else would there be support for an -fda \\.\A: option?) which would save the time of unmounting all the time.
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
Re: Rant: Emulators
Hi,
Use mtools and you don't need to mount the disk at all.
Cheers,
Adam
Use mtools and you don't need to mount the disk at all.
Cheers,
Adam
Re: Rant: Emulators
go dive into the qemu source and implement it then.. there is a reason its not implemented.. cause windows is dumb and doesn't treat block devices the same way as files...Creature wrote:The mount -> copy -> unmount way does work, but it's still pretty lame that QEMU can't just recognize any boot floppy from virtual floppy drive (and I have no idea why, as it worked perfectly before and why else would there be support for an -fda \\.\A: option?) which would save the time of unmounting all the time.
Re: Rant: Emulators
Well if Bochs can use a floppy drive (a physical one), there is no reason Qemu couldn't use one...earlz wrote:go dive into the qemu source and implement it then.. there is a reason its not implemented.. cause windows is dumb and doesn't treat block devices the same way as files...
Re: Rant: Emulators
That's what I thought, and the documentation says it can, by using something like 'fda \\.\A:' but QEMU just doesn't recognize it as a boot device then for some reason. It could also be a new bug occurring in the new version.ru2aqare wrote:Well if Bochs can use a floppy drive (a physical one), there is no reason Qemu couldn't use one...earlz wrote:go dive into the qemu source and implement it then.. there is a reason its not implemented.. cause windows is dumb and doesn't treat block devices the same way as files...
I've just compiled mtools with Cygwin, though I'm not really sure how to use it, it keeps giving me a list of commands (I'll search for some documentation soon).Hi,
Use mtools and you don't need to mount the disk at all.
Cheers,
Adam
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
Re: Rant: Emulators
The way I see it is we are extremley fortunate to even have emulator options, because without them Im pretty sure most of us would have no chance at OS development. You cannot debug by testing on a PC. Ive never had a problem with Bochs, but if it does have some minor problems, there is enough in there that you can figure another way to find what you want.
Re: Rant: Emulators
Um, really? What about implementing serial port support and doing remote GDB debugging? Or using debugging printfs/printks? Stack tracing isn't too hard to implement either. You could throw all your debug statements out a serial port (and have that serial port be attached to another computer, or just an old line printer). The only problem here is the need for some extra equipment, but you should really have that anyway. How many people that are developing their own OS don't have a second PC to test on?yemista wrote:You cannot debug by testing on a PC.
Of course, you can always implement an in-kernel debugger as well. All of these techniques are covered on our very own wiki, and other threads on these forums as well. Debugging your OS code by testing on a PC is not only doable, but it's also something that must be done, or you end up with an OS that runs correctly only on your computer. Although I'm sure that's fine for some people.
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: Rant: Emulators
Yes, but debugging like that every time you change the littlest thing is quite annoying and time consumming, especially early on when you make plenty of mistakes that cause triple-faults and such (which will not be caught by in-kernel debugging). It is possible to develop an OS without an emulator, but having one does make it a lot easier.
Re: Rant: Emulators
Sure it's time consuming and perhaps even a bit harder, but that's not the point I was arguing. It was said that it's not possible, and it certainly is. In fact, it's even needed. Neither qemu nor bochs correctly emulate all aspects of an x86 CPU. It's completely possible to write code that will work in an emulator, but not on real hardware. When that happens, you'll need to be able to debug your code on a real PC. Time consuming or not, it's best to take the extra time and steps to test your code often on a real PC, even at the low levels.JohnnyTheDon wrote:Yes, but debugging like that every time you change the littlest thing is quite annoying and time consumming, especially early on when you make plenty of mistakes that cause triple-faults and such (which will not be caught by in-kernel debugging). It is possible to develop an OS without an emulator, but having one does make it a lot easier.
Re: Rant: Emulators
I noticed when using VFD and QEMU on Windows, I had to insert a delay between copying my kernel to A: and starting QEMU. I done this simply using a pause in the batch file. By the time I press the key a long enough delay has elapsed.
It seemed like Windows didn't want to grant the exculsive access to the floppy device as it was probably still writing the data when QEMU tried to open it.
-fda "\\.\a:" works for me in 0.9 atleast. I use QEMU and VFD on a daily basis with no mounting/unmounting.
It seemed like Windows didn't want to grant the exculsive access to the floppy device as it was probably still writing the data when QEMU tried to open it.
-fda "\\.\a:" works for me in 0.9 atleast. I use QEMU and VFD on a daily basis with no mounting/unmounting.
All your base are belong to us.
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: Rant: Emulators
For copying a file to an image:I've just compiled mtools with Cygwin, though I'm not really sure how to use it, it keeps giving me a list of commands (I'll search for some documentation soon).
Code: Select all
mcopy -i <image> <path_to_file_to_copy> ::/<path_to_destination>
Code: Select all
mmd -i <image> <folder name> ::/
Code: Select all
mcopy <file> A:/<path-to-file>
Re: Rant: Emulators
Hmmm.. that sounds rather interesting, I'll give it a try later today, thanks .
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.