Making PsyQ Program Compatible with FreePSXBoot

General Programming help in C, C++ or ASM, Compiling / Debugging, and R3000A Central Processing Unit (CPU) information
Post Reply
User avatar
MottZilla
Verified
Serious PSXDEV User
Serious PSXDEV User
Posts: 89
Joined: Jul 04, 2015
Location: North America

Making PsyQ Program Compatible with FreePSXBoot

Post by MottZilla » May 6th, 2022, 7:45 am

I thought I'd ask if anything could demonstrate how to make a PS-EXE developed with PsyQ (programmed in C) compatible when booted with the FreePSXBoot exploit. I have used the Builder program for FreePSXBoot and while TonyHax which supports being started that way works fine, my own programs don't start and infact when tested in DuckStation it eventually crashes the emulator.

I can see in the TonyHax source code some functions are called to reinitialize the BIOS and/or Kernel stuff. Unfortunately when i tried to transplant the code into my own program I ran into a road block where it declares some functions in the C header file but then in an assembly source file it creates the code for those functions. When I tried using the asm keyword in my C source file this opcode "li t1, 0x12" would always error on compiling saying illegal addressing mode.

So if anyone can offer some help it would be greatly appreciated. It would be nice if programs create with Psy-Q could launch with the FreePSXBoot exploit.

Edit: I've made some progress, but I haven't identified what exactly breaks things yet.

Edit: It seems like if your program exceeds around 60kb that's when it craps out.

User avatar
Administrator
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2689
Joined: Dec 31, 2012
I am a: Shadow
PlayStation Model: H2000/5502

Post by Administrator » May 9th, 2022, 6:20 am

You'll have to share your code and compilation routines so we can see what you're doing :)
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 4 guests