| View previous topic :: View next topic |
| Author |
Message |
bubugian
Joined: 09 Oct 2008 Posts: 18
|
Posted: Thu Aug 13, 2009 8:33 am Post subject: PSP memory map: WHERE ? |
|
|
I'm new with psp programming so please be patient if my questions are banal.
Looking at some samplecode (Fanjita sio's prx in this case) I found following code:
| Code: |
int intr_handler(void *arg)
{
sceKernelDisableIntr(PSP_HPREMOTE_INT);
u32 stat = _lw(0xBE500040);
_sw(stat, 0xBE500044);
if(!(_lw(PSP_UART4_STAT) & PSP_UART_RXEMPTY)) {
fWrite(_lw(PSP_UART4_FIFO));
sceKernelSetEventFlag(g_eventflag , SIO_CHAR_RECV_EVENT); // set "we got something!!" flag
}
sceKernelEnableIntr(PSP_HPREMOTE_INT); // re-enable interrupt
return -1;
}
|
I imagine that 0xBE500040 and 0xBE500044 are pointer to uart controller's registers.
I'm asking:
Where I could find a table with psp's memory map ?
Which uart controller is used in psp ?
Thanks all! |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Thu Aug 13, 2009 10:17 am Post subject: |
|
|
You can find some info at http://hitmen.c02.at/files/yapspd/psp_doc/
In general, addresses like this and how they're used are found by reverse-engineering the Sony kernel and binaries to see how they work. |
|
| Back to top |
|
 |
bubugian
Joined: 09 Oct 2008 Posts: 18
|
Posted: Thu Aug 13, 2009 6:48 pm Post subject: |
|
|
Thanks, very useful! |
|
| Back to top |
|
 |
|