Need help restoring an image file to a CF card!

Started by 98digger, January 18, 2015, 08:33:45 AM

Previous topic - Next topic

98digger

Hello,

As of today, both my CF-IDE adapter and my CF card (Transcend 2GB) have arrived. My PC-9821 Ce2 is functional and working.

I downloaded a FreeDOS(98) .NHD from the below site:
http://mwlab.net/2014/08/pc-98-emu-hdd-image-fix.html

I modified the contents of the said .nhd file so that the neko project extended memory drivers would be used in place of the provided drivers. Below is the current CONFIG.SYS contents:

files=20
buffers=10
device=np2hma.sys
device=np2ems.sys
device=fdxms.sys
shell=command.com
dos=high


Strangely enough, I cannot get the Touhou games to run in an emulator using this .nhd file. If anyone knows what I might be doing wrong, please reply.

Anyways, I tried using NHC.exe to convert this FreeDOS(98) .nhd into something that is readable by WinImage. I've tried several different formats from within NHC.exe, but I still cannot create an output file that can be restored to the CF card and read properly. Every time, the PC-98 just froze at the RAM test and displayed the orange HDD indicator LED.

I got NHC.exe from: http://euee.web.fc2.com/tool/nhc.html#nhc

EDIT: I swapped the IDE cable with another one and now the solid HDD light is gone. It now boots, the light flickers after the RAM test, then the screen goes black and the HDD light stays solid. Nothing else happens; it probably cannot find the boot sector and gets locked up because of it.

Could anyone here possibly give me instructions on how to properly convert the .nhd using NCH and also on how to restore file to the CF card?

-Thanks

caius

#1
Well, .NHD HDD images should be ready to be used in emulators.Anyway, you need to convert the image from .NHD to raw format in order to write it back to a CF using WinImage (or better, use Win32DiskImager).I don't know if there are specific tool for this but all you have to do is remove the 512 byte header from the .NHD image.You can read more about here:

http://nfggames.com/forum2/index.php?topic=5463.0

98digger

Quote from: caius on January 19, 2015, 05:12:02 AM
Well, .NHD HDD images should be ready to be used in emulators.Anyway, you need to convert the image from .NHD to raw format in order to write it back to a CF using WinImage (or better, use Win32DiskImager).I don't know if there are specific tool for this but all you have to do is remove the 512 byte header from the .NHD image.You can read more about here:

http://nfggames.com/forum2/index.php?topic=5463.0

I went in with HxD and saw a block of text and characters near the top of the .NHD file (this appears to have been the header), which I erased. I then tried writing the image directly to the CF card, but now the PC-98 simply says "please insert system disk" after blinking the HDD indicator LED once.

I really have no idea what I'm doing here; does anyone have step-by-step instructions on how to convert/prepare the .nhd for writing to the CF card? I tried to use the NHC.exe tool to convert the file already, but there is no ".img" option for the output file, and none of the other formats seem to work.

If it helps, the .nhd is 128 MB large.

Thanks,
-98digger

caius

Could you post your HDD image here (compress it first) so we can take a look.Thanks.

98digger

Quote from: caius on January 19, 2015, 06:30:23 AM
Could you post your HDD image here (compress it first) so we can take a look.Thanks.

The image i am using is simply the 128MB .nhd I got off the below site, except with several games added to it:

http://mwlab.net/2014/08/pc-98-emu-hdd-image-fix.html

caius

OK.If you want to practice with your new PC-98, why don't you use a standard DOS image like the one posted here by 'kobushi'?It works great in my PC9821Ap2 and I think the same will do in your PC-9821Ce2
You can download HDD image from here:

http://nfggames.com/forum2/index.php?topic=5463.0

The 'kobushi' HDD image can be mounted also under Windows O.S. as a virtual disk so you can easily transfer games to it:

There's another cool thing about this image: it has a hybrid partition table created with the CONV98AT utility, which means it can be accessed directly on both a PC-9801 and a modern PC. You can either mount the image in Windows as a virtual disk, or write it to an SD/CF card and browse it like an ordinary flash drive. This makes it much easier to transfer files between your PC98 and modern PC. CONV98AT is included, so you can convert other PC98 hard disks in the same way.

98digger

Quote from: caius on January 19, 2015, 07:04:09 AM
OK.If you want to practice with your new PC-98, why don't you use a standard DOS image like the one posted here by 'kobushi'?It works great in my PC9821Ap2 and I think the same will do in your PC-9821Ce2
You can download HDD image from here:

http://nfggames.com/forum2/index.php?topic=5463.0

The 'kobushi' HDD image can be mounted also under Windows O.S. as a virtual disk so you can easily transfer games to it:

There's another cool thing about this image: it has a hybrid partition table created with the CONV98AT utility, which means it can be accessed directly on both a PC-9801 and a modern PC. You can either mount the image in Windows as a virtual disk, or write it to an SD/CF card and browse it like an ordinary flash drive. This makes it much easier to transfer files between your PC98 and modern PC. CONV98AT is included, so you can convert other PC98 hard disks in the same way.


Yes, I know about that image, but I generally like to avoid pirating if possible (I believe MS-DOS 6.2 is still under copyright by Microsoft), which is why I looked to FreeDOS(98) as an alternative.

The freedos .nhd was working fine in T98-Next, so I know that it is at least functional on an emulator. I've also seen several pictures of FreeDOS(98) running on real PC-98 before, so I know its possible.

I think that the main issue with the .nhd has something to do with the header; FreeDOS(98) does not use a fixed disk boot program like MS-DOS for PC-98 uses, but it still works in T98, so I think its fine without the boot selector.

caius


98digger

Quote from: caius on January 19, 2015, 08:43:05 AM
Try to restore this image using Win32DiskImager instead on WinImage:

https://www.mediafire.com/?2n12rwia8riertb

Hello,

It seems that Win32diskimager is a lot faster at writing than WinImage, so that helps.  :)

Anyways, it essentially has the same results as WinImage, but I've noticed something: The PC-98's "reaction" tends to differ depending on which output file I choose. The NHC.exe program allows for a .nhd to be converted into the following different file types:

-VMware VMDK
-VMware4 file (old)
-VMware4 2GB split (old)
-VMware3
-VMware2
-HyperV VHDX
-VirtualPC variable volume
-VirtualPC fixed size
-VirtualPC variable volume (old)
-VirtualPC fixed size (old)
-Parallels (Desktop 4 or later)
-Parallels extendable (old version)
-Bochs growing
-Bochs sparse
-QEMU qcow
-VirtualBox dynamically expanding
-ANEX86
-T98
-T98NEXT
-Virtual98
-PC98E
-Unz
-PartitionSaving uncompressed
-Bochs solid


Which one of these files should I choose as the output file? I tried a few already, but the reaction of the PC-98 always differs between (1.) refusing to move past the RAM check screen, (2.) displaying "Please insert system disk", or (3.) Blinking the HDD LED a few times and then cutting to black.

caius


98digger

Quote from: caius on January 19, 2015, 09:39:42 AM
Did you try to write  back the HDD image I posted the link of?

https://www.mediafire.com/?2n12rwia8riertb

Sorry, didn't realize it was in your post.

Anyways, its currently downloading (it will take an hour at this rate); I'll try writing it when its finished.

98digger

#11
Quote from: caius on January 19, 2015, 09:39:42 AM
Did you try to write  back the HDD image I posted the link of?

https://www.mediafire.com/?2n12rwia8riertb

The file you put up cannot be extracted by 7zip or Windows, could you use a different compression format?

I used Lubuntu and successfully extracted the RAW. I will try writing to the CF card tomorrow.

98digger

I restored the .img to the  CF card today. The PC-98 started up as usual, but after blinking the hard drive LED a few times, it displayed "NO SYSTEM FILES" on-screen while making a high-pitched beeping noise.

It looks as if the format of the CF card is correct, but the location of the OS and the boot sector are not correct.

98digger

I found a .hdi file that contains a game (which boots automatically) of FreeDOS(98). I copied COMMAND.COM and CONFIG.SYS onto the .hdi and removed all of the game's files, and then proceeded to add some games/tools to it. I think this .hdi might work, but I cannot figure out how to convert it into a RAW hard disk image before writing to the CF card; every attempt I've made results in the "Please insert system disk" error on the PC-98, which tells me it was not converted and written properly.

Site where I found this new .hdi: http://black.sakura.ne.jp/~sakai/metajo/mtj_zai_download.htm

caius

Hi, could you try the 'kobushi' HDD RAW image?Sso maye we can understand if your troubles depends from your system and not HDD images.

98digger

Quote from: caius on January 20, 2015, 10:31:06 PM
Hi, could you try the 'kobushi' HDD RAW image?Sso maye we can understand if your troubles depends from your system and not HDD images.


I can confirm that it is not the system that is the problem. Before the HDD failed (it started sounding like the bearings were breaking [shrieking metallic noises] and it could not be booted from), Windows 3.1 booted up without any issues.

I am 99% sure that the problem is with the way I am converting the hard disk images, because none of the images I burnt to the CF card that I had converted myself were actually recognized by the PC-98; only that FreeDOS(98) RAW you posted was recognized (But it was unable to boot due to a "no system files" error).

How were you able to convert the FreeDOS(98) image into the RAW format?

caius

Quote from: 98digger on January 21, 2015, 07:52:32 AM





How were you able to convert the FreeDOS(98) image into the RAW format?

I only took a RAW image deleting its content and transferring to it the files from the FreeDOS(98) image.Anyway tomorrow I will try to do a real conversion, the trick is deleting the header of the .NHD format.

98digger

Quote from: caius on January 21, 2015, 09:08:15 AM
I only took a RAW image deleting its content and transferring to it the files from the FreeDOS(98) image.Anyway tomorrow I will try to do a real conversion, the trick is deleting the header of the .NHD format.

Any luck yet with converting the FreeDOS(98) image?

caius

Quote from: 98digger on January 23, 2015, 12:07:58 PM
Any luck yet with converting the FreeDOS(98) image?

Sadly I didn't find yet the time to work on.I will do ASAP.

98digger

Quote from: caius on January 23, 2015, 09:12:34 PM
Quote from: 98digger on January 23, 2015, 12:07:58 PM
Any luck yet with converting the FreeDOS(98) image?

Sadly I didn't find yet the time to work on.I will do ASAP.

I did some more research and found that some guy has successfully booted FreeDOS(98) on his Epson PC-486 (PC-98 compatible):



The site provides no specifics on how this was done, however. It does at least provide us with solid evidence that FreeDOS(98) does in fact work on real hardware.

Also, when you convert the FreeDOS(98) image to a RAW, could you use the .NHD images posted here?:
http://mwlab.net/2014/08/pc-98-emu-hdd-image-fix.html
They contain a boot-related fix and an updated version of FreeCOM(98). I did try and erase the .NHD header myself with a hex editor, but I couldn't figure out where it starts and where it ends (I know close to nothing about hex coding).