RSD Export Plug-in for Blender

Downloadable items posted by PSXDEV members are within this forum.
User avatar
Admin / PSXDEV
Admin / PSXDEV
Posts: 2420
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: RSD Export Plug-in for Blender

Post by Shadow » May 10th, 2016, 2:52 pm

This should get you going. It's not perfect (there is no return value checking on errors, etc), but you'll get the idea. Rip out all the parts needed and it'll copy what you need from the CD-ROM into memory. I'd recommend using malloc3 so that way you can free memory afterwards, but that's only if you're seriously trying to make a game that needs dynamic RAM adjusting in real-time.

You call "CdRead2Addr" as that is your primary function.
IE: int main() { CdRead2Addr(arguments go here); return 0; }

Sony PlayStation 1 Source Code
CD-ROM RAM Copy Routines

Developers / Programmer.............: Shadow
Software Development Kit............: Psy-Q 4.6
First Release (as v1.0).............: 10/MAY/2016
Current Version.....................: 1.0


// RAM address storage location of the to be loaded TEX1 data
// NOTE: this is at the 1 MB location, but use anything that is available.
u_long TEX1 = 0x80100000L;

// CD-ROM prototypes
CdlFILE* CdRead2Addr(char *fname, void *address);
int _read2(long byte, void *sectbuf, int mode);

// copy the 't_tex.tim' into TEX1
CdRead2Addr("\\TEXTURES\\T_TEX.TIM;1", (u_long *)TEX1);

// Read a file to a hardcoded address
CdlFILE* CdRead2Addr(char *fname, void *address)
int mode = CdlModeSpeed;
int cnt, i;

for (i=0; i<10; i++) // retry ten times
if (CdSearchFile(&fp, fname) == 0) continue;

// set target position
CdControl(CdlSetloc, (u_char *)&(fp.pos), 0);
cnt = _read2(fp.size, address, mode); // read

if(cnt==0) return(&fp); // success

printf("\nCan not read the file: %s", fname);

return 0; // fail

int _read2(long byte, void *sectbuf, int mode)
int nsector,cnt;

// read start
CdRead(nsector, sectbuf, mode);

while((cnt=CdReadSync(1,NULL))>0) VSync(0);
return cnt;
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
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 381
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Location: Philippines

Re: RSD Export Plug-in for Blender

Post by LameGuy64 » November 23rd, 2017, 12:51 pm

I've made a much newer version of this plug-in I made earlier this year that performs better and is a lot less buggy than the version available here but I forgot to put it out somewhere.

I've updated the first post of this thread to feature a link to the Github repository of the new RSD export plug-in.
Please don't forget to include my name if you share my work around. Credit where it is due.

Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.

DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest