Is there any chance to do C code line-by-line debugging (possibly with emulators such as no$psx), or printf() calls are the closest thing to achieve a debugging environment? ccpsx comes with a -g option but I have no clue about how to use that... was it meant for specific hardware like DTL-H2000 or it can be used in some other ways as well?
Thanks in advance
line-by-line debugging possibility
-
Verified
- Extreme PSXDEV User
- Posts: 131
- Joined: Jul 17, 2013
- t0rxe
- C Programming Expert
- Posts: 139
- Joined: Dec 19, 2012
- Motto: /\OX[]
- PlayStation Model: SCPH-5502
- Location: Australia
I've actually thought about this, and I noticed that the PC compiles on itself and runs on itself, whereas the PlayStation compiles on the PC and runs on itself, so live debugging isn't possible without some sort of 'step by step' I/O check procedure. I just use the printf() function where and when I need to debug things. If you use NO$PSX, you can use the printf() command, but if you're on a real console, a serial cable works great for debugging as the printf() command gets sent over it once AddSIO() is initialised.
"Nostalgia isn't a big enough word to describe the PlayStation from my eyes"
-
Verified
- Extreme PSXDEV User
- Posts: 131
- Joined: Jul 17, 2013
Alright, printf it is then. Still curious about for what kind of debugging -g parameter is intended though, since the interactive one isn't possible
Just out of curiosity (didn't check myself yet).
scee_dev.pdf, page 13 and following: "3.1.2b DBUGPSX".
They talk about this debugger for PC-based development but don't get into details. Could it be a useful tool?
scee_dev.pdf, page 13 and following: "3.1.2b DBUGPSX".
They talk about this debugger for PC-based development but don't get into details. Could it be a useful tool?
-
Verified
- Extreme PSXDEV User
- Posts: 131
- Joined: Jul 17, 2013
I've digged a bit more about this, and found this excerpt from the psy-q documentation cd(DEVREFS/PSYQ2.PDF more precisely):
If someone with enough experience/patience writes a C/C++ debugger that interprets debugging symbols produced with -g parameter while being linked with an emulator/real psx without having to buy rare and expensive hardware relics, that would be great. But I honestly don't see that happening
The sad part is that the included debugger seems to work only with pieces of hardware like DTL-S510B(a SCSI card linked with psx PIO), or the boards DTL-H2000/DTL-H2500, so it's most likely useless nowadaysPsy-Q offers Source Level Debugging. This allows you to step, trace, set
breakpoints, etc. in your original C or Assembler source code. The system
automatically and invisibly, handles multiple text files.
If someone with enough experience/patience writes a C/C++ debugger that interprets debugging symbols produced with -g parameter while being linked with an emulator/real psx without having to buy rare and expensive hardware relics, that would be great. But I honestly don't see that happening
- t0rxe
- C Programming Expert
- Posts: 139
- Joined: Dec 19, 2012
- Motto: /\OX[]
- PlayStation Model: SCPH-5502
- Location: Australia
I too was looking at DBUGPSX last night actually
It's in the Psy-Q BIN folder and is part of the environment variables, so it can be called from anywhere, but we can't use it. I'm sure there is probably a way to debug with CAETLA. I will look into it.
It's in the Psy-Q BIN folder and is part of the environment variables, so it can be called from anywhere, but we can't use it. I'm sure there is probably a way to debug with CAETLA. I will look into it.
"Nostalgia isn't a big enough word to describe the PlayStation from my eyes"
-
Verified
- Extreme PSXDEV User
- Posts: 131
- Joined: Jul 17, 2013
let us know if you figure something out, I might get an xplorer fx/gameshark cartridge as well
- t0rxe
- C Programming Expert
- Posts: 139
- Joined: Dec 19, 2012
- Motto: /\OX[]
- PlayStation Model: SCPH-5502
- Location: Australia
I didn't find anything for CAETLA. The closest thing I found was that you can download the RAM. The only way to debug at the moment is with SN Systems DBUGPSX.EXE on official development hardware. I'm sure the program could be cracked to work with CAETLA though by someone, but it would be difficult. It would be easier for them to code a new one from scratch. Another option is to just use NO$PSX. This has a straight up debugger on start, but there isn't a 'live' step by step C code debugger like DBUGPSX states it offers.
"Nostalgia isn't a big enough word to describe the PlayStation from my eyes"
Who is online
Users browsing this forum: No registered users and 4 guests