PSX.EXE that are bigger than 2MB in size

Problems or feedback about the NO$PSX emulator by Martin Korth
Post Reply
User avatar
gwald
Verified
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 313
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

PSX.EXE that are bigger than 2MB in size

Post by gwald » October 6th, 2024, 1:42 am

Hi Martin.
I enabled 8MB support, and made a PSX.EXE with packaged assets, but no$psx doesn't seem to run it?
I tried the same PSX.EXE in Avocado and PCSX-Redux both of which runs it fine.
Did I miss a setting somewhere or is this a bug?

Nocash PSX Kernel v2.1 (c) 2008-2022 Martin Korth.
KERNEL SETUP!
Configuration : EvCB=10h TCB=04h
Read Path Table

BOOTSTRAP LOADER Type C Ver 2.1 03-JUL-1994
Read Directory 1
KERNEL SETUP!
Configuration : EvCB=10h TCB=04h
boot file : cdrom:PSX.EXE;1
*** System Error - Unresolved Exception
*** Excode=0000000Ah, Epc=1FC08440h, ra=00000000h
cat-PS-X.zip

I'm using your previous version because I can't seem to load PSX.EXE via the command line with the new one.


Thanks in advance.
You do not have the required permissions to view the files attached to this post.

User avatar
nocash
Verified
PSX Aficionado
PSX Aficionado
Posts: 614
Joined: Nov 12, 2012
Contact:

Post by nocash » October 7th, 2024, 7:43 pm

That seems to be a kernel issue. The stack is near the top of the standard 2Mbyte RAM area (during loading, and also after loading).

It might work when changing the load address in the exe header to the upper 6Mbytes (though I am not sure if all kernel versions have the extra RAM enabled in the Memory Control register).

One could make a special patched kernel ROM that moves the stack to the top of the 8MByte area... but that could make the kernel incompatible with normal games, and it would work only for people who do have that special ROM.

Perhaps better would be using two EXE files: One small EXE stub that ensures that Memory Control has 8MByte enabled, detects if 8MByte RAM is installed (and shows an error if not), and then changes the stack pointer before loading the 2nd EXE file.

User avatar
gwald
Verified
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 313
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

Post by gwald » October 7th, 2024, 10:39 pm

Thanks for the reply.
I think I understand what you said (I'm a Net Yaroze guy after all :lol: ).
I played around with the stack pointer in the EXE header but didn't seem to work, I'll try linking at 6MB.

I can't split the file, it has to be a single executable file, created using:
https://github.com/gwald/Yarexe (which is eco2exe, combine and exefix in one)
Which I maintain, I think having the 8MB development support is ideal, because yarexe would mostly be used for development and would save time loading unload etc.

I like the idea of keeping the executable as a "normal" 2MB file while still being >2MB in size for development.
I dont know how the other emulators work, it also works on duckstation... maybe they load the kernel in after loading the psx.exe file.


You can see it working here with avocado, mimewave.mp4 6MB: https://cdn.discordapp.com/attachments/ ... 45fa81021c&

It's from the art tool CDROM, the original batch file is:
all:
ccpsx -O -Xo$80010000 main.c nmime.c control.c wave.c -omimewave.cpe,mimewave.sym

run:
run mimewave

load:
pqbload md0.tmd 80100000
pqbload md0.vdf 80180000
pqbload md0.ndf 80200000
pqbload wave.dat 80400000
pqbload texture.dat 80500000


Which just worked converted to yarexe and a PSX.EXE in emulation.

Thanks again for the help.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests