Jump to content
  • Advertisement
Sign in to follow this  
Decrius

PartCopy: Failed to write destination at offset 0

This topic is 3647 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I've been trying to get along with this tutorial: http://www.brokenthorn.com/Resources/OSDevIndex.html made by Crypter on this forum. Excellent resource center, except that PartCopy does not work for me. I first start up the virtual floppy drive, then compile the ASM code using NASM to flat binary. Then I try to copy it to the first sector of the floppy, and run it in Bochs. This is what I get: C:\Documents and Settings\*\Bureaublad\OS>"F:\Program Files\PartCopy\part copy" boot1.bin 0 200 -f0 Failed to write destination at offset 0 C:\DOCUME~1\*\BUREAU~1\OS>PAUSE Druk op een toets om door te gaan. . . What is wrong? One of this forum said a simple reboot would fix it, didn't work. I can't find any info out on the net aswell. I run a WinXP32 home edition... Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Is there a virtual disk in the drive? Double click your virtual drive in My Computer to open it. (ie, if your drive is A:, just double click it) Does any error come up?

That PartCopy error may appear if there is no disk in the drive.

Share this post


Link to post
Share on other sites
It does appear as A:, but when I click it, it says "Place a medium in the floppy drive" (translated). So I guess it's not running.

VFD says:
The VFD driver is installed.
The VFD driver is started.
Drive 0: A virtual floppy image is opened.

Do I have to select an image file?

Share this post


Link to post
Share on other sites
What happens when you attempt to format the drive from within VFD?

VFD is saying that the floppy image is opened, but Windows is not seeing it. So I want to see what happens when VFD tries to format the floppy image.

Also, what version of Windows do you have? WinXP SP2 32bit?

Share this post


Link to post
Share on other sites
It formats it perfectly fine, even after doing so Windows tells me to place something in the floppy drive.

Share this post


Link to post
Share on other sites
Wait...Something is not right with that image. VFD is not set up to use any drive letter.

Next to Drive Letter, hit the change button and select drive A: in the box that comes up. Also check the Persistent / Global check box. Then hit OK to close the box.

Afterwords it should read something similar to A (Persistent / Global) next to Drive Letter.

VFD opens a virtual drive 0 and works with it just fine. This means nothing to Windows as it does not have an associated drive letter to it--which is where the problem is at.

Other then the above, everything else looks fine.

Share this post


Link to post
Share on other sites
Excellent, somehow A: was occupied (while I don't have a floppy drive!) so I made one for B:

Works now :), thanks a lot.

Might be a good idea to add this to your tutorial ;)

Also, what steps should I follow so the bin file copied by PartCopy is savely deleted, or should I not be bothered by that? (do I need to format it before closing?)

Share this post


Link to post
Share on other sites
I personally would not worry too much about that. Because PartCopy copies your file to your virtual disk, as soon as you close the floppy driver using VFD, all of those copied files will be gone, even all of the other files copied or created there.

Also, are you planning on using MSVC++ for the kernel? If so, please take note that I am going to be updating all tutorials and demos that use MSVC++ do to a kernel parsing bug I found (and fixed) today in the bootloader.

Share this post


Link to post
Share on other sites
Quote:
Original post by Crypter
I personally would not worry too much about that. Because PartCopy copies your file to your virtual disk, as soon as you close the floppy driver using VFD, all of those copied files will be gone, even all of the other files copied or created there.

Also, are you planning on using MSVC++ for the kernel? If so, please take note that I am going to be updating all tutorials and demos that use MSVC++ do to a kernel parsing bug I found (and fixed) today in the bootloader.


Nope, I use CodeBlocks :). Might use MSVC++ in future...unsure, but for the final release I will probably not use the MSVC++ compiler.

Error I got in part 3 of the bootloader (or 2?), was the use of 2 org's. The part where the bootloader would switch to a second bootloader on the next section.

Also, I guess PartCopy has to be modified, so it will copy the whole bootloader even if it's bigger then 512 (200h) bytes...

And, you might want to re-read and fix the language errors :P, quite some of them in it ;).

Just some tips :)

Share this post


Link to post
Share on other sites
Quote:
Also, I guess PartCopy has to be modified, so it will copy the whole bootloader even if it's bigger then 512 (200h) bytes...

You can just change the PartCopy command line to do that :) It doesnt matter though as the BIOS will only load the first 512 bytes in memory regardless of whats on disk.

Quote:
And, you might want to re-read and fix the language errors :P, quite some of them in it ;).

hehe... I know about that ^^

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!