First thanks for mupen64, it seems to be the only n64 emulator working in linux and being open sourced !
Now I am having some troubles with this annoying freezing bug described in the big topic below (sound still works but everything except the sound is frozen).
So I made a few tests and discovered 2 thiings :
there is a gcc bug somewhere when you try to compile the glNintendo.so-0.3.1 plugin (the source of 0.4.1 does not seem to be available). Anyway the bug shows for example on the title screen of zelda : red rotating N, no textures and "Nintendo" unreadable. It happens with gcc-3.2.3 and gcc-3.3.1. The only work around I found was to use -O0 instead of -O3. I didn't take the time to find where the bug exactly is in the plugin source (usually you can find a workaround in these cases).
And secondly I found a buffer overflow in dma.c. It happens for example when you try to load "mortal kombat trilogy", it says the rom seems to be some kind of hack, you click yes to continue, and you get tons of segfaults after the title screen. Also this same bug makes the letters quite unreadable in zelda when you first enter your name.
It's around line 150 in memory/dma.c :
int offset = ((pi_register.pi_cart_addr_reg-0x10000000)&(taille_rom-1));
longueur = (pi_register.pi_wr_len_reg & 0xFFFFFF)+1;
i = (pi_register.pi_cart_addr_reg-0x10000000)&(taille_rom-1);
longueur = (i + longueur) > taille_rom ?
(taille_rom - i) : longueur;
longueur = (pi_register.pi_dram_addr_reg + longueur) > 0x7FFFFF ?
(0x7FFFFF - pi_register.pi_dram_addr_reg) : longueur;
for (i=0; i < longueur; i++)
((unsigned char*)rdram)[(pi_register.pi_dram_addr_reg+i)^S8]=
rom[(offset+i)^S8];
The bigest problem was with the line i = ....
It was anded with something much bigger than rdram, and the correction on longueur below was just not enough after this.
I still have this very annoying freezing bug, I don't have a clue about what's happening for now. You can save when it happens apparently, but it's useless because the cpu emulation seems dead.
Hope this dma thing helps, and thanks again for the emulator !
Now I am having some troubles with this annoying freezing bug described in the big topic below (sound still works but everything except the sound is frozen).
So I made a few tests and discovered 2 thiings :
there is a gcc bug somewhere when you try to compile the glNintendo.so-0.3.1 plugin (the source of 0.4.1 does not seem to be available). Anyway the bug shows for example on the title screen of zelda : red rotating N, no textures and "Nintendo" unreadable. It happens with gcc-3.2.3 and gcc-3.3.1. The only work around I found was to use -O0 instead of -O3. I didn't take the time to find where the bug exactly is in the plugin source (usually you can find a workaround in these cases).
And secondly I found a buffer overflow in dma.c. It happens for example when you try to load "mortal kombat trilogy", it says the rom seems to be some kind of hack, you click yes to continue, and you get tons of segfaults after the title screen. Also this same bug makes the letters quite unreadable in zelda when you first enter your name.
It's around line 150 in memory/dma.c :
int offset = ((pi_register.pi_cart_addr_reg-0x10000000)&(taille_rom-1));
longueur = (pi_register.pi_wr_len_reg & 0xFFFFFF)+1;
i = (pi_register.pi_cart_addr_reg-0x10000000)&(taille_rom-1);
longueur = (i + longueur) > taille_rom ?
(taille_rom - i) : longueur;
longueur = (pi_register.pi_dram_addr_reg + longueur) > 0x7FFFFF ?
(0x7FFFFF - pi_register.pi_dram_addr_reg) : longueur;
for (i=0; i < longueur; i++)
((unsigned char*)rdram)[(pi_register.pi_dram_addr_reg+i)^S8]=
rom[(offset+i)^S8];
The bigest problem was with the line i = ....
It was anded with something much bigger than rdram, and the correction on longueur below was just not enough after this.
I still have this very annoying freezing bug, I don't have a clue about what's happening for now. You can save when it happens apparently, but it's useless because the cpu emulation seems dead.
Hope this dma thing helps, and thanks again for the emulator !
Last edited: