Porting Wolf3D to N64: does libdragon/newlib provide threads? I am working on porting the Wolf3D source to N64 using libdragon and I am currently blocked at porting the sound code. It uses pthreads to spawn a thread to write out audio data. Does anyone know if libdragon provide threads of any kind, or would I need to implement that functionality? Thanks. - Jason
I am attempting to re-work the sd_oss file to not use a thread for writing out audio data, but so far my executable hangs up before rendering the "PC-13" warning screen if I actually call the function. Still working through the sound module to see what I might be doing wrong.
Don't rewrite the sd_oss, chances are you'll have to write something to handle a replacement for the pthreads.
Well I am not rewriting sd_oss.c, I just took the SoundThread function and made it a standalone function that does one iteration and returns instead of running for "while(SD_Started)." The reason my port hangs up shortly after starting is because the second time it gets called, it tries to read memory from address 0 at the following line of code: "dat = *MusicData++;" Running out of patience to debug that at the moment, it is 3:10 AM and I have to be at the office in 5 hours, so off for the night.