PSn00b Debugger - Homebrew debugger for retail consoles

Downloadable items posted by PSXDEV members are within this forum.
Post Reply
User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 349
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

PSn00b Debugger - Homebrew debugger for retail consoles

Post by LameGuy64 » December 12th, 2018, 2:15 pm

This is a PlayStation debugger I made entirely from scratch, debugging programs on real hardware is no longer exclusive to official development hardware with PSn00b Debugger as it works on retail units with a modchip and a serial cable of some sort preferably one that uses a 3.3v USB TTL serial adapter.

PSn00b Debugger Features:
  • Instruction trace.
  • Run to cursor.
  • MIPS disassembler.
  • Register preview.
  • Remote memory browser.
  • Remote reset.
  • Supports PS-EXE, CPE and ELF format executables.
  • Supports SN symbol files (does not support ELF symbols yet).
  • Resolve program address to source line and vice versa.
  • Bookmarks.
  • Built-in serial message window.
Currently, the debugger only supports communications through the serial interface and does not support Xplorer nor PAR communication interfaces. Still need to do research on achieving reliable communications with the Xplorer's parallel interface.

Screenshot:
Image

Demonstration video with some insight to how my debugger works:
https://youtube.com/watch?v=YSgkBlS0oGs

Download and source code of PSn00b Debugger can be found on github.

You will also need LITELOAD 1.1 or newer as my debugger only works on that. You can find an ISO and cartridge ROM version of it in this forum thread.
Attachments
psn00b-debugger.png
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.

rama3
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 442
Joined: April 16th, 2017, 10:54 pm

Re: PSn00b Debugger - Homebrew debugger for retail consoles

Post by rama3 » December 13th, 2018, 6:41 am

Very impressive work!
Software development isn't my PSX niche, but knowing that single step debugging is now possible is great :)

Regarding your efforts with the parallel port:
Developers for PSX quickly reach out to this port when they want more speed. Sometimes it works out, sometimes it doesn't.
In any case, it will require an expansion card with some custom software installed on it.
Next, people will need to source a legacy parallel COM port cable (and/or build adapter hardware with address and data lines).
Then it's still not enough, a PCI adapter card (or an ancient PC) is required for the cable...

Suffice it to say, the "easy speed" route via the expansion port is actually quite a burden to use.

So, what else can we do?
Have you looked into the actual limitations of the serial port yet? (I haven't :p)
How fast can the symbol rate be, and does the PSX bus support moving more data?
If there are untapped reserves there, then quite often the need to drive a serial cable limits what can be achieved.
However, if you simply attached a USB to TTL bridge directly at the port, then the more efficient USB protocol eliminates that issue :)

If really no one has tested those limits yet, there could be a lot of untapped speed there.
At maybe 4x the current "limit", it may be fast enough to be convenient.

User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 349
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

Re: PSn00b Debugger - Homebrew debugger for retail consoles

Post by LameGuy64 » December 13th, 2018, 12:28 pm

Well, there are actually some new motherboards as recent as Socket 1151 and AM4 still being made with parallel ports on it usually as a pin header that you can connect the same DB25 connectors from an old AT machine to. My i5 4590 rig for example has such a header and I can actually use my Xplorer on it even under Win7 thanks to orion's inpout32 port of catflap. I have a PCIE legacy I/O card that has 2 serial and a parallel port and it uses the CH384 chipset but i haven't tested that yet. Using the Xplorer's parallel interface is pretty tricky in my experience because it involves a lot of bit banging and sometimes careful timing.

I should correct you a bit that the PAR (and Gameshark except the Pro version) are the only cheat cartridges that require a special 'comms-link' card for it and its DB25 header is not parallel port compatible but it has the advantage of being a full 8-bit comms bus instead of the 8-bits in, 3 bits out that Xplorer has but that's due to limitations of the bi-directional parallel port interface. There is CommLinkUSB and XlinkUSB but its closed sourced rubbish so I can't make use of them in my debugger project. danhans42's Raspberry Pi based efforts for the Xplorer look promising if he decides to release sources of it.

Faster transfer speeds could be achieved by means of building a custom comms interface that communicates through USB and featuring a sizable buffer that can be DMA'd but that would require using an FPGA. I imagine speeds would be on par if not faster than reading from CD which has a maximum transfer rate of about 300KB/s.
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
Squaresoft74
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 140
Joined: January 7th, 2016, 2:55 am
PlayStation Model: SCPH-7502
Location: France
Contact:

Re: PSn00b Debugger - Homebrew debugger for retail consoles

Post by Squaresoft74 » December 13th, 2018, 12:55 pm

Nice to see such tool being developed, many thanks for this ! :clap
LameGuy64 wrote:
December 12th, 2018, 2:15 pm
Currently, the debugger only supports communications through the serial interface and does not support Xplorer nor PAR communication interfaces. Still need to do research on achieving reliable communications with the Xplorer's parallel interface.
Maybe try contacting Nocash and see if he could help you here ?
His Expansion ROM with no$psx is now my primary setup to upload exe at great speed and it works fine up to Windows 10 x86.
Would be great if you could get similar results with your LITELOAD/PSn00b Debugger setup. :praise
rama3 wrote:
December 13th, 2018, 6:41 am
Then it's still not enough, a PCI adapter card (or an ancient PC) is required for the cable...
On my side, I'm using a not that old Dell Latitude E6540 laptop, with its docking station I separately bought for 10 € in a refurbished hardware store. ! :mrgreen:

So i think it's still possible to have modern hardware working for this kind of things without having to spend too much money.

Except maybe for the Xploder/Xplorer itself getting ridiculously expensive on ebay since the last three years if you don't already have one... :roll:

Until Nocash's stuff got released my main problem for my usage was more with the old tools not properly working (or at all) with modern OS.
So if LameGuy64 can get his tools to work with such setups, that would be very welcomed. ;)

User avatar
gwald
1997 Yaroze Enthusiast
1997 Yaroze Enthusiast
Posts: 256
Joined: September 18th, 2013, 8:44 am
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Location: Australia
Contact:

Re: PSn00b Debugger - Homebrew debugger for retail consoles

Post by gwald » December 14th, 2018, 8:16 am

my 2cents:
Anything that requires old hardware is counter productive, even if it's faster.
Accessibility is more important then usability etc.
Net Yaroze comms cable, PS link cable, AR/Xplorer, old ISA/PCI slots & cards, and physical parallel and serial ports just make it harder.
Anything that interfaces with USB is the way to go IMO
As long as the 2 wire USB serial mod works and is maintained as a base, then it's all good!

User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 349
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

Re: PSn00b Debugger - Homebrew debugger for retail consoles

Post by LameGuy64 » January 23rd, 2019, 11:59 am

Just released a small 0.26b update that fixes some bugs on the disassembler and a bug on the memory browser when you save a project with the bookmarks window open.

I'm thinking of getting proper Linux support working on the debugger so I can start implementing support for ELF symbols.
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.

Dedok179
Active PSXDEV User
Active PSXDEV User
Posts: 36
Joined: June 11th, 2015, 7:23 pm
I am a: Programmer, Developer.
PlayStation Model: SCPH-5502
Location: Tula,RU

Re: PSn00b Debugger - Homebrew debugger for retail consoles

Post by Dedok179 » January 27th, 2019, 9:19 pm

LameGuy64, Is 3 contacts enough to use it? Or not all 8 are bypassed?

User avatar
LameGuy64
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 349
Joined: April 10th, 2013, 3:47 pm
I am a: Hobbyist Game Developer
Motto: Commercial or not, play it!
PlayStation Model: H2000/7000
Skype: lameguy64
Location: Philippines

Re: PSn00b Debugger - Homebrew debugger for retail consoles

Post by LameGuy64 » January 27th, 2019, 11:55 pm

My debugger does not require any handshaking so Tx, Rx and Ground is typically enough.
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.

Dedok179
Active PSXDEV User
Active PSXDEV User
Posts: 36
Joined: June 11th, 2015, 7:23 pm
I am a: Programmer, Developer.
PlayStation Model: SCPH-5502
Location: Tula,RU

Re: PSn00b Debugger - Homebrew debugger for retail consoles

Post by Dedok179 » January 27th, 2019, 11:59 pm

LameGuy64, All right. Thank you very much.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest