UniROM 8.0.K - GDB Debugging, install/backup to/from memory card, homebrew from memcard, etc

Downloadable items posted by PSXDEV members are within this forum.
Aergan
Curious PSXDEV User
Curious PSXDEV User
Posts: 23
Joined: Jul 26, 2015
Motto: Not today.
PlayStation Model: SCPH-7502b
Location: Staffordshire, UK
Contact:

Post by Aergan » August 5th, 2015, 4:24 am

sicklebrick wrote:Aww jeez... off the top of my head, XLink (PC) works with XFlash + Xplorer Rom, but it doesn't work the other way around ( XLink won't talk to the XFlash CD).
I don't *think* caetla has so many of the in-game features, like cheat searching and all that, you could possibly do it via catflap or XFlash (PC) by resetting the console and dumping the mem out before it's overwritten?

I remember there being similar GameShark code finders, but I dunno how compatible they are with an Xplorer running Caetla. For one, Caetla uses a different way to pulse/ack bytes over the parallel port even on Xplorer cart... but y'know, it could be incompatible in terms of both the protocol and the send/acknowledge routines.

Have you tried to see if it's possible to pause, dump memory and dump the VRAM under caetla with catflap while a game is running? If so you could knock up your own GUI to do the business in C# -it's ridiculously easy to get the comms up and running with the catflap source sitting next to you (just pay close attention to Send vs Send8). If it was to work, then I guess, just like XPlorer you'd have to start the game with cheats enabled or somethng?
I'd completely forgotten they used to work that way. I guess that explains why we (Xplorer/Xploder community) almost always had codes first - we had a decent environment & tools to work with by comparison.
I can live without convenience of that as I can always boot up a VM to talk to it for X-Link etc still. I was more interested to see if I was missing out rather than taking what I'm used to for granted!
From what I've read so far it seems the having Caetla on Xplorer carts seems to be geared more towards sending executables to be executed to surpass limitations with FCD's ROM rather than bi-directional access to PSX memory.

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » August 5th, 2015, 12:08 pm

It's kinda weird actually... around 1999-2000 Xplorers weren't *that* much more expensive than the Action Replay/Gameshark style carts, but they came with XLink95 and also the 16bit command line XLink (which allowed binary uploads/cheat .txt uploads/memory card editing/.EXE uploads). To me it seemed like the fuller package, but everyone on the internets was a bit obsessed with Caetla (Catflap or Caetla didn't support Xplorer by this point). To this day I probably still prefer stock Xplorer tools + ROM. I reckon PSXDev would be quite different if XPlorer had been the dominant ROM the from the beginning! (And if XLink 95 had the .exe upload like XLink 16bit commandline had)

Is Xlink (16bit) + DOSBox likely to work in your VM?

User avatar
Shendo
Verified
C Programming Expert
C Programming Expert
Posts: 250
Joined: Mar 21, 2012
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-7502
Discord: ShendoXT
Location: Croatia, EU

Post by Shendo » August 6th, 2015, 3:32 am

Sure, you can use MCLaunch. If you want I can also give you the source.
You could list and launch programs found on Memcards right from the main menu of your application.
Dev console: SCPH-7502, FreePSXBoot, CH340 serial cable.

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » August 6th, 2015, 9:56 pm

Oh wow, that'd be pretty cool actually!
Is it written in assembly btw, 'cause IIRC even an empty Psy-Q .exe is bigger than 20kb?

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 » August 6th, 2015, 10:30 pm

sicklebrick wrote:Oh wow, that'd be pretty cool actually!
Is it written in assembly btw, 'cause IIRC even an empty Psy-Q .exe is bigger than 20kb?

Code: Select all

#include <stdlib.h>

int main()
{
	AddSIO(9600);
	printf("Playstation %s %d \n" , "debug",  1);	
	
	return 0;
}
That compiles in Psy-Q to 6KB.

You're right though. If you start to add the basic functionality (GPU routines, etc), then you get a much larger size no matter how much you optimise it in C.
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
LameGuy64
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 388
Joined: Apr 10, 2013
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Location: Philippines
Contact:

Post by LameGuy64 » August 7th, 2015, 8:54 am

Would LZSS compression help alleviate the space limitation when storing EXEs inside a memory card? I'm saying this as I've ported an LZSS compressor and decompressor library to the PlayStation and I'd thought that would help greatly for this sort of thing.
Please don't forget to include my name if you share my work around. Credit where it is due.

Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.

DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » August 10th, 2015, 4:00 pm

Yeah, that's the problem I've been facing Shadow - it's ballooning a wee bit.

LameGuy64... how large is the library?

Lemme explain...

There are 2 versions of ByteKiller compression I'm using - an old algo created fro the Amiga, ported by Silpheed. One creates a straightforward binary, so you need the accompanying .asm to unpack. I'm using this for a few things like the display list to cut down on size - you have to unpack to an absolute address, but the display list won't run off a ROM anyway, so it's worked out nicely.

The other version is BKEXE which will make a standalone psx .exe. This is ORGed to load as close to the end of the memory as possible and unpack itsself.
Upside: Super simple to test and maintain.
Downside: Trashes a bit of extra memory, has 0x800 header (size), gotta be careful incase it overwrites itsself with super large .EXEs.

So, it's no real fuss to BKEXE before uploading to the memcard. Infact, it unpacks so fast it would be silly not to... but I'm really wondering if the library is small enough to cover it's ass and compress the embedded XFlash and PSXSerial (and potentially MCLauncher) in UniROM?

xflash(62kb) -> bkexe = 33kb
PSXSerial(68kb) -> bkexe = 38kb
MCLauncher(42kb) -> bkexe = 22kb

I could shave another 1-2 kb off each by storing them as binaries and remembering an absolute path to unpack them, but this complicates the code a bit.

Oh yeah, why mention all this... well I always want to support 128k carts, and UniROM current dev version is sitting at 108kb (220 of 256 for the Caetla Version). Note I mentioned compressed MCLauncher is @ 22kb, so there's a space isssue :
The breakdown right now is something like:
psxserial = 38kb
xflash = 33kb
display = 12kb
menus = 8k (plain text)
font = 7kb (4bpp 128x48 TGA)
=98kb
(+112kb for caetla, with room for the save area it likes to trash)

So the menu system, unpacker, decompressor, fastboot, cdboot, CD unlocker etc, comms stuff and all that only come to around 10k.

At a push, I could free:
2k - Recompress xflash as a binary (not standalone)
2k - Recompress psxserial
1k - Trim whitespace in menus (though I kinda want them easy to edit in a hex editor)
1k - Remove some unused CD functions
(maybe a few more compressing the font or something, but that just means more boot delays)

Which would take us to about 102k.
Enough space, but that would leave only like 6kb left for patches, fixes, features, etc.
(like 1500 32bit ASM instructions I guess, which isn't a lot).


So, if LZSS compression was to offer a better than average 50% compression (bytekiller hovers around 50%), then as much as it would complicate things, it'd be pretty worthwhile, even if it meant recoding it all in assembly!


Last minute addition to the wall of text:

I had a quick shot at compressing the menus and the font... which actually came close to 10kb worth of savings, but I like the idea that they're very accessible with just a hex editor right now.
For example, if you find the text for any menu item, there will be 30ish 4 byte values just above it... each corresponding to one line of text on the screen. If it's zero, the menu cursor will ignore that line, if it's nonzero, it's selectable and that value is the absolute jump address. So say you added some code at the end of the ROM for whatever, you could insert a new line, add the address, and the menu's good to go!

User avatar
LameGuy64
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 388
Joined: Apr 10, 2013
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Location: Philippines
Contact:

Post by LameGuy64 » August 12th, 2015, 1:48 am

The LZSS library I ported is about 7KB in size when compiled as a standalone .obj file... Can be smaller if you don't use the compress function.
Please don't forget to include my name if you share my work around. Credit where it is due.

Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.

DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.

Orion_
Verified
Legendary Programmer
Legendary Programmer
Posts: 256
Joined: Aug 13, 2012
I am a: Programmer
PlayStation Model: Net Yaroze
Location: France
Contact:

Post by Orion_ » August 12th, 2015, 3:20 am

you can compress any PSX exe using UPX, it has a very good compression ratio
Retro game development on Playstation and other consoles http://orionsoft.free.fr/

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » August 12th, 2015, 3:47 pm

Orion_ wrote:you can compress any PSX exe using UPX, it has a very good compression ratio
O_o Wow...
I though you were a little confused when I first read "UPX", but damn I giggled maniacly when I saw the compression ratio! There's no real slowdown and the ratio seems to hover about 38% of the original. Thanks!

LameGuy64 wrote:The LZSS library I ported is about 7KB in size when compiled as a standalone .obj file... Can be smaller if you don't use the compress function.
7KB's not bad actually; would be like 3 after the final .EXE was itsself compressed.

I'd just logged in to submit the 0.24 update before reading these replies, so time was a little tight to make significant MCLauncher Changes - but there's more than enough space now for that and possibly more!
(standalone is 109kb now with MCLauncher as a plugin)
If I've missed anything I'll get round to it in the next update.


P.s. Bump for 0.24 - Auto Launch with Plugin and stuff.

User avatar
CyrusDevX
Active PSXDEV User
Active PSXDEV User
Posts: 47
Joined: Aug 07, 2015

Post by CyrusDevX » August 12th, 2015, 11:14 pm

sicklebrick wrote:
I'd just logged in to submit the 0.24 update before reading these replies, so time was a little tight to make significant MCLauncher Changes - but there's more than enough space now for that and possibly more!
(standalone is 109kb now with MCLauncher as a plugin)
If I've missed anything I'll get round to it in the next update.


P.s. Bump for 0.24 - Auto Launch with Plugin and stuff.
Nice sicklebrick ^^, i love how the psx still is still chugging along lol, now to get my pio card to work again XD

neSneSgB
Interested PSXDEV User
Interested PSXDEV User
Posts: 5
Joined: Jul 26, 2015

Post by neSneSgB » August 23rd, 2015, 1:37 pm

I'm having a slight issue with the UniROM 2.4 on my gray GameShark, where it will automatically boot to X-Flash, unless it randomly decides to stay at the menu. I don't believe it does this on 2.0, and I don't know what's causing it.
It also seems that X-Flash will never find any ROMs on any CDs, it doesn't even spin up the disc to check it, but other than that, I absolutely love UniROM!

User avatar
LameGuy64
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 388
Joined: Apr 10, 2013
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Location: Philippines
Contact:

Post by LameGuy64 » August 24th, 2015, 10:07 am

In case you need a LZSS library I ported to the PSX, here it is:
http://www.mediafire.com/download/s2dzk ... ss_psx.zip

Its a bit messy but it works... Since the PSX runs on a little-endian processor, the library should also work properly when compiled for Win32 as well.

It is based off of one of the LZSS compression/decompression examples from this site:
http://michael.dipperstein.com/lzss/
Please don't forget to include my name if you share my work around. Credit where it is due.

Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.

DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » August 26th, 2015, 11:47 pm

Sorry about this long ass delay - I typed this up in notepad a while ago and got distracted!
neSneSgB wrote:I'm having a slight issue with the UniROM 2.4 on my gray GameShark, where it will automatically boot to X-Flash, unless it randomly decides to stay at the menu. I don't believe it does this on 2.0, and I don't know what's causing it.
It also seems that X-Flash will never find any ROMs on any CDs, it doesn't even spin up the disc to check it, but other than that, I absolutely love UniROM!
Aww jeez pretty sure I know what's wrong here, and I should've seen it coming!
Is it connected to a PC at all? (via the GS card it's self?)

I've been putting off major testing on non-Xplorer cards 'cause it's a pain to reflash afterwards... I'll give this some thought - it's a handy feature to have when it works, but we can't have it screwing things up like that!


LameGuy64 wrote:In case you need a LZSS library I ported to the PSX, here it is:
http://www.mediafire.com/download/s2dzk ... ss_psx.zip

Its a bit messy but it works... Since the PSX runs on a little-endian processor, the library should also work properly when compiled for Win32 as well.

It is based off of one of the LZSS compression/decompression examples from this site:
http://michael.dipperstein.com/lzss/
Damn, that's a really clean and easy to folow implementation, thanks!
From what I see it should work really nicely with the way Shendo's code uses headerless .EXEs.

neSneSgB
Interested PSXDEV User
Interested PSXDEV User
Posts: 5
Joined: Jul 26, 2015

Post by neSneSgB » August 27th, 2015, 7:36 am

Nope, it is not plugged in to anything except the PlayStation, although I will be building the CommLinkUSB by Greg, so I will be able to interface it finally.

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 » January 5th, 2016, 4:46 pm

sicklebrick wrote: It's awesome and all, but I think one of the hurdles for entry for people wanting to have a go at coding for the PSX is the complexity of it all. 10-15 years ago it was likely easier 'cause you'd have a parallel port or ISA slot for the comms card, but now I see a lot of people asking questions then giving up 'cause it's pretty tricky to find a single source of all the tools and hardware to get up and going quickly (i.e. before losing interest). So I'm really intent on having a standalone 128k version of UniROM that's as usable as possible - i.e. comes with its own recovery disk, can be reflashed by itsself, and offers both serial/parallel comms.
I get the feeling it'd be easier for someone with an old generic 128k cart to get something built with Unirom+PSXSerial than to build a Freewing and flash Caetla or other kinda card replacement.
I'm having that issue, I got the 8bit ISA comms card, Action replay and (I think) an xplorer card... and a net yaroze.
I don't really want to use the yaroze stuff (slow) and I don't want to buy a PC that's 20 years old :lol:

Does a USB parallel port work?
ie:
http://www.jaycar.com.au/IT-Products/Co ... e/p/XC4847

if so with which comms software? PSXSerial?
Any help would be appreciated.
Cheers

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 » January 5th, 2016, 5:13 pm

gwald wrote:
sicklebrick wrote: It's awesome and all, but I think one of the hurdles for entry for people wanting to have a go at coding for the PSX is the complexity of it all. 10-15 years ago it was likely easier 'cause you'd have a parallel port or ISA slot for the comms card, but now I see a lot of people asking questions then giving up 'cause it's pretty tricky to find a single source of all the tools and hardware to get up and going quickly (i.e. before losing interest). So I'm really intent on having a standalone 128k version of UniROM that's as usable as possible - i.e. comes with its own recovery disk, can be reflashed by itsself, and offers both serial/parallel comms.
I get the feeling it'd be easier for someone with an old generic 128k cart to get something built with Unirom+PSXSerial than to build a Freewing and flash Caetla or other kinda card replacement.
I'm having that issue, I got the 8bit ISA comms card, Action replay and (I think) an xplorer card... and a net yaroze.
I don't really want to use the yaroze stuff (slow) and I don't want to buy a PC that's 20 years old :lol:

Does a USB parallel port work?
ie:
http://www.jaycar.com.au/IT-Products/Co ... e/p/XC4847

if so with which comms software? PSXSerial?
Any help would be appreciated.
Cheers
Just use your Yaroze DTL-H3050 serial cable with PSXSERIAL.
If your computer does not have a RS232 (male DB9/COM1) port, use a USB to RS232 adapter.

If you want faster transfers with faster debugging, you'll have to get yourself an old computer with a parallel (male DB-25/LPT1) port that supports SPP mode and use your Xplorer/Xploder with CAETLA. I'm not going to explain how to set that up, because it's been covered many times before on the forums (use the 'Search' bar at the top).

If you have an Action Replay V3, you don't need the Comms Link (ISA card) to use it since DATEL added the communication layer in the V3 itself.
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
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 » January 5th, 2016, 6:51 pm

Shadow wrote:
gwald wrote:
sicklebrick wrote: It's awesome and all, but I think one of the hurdles for entry for people wanting to have a go at coding for the PSX is the complexity of it all. 10-15 years ago it was likely easier 'cause you'd have a parallel port or ISA slot for the comms card, but now I see a lot of people asking questions then giving up 'cause it's pretty tricky to find a single source of all the tools and hardware to get up and going quickly (i.e. before losing interest). So I'm really intent on having a standalone 128k version of UniROM that's as usable as possible - i.e. comes with its own recovery disk, can be reflashed by itsself, and offers both serial/parallel comms.
I get the feeling it'd be easier for someone with an old generic 128k cart to get something built with Unirom+PSXSerial than to build a Freewing and flash Caetla or other kinda card replacement.
I'm having that issue, I got the 8bit ISA comms card, Action replay and (I think) an xplorer card... and a net yaroze.
I don't really want to use the yaroze stuff (slow) and I don't want to buy a PC that's 20 years old :lol:

Does a USB parallel port work?
ie:
http://www.jaycar.com.au/IT-Products/Co ... e/p/XC4847

if so with which comms software? PSXSerial?
Any help would be appreciated.
Cheers
Just use your Yaroze DTL-H3050 serial cable with PSXSERIAL.
If your computer does not have a RS232 (male DB9/COM1) port, use a USB to RS232 adapter.

If you want faster transfers with faster debugging, you'll have to get yourself an old computer with a parallel (male DB-25/LPT1) port that supports SPP mode and use your Xplorer/Xploder with CAETLA. I'm not going to explain how to set that up, because it's been covered many times before on the forums (use the 'Search' bar at the top).

If you have an Action Replay V3, you don't need the Comms Link (ISA card) to use it since DATEL added the communication layer in the V3 itself.
Thanks man, you've given me some good leads, cheers
And great site! :praise

User avatar
Squaresoft74
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 310
Joined: Jan 07, 2016
PlayStation Model: SCPH-7502
Location: France
Contact:

Post by Squaresoft74 » January 15th, 2016, 5:29 am

Hi Sicklebrick,
neSneSgB wrote:I'm having a slight issue with the UniROM 2.4 on my gray GameShark, where it will automatically boot to X-Flash, unless it randomly decides to stay at the menu.
I have the very same issue here but with a Xplorer (SST 29EE020 256 KB).

I also own two different Xplorer FX versions i could to test Unirom updates (if any) on if you need.

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » January 16th, 2016, 10:52 am

Heyhey, sorry this has dragged on so long guys... been a little tight for time and I've not had a chance to set up an old PC with ISA slots for the non-XPlorers. I think the GS/XP issues are kinda related... one of the pins on the GS is high by default and on the XP low by default (or the other way around). Kinda means the GS will always register things wrong, but I have noticed that sometimes the XPlorer cards get "stuck" in the wrong state causing the same problem.
I'll have a little fiddle and see if there's a quick fix ^^

As for the serial cable, this is what I use - it's very reliable =)
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 4 guests