Joypad solution for PC-9821 (tested and working)

Started by caius, September 29, 2014, 04:02:49 AM

Previous topic - Next topic

caius

September 29, 2014, 04:02:49 AM Last Edit: September 29, 2014, 08:04:54 AM by caius
Hi all,
I want to share with you the solution I found to add an MSX/FM-TOWNS/X68000  joypad port to your PC-9821.
After tried to connect a DB9 connector directly to YM2608B and fried the motherboard of my PC-9821AP1/U8W (still wondering how..) I get another PC (this time a PC-9821AS2/U8W , pratically same hardware of the previous except for the main CPU) and looked for a joypad solution.
After some researches I came across a safe and simple solution called PC-98DO/P-11.


This solution is originally for PC-98DO but it works also on other model like AMate , CE and all other with a built-in 86 sound source.It's very simple, it consists in building an adapter from PC-98 mouse port using a male miniDIN 9 to a male DB9 connector  like explained here:


https://translate.google.com/translate?depth=1&hl=it&ie=UTF8&prev=_t&rurl=translate.google.it&sl=ja&tl=en&u=http://blogs.yahoo.co.jp/wtdfp683/29370850.html

Here you can see the PC-98 mouse connector pinout:

http://nkmm.org/yagura/lib/

and here the MSX/X68000 one (called in Japan improperly Atari style):

http://www.gamesx.com/controldata/msx.htm

Diagram of the adapter is explained in this page:

http://www.hi-ho.ne.jp/~y-exp/dustman/98dop-11.htm

I personally tested this adapter with an FM-TOWNS joypad and I can say it works perfectly on all games except for Rude Breaker,  some Touhou games and some other few.Does somebody know if in these games you can change some setting about controls  ?



SkyeWelse

Sorry to hear that your motherboard is still not in good shape Caius. Hope that is something you are able to resolve one of these days.

Interesting that the PC98DO Adapter is something used for other machines as well. I have a custom adapter for the PC98DO that I had found on Yahoo Auctions years ago which was probably put together using the same instructions.



http://retro-type.com/PC98/PC98DO-Adapter-01.jpg
http://retro-type.com/PC98/PC98DO-Adapter-02.jpg
http://retro-type.com/PC98/PC98DO-Adapter-03.jpg

-Thomas


caius

Hi, yes , it's the same, I can see also the 2,2KOhm resistor.As I sais this adapter was originally developed for PC-98DO but it works also for other models, the only difference is the mouse port, PC-98DO has a DB-9 while A-Mate has a mini-DIN 9.Right now I'm testing it and it works for most of games except for some.Did you notice same thing?Anyway the best would be a native joypad port using a PC-9801-86 sound card or a programmable joypad like the yours.

Regadring my dead motherboard I have bought a PC-9821AS/U8W (same hardware) which I'm using now but I'm waiting to receive also another PC-9821AP2/U8W sold as not working (probably due bad PSU) and I hope to swap parts in order to obtain another working one.

P.S.
I'm installing new games using the environment ERCACE+ERCVFD present in the Kobushi HDD image, I will release a new image when I'll get a good numbe rof games working.By the way, is there a list of PC-98 arcade ports?

SkyeWelse

Ah that's good that you may be able to simply replace the parts and get your system working again that way. Hope it all works out well and as inexpensive as possible.

Though I did try and use the adapter on the PC98DO when I first got the machine, it didn't work with the handful of original games I own for PC-88 such as Popful Mail and Ys. Perhaps I should try it again sometime.

I recently received a new replacement 3-Mode PC-98 FDD drive to replace the one I broke which works fine now although it's a different LED light. I guess if I really want to change it, I can swap it and solder it, but for now I can live with it.

I'm very interested in learning more about how to use ERCACHE+ERVFD sometime to try and get some games working. Would you mind typing up the process for how you got some of your games to work in a new thread sometime? That might give us a better idea of how you accomplished getting certain games to work. Right now I find it to be rather confusing to understand.

I've also added some games to Kobushi's menu recently as bat files that launch the files needed to launch both Rusty and Briganty, but I've not had much success there. It just tries to load something and then kicks me into a Dos prompt at the root of the HDD. I also downloaded the English versions of the first two Touhou games, but I cannot get them to launch... not sure what I'm doing wrong.

-Thomas

caius

Swapping parts between my working PC-9821AS2/U8W and my faulty PC-9821AP2/U8W I could narrow the fault in the motherboard, all other components (PSU, graphic accelertaor card, CPU and its daughterboard, RAM module and it's daughterboard) are good, pratically machine doesn't get initialized, data lines of the BIOS EPROM are silent, so there is no DATA exchange between CPU and BIOS.
It would be a challenge to fix it since there are a lot ICs on both layer, some of them are also NEC ASICS, let's see what I can do.

P.S.
I have a spare HxC SD Floppy Emulator, I'm thinking to fit it in my PC-9821AS2/U8W bit I've seen A-Mate models  use 30 pin FDD connector, I have to figure out the pinout and build some adapter to 34 pin.

P.P.S.
All these PC-9821 came with some cards inserted in the C-Bus.There is a Roland MIDI , an S3 video,  a LAN and a couple of SCSI cards.Does somebody need some?I have no use of them.

SkyeWelse

QuoteAll these PC-9821 came with some cards inserted in the C-Bus.There is a Roland MIDI , an S3 video,  a LAN and a couple of SCSI cards.Does somebody need some?I have no use of them.

The Roland MIDI and S3 Video certainly sound nice. A LAN card sounds nice to have as well, although I'm not sure if my Networking skills are up to par to really be able to use it since I'd imagine you would need to really know what you are doing to interface with it when using a modern windows platform, or even an older OS like XP or Windows NT. If you have no use for them anymore, I'd be interested in them if only to play around with them. I believe I have a SCSI interface so far and haven't quite figured out how to use it either...

What does the S3 Video CBus card look like btw? Would you mind snapping a photo sometime?

Also, today I tried playing Flame Zapper using my programmable controller and it worked well. Xybots here was asking if there was any lag with the controller and there was no lag from what I could tell.

-Thomas




xybots

Hi everyone

Thanks Thomas for trying your joypad for me i won a programmable joystick interface for my pc 9821 but when i use it as i move around in Flame Zapper it moves so slow.

I was wondering does any one here know how to program this interface as maybe i  doing something wrong as there is no instructions.

Thanks

Brian

caius

October 01, 2014, 04:44:42 AM #7 Last Edit: October 02, 2014, 06:48:10 AM by caius
Quote from: SkyeWelse on September 30, 2014, 01:24:42 AM


I'm very interested in learning more about how to use ERCACHE+ERVFD sometime to try and get some games working. Would you mind typing up the process for how you got some of your games to work in a new thread sometime? That might give us a better idea of how you accomplished getting certain games to work. Right now I find it to be rather confusing to understand.



-Thomas

Adding game using ERCACHE+ERVFD is quite easy.For first you have to convert existing disk image (in .FDI, .D88 or other format) to .VFD format, you can do this by using ERVFD or using Virtual Floppy Image Converter utility, I prefer this last method.After done this you have to create a folder in GAMES directory (I assuming we are using the Kobushi HDD image), put the converted disk image in it and add three files

- AUTOEXEC.BAT
- BOOT.BAT
- CONFIG.SYS

CONFIG.SYS is always the same (for example you can find it in RUDEWIND directory on Kobushi HDD) except for the number of emulated FDD drives which need to be set
AUTOEXEC.BAT and BOOT.BAT will change according to  the game name directory, name of .VFD disk image and number of disk image.
Let's explain.

For example BOOT.BAT of RAIDWIND (one-disk game) is :

HSB A:GAMES\RAIDWIND\

and its AUTOEXEC.BAT is :

@ECHO OFF
SET PATH=A:\;A:\DOS;A:\TOOLS
CD A:\GAMES\RAIDWIND
ESOUND /VF
ERCVFD /LOAD RAIDWIND.VFD /REBOOT


As you can see you have only to change paths according the new game you are adding.
If game is on multiple disk image, its AUTOEXEC.BAT will be like this (this one is from HELL OGRE which is two disk game):

SET PATH=A:\,A:\DOS;A:\TOOLS
CD A:\GAMES\HELLOGRE
ESOUND /VF
ERCVFD /LOAD HELLOGR1.VFD
ERCVFD /LOAD HELLOGR2.VFD
ERCVFD /REBOOT


while the CONFIG.SYS will be like this (note the 'VFDMAX' parameter set to 2 in order to emulate two FDD drives)

DEVICE=A:\TOOLS\HSB.EXE VU I26 IGDC
DEVICE=A:\TOOLS\ERCACHE.EXE /HM /VFDS=36 /VFDMAX=2 /VFDKEY
DOS=HIGH


Keep in mind that not all game will works with ERCACHE+ERCVFD environment.

If you have any questions, feel free to ask.

SkyeWelse

Thanks very much for posting this Caius. This definitely can get me started with testing some games out. So far I've only had a chance to test one game, which a friend and I enjoy and *might* consider a translation project for (if it works out) called AIZA: New Generation, which is an Action RPG. So far I've not been successful with it and after loading the opening it asks for me to insert Scenario Disk 1 into Drive 2. It will at least virtually load the System Disk virtually it seems in Drive 1 which is a start.

AIZA may be one such game that may not be compatible, but when following the instructions you provided, I created 4 disk images in ERCVFD format using VFIC utility and placed them all in a folder called A:\Games\AIZA.

The Boot.bat file reads as:

HSB A:GAMES\AIZA\

The Autoexec.bat reads as:

@ECHO OFF
SET PATH=A:\;A:\DOS;A:\TOOLS
CD A:\GAMES\AIZA
ESOUND /VF
ERCVFD /LOAD System.VFD
ERCVFD /LOAD Scen01.VFD
ERCVFD /LOAD Scen02.VFD
ERCVFD /LOAD Scen03.VFD /REBOOT
 (Not sure if this character will render, but's a Return Key symbol)

And the Config.sys reads as:

DEVICE=A:\TOOLS\HSB.EXE VU I26 IGDC
DEVICE=A:\TOOLS\ERCACHE.EXE /HM /VFDS=28 /VFDMAX=4 /VFDKEY
DOS=HIGH
 (Not sure if this character will render, but's a Return Key symbol)

If there is anything I'm clearly doing wrong, by all means I'd love to find out. I'll skip this one for now and try some other games as well, maybe Rudebreaker since I think that's only one disk.

Thanks again for your help!

-Thomas

caius

October 02, 2014, 05:17:59 AM #9 Last Edit: October 02, 2014, 07:24:31 AM by caius
Hi, I think AIZA: New Generation has a HD installer.Anyway I will try to install it in other ways and let you know about.Stay tuned.

P.S.
I forgot to say that  /VFDS parameter in CONFIG.SYS of ERCACHE must be set according how much RAM you have:


4Mb system = 28
6Mb system = 44
8Mb system = 60
9Mb system = 68
10Mb system = 76
11Mb system = 84
12Mb system = 92
13Mb system = 100
14Mb system = 108
16Mb system = 124
24Mb system = 188
32Mb system = 252
48Mb or more = 256

UPDATE:

I just tried AIZA with ERCACHE+ERCVFD and it works fine on my PC-9821AS2/U8W.Let me know if it works also for you.

https://www.mediafire.com/?7wkebdy2r7v5lqt

SkyeWelse

Hey! Alright, I've gotten it to work as well and I think I found out what the problem was now. You see, at first when I was using the default Config.sys that I took from Hell Ogre, the /VFDS parameter must not have been high enough to run 4 virtual disks, so when I would run AIZA, it would load the track data from some of the disks, but not all of it.

Then when you said to change your parameter I changed it to the RAM that thought I remembered having, which was 24MB, so the value was set to 188. This of course didn't work because I only have 20480KB of extra ram, which is roughly 20MB. I didn't see the value listed in your list for 20MB so I went with the one for 16MB which was 124 and sure enough it was enough to load Aiza and play the game!

Thanks for uploading your image too, I think it helped me realize what I was doing wrong here. This however brings me to another couple of questions. Now that I've gotten Aiza to work I was able to save the the game and load the save file, but after cutting the power off and restarting Aiza again everything that had been in RAM at the time was of course lost and so was the save file. Is there a method of copying what is stored in RAM over to a permanent storage area, either to Disk or Harddrive, or perhaps maybe load everything except for the System Disk which I believe you can run the files from that disk from the HDD anyway. Just curious what options there are for using ERCACHE and wanting to keep save data in tact.

Hehe maybe this topic should be changed to to "Joypad Solution and ERCACHE Guide" so it would make it easier to find for folks that want to know more about how ERCACHE works.  :)

Now that I see the importance of RAM for use with this program, I think I should upgrade to the full 64MB. Is there a good way to identify what type of RAM I am currently using so that I can find compatible sticks of a higher size and latency? I'd be happy to pull it out and take photos if need be.

-Thomas

caius

Quote from: SkyeWelse on October 02, 2014, 09:25:12 AM

Thanks for uploading your image too, I think it helped me realize what I was doing wrong here. This however brings me to another couple of questions. Now that I've gotten Aiza to work I was able to save the the game and load the save file, but after cutting the power off and restarting Aiza again everything that had been in RAM at the time was of course lost and so was the save file. Is there a method of copying what is stored in RAM over to a permanent storage area, either to Disk or Harddrive, or perhaps maybe load everything except for the System Disk which I believe you can run the files from that disk from the HDD anyway. Just curious what options there are for using ERCACHE and wanting to keep save data in tact.



Yes, since ERCACHE stores data in RAM, the data will be lost
when you reset or restart HSB.

I can read in ERCACHE manual that If you want to save a game  you have to press  CTRL + GRAPH + INS keys and then use the following command to load saved game:

A>A:\REBOOT\ERCVFD.EXE /VFDSAVE?

Let me know if it works as I never tried this option.

SkyeWelse

October 03, 2014, 11:27:40 PM #12 Last Edit: October 03, 2014, 11:29:39 PM by SkyeWelse
Hi Caius,

I haven't gotten this procedure to work yet, but I did find an interesting guide online, but some of it is a bit confusing to me. Seems like perhaps to do this, we would need to create a file called QLOAD.1 or perhaps a different number depending on the disk inserted.

Hitting CTRL + Graph + Ins will reboot the machine, and in my case it will boot me all the way out to my partition selector between by two CF drives (the second one is a Dos 3.3D image OS) but in this guide, it seems like what it is supposed to do is reboot in such a way to where the changes such as save games being saved are still stored in RAM. And you can load this stored data at this point or possibly even save it for later. My Japanese is not good enough to understand it so I'm relying on Google Translate which can only get so far.

Anyhow, here is the guide:

http://page.freett.com/9821xafan/go_ercach.html

Google Translated version

QuoteA>CD A:\VFD
A>ERCVFD /SAVE QLOAD.1
         因みに、別のゲームで2DDメディアの物だったら
         A>ERCVFD.EXE /SAVE FILENAME.x /DRIVE=10
         になります。
         では、続き

ゲームディスク2を、ドライブ1に入れ換え
A>ERCVFD /SAVE QLOAD.2
これを、全ての枚数、やって下さい。
         BATファイルを作っておくと便利かも知れません。
         例)
         A>COPY CON:VFD.BAT
         ECHO OFF
         A:\REBOOT\ERCVFD.EXE /SAVE %1
         最後にCTRL+Zを押す。(^_^)
         これでBATファイル、ができあがり
         以後
         A>VFD QLOAD.1
         で構築できるはずです。

Quote2.AUTOEXEC.ERC
@ECHO OFF
A:\REBOOT\ESOUND /VF
;  ESOUNDが使える人だけ
A:\REBOOT\ERCVFD /LOAD A:\VFD\QLOAD.1
A:\REBOOT\ERCVFD /LOAD A:\VFD\QLOAD.2
A:\REBOOT\ERCVFD /LOAD A:\VFD\QLOAD.3
A:\REBOOT\ERCVFD /LOAD A:\VFD\QLOAD.4
A:\REBOOT\ERCVFD /LOAD A:\VFD\QLOAD.5
A:\REBOOT\ERCVFD /LOAD A:\VFD\QLOAD.6
A:\REBOOT\ERCVFD /REBOOT

QuoteA>A:\REBOOT\ERCVFD.EXE /VFDSAVE?
        これこそ、BATファイル作っておけば、便利です。
で、仮想FDの更新をします。終わったら
改めて、再起動を掛けます。
CTRL+GRAPH+DEL
A:\ にできあがっている
ERCVFDxx.VFD
xxには、数字が入っています。01ならゲームディスク1です。
ERCVFD01.VFD
なら
QLOAD.1 が、相当します。
実際には、クインティアロードは、ディスク3にセーブされるので
ERCVFD03.VFD

QLOAD.3
に、リネームして
VFDデレクトリ内のQLOAD.3に上書きコピーしましょう

-Thomas

PepAlacant

Caius, Rudebreaker has an option for activate and deactivate the Control Pad on the Config Menu.

By the way... I ask if this mod would work on my PC-9821 Nx/C7 ?  It's an CanBe Sound laptop.

Pep

98digger

Quote from: PepAlacant on October 29, 2014, 10:01:05 PM
Caius, Rudebreaker has an option for activate and deactivate the Control Pad on the Config Menu.

By the way... I ask if this mod would work on my PC-9821 Nx/C7 ?  It's an CanBe Sound laptop.

Pep

Hello,


Ah, so you are the guy who uploaded those PC-98Note videos onto YouTube  :D. Sorry for the late reply, but the PC-98 community seems to be kind of inactive at the moment (I myself am still awaiting a voltage converter and Solder mask pen in order to fix and use my PC-98).

CanBe sound is not the same as OPNA (YM2608). Instead, an OPL3 is used, which emulates the OPNA. The mouse port works independently of the sound chip, I believe, so that should not be a problem.

Your specific PC-98 appears to have a standard 98Mouse port on the back of it, so it looks like caius' joypad converter should work with it.


-98digger

Ale555

For those Note users out there... I bought a PC-9821n-K07 adaptor.
If you Google for it, it's a note printer-to-15pin harness, it should let me use any normal old style PC 15pin joypad.
I'll let you know as soon as it arrives.

PepAlacant

I followed the tutorial and it worked perfectly on my PC-9821 Cs2 that have a mini-din 9 and OPNA chip built-in in board. It works in the same way when a joypad is connected on a PC-9801-86 sound card. It works in the 0188h, so same with the PC-9801-86 card.

Pep