Page 1 of 1

Problem starting external PSX-EXE

Posted: September 3rd, 2019, 4:23 am
by Dedok179
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]

Re: Problem starting external PSX-EXE

Posted: September 3rd, 2019, 12:17 pm
by Shadow
Try doing it with interrupts disabled by using 'EnterCriticalSection' and then turn them back on with 'ExitCriticalSection'.

Re: Problem starting external PSX-EXE

Posted: September 3rd, 2019, 5:44 pm
by Dedok179
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]

Re: Problem starting external PSX-EXE

Posted: September 3rd, 2019, 6:11 pm
by Shadow
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.

Re: Problem starting external PSX-EXE

Posted: September 3rd, 2019, 7:09 pm
by Dedok179
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.

Re: Problem starting external PSX-EXE

Posted: September 4th, 2019, 3:47 am
by Dedok179
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?

Re: Problem starting external PSX-EXE

Posted: September 4th, 2019, 5:29 pm
by Dedok179
PC pointer goes into the unknown.

Re: Problem starting external PSX-EXE

Posted: September 4th, 2019, 5:49 pm
by Dedok179
Everything turned out, it was necessary to copy the trainer files through the asm function).

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

Re: Problem starting external PSX-EXE

Posted: September 15th, 2019, 11:55 pm
by isufje
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.

Re: Problem starting external PSX-EXE

Posted: September 16th, 2019, 3:05 am
by Dedok179
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.