Page 2 of 2

Re: sioloader

Posted: July 26th, 2019, 3:44 am
by danhans42
😀😀

Yeah not much at all that large really. NXFLASH loads so quick I can't even time it lol.

Saying that, loading a 1.5mb EXE using psexe & caetla on an xplorer isn't exactly fast either

Re: sioloader

Posted: July 26th, 2019, 4:13 am
by Squaresoft74
Works like a charm with Xrider's STU. :clap
Any chance to make PAL/NTSC videomode selectable ?

Re: sioloader

Posted: July 26th, 2019, 4:17 am
by danhans42
Squaresoft74 wrote:
July 26th, 2019, 4:13 am
Works like a charm with Xrider's STU. :clap
Any chance to make PAL/NTSC videomode selectable ?
Excellent, thanks again Squaresoft for testing.


I'm trying not to have any pad routines at the moment, so not at this minute but definitely will do it the future. That being said I can compile a version for you that just defaults to NTSC if that helps?

Re: sioloader

Posted: July 26th, 2019, 4:20 am
by Squaresoft74
A forced NTSC build would be very appreciated. :)

Re: sioloader

Posted: July 26th, 2019, 4:30 am
by rama3
It may be a little off topic, but I wonder if it isn't possible to use some other video mode detection hint than the "E/A/I" char of the BIOS.
One reason for this is that BIOS swaps are becoming more popular. Especially NTSC-J consoles really benefit from a PAL BIOS.

I don't know of other "region bits", but I know that the PAL and NTSC(U/J) GPU oscillators are different.
Using a CPU timer to watch the length of PAL and NTSC field should tell the programmer exactly what kind of hardware is present.

If the timer is correct for PAL but not for NTSC > It's a true PAL console
If the timer is correct for NTSC but not for PAL > It's a true NTSC console

If the timer is correct for NTSC and for PAL > It's a Net Yaroze or dual oscillator console > prefer NTSC (always prefer NTSC! :p )

(If the timer is incorrect for both modes > It's a broken console or bad / weird mod > prefer NTSC as CVBS color will not work in any case, so might as well go 60Hz.)
(This last case may also happen with some rare consoles where the PAL clock input to the GPU is severed by the factory. Wrap the detect code in a timeout, then go to NTSC mode if it does time out.)

Re: sioloader

Posted: July 26th, 2019, 4:52 am
by danhans42
Squaresoft74 wrote:
July 26th, 2019, 4:20 am
A forced NTSC build would be very appreciated. :)
There you go mate.

Hope it does what you need it to!

Thanks

Re: sioloader

Posted: July 26th, 2019, 4:56 am
by danhans42
rama3 wrote:
July 26th, 2019, 4:30 am
It may be a little off topic, but I wonder if it isn't possible to use some other video mode detection hint than the "E/A/I" char of the BIOS.
One reason for this is that BIOS swaps are becoming more popular. Especially NTSC-J consoles really benefit from a PAL BIOS.

...
Might be best in a new topic as that sounds like a whole new discussion. I only use this method as it is what everyone else uses but completely see your point, especially with the interest in flashing different BIOS's increasing.

Re: sioloader

Posted: July 26th, 2019, 5:12 am
by Squaresoft74
Many thanks Dan for the NTSC build, it covers my needs perfectly ! :)
rama3 wrote:
July 26th, 2019, 3:36 am
very little software would be 1.5 megs, right? :)
As far as i'm concerned i'm mainly testing PSF files converted back to exe so they're usually quite big files.
Not sure if that could be considered/possible, but how about adding PSF loading support ?

PSF Format Specification.
PSF1 Format.

Once uploaded it would be up to the Sio loader to process the exe unpacking before executing it but then memory space limitation might be an issue there i guess. :?

I've also tried compressing exe using UPX:

Code: Select all

upx.exe --force --brute input.exe -o output.exe
It works pretty nicely, just a little bit slower to boot but worth the upload time gain.
Not sure if handling native PSF file would be faster and/or bring any other benefit beside avoiding to convert/compress exe first.

Re: sioloader

Posted: July 26th, 2019, 12:23 pm
by Shadow
rama wrote: It may be a little off topic, but I wonder if it isn't possible to use some other video mode detection hint than the "E/A/I" char of the BIOS.
You mean this one?

Code: Select all

// SCEx string address in the BIOS (we *must* do a !='E' check or else a Japanese PSX will treat it as PAL)
if (*(char *)0xBFC7FF52!='E')
{
    // NTSC
}
else
{
    // PAL
}
The only other way is to check what mode the GPU is in, check the VBLANK timing or somehow check the clock speed.

Re: sioloader

Posted: July 27th, 2019, 1:15 am
by danhans42
Squaresoft74 wrote:
July 26th, 2019, 5:12 am
Many thanks Dan for the NTSC build, it covers my needs perfectly ! :)
rama3 wrote:
July 26th, 2019, 3:36 am
very little software would be 1.5 megs, right? :)
As far as i'm concerned i'm mainly testing PSF files converted back to exe so they're usually quite big files.
Not sure if that could be considered/possible, but how about adding PSF loading support ?

PSF Format Specification.
PSF1 Format.

Once uploaded it would be up to the Sio loader to process the exe unpacking before executing it but then memory space limitation might be an issue there i guess. :?

I've also tried compressing exe using UPX:

Code: Select all

upx.exe --force --brute input.exe -o output.exe
It works pretty nicely, just a little bit slower to boot but worth the upload time gain.
Not sure if handling native PSF file would be faster and/or bring any other benefit beside avoiding to convert/compress exe first.
Thanks for this.. never heard of UPX before and will certainly look into it. I assume the utility packs the EXE and adds a decompression routine to the output EXE?

Re: sioloader

Posted: July 27th, 2019, 3:09 am
by rama3
I've opened a thread for the default video mode stuff here:
viewtopic.php?f=41&t=3464

Please feel free to share your opinions! ;p

Re: sioloader

Posted: July 28th, 2019, 8:22 am
by danhans42
Will look to add an option to the client so you can pack the EXE with UPX prior to transmission.

Only tried it for the first time with trancetro and it worked great. It will rely on it being installed however
Thank you for mentioning it Squaresoft74.. it squashed over 700kb into under 150 with no noticeable delay to execution as far as I can tell

Re: sioloader

Posted: July 28th, 2019, 1:38 pm
by Squaresoft74
danhans42 wrote:
July 27th, 2019, 1:15 am
I assume the utility packs the EXE and adds a decompression routine to the output EXE?
Yup, looks like it works that way.

I only recently knew about UPX supporting PS1 executable thanks to kHn who pointed it out to me. :)
Sounds like a good idea to add it as an optional step to the client.
Might need to play a bit with the compression options to check what gives the best results without slowing down the boot process too much.

Using "-9" or "--best" switches instead of "--brute" generated a slightly bigger file but fixed my slow boot issue.