PCOpen and PSXSERIAL

General help for the PSY-Q SDK, such as setting the SDK up, compiling correctly, linking and debugging
Post Reply
Misscelan
Curious PSXDEV User
Curious PSXDEV User
Posts: 21
Joined: Dec 11, 2016

PCOpen and PSXSERIAL

Post by Misscelan » July 31st, 2017, 5:51 pm

Hi there,

I was considering getting one of those Serial->USB cables and start using PSXSERIAL to upload my homebrew.
I wanted to check first if functions like PCOpen (and all the other CDRoom function replacements) work with PSXSERIAL, I know it seems to work with CAETLA but at the moment and not interested on that.

Cheers!

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

Post by Shadow » July 31st, 2017, 5:58 pm

The serial side is completely different from CAETLA. You need to use a parallel port based cartridge like the Xplorer/Xploder. It then works with CAETLA apparently, but I had trouble with it. It's known for sure though to work with CATFLAP, and if you have trouble using it with CATFLAP, LameGuy64 is the man to talk to about it :)
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.

Misscelan
Curious PSXDEV User
Curious PSXDEV User
Posts: 21
Joined: Dec 11, 2016

Post by Misscelan » July 31st, 2017, 6:42 pm

Thanks Shadow.
I was just trying to avoid that to change the set up of my pc and the SERIAL->USB was very convenient for that :P.
Then I guess I will stick to emulators for the time being.

Xavi92
Verified
C Programming Expert
C Programming Expert
Posts: 161
Joined: Oct 06, 2012
PlayStation Model: SCPH-5502
Contact:

Post by Xavi92 » August 3rd, 2017, 8:03 am

Hello Misscelan,

I created a new tool to upload both PSX-EXE and CD-ROM data to PC to PSX by using a PSX Serial-to-USB cable. Both applications are open-source (Windows build is also included) and can be used both with Psy-Q and PSXSDK applications. You can find more information on the following thread:

http://www.psxdev.net/forum/viewtopic.php?f=66&t=1307

Misscelan
Curious PSXDEV User
Curious PSXDEV User
Posts: 21
Joined: Dec 11, 2016

Post by Misscelan » August 3rd, 2017, 5:53 pm

Hey Xavi92, that looks great!

I've checked your example project but it seems to be using PSXSDK and I don't really know what is what :P.
So with your tool I could use all the commands on the Psy-Q LIBSN (PCinit, PCopen, PClseek, etc...) normally? Or would it require any special setup?

Thanks!

Xavi92
Verified
C Programming Expert
C Programming Expert
Posts: 161
Joined: Oct 06, 2012
PlayStation Model: SCPH-5502
Contact:

Post by Xavi92 » August 4th, 2017, 9:06 am

My tools were not written with Psy-Q LIBSN in mind, so they will not be compatible with the functions you have described. Instead, you need to follow the protocol described on my video game "Airport", specifically inside SystemLoadFileToBuffer(). These would be the main steps to be performed:

0. Call SIOInit() (probably Psy-Q also has an equivalent function for this). Make sure you set baud rate to 115200 baud.
1. Send a string beginning with ASCII '#' and ending with '@' with file path e.g.: "#cdrom:\\DATA\\SPRITES\\TILESET1.TIM;1@" via SIO interface.
2. Read file size returned by the PC.
3. Send ACK back to PC (ASCII 'b').
4. Get file data in 8 byte-length packets, store these bytes into a buffer and send ACK for each packet received.

For more details, also get a look into Serial.c/Serial.h implementations.
If you ever experience difficulties with Psy-Q, give open-source SW a try and check PSXSDK out. Find the source code and prebuilt Linux binaries on the following links:
http://unhaut.x10host.com/psxsdk/

Misscelan
Curious PSXDEV User
Curious PSXDEV User
Posts: 21
Joined: Dec 11, 2016

Post by Misscelan » August 4th, 2017, 6:05 pm

Thanks for the detailed explanation! If I go down the SERIAL cable route I will definitely give it a try.
I would love use PSXSDK instead of PSYQ, but on my current homebrew project is 3D. If I decide to do something 2d in the future I'll sure give it a try

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests