tfdsoft / famidash

Geometry Dash for the Nintendo Entertainment System
MIT License
222 stars 21 forks source link

Initial DPCM safe mouse code #269

Closed jroweboy closed 1 month ago

jroweboy commented 1 month ago

The reason its a draft right now is there's still an issue with timing that I need to work out (you'll see at the top of the screen that the parallax is jittery)

But all of the button inputs should be working, please test if i'm missing anything.

Also I cheated to clear up enough space for the new code by moving some code in reset level into the $C000 bank. To hack around that, I made it so we can disable dpcm banking when loading it. In this case it didn't matter since DPCM isn't playing except in practice mode, so i just check for practice mode and skip playing dpcm samples during loading. So sue me. Move something else outta the fixed bank if you want me to not do this 😛 Or you can embrace the awesome hack and move more of the reset level code into a dpcm bank. :)

ADM228 commented 1 month ago

~~Unfortunately your autopsy report ideas of our music seem outdated - literally every song uses DPCM and we have 2 DPCM banks to fit all the shit in

what we DO have is a separate SFX bank that isn't a fixed one~~ didn't read correctly, but at that point the extra code can be moved into a proper XCD bank

jroweboy commented 1 month ago

My reading of the code was informed of dpcm banking, the only reason this works is because we stop music when you die and restart a level (except for the practice music, which i hacked around as I mentioned). The reason it couldn't go into a bank at $a000 is because the code already switches out $a000 multiple times for loading various things when restarting the level, so we can't put the loading code into a slot in $a000 and expect it to work.

jroweboy commented 1 month ago

Pushed the update so that palettes are loaded directly instead of through a pointer.

Its just barely not enough time yet to fit all updates in each frame, so i still delay palette writes.