DsReadFile Problems

BIOS, Controllers, Memory Cards, Serial I/O, Parallel I/O, etc.
Post Reply
User avatar
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

DsReadFile Problems

Post by Shadow » September 20th, 2012, 9:35 pm

I am having trouble trying to load a *.TIM from the CD-ROM into RAM.

I was using "libds.h" to do this while then using a separate function to load "DsReadFile("\\DATA\\TIM\\IMAGE1.TIM;1",(u_long *)(0x80011000),0);" but it wont work.

All I get is: "C:\WINDOWS\TEMP\PQ14 : Error : Symbol 'DsReadFile' not defined"
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.

Mdrb
Curious PSXDEV User
Curious PSXDEV User
Posts: 15
Joined: Jul 18, 2012

Post by Mdrb » September 23rd, 2012, 8:35 pm

Hum... never tried to access data with libds but it seems that the linker doesn't find this lib. So you need to edit the PSYQ/BIN/PSYQ.INI, in the ccpsx section add "libds.lib" to the values of the stdlib key. Like this :

Code: Select all

[ccpsx]
stdlib=libgs.lib libgte.lib libgpu.lib libspu.lib libsnd.lib libetc.lib libapi.lib libsn.lib libc.lib libcd.lib libcard.lib libmath.lib libds.lib
You can also use the libcd instead (this method seems to be more commonly used). Give a look at the PSX Music Disk sources if you need an example.

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 23rd, 2012, 9:56 pm

That sounds about right and it should fix it up :)
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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests