http://rapidshare.com/files/186940799/p ... ch.gz.html
This patch it to maintain(well, in this case, gain) compatibility with kernel-mode, as pspDebugScreenPrintf is not usable in kernel-mode modules, and pspDebugScreenKprintf is not usable in user-mode(to the best of my knowledge), so I added a macro I came across somewhere to it to substitute that, so that way it would work on both usermode and kernel-mode.
pspdebugkb.c patch
pspdebugkb.c patch
Programming with:
Geany + Latest PSPSDK from svn
Geany + Latest PSPSDK from svn
Code: Select all
--- pspdebugkb.c 2009-01-21 00:27:21.000000000 -0500
+++ pspdebugkb_new.c 2009-01-21 00:27:17.000000000 -0500
@@ -15,6 +15,8 @@
#include <string.h>
#include "pspdebugkb.h"
+#define pspDebugScreenPrintf(...) { char buf[256]; sprintf(buf,__VA_ARGS__); pspDebugScreenPuts( buf ); }
+
static char loCharTable[PSP_DEBUG_KB_NUM_ROWS][PSP_DEBUG_KB_NUM_CHARS] = {
{ '`', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=' },
{ 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\\' },
The pspDebugScreenPrintf does not work in kernel mode(thus the entire debug keyboard), and from my experience, pspDebugScreenKprintf does not work in user mode. So, instead of manually going and doing sprintf this that puts this I just used Raphael's macro he gave me a while back to overcome this.
Programming with:
Geany + Latest PSPSDK from svn
Geany + Latest PSPSDK from svn
Well the "changed" version if the pspDebugScreenKprintf which I modified to use the kernel's callback formatter. Alas due to obvious name conflicts there was no easy and compatible way of matching the two up :) Now if we had a clear separation between kernel and user libraries that wouldn't now be an issue :)