Problem starting external PSX-EXE

General Programming help in C, C++ or ASM, Compiling / Debugging, and R3000A Central Processing Unit (CPU) information
Post Reply
User avatar
Dedok179
Serious PSXDEV User
Serious PSXDEV User
Posts: 86
Joined: Jun 11, 2015
I am a: Programmer, Beginning reverser
PlayStation Model: SCPH-5502
Discord: Dedok179#2632
Location: Tula,RU

Problem starting external PSX-EXE

Post by Dedok179 » September 3rd, 2019, 4:23 am

Hello. Please help me solve the problem. An external executable file cannot be executed when the code for switching to the asm routine is active, but it executes fine when it is loaded into memory from the inside of the main executable file or when switching to the asm routine is disabled. What could be the problem and how to solve it?

[BBvideo=560,315]https://youtu.be/jBA0g4qVawE[/BBvideo]

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 3rd, 2019, 12:17 pm

Try doing it with interrupts disabled by using 'EnterCriticalSection' and then turn them back on with 'ExitCriticalSection'.
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
Dedok179
Serious PSXDEV User
Serious PSXDEV User
Posts: 86
Joined: Jun 11, 2015
I am a: Programmer, Beginning reverser
PlayStation Model: SCPH-5502
Discord: Dedok179#2632
Location: Tula,RU

Post by Dedok179 » September 3rd, 2019, 5:44 pm

Shadow wrote: September 3rd, 2019, 12:17 pm Try doing it with interrupts disabled by using 'EnterCriticalSection' and then turn them back on with 'ExitCriticalSection'.
No, this did not fix the problem.

[BBvideo=560,315]https://youtu.be/PbtpYd2LEpE[/BBvideo]

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 3rd, 2019, 6:11 pm

Something is getting trashed in memory then. You'll have to do some more debugging and tests. One thing you can check is to compare the registers on the one that works and the one that does not to make sure that something like RA (for example) isn't pointing to something different.
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
Dedok179
Serious PSXDEV User
Serious PSXDEV User
Posts: 86
Joined: Jun 11, 2015
I am a: Programmer, Beginning reverser
PlayStation Model: SCPH-5502
Discord: Dedok179#2632
Location: Tula,RU

Post by Dedok179 » September 3rd, 2019, 7:09 pm

Shadow wrote: September 3rd, 2019, 6:11 pm Something is getting trashed in memory then. You'll have to do some more debugging and tests. One thing you can check is to compare the registers on the one that works and the one that does not to make sure that something like RA (for example) isn't pointing to something different.
Well, I don’t see any serious differences here.
You do not have the required permissions to view the files attached to this post.

User avatar
Dedok179
Serious PSXDEV User
Serious PSXDEV User
Posts: 86
Joined: Jun 11, 2015
I am a: Programmer, Beginning reverser
PlayStation Model: SCPH-5502
Discord: Dedok179#2632
Location: Tula,RU

Post by Dedok179 » September 4th, 2019, 3:47 am

Maybe after switching to copying the asm routine I need to give CD some command? It just all works perfectly when the executable file is loaded from the internal file when everything is written to an empty disk, or how then can I do it to load the file from the internal storage and force the rest of the data to be picked up from the disk?

User avatar
Dedok179
Serious PSXDEV User
Serious PSXDEV User
Posts: 86
Joined: Jun 11, 2015
I am a: Programmer, Beginning reverser
PlayStation Model: SCPH-5502
Discord: Dedok179#2632
Location: Tula,RU

Post by Dedok179 » September 4th, 2019, 5:29 pm

PC pointer goes into the unknown.
You do not have the required permissions to view the files attached to this post.

User avatar
Dedok179
Serious PSXDEV User
Serious PSXDEV User
Posts: 86
Joined: Jun 11, 2015
I am a: Programmer, Beginning reverser
PlayStation Model: SCPH-5502
Discord: Dedok179#2632
Location: Tula,RU

Post by Dedok179 » September 4th, 2019, 5:49 pm

Everything turned out, it was necessary to copy the trainer files through the asm function).

[BBvideo=560,315]https://youtu.be/Z54yDGbfhpo[/BBvideo]

isufje
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 64
Joined: Apr 11, 2012

Post by isufje » September 15th, 2019, 11:55 pm

That's cool that you solved your problem. I have a question though. What flags do you set in your function setflags() before you jump to game. I'm interested in knowing... It might solve a problem I'm having. Thank you.

User avatar
Dedok179
Serious PSXDEV User
Serious PSXDEV User
Posts: 86
Joined: Jun 11, 2015
I am a: Programmer, Beginning reverser
PlayStation Model: SCPH-5502
Discord: Dedok179#2632
Location: Tula,RU

Post by Dedok179 » September 16th, 2019, 3:05 am

isufje wrote: September 15th, 2019, 11:55 pm That's cool that you solved your problem. I have a question though. What flags do you set in your function setflags() before you jump to game. I'm interested in knowing... It might solve a problem I'm having. Thank you.
I don't use her anymore. Now the structure looks like this, and everything works fine on the console.
You do not have the required permissions to view the files attached to this post.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests