Virtual Pro Comms Link Driver for Printer Port Adapter

General information to do with the PlayStation 1 Hardware. Including modchips, pinouts, rare or obscure development equipment, etc.
Post Reply
User avatar
brill
Verified
Active PSXDEV User
Active PSXDEV User
Posts: 63
Joined: Apr 30, 2013
PlayStation Model: SCPH-7502
Contact:

Virtual Pro Comms Link Driver for Printer Port Adapter

Post by brill » December 10th, 2019, 9:58 pm

Hi!

I would like to know if it is possible to adapt this driver for use in conjunction with Xplorer cheat cartridge?

Japan
Google Translator (English)

Driver itself can be downloaded here

Maybe someone else will be interested in the topic and it will help to understand it.
I would like to launch PSDEBUG 1.10 (and other old software) on the Xplorer hardware

Thanks!

If I made a mistake in the section, move the topic to where it should be.

; UPDATE
Added the original and modified drivers for Windows 9x. For the story.
The modified driver includes support for the Xplorer cheat cartridge.

Code: Select all

;------------------------------------------------------------------------------
; vcomslnk.asm - Virtual Pro Comms Link Driver for Xplorer
;
;                Version 1.1
;
; Disclaimer:    I don't know why I decided to share it, since nobody needs it.
;                But whatever.
;
;                I want to warn you  right away, if you don't know  what it is,
;                it's  better  not to use it.  I'm not  responsible  for burned
;                equipment, crashed Windows and your other misfortunes.
;
; Description:   Driver  translating  I/O  ports  from the  Action Replay Comms
;                Link Card  (0x300 / 0x310 / 0x320 / 0x330)  port address space
;                to the XPLORER (0x378/LPT) address space.
;
; Notes:         The  I/O  protocol seems to  work fine, but requires some end-
;                software tweaking. So don't expect much more from this driver.
;                This  work  was done  just  to  learn  how  the  communication
;                protocol works, to learn  x86 assembly language, x86 debugging
;                (be damned), to gain experience, and of course for fun.
;
; Based on:      Takashi Yano driver work
;                no$psx specifications
;                some old software (for driver testing)
;
; Used software: 98DDK for driver assembly / SoftIce for debug driver /
;                Tiny C Compiler for tests
;
; Tested on:     Windows 98
;
; P.S.:          For rugged and bearded electronic-programmers only. lOl
;
; Installation:
;                - Copy VCOMSLNK.VXD file to C:\Windows\System folder.
;                - Open the C:\Windows\System.ini file in a text editor and add
;                  the following lines to the [386Enh] section:
;------------------------------------------------------------------------------
;                      [386Enh]
;                      
;                      ;Case of XPLORER
;                      ;--- start ---
;                      DEVICE=VCOMSLNK.VXD
;                      VCOMSLNK_XplorerVirtualPort=320
;                      VCOMSLNK_XplorerTargetPort=378
;                      ;---- end ----
;------------------------------------------------------------------------------
;                Don't forget to specify the port addresses on your system
;------------------------------------------------------------------------------
;
;                Greetings to the PSXDEV.NET forum and its inhabitants!!!
;
;------------------------------------------------------------------------------
; Worklog:
; 22.12.23       Starting work on adding XPLORER support
;                information gathering, holidays celebration, etc, etc, etc...
;
; 06.01.24       Decompiled  transmit & receive  functions  from  XKiller seems
;                work fine.
;
; 13.01.24       Rewrite twice transmit & receive test functions.
; 14.01.24       First(&seems last) Release - v1.1
;
; brill ;)
;------------------------------------------------------------------------------



        .386p
WIN40COMPAT EQU 1   ; for Windows9X compatibility



;------------------------------------------------------------------------------
;include files
;------------------------------------------------------------------------------
        include vmm.inc



;------------------------------------------------------------------------------
;    Virtual Device Declaration
;------------------------------------------------------------------------------
VCOMSLNK_VER_HI  EQU     1
VCOMSLNK_VER_LO  EQU     1

Declare_Virtual_Device         VCOMSLNK,         VCOMSLNK_VER_HI, VCOMSLNK_VER_LO,         VCOMSLNK_Control,         Undefined_Device_ID, Undefined_Init_Order



;------------------------------------------------------------------------------
;    Local Data
;------------------------------------------------------------------------------
VxD_LOCKED_DATA_SEG

xplorer_virtual_port    dd  320h    ; ProCommsLink Port No.
xplorer_target_port     dd  378h    ; LPT1 Port No.

timeout                 dw  0FFFFh  ; some timeout

ack_var                 db  00h
stp1_var                db  00h
stp2_var                db  00h
stp3_var                db  00h

VxD_LOCKED_DATA_ENDS



;------------------------------------------------------------------------------
;    Locked Code
;------------------------------------------------------------------------------
VxD_LOCKED_CODE_SEG

BeginProc VCOMSLNK_Control
        Control_Dispatch Device_Init, VCOMSLNK_Device_Init
        clc
        ret
EndProc VCOMSLNK_Control

VxD_LOCKED_CODE_ENDS



;------------------------------------------------------------------------------
;    Initialization  Data
;------------------------------------------------------------------------------
VxD_IDATA_SEG

xplorer_virtual_str     db  'VCOMSLNK_XplorerVirtualPort',0
xplorer_target_str      db  'VCOMSLNK_XplorerTargetPort',0

VxD_IDATA_ENDS



;------------------------------------------------------------------------------
;    Initialization  Code
;------------------------------------------------------------------------------
VxD_ICODE_SEG

BeginProc VCOMSLNK_Device_Init
        ; configuration for Xplorer I/F

        ; Get VirtualPort No.
        mov     eax, xplorer_virtual_port
        mov     edi, OFFSET32 xplorer_virtual_str
        xor     esi, esi    ; [386Enh] section
        VMMCall Get_Profile_Hex_Int
        jc      VCOMSLNK_Device_Init_End
        mov     xplorer_virtual_port, eax

        ; Get TargetPort No.
        mov     eax, xplorer_target_port
        mov     edi, OFFSET32 xplorer_target_str
        xor     esi, esi    ; [386Enh] section
        VMMCall Get_Profile_Hex_Int
        mov     xplorer_target_port, eax

        ; register I/O Handler for Xplorer I/F
        mov     esi, Xplorer_DataPort_Handler
        mov     edx, xplorer_virtual_port
        VMMCall Install_IO_Handler
        mov     esi, Xplorer_StatPort_Handler
        mov     edx, xplorer_virtual_port
        add     edx, 2
        VMMCall Install_IO_Handler

VCOMSLNK_Device_Init_End:
        clc
        ret
EndProc VCOMSLNK_Device_Init

VxD_ICODE_ENDS



;------------------------------------------------------------------------------
;    Code Segment
;------------------------------------------------------------------------------
VxD_CODE_SEG

;------------------------------------------------------------------------------
; for Xplorer Parallel I/F
;------------------------------------------------------------------------------
XPLORER_DFLT    EQU 00h
XPLORER_PSEL    EQU 08h ; SELECT_PRN#   ; Control Register-3 / DB-25 Pin 17
XPLORER_SLCT    EQU 10h ; SELECT        ; Status  Register-4 / DB-25 Pin 13
XPLORER_POUT    EQU 20h ; PAPER END/OUT ; Status  Register-5 / DB-25 Pin 12
XPLORER_ACK     EQU 40h ; ACK           ; Status  Register-6 / DB-25 Pin 10
XPLORER_BUSY    EQU 80h ; BUSY#         ; Status  Register-7 / DB-25 Pin 11



;----- I/O Handler for Data Port ----------------------------------------------
BeginProc Xplorer_DataPort_Handler
;==============================================================================
        test    cl, String_IO
        jnz     VCOMSLNK_Simulate_IO
        cmp     cl, Byte_Input
        je      Xplorer_DataPort_Handler_InB
        cmp     cl, Byte_Output
        jne     VCOMSLNK_Simulate_IO

;==============================================================================
;send a byte to psx
;==============================================================================
Xplorer_DataPort_Handler_OutB:
        push    edx                 ; save all used in routine regs on stack
        push    ecx
        push    ebx
;------------------------------------------------------------------------------
;       mov     [ack_var], 1        ; ack flag = HIGH (for Status Port Routine)
;------------------------------------------------------------------------------
;DATA send
;------------------------------------------------------------------------------
        mov     edx, xplorer_target_port
        out     dx, al              ; send Data to 378h ; al = DATA
;------------------------------------------------------------------------------
        push    eax                 ; save eax reg to stack
;------------------------------------------------------------------------------
;PSEL=HIGH
;------------------------------------------------------------------------------
        add     edx, 2              ; CTRL (37Ah)

        in      al, dx              ; read current state of Control Port
        and     al, 0F7h            ; 0F7h = ~XPLORER_PSEL (and modif it)
        out     dx, al              ; PSEL=HIGH
;------------------------------------------------------------------------------
;/ACK=HIGH
;------------------------------------------------------------------------------
        mov     bx, timeout
        dec     edx                 ; STAT (379h)
        jmp     Xplorer_DataPort_Handler_OutB_Loop2

Xplorer_DataPort_Handler_OutB_Loop1:
        mov     ax, bx
        dec     bx
        or      ax, ax
        jz      Xplorer_DataPort_Handler_OutB_Loop3

Xplorer_DataPort_Handler_OutB_Loop2:
        in      al, dx              ; al = inp(STAT);
        test    al, XPLORER_ACK
        jz      Xplorer_DataPort_Handler_OutB_Loop1

;------------------------------------------------------------------------------
;PSEL=LOW
;------------------------------------------------------------------------------
Xplorer_DataPort_Handler_OutB_Loop3:
        inc     edx                 ; CTRL (37Ah)

        in      al, dx
        or      al, XPLORER_PSEL
        out     dx, al
;------------------------------------------------------------------------------
;/ACK=LOW
;------------------------------------------------------------------------------
        mov     bx, timeout
        dec     edx                 ; STAT (379h)
        jmp     Xplorer_DataPort_Handler_OutB_Loop5

Xplorer_DataPort_Handler_OutB_Loop4:
        mov     ax, bx
        dec     bx
        or      ax, ax
        jz      Xplorer_DataPort_Handler_OutB_Loop6

Xplorer_DataPort_Handler_OutB_Loop5:
        in      al, dx              ; al = inp(STAT);
        mov     ah, 0
        and     ax, XPLORER_ACK
        cmp     ax, XPLORER_ACK
        jz      Xplorer_DataPort_Handler_OutB_Loop4
;------------------------------------------------------------------------------
;       mov     [ack_var], 0        ; ack flag = LOW  (for Status Port Routine)
;------------------------------------------------------------------------------
;return
;------------------------------------------------------------------------------
Xplorer_DataPort_Handler_OutB_Loop6:
        pop     eax                 ; restore eax reg from stack
        pop     ebx
        pop     ecx
        pop     edx                 ; restore edx reg from stack

        ret                         ; return
;==============================================================================



;==============================================================================
;get a byte from psx
;==============================================================================
Xplorer_DataPort_Handler_InB:
        push    ebx
        push    ecx
        push    edx
;------------------------------------------------------------------------------
        mov     [ack_var], 1        ; ack flag = HIGH (for Status Port Routine)
;------------------------------------------------------------------------------
;/ACK=HIGH
;------------------------------------------------------------------------------
        mov     bx, timeout
        mov     edx, xplorer_target_port
        inc     edx                 ; STAT (379h)
        jmp     Xplorer_DataPort_Handler_InB_Loop2

Xplorer_DataPort_Handler_InB_Loop1:
        mov     ax, bx
        dec     bx
        or      ax, ax
        jz      Xplorer_DataPort_Handler_InB_Loop3

Xplorer_DataPort_Handler_InB_Loop2:
        in      al, dx              ; al = inp(STAT);
        test    al, XPLORER_ACK
        jz      Xplorer_DataPort_Handler_InB_Loop1

;------------------------------------------------------------------------------
;1 step read
;------------------------------------------------------------------------------
Xplorer_DataPort_Handler_InB_Loop3:
        in      al, dx              ; STAT (379h)
        mov     [stp1_var], al      ; 1st step (D6,D7,HI)

;------------------------------------------------------------------------------
;PSEL=HIGH
;------------------------------------------------------------------------------
        inc     edx                 ; CTRL (37Ah)

        in      al, dx              ; read current state of Control Port
        and     al, 0F7h            ; 0F7h = ~XPLORER_PSEL (and modif it)
        out     dx, al              ; PSEL=HIGH

;------------------------------------------------------------------------------
;/ACK=LOW
;------------------------------------------------------------------------------
        mov     bx, timeout
        dec     edx                 ; STAT (379h)
        jmp     Xplorer_DataPort_Handler_InB_Loop5

Xplorer_DataPort_Handler_InB_Loop4:
        mov     ax, bx
        dec     bx
        or      ax, ax
        jz      Xplorer_DataPort_Handler_InB_Loop6

Xplorer_DataPort_Handler_InB_Loop5:
        in      al, dx              ; al = inp(STAT);
        mov     ah, 0
        and     ax, XPLORER_ACK
        cmp     ax, XPLORER_ACK
        jz      Xplorer_DataPort_Handler_InB_Loop4

;------------------------------------------------------------------------------
;2 step read
;------------------------------------------------------------------------------
Xplorer_DataPort_Handler_InB_Loop6:
        in      al, dx              ; STAT (379h)
        mov     [stp2_var], al

;------------------------------------------------------------------------------
;PSEL=LOW
;------------------------------------------------------------------------------
        inc     edx                 ; CTRL (37Ah)

        in      al, dx              ; read current state of Control Port
        or      al, XPLORER_PSEL    ;
        out     dx, al              ; PSEL=LOW

;------------------------------------------------------------------------------
;/ACK=HIGH
;------------------------------------------------------------------------------
        mov     bx, timeout
        dec     edx                 ; STAT (379h)
        jmp     Xplorer_DataPort_Handler_InB_Loop8

Xplorer_DataPort_Handler_InB_Loop7:
        mov     ax, bx
        dec     bx
        or      ax, ax
        jz      Xplorer_DataPort_Handler_InB_Loop9

Xplorer_DataPort_Handler_InB_Loop8:
        in      al, dx
        test    al, XPLORER_ACK
        jz      Xplorer_DataPort_Handler_InB_Loop7

;------------------------------------------------------------------------------
;3 step read
;------------------------------------------------------------------------------
Xplorer_DataPort_Handler_InB_Loop9:
        in      al, dx              ; STAT (379h)
        mov     [stp3_var], al

;------------------------------------------------------------------------------
;PSEL=HIGH
;------------------------------------------------------------------------------
        inc     edx                 ; CTRL (37Ah)

        in      al, dx              ; read current state of Control Port
        and     al, 0F7h            ; 0F7h = ~XPLORER_PSEL (and modif it)
        out     dx, al              ; PSEL=HIGH

;------------------------------------------------------------------------------
;/ACK=LOW
;------------------------------------------------------------------------------
        mov     bx, timeout
        dec     edx                 ; STAT (379h)
        jmp     Xplorer_DataPort_Handler_InB_Loop11

Xplorer_DataPort_Handler_InB_Loop10:
        mov     ax, bx
        dec     bx
        or      ax, ax
        jz      Xplorer_DataPort_Handler_InB_Loop12

Xplorer_DataPort_Handler_InB_Loop11:
        in      al, dx              ; al = inp(STAT);
        mov     ah, 0
        and     ax, XPLORER_ACK
        cmp     ax, XPLORER_ACK
        jz      Xplorer_DataPort_Handler_InB_Loop10

;------------------------------------------------------------------------------
;PSEL=LOW
;------------------------------------------------------------------------------
Xplorer_DataPort_Handler_InB_Loop12:
        inc     edx                 ; CTRL (37Ah)

        in      al, dx              ; read current state of Control Port
        or      al, XPLORER_PSEL    ;
        out     dx, al              ; PSEL=LOW

;------------------------------------------------------------------------------
;calculate result byte
;------------------------------------------------------------------------------
        mov     dl, [stp1_var]
        and     dl, XPLORER_SLCT+XPLORER_POUT
        shl     dl, 2
        mov     al, [stp2_var]
        mov     ah, 0
        not     ax
        and     ax, XPLORER_BUSY
        sar     ax, 2
        or      dl, al
        mov     al, [stp2_var]
        mov     ah, 0
        and     ax, XPLORER_SLCT+XPLORER_POUT
        sar     ax, 1
        or      dl, al
        mov     al, [stp3_var]
        mov     ah, 0
        not     ax
        and     ax, XPLORER_BUSY
        sar     ax, 5
        or      dl, al
        mov     al, [stp3_var]
        mov     ah, 0
        and     ax, XPLORER_SLCT+XPLORER_POUT
        sar     ax, 4
        or      dl, al
        mov     al, dl
;------------------------------------------------------------------------------
        mov     [ack_var], 0        ; ack flag = LOW  (for Status Port Routine)
;------------------------------------------------------------------------------
        pop     edx
        pop     ecx
        pop     ebx

        ret
;==============================================================================
EndProc Xplorer_DataPort_Handler



;===== I/O Handler for Status Port ============================================
BeginProc Xplorer_StatPort_Handler
        test    cl, String_IO
        jnz     VCOMSLNK_Simulate_IO
        cmp     cl, Byte_Input
        jne     VCOMSLNK_Simulate_IO

;       push    edx                 ; save edx (322h at this point)
;       mov     edx, xplorer_target_port
;       inc     edx                 ; Status Port (379h)
;       in      al, dx              ; to al
;       pop     edx                 ; load edx

        mov     al, [ack_var]
        test    al, 1               ; test ACK FLAG

        jz      Xplorer_StatPort_Handler_Ack    ;EXSTAND
;       jnz     Xplorer_StatPort_Handler_Ack    ;FREEWING

        mov     al, 0FFh            ; report no ACK
        ret

Xplorer_StatPort_Handler_Ack:
        mov     al, 0FEh            ; report ACK
        ret
EndProc Xplorer_StatPort_Handler
;==============================================================================



;===== Default I/O Handler ====================================================
BeginProc VCOMSLNK_Simulate_IO
        VMMJmp  Simulate_IO
        ret
EndProc VCOMSLNK_Simulate_IO
;==============================================================================



VxD_CODE_ENDS

        END

You do not have the required permissions to view the files attached to this post.
Last edited by brill on January 15th, 2024, 6:36 am, edited 1 time in total.
Dev console: SCPH-7502 + Xplorer with custom MultiRom firmware
Dev PC: Windows 98 SE, Celeron at 633MHz, 128MB RAM, 20GB HDD

User avatar
szalay_1
Active PSXDEV User
Active PSXDEV User
Posts: 41
Joined: Jan 22, 2019
I am a: Cheat Device Code Creator
PlayStation Model: 5502-7502
Location: Hungary
Contact:

Post by szalay_1 » January 22nd, 2020, 3:36 am

If i good understand it, with my bad English...

The VCOMSLNK.VXD = "Virtual Pro Comms Link Driver can hook I/O access to
Pro Comms Link I/F board"

I thought with hella simple:
So connect my Freeweng hardware one side to PC-Pralellport, then connect
second side to PAR (pro action replay cardridge) and i could use PSX hack TOOLS
like: PSDebug 1.10 & PsParUK & Craction & GSCC99 & Action EXE etc etc right ?

Use these tools, like connected to Pro Comms Link hardware, but
will substitute it.

I would like to ask for help, I'd be grateful...

@brill the Xplorer does not use I/O Comms Link, it uses praralellport,
so PSDebug use I/O Comms Link = Pro Action Replay, Caetla etc

Freeweng_Prototype:
You do not have the required permissions to view the files attached to this post.

User avatar
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » January 22nd, 2020, 12:47 pm

I've tried PSDebug. It isn't good. It's very, very old and outdated. NO$PSX is much better.
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

User avatar
szalay_1
Active PSXDEV User
Active PSXDEV User
Posts: 41
Joined: Jan 22, 2019
I am a: Cheat Device Code Creator
PlayStation Model: 5502-7502
Location: Hungary
Contact:

Post by szalay_1 » January 23rd, 2020, 2:15 am

Shadow wrote: January 22nd, 2020, 12:47 pm I've tried PSDebug. It isn't good. It's very, very old and outdated. NO$PSX is much better.
I means if I use "VCOMSLNK.VXD" then i can use PSDebug.exe etc vith PAR-device via parallel port using freewing harware
and manage saves/codes etc?

User avatar
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » January 23rd, 2020, 10:39 am

I'm not sure about the FreeWing. It should work, but I used the CommsLink 8-bit ISA card because PSDebug is locked to communicate by that method and will not access address 0x378. I also had to use Windows 95 on an Intel 486 to get it all to run correctly, and it was super slow :lol:
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

User avatar
szalay_1
Active PSXDEV User
Active PSXDEV User
Posts: 41
Joined: Jan 22, 2019
I am a: Cheat Device Code Creator
PlayStation Model: 5502-7502
Location: Hungary
Contact:

Post by szalay_1 » February 14th, 2020, 6:19 am

Well, I will confirm ! on Win98SE/Me
I have installed VCOMSLNK.VXD and using Freewing hardware,
and i get it works the PSX HACK tools, Like:
ACTION.EXE
PSDebug.exe
PsPar.exe
Craction.exe
gscc.exe
etc etc

Little slower than CommsLink but works, also randomly its freeze up, during
large memory dump.

But doesn't work on Psexe.com "the checksum did not correspond!"
You do not have the required permissions to view the files attached to this post.

User avatar
brill
Verified
Active PSXDEV User
Active PSXDEV User
Posts: 63
Joined: Apr 30, 2013
PlayStation Model: SCPH-7502
Contact:

Post by brill » January 15th, 2024, 6:41 am

Updated the topic
Added original and modified drivers
Thanks to everyone involved in the thread, but the topic has been exhausted. Closure is left at the discretion of the administrator.
Dev console: SCPH-7502 + Xplorer with custom MultiRom firmware
Dev PC: Windows 98 SE, Celeron at 633MHz, 128MB RAM, 20GB HDD

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests