I'm trying to build snes9xTYL 0.4.2me from source on MacOS X (10.4.10) with the PSPSDK ('psp-gcc -v' says 4.1.0). The precompiled version runs fine on my 3.40-A OE PSP and I just replaced the eboot to run the one I compiled.
I had to make a few changes to get it to compile (IMHO Mostly caused by not using cygwin, but a real *NIX) and it does now without any errormessages. It even starts, but once I choose a game it simply crahes with that BSOD:
If someone want's to read the full dump: I took a shoot.Exception - Bus Error (data)
EPC - 08A08F3C
Cause - 1000001C
Status - 60008613
BadVAddr - 81810860
(btw: is there a better way than taking a camera - can I dump this into a file? The OE-screenshot-module didn't work...)
Using psp-addr2line I found the error occured in line 516 of the file tile_psp.cpp (I put a copy here), which seems to handle the "psp-accelerated"-graphicsmode. Having found that I switched to softwaremode, and found everything running - though slower, as of the nature of softwaremode.
I did some experiments then:
I started with sw-mode and then switched to psp-mode. Doing that I found there are several very similar functions in tile_psp.cpp (all named: pspDraw*Tile16) and the program crashes always in one of these on the second line:
Code: Select all
cache_ptr=tile_insert_cache(current_bitshift,TileKey);
u=(cache_ptr->text_idx&63)<<3; //here's the crash
v=(cache_ptr->text_idx>>6)<<3;
Code: Select all
// insert a new tile in cache
INLINE tile_cache_t *tile_insert_cache(int cache_num,u32 key){
tile_cache_t *p=tile_cache_ptr[cache_num][key&TILE_HASH_MASK];
tile_cache_t *q;
//get first free cache entry
q=tile_cache_first_free[cache_num];
if (!q) {//error cache full
//debug_log("**tile cache full!");
return NULL;
}
tile_cached[cache_num]++;
//tile_cached_line[cache_num][key]++;
//update first free
tile_cache_first_free[cache_num]=tile_cache_first_free[cache_num]->next;
//update new cached tile data
q->next=NULL;
q->key=key;
q->used=render_timestamp;
if (!p) {//insert first
tile_cache_ptr[cache_num][key&TILE_HASH_MASK]=q;
}else{//insert at end
for (;;){
if (p->next) p=p->next;
else {p->next=q;break;}
}
}
return q;
}
(I assume that because I found a thread where someone says that cause: 1000001C means "dereferencition of a NULL-pointer". Is there a list of causes somewhere around?)
I suppose the developer did compile it as is (I already asked in his forum but didn't get an answer) - and something has been changed in the SDK. So if anybody with greater knowledge than mine could point me to what this might be, would be great!
Thanks in advance...