The data is encoded as bi-phase mark modulation:
And i could not find any VHD language command strings from VHD interpreter code, because VHD high level language is only used to write the game code. Then that language is compiled to hex bytes(VHD intermediate language), and these have common encode/decode values for every commands(+parameter bytes):
These bytes are written to disk and read by VHD interpreter.
It seems the data coming from DIN-13 connector is not coded same way as data in the disk. In the book there is only described the disk coding, but not this DIN-13 connector coding.
I tried to find out how MSX and X1 gets the inquired data for VHD status and current frame number. From games I did not find any usage to read current frame( RG string in X1, VP("G",A) in MSX). The string is there in MSX and X1 side games, and function to send that string to port, but that function is not called in anywhere in the games. Also R2 (S1 in MSX) reading was not called. So did the game developers use some generic template and just left the unused "functions" there? But it is strange that no page/frame inquiry is needed.
Anyway the same packet format is received from port in both X1 and MSX (verified from the code), 7 bytes, as described in the book.
So it wuold be quite straightforward to make that VO-20PC like adapter for X1 usage (thunder storm/road blaster type games) from MSX+MSX-RS232 interface+ MSX VHD card
Why in IF-C9D rom there is jump table starting from 4010h address (AB string is at 0x4000), as in init part there is no jump table setting or interrupt handling overriding?
In this table there are jump to separate routines:
-send initial string command ( 18h,"H01:RD:R0:A0\rRS0F0\r" ) to port
-to send one character to port (character value is given as input in register A), so user have to call it again with separate value and also call one time to give that ending \r char.
-inquire VHD system status(so sends R1, R2, or R2 to port and inquires back 7 bytes and calculates the proper value for return values)
-inquire G,C, or T value (so sends RG, RC, or RT to port and inquires back 7 bytes and calculates the proper value for return values)
-some unknown function...as there are many OUT 0x1, A OUT 0x3, A OUT 0x5, A OUT 0x7, A OUT 0x9, A . not sure if it got deassembled correctly. And it does not help that Ghindra deassembler does not know Z80 opcode 0xED 0x39 0xXX at all...
Also there are no usage to call these routines. There are separate almoust as if dublicate routines for these inquire commands ( R1/R2/R2/RG/RC/RT), and those are executed when VP basic command is given to inquire those values (e.g. VP("G",VAR1 ). So strange that those are not optimised to use just same calculation functions. And are these extra routines then just left there from C9C accidentally...
Anyway it would seem there is no interrupt related jump table, so the interrupt line connection would be useless in IF-C9D case. So it must be in schematics to get dynamically that VHD interpreter data, as in the book it is said that there can come dynamically commands.
current dissambler output in html can be found from https://github.com/popolonx/MSX_STUFF/blob/main/vhd_c9d_card...
Hello popolon, I'm just getting into MSX and am very excited reading all of this! I'm currently trying to find service manuals for VHD players so that the Domesday Duplicator can be adapted to work with VHD (it currently works to make replicas of laserdisc and VHS tapes). That way the VHD games themselves can be backed up and someday it will be possible to play these games without requiring such an esoteric hardware collection.
For the time being, I do need to start assmebling that esoteric hardware myself for testing purposes. Is there a BOM (bill of materials) for how to build an IF-C9C replacement using your open source schematics for the IF-C9D plus the dumped ROM for the VHD BASIC commands? That seems like it might be the best way to get a working VHD interface if it works!
The problem atm is to get the ROM of a IF-7900, IF-7910 or IF-C9C interface because only these interfaces have the CALL VHD instruction, that is used for VHDpc products.
The IF-7510 and IF-C9D interfaces have only the CALL VP instruction. This instruction does not allow the interactivity provided by VHDpc.
Gotcha, I will be on the lookout for those items, then, hopefully one turns up soon! I'm eager to start contributing
VHD intermediate language program from disk could be dumped using the IF-C9C card, as the command to activate the data transfer can be given with VP command. Then just have to record the data stream with logic analyser.
VP("RP") is command to enable data transfer
VP("RD") is command to disable data transfer.
Without giving that VP("RP") command, the audio channel containing data is not send from VHD player to VHD interface card.
And in 80C49 rom code there are all code that would be in IF-C9C case also (interaction code with that second 80C49). So only that decoding/fetching is missing.
That sounds like a bunch of steps I'm not qualified to do, so if I manage to acquire one of these things i'll make sure to send it straight along to you