Closed Kippykip closed 2 years ago
I've just noticed this too! You are on it KippyKip!
I've just noticed this too! You are on it KippyKip!
I got this project on email alerts baby 😄 Btw I forgot to check, does the high quality setting save?
No it won't save.
I need to check if the game settings are stored at the start or end of SRAM as if I saved them at the start I have a backward compatibility issue....
Got no idea what is breaking the sound though.
I think I'm going to have to do a commit by commit bi-sect. Oh joy.
So. Heres where we are.
The commit that uses the original iD Zone allocator screws up the sound. I think it's because maxmod is calling malloc to grab some EWRAM and not getting any as we've already allocated it all.
Can test this by only grabbing 200kb and seeing if the music works again.
It seems to be somewhere in between "Code tidy. Fix some warnings." (works) and the "Unused globals" commit (breaks). I'm still narrowing them down tho
So. Heres where we are.
The commit that uses the original iD Zone allocator screws up the sound. I think it's because maxmod is calling malloc to grab some EWRAM and not getting any as we've already allocated it all.
Can test this by only grabbing 200kb and seeing if the music works again.
oh nevermind, now you're on it lol
Yes, if we change the Zone allow to only 200kb then the music works again.
If we look here: https://github.com/devkitPro/maxmod/blob/master/source_gba/mm_init_default.s
MaxMod is calling malloc and then not checking the result of the alloc so it is corrupting memory.
We can fix this by using the mmInit call and supplying mix buffers ourselves. The catch here is that an iwram mixbuffer is already created so we want to use that rather than waste iwram by allocating another buffer.
2.3 should work now!
Hey Doomhack, just gave the new 2.2 build a try, although I noticed the sound isn't working at all (just a bunch of clicking sounds), and also some of the weapon sprites are glitching? I took a video. https://user-images.githubusercontent.com/33023808/146653177-cafc72a6-8eff-446d-bb79-f43de882f189.mp4
Otherwise the high detail mode looks pretty epic otherwise