futaris:
I still have one more puzzle to solve:
My latest setup works with the EBOOT from the zip that you provided above - I get normal NMEA sentences on the screen.
But then I use the EBOOT, compiled on my cygwin, box I get only 3-4 characters a second. It looks like most of the characters are skipped for some reason. Here is a sample of what I get:
$00,$0,$00$..$P,0323G$.,$G,6$58,$54,$6 and so on
I tried to build a few versions of SDK (from 10 months ago- to current) under sygwin and recompile, but still I get the same output...
Of course I played with different bauds but 38400 is the only one, giving me more or less recorgnizable characters... but at any baud I only get 3-4 charachters per second...
Any ideas? Is there anything else in your EBOOT that did not get to the source, provided in the zip? Under which environment did you build it?
[EDIT] Nevermind, I fugured out what the problem was - looks like reading the controls was slowing down the read loop.
Here is the final barebone code sample that works for me:
Code: Select all
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspsdk.h>
PSP_MODULE_INFO("GPSCOMM", 0x1000, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
int main(void)
{
pspDebugScreenInit();
pspDebugSioInit();
pspDebugSioSetBaud(38400);
pspDebugScreenPrintf("PSP GPSlim 236 test:\n");
double i=0;
int ch;
while(i<20000000)
{
i++;
ch = pspDebugSioGetchar();
if((ch >= 0) && (ch != '\r')) {
pspDebugScreenPrintf("%c", ch);
}
}
sceKernelExitGame();
return 0;
}
Makefile:
Code: Select all
TARGET = pspgpslim236
OBJS = main.o
USE_PSPSDK_LIBC = 1
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = GPSlim236
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
LIBS += -lpsphprm_driver