MESS1, MESS3, TESTMESS, PCopen() and PCDRV: Problems?

General help for the PSY-Q SDK, such as setting the SDK up, compiling correctly, linking and debugging
Post Reply
User avatar
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

MESS1, MESS3, TESTMESS, PCopen() and PCDRV: Problems?

Post by Shadow » November 8th, 2013, 10:32 pm

Hi. Does anyone know how to get the PCopen() command working? It apparently works with CAETLA, and you can use pcdrv: as a device, exactly like cdrom: is a device. I have ran MESS1.COM and TESTMESS.COM. I don't get any output whatsoever.

There is an example in the psyq\docs\techref\training\winter95\beginner\source\graphics\2d folder (the docs folder is from the developers documentation disc), but I can't get it to compile. It also seems to be using the 8MB addressing scheme, so that will need to be changed. I have taken the parts out that are needed from DEBUG.C (and a few from the others here and there), but it doesn't do anything. No errors, nothing.

If this works, we wont need to waste so many CD-ROM's or keep testing in emulators. We can load directly into RAM from the PC HDD over CAETLA. Any ideas? Has anyone got it working?? :shrug
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.

Yagotzirck
Verified
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 131
Joined: Jul 17, 2013

Post by Yagotzirck » November 9th, 2013, 12:02 am

makefile contains this:

Code: Select all

load:
		pqbload seminar.tim 80100000
Seems like the example you're dealing with was designed to work with graphics' artist /DTL-H2000 board... maybe adapting the code to load that tim in another way should get it fixed(unless I'm being trivial and you noticed/adapted it already, yet with no results)

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

Post by Shadow » November 9th, 2013, 1:11 am

Yes, PQBLOAD is for the DTL-H2000 and 2500. The replacement for CAETLA is PSEXE.COM -P10 -X seminar.tim -D80011000. I'm talking about the PCopen() function that is part of SN Systems LIBSN.H.
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
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » November 9th, 2013, 4:47 pm

Okay. I looked into it a little more and I found out that PCopen() (and other similar commands) are for MESS which are for the DTL boards, even though the CAETLA document states it works.

Looking even more, I found this line of code from an example.
LoadGraphicToVRAM("pcdrv:images\\logo.tim", &TimImage);
It compiles perfectly fine. Though if I run PSEXE.COM -P10 -L MAIN.EXE, I get "PC control is not possible" from it.
If I try without the -L switch, logo.tim doesn't load at all. I am using CAETLA V0.34 for all of these tests.

CATFLAP.EXE doesn't work correctly either (CATFLAP.EXE -XP -P0x378 RUN MAIN.EXE). It just comes back once uploaded with 'Error: Communications Timeout'.

The CAETLA documenatation states that:

Code: Select all

--------------------------------------------------------------------------
PC file server
--------------------------------------------------------------------------
CAETLA supports pcdrv: device, the SN systems device extension to access
files on the drive of the pc. This fileserver can be accessed by using the
kernel functions, with the 'pcdrv:' device name prefix to the filenames or
using the SN system calls.

-------------------------------------------------------------
SN System calls
-------------------------------------------------------------
The following SN system calls for the fileserver are provided.
Accessed by setting the registers and using the break command
with the specified field.
-------------------------------------------------------------
PCInit   Inits the fileserver.
break    $0101
-------------------------------------------------------------
PCCreat  Creates a new file on PC.
break    $0102
in:      a1       pointer to file name
         a2       file attribute
out:     v0       0 = success, -1 = failure
         v1       file handle or error code if v0 is negative
-------------------------------------------------------------
PCOpen            Opens a file on the PC.
break    $0103
in:      a1       pointer to file name
         a2       access mode 0     read only
                              1     write only
                              2     r/w
out:     v0       0 = succes, -1 = failure
         v1       file handle or error code if v0 is negative
-------------------------------------------------------------
PCClose           Closes a file on the PC.
break    $0104
in:      a1       file handle
out:     v0       0 = succes, -1 = failure
         v1       0 = succes, error code if v0 is negative
-------------------------------------------------------------
PCRead            Reads from an open file on PC.
break    $0105
in:      a1       file handle
         a2       length in bytes
         a3       pointer to store address
out:     v0       0 = succes, -1 = failure
         v1       number of read bytes or error code if v0 is
                  negative.

Note:    Does not stop at eof, so if you set more bytes to read
         than the filelength, the fileserver will pad with zero
         bytes. If you are not sure of the the filelength obtain
         the filelength by PClSeek (a2 = 0, a3 = 2, v1 will return
         the length of the file, don't forget to reset the file
         pointer to the start before calling PCread!)
-------------------------------------------------------------
PCWrite           Writes to an open file on PC.
break    $0106
in:      a1       file handle
         a2       length in bytes
         a3       pointer to read address
out:     v0       0 = succes, -1 = failure
         v1       number of written bytes or error code if v0
                  is negative.
-------------------------------------------------------------
PClSeek           Repositions the file pointer
break    $0107
in:      a1       file handle
         a2       number of bytes to move.
         a3       position from 0   Beginning of file
                                1   Current pointer
                                2   End of file
out:     v0       0 = succes, -1 = failure
         v1       file pointer
-------------------------------------------------------------
Attributes are passed as is. File attributes for the pc file
system are like this:
bit | 7  6| 5| 4| 3| 2| 1| 0|
desc|    0| A| D| 0| S| H| R|

A        Archive file
D        Directory
S        System file
H        Hidden file
R        Read only file
-------------------------------------------------------------
If anyone has any ideas or can shed some light on the subject, that would be great :P
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
Greg
Verified
Serious PSXDEV User
Serious PSXDEV User
Posts: 101
Joined: Sep 09, 2013
PlayStation Model: SCPH-7501
Location: Port-au-Prince, HAITI

Post by Greg » September 12th, 2015, 1:03 pm

Sorry to revive a old thread, but do you still have the CAETLA documentation?
1 x SCPH-7501, 2 x SCPH-7001, 2 x SCPH-5501
1 x Pro Action Replay with "Dual Rom Mod", ROM 1: Caetla, ROM 2: UNIROM
1 x Xplorer V2 with Caetla
1 x GameShark V2.1
1 x GameShark Pro V3.0
1 x CommLinkUSB
1 x XLinkUSB

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

Post by Shadow » September 12th, 2015, 3:20 pm

Greg wrote:Sorry to revive a old thread, but do you still have the CAETLA documentation?
Sure do. Enjoy.
capr-eng.txt
You do not have the required permissions to view the files attached to this post.
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
Greg
Verified
Serious PSXDEV User
Serious PSXDEV User
Posts: 101
Joined: Sep 09, 2013
PlayStation Model: SCPH-7501
Location: Port-au-Prince, HAITI

Post by Greg » September 12th, 2015, 6:50 pm

Thanks. :praise
1 x SCPH-7501, 2 x SCPH-7001, 2 x SCPH-5501
1 x Pro Action Replay with "Dual Rom Mod", ROM 1: Caetla, ROM 2: UNIROM
1 x Xplorer V2 with Caetla
1 x GameShark V2.1
1 x GameShark Pro V3.0
1 x CommLinkUSB
1 x XLinkUSB

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests