PS2 How to debug PADEMU?

shooter

Member
Hello! i'm trying to implement Xbox360 wired controller support in OPL's PADEMU module, but i have a issues with controller's enpoints detection(as i guess). Without debugging solve this issue is very painful :D
So, i want to get a output of messages contains if DPRINTF defenitions, that be represented in PADEMU module's source code. For solve this i uncomment a DPRINTF defenitiont thats calls a printf function, and build OPL with
make PADEMU=1 iopcore_debug
command, but i dont see an output from ps2client listen command.

I can't find any information about OPL debugging process. There is right way? What i'm missed in this steps?

Thanks!
 
  • Like
Reactions: TnA
Finally i get this output:
loadelf: fname host:opl.elf secname all
Input ELF format filename = host:opl.elf
0 00100000 002b7d08 ............................................
1 009434ac 00000004 .
Loaded, host:opl.elf
start address 0x1000d8
gp address 00000000
OPL GUI start!
This is all, despite what i uncomment a DPRINTF macro definition:
+#define DPRINTF(x...) printf(x)
+//#define DPRINTF(x...)
in modules/ds34usb/iop/ds34usb.c and modules/pademu/ds34usb.c files.

I do not know why printed strings are not represented if ps2link output. Aneone hWhat i need to check?
 
Did you compile with debugging support?:
make PADEMU=1 DEBUG=1 INGAME_DEBUG=1 clean all
(or instead of "all", you can also build "opl.elf", "run", "sim" or "release")

You do not need to comment/uncomment the DPRINTF macro's.
 
Yeah, i build OPL with
make PADEMU=1 DEBUG=1 INGAME_DEBUG=1
. Then i use a
ps2client execee host:opl.elf
command.

I'm checked in PCSX2 that's i have no debug messages without uncommenting DPRINTF macro. But i try to restore them to initial state, and still don't see is in ps2client listen output, very interesting.

And i noticed that debug OPL builds cannot start on my console while OPL configured to fetch games from SMB share(many and many error messages goin to ps2link listen output). Disabled DHCP and SMBD on my host, using a static IP configuration helps me. While I will test without starting the games, only the menu.
 
Code:
make DEBUG=1 clean run
should be all you need.

You do not need in-game debugging. if the "run" target fails (probably becouse of a different IP addres), try changing the ps2client command in the Makefile. Make sure you do clean also, or you will still be using the non-debug .o files from your previous build.

I've had lots of issues with losing debug messages also. Most of the time I loose the messages after rebooting the IOP. This is normal, but the debug messages should return after the right modules are loaded again.

You can try commenting line 179 to 198 of src/system.c to prevent the IOP reboot. This sometimes helps me.
https://github.com/ps2homebrew/Open-PS2-Loader/blob/master/src/system.c#L179
https://github.com/ps2homebrew/Open-PS2-Loader/blob/master/src/system.c#L198

And i noticed that debug OPL builds cannot start on my console while OPL configured to fetch games from SMB share(many and many error messages goin to ps2link listen output). Disabled DHCP and SMBD on my host, using a static IP configuration helps me. While I will test without starting the games, only the menu.
This could be a bug. You can report it here:
https://github.com/ps2homebrew/Open-PS2-Loader/issues
 
Hi
@shooter as @Maximus32 wrote I also recommended to use some test application - you can use pad example with xpadman module. With pademu and ingame debug enabled is easy to run out of iop memory. When I was working on pademu I redirected iop tty output to ee sio to prevent that.
I'm currently testing pademu as separate modules and I've added draft of xbox360 wired controller module. Since I don't have one I can't test it and I don't know if it works. You could finish it if you like :)
https://github.com/belek666/Open-PS2-Loader
 
Nice to hear that. i will try to use all yours advices. And yeah, i will to switch my attention to that fork, he will be great.
Thank you, guys.
 
  • Like
Reactions: TnA
I wish you good luck!

Multiple things are currently emerging, which WILL make various work a lot easier!
 
Back
Top