PC9801 with Gotek & HxC CUSB

HxC Floppy Emulator on PC88 / PC98 and compatible support
Post Reply
jmp49152
Posts: 8
Joined: Tue Oct 11, 2022 5:36 pm

PC9801 with Gotek & HxC CUSB

Post by jmp49152 »

I have success to report, so I will share with others.
I bought a VFO board from Japan using a proxy buyer service :-
https://www.fromjapan.co.jp/en/item/search/pc-98+vfo/

This is a incredibly useful guide to the process, from the people who make the above vfo boards, translated because I don't speak Japanese.
https://www-amy-hi--ho-ne-jp.translate. ... r_pto=wapp

If you are stuck with kanji output you do not understand, google translate on a mobile phone can be used to translate a monitor output in real time. It works well enough to understand menus and output.

With this, and straight FDD cables (not pc/at twisted fdd cable), I can boot my PC9801UV directly into HFE images as the boot disk.

Using HxC Floppy Emulator software, https://hxc2001.com/download/floppy_dri ... r_soft.zip
I can take images from the PC-98 software collection and convert them from .FDI or .D88 to HFE. Even the pc9801 with its ancient v30 cpu is a nice retro computer with colour and sound. A lot of the images in the collection have problems and won't boot or convert, but most are ok.

For the HxC drive itself, I have both a Gotek with HxC firmware, and also a HxC CUSB latest version. Both work fine as single drives.
I'm experimenting how I can have both in the machine at the same time, as its written that if you have a vfo on the PC98's FDD interface, you cannot mix the original disks on the same cable. I'm waiting for some IDC plugs to arrive to crimp up a straight cable with multiple plugs on it to experiment further.

To copy from diskettes to a image, its possible with DD under linux, I'll experiment more when I have time to convert the working HFE drives to .img and use DD to write them to diskettes to see if its possible. So far I can read and write a real fdd, but I can't take this DD .img and convert it to HFE to use in the HxC drive.
This link I found helpful -
https://blog.soykaf.com/post/writing-pc ... der-linux/

I hope this helps someone, its been a long journey getting this far.

jmp49152
Posts: 8
Joined: Tue Oct 11, 2022 5:36 pm

Re: PC9801 with Gotek & HxC CUSB

Post by jmp49152 »

And after some further experimentation, I now two drives working.
I have a straight cable from the pc98 motherboard to the VFO, then the original 9801 floppy cable with two heads to the both cusb and gotek/hxc, and its working fine. So just one vfo needed for both drives.
If I put the vfo on the original two head cable in position 2, the original fdd drives do not work because the vfo interferes with them somehow. I have a 3 mode usb fdd drive and I can take dd dumps of the original diskettes I have using that.

Now to understand how to convert the raw .img disks I have made dumps of with dd into working HFE diskettes to use in the emulated drives.

jmp49152
Posts: 8
Joined: Tue Oct 11, 2022 5:36 pm

Re: PC9801 with Gotek & HxC CUSB

Post by jmp49152 »

I tried and failed with a number of methods to dump the diskettes I use to boot my machine, but I'll document the attempts here in case it assists anyone else.
First I installed a scsi card and connected a SCSI2SD emulator to it, so I could boot the pc-98 from hard (well sd card) disk but keep the original floppy drives in. Then I tried mahalito to dump the disks, but it produced undersized files and unreadable images when transfered to a windows machine to convert.

Second attempt was using NFDMAKE which is included in the T98-NEXT emulator package, running right on the PC-98 hardware and using the FD1135 drives to read the diskette.
Using NFDMAKE -r1d 0 filename.NFD a image was produced that when loaded into the HxC floppy converter, produced a disk with all the correct files when browsed, but which failed to boot the PC-98.
I tried also with make_hd from the P88SR emulator, again running on the native PC-98 hardware, which unlike its name suggests is for taking dumps of PC-98 diskettes.

Finally I got a greaseweasel and took a dump using gw read test2.scp --format ibm.720 --drive 1 on my linux pc, with a 3 mode fdd reading the disk, but as it turned out I believe I didn't need it to be 3 mode in the end as the flux image software doesn't care about speed etc.
This produced a dump called test2.scp, but that still would not convert to a HFE image correctly. It did the same as the NFDMAKE dump and had the files but no system images.
And finally thanks to the post here viewtopic.php?f=21&t=3962
I passed the .scp image through pfi compiled under linux with pfi test2.scp -p scale 0.8333 dest.scp
Finally I loaded this as a image into the newest HxC disk software on a windows machine and exported a .HFE to a usb stick, and it booted the PC-98. I'll try the same image with the CUSB as well as the gotek and report back.

I believe the diskette in question has some odd copy protection early on in the floppy, and you have to read it as a real pc98 diskette for the initial few sectors to get the boot loader working, then it switches to a more normal pc format.
I started this because I have for hobby purposes a Sodick BF275 wire edm, which has a PC-9801UV inside it. I now own 3 pc-9801's imported from Japan, and a retro habit, so the hard disk and scsi & network cards I picked up along the way will probably come in useful for that :)

jmp49152
Posts: 8
Joined: Tue Oct 11, 2022 5:36 pm

Re: PC9801 with Gotek & HxC CUSB

Post by jmp49152 »

And one last problem before 100% working, this is where we encounter PC-98 and bespoke hardware configurations.
First some background, besides retro fun, I am a hobbyist dragbike builder & I have a Sodick BF275 wire edm I just use for my own projects. I bought it as industrial scrap after a fire in the machine cabinet half destroyed it, and I rebuilt it myself with non oem parts over time.

Sodick Wire EDM's are not all the same inside, each series seems to take a different variant of pc-98, with different drive shapes and combinations of ram and hardware in the pc-98. The system and user disks are supplied are bespoke for each machine, as they contain a set of parameters unique to the tolerances of the hardware in that single machine. I purchased a (expensive) replacement IX 10.1T floppy diskette with generic settings and was lucky and have a working User1 image & have a printout of the parameters that had escaped the fire. These parameters are stored on the User1 diskette.

My machine is a IX series & will only boot to control display fully with a contec dual rs232 cbus card & a 1M ram expansion cbus card, as during boot it creates a ram disk denoted as C: , then copies pcdos 2.2 into it and runs from the ram disk then communicates down to a second (really bespoke open frame) computer that controls motion via the rs232 ports.

I have so far been testing it without the correct cards in the cbus sockets, and it was ignoring the special bits in the boot sequence as a result. Once the correct cbus cards were inserted, the sodick software failed with a message to put the disk in drive2 and press ent. Except standard pc-98 kb does not have a ent key so lots of painful rebooting and waiting for it to boot to this section to find my last working copy of this using the original fdd drives in the desktop machine, then I dumped that with the greaseweasel the same as the main system diskette but with retries set to 10 as it was problematic on a few sectors & converted that to HFE.
Then with two CUSB's in the pc98, post-os boot while running the sodick software disk2 is checked on tracks 0 & 1 and lots of track jumping about, so its possibly some copy protection.

If the machine motion computer is not detected, the sodick software crashes out late on with "system error" in a red box. And with the two CUSB's that's where the desktop machine is booting to (small victory. I know when I put this in the machine pc itself instead of on the desktop pc-98, it will pass this step).

Then back to the HxC flashed gotek's now I have both known working HFE images and a correct bus hardware configuration, and with these images the gotek's both have read errors in the part of the boot sequence when the heads move fast between tracks. Even one CUSB and one Gotek and booting with the CUSB results in the same problem when the special sectors are checked on the Gotek image even before it gets to the odd bit where it checks drive1 for boot sectors. This could also be a vfo issue not responding quickly enough, but the same vfo times the CUSB's for the same sequences.
If I put just one gotek in, it seems ok, but the software fails at the part of the sequence before it checks sectors on the second disk so I can't be sure its like for like testing.

I'm a bit unsure where to go now for the end solution, as having my test setup of two virtual machines on a desktop to feed the CUSB's images during boot of the machine control is not feasible. I'm open to putting a beaglebone or even 2 in there and have it control the CUSB's if HxC software can be compiled to run headless under linux.
Or maybe I just need better emu hardware in place of the gotek's that can react to the sector changes faster, or I missed some config to deal with this edge case. The gotek's behave fine with .d88 etc images from the pc-98 retro collections on the internet archive.

Frustrating, but if it was easy, I'd have managed it years ago instead of wrecking multiple bespoke parts with disk errors.

jmp49152
Posts: 8
Joined: Tue Oct 11, 2022 5:36 pm

Re: PC9801 with Gotek & HxC CUSB

Post by jmp49152 »

Well more testing, and I can run a CUSB as the boot drive, and a gotek as the B drive and boot successfully if I run the gotek from a external psu, so perhaps there's a voltage problem. But not with two gotek's running exernal psu's.

I bit the bullet and ordered a HXC Rev F from Lotharek, since I see in the showroom this has been used on pc-98 already with success, perhaps I can set it up to emulate two drives and not need a problematic second device at all as a result.

jmp49152
Posts: 8
Joined: Tue Oct 11, 2022 5:36 pm

Re: PC9801 with Gotek & HxC CUSB

Post by jmp49152 »

One last until the real HxC drive arrives. I can put just one hxc gotek in, and have it work fine + switch diskette images when prompted during boot using the selectors (that's the kanji at the top prompting for the different diskettes to be inserted ).
So its quite usable like this, and I can put it back in the machine for now until I solve the two units working issue.
pc98_system_error.jpg
pc98_system_error.jpg (196.35 KiB) Viewed 6947 times

Tntmold
Posts: 1
Joined: Wed Feb 22, 2023 9:22 pm

Re: PC9801 with Gotek & HxC CUSB

Post by Tntmold »

Were you able to get your Sodick running? If so, did you need anything other than the two CUSB emulators?

Post Reply