Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] MSU-1 implementation and 4MB SuperFX and FastROM modes. #21

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

TrashRaccoonSnuffy
Copy link
Collaborator

@TrashRaccoonSnuffy TrashRaccoonSnuffy commented Sep 8, 2023

https://github.com/xyproto/zsnes/assets/127693805/a213c104-3e3d-4670-9f36-9b40a1f4d49f
https://github.com/xyproto/zsnes/assets/127693805/97373535-b44a-4877-87a5-f3185a242bf2

Changes:

  • Added support for the MSU-1 coprocessor. The MSU-1 is a custom Media Enhancement chip that was originally developed for BSNES and later ported to other emulators, it allows for streaming external audio data and files via DMA, like a CD drive.
  • Added support for SuperFX 4MB mapping and fixed a couple of SuperFX games not booting at all due to incorrect RAM mapping. Not every game has been verified and some still are a black screen (Star Fox, Star Fox 2) but Yoshi's Island and other games are unaffected besides graphical bugs, issue Graphical issues on Yoshi's Island #18
  • Fixed FastROM bit detection being incorrect for ROM header check, made every ROM act as if it were FastROM and this caused very rare timing issues on some games, needs to be also tested for compatibility.

Current issues with MSU-1:

  • Some games have DMA timing issues with streaming video data from the MSU-1, causing corruption of graphics.
  • Data seek should be protected and fail if the read is out of bounds. It is currently not checked and it will cause an access violation or a crash if the read goes too far.
  • Sound sample rates other than 44100 will cause the audio to sound sped up or slowed down. Interpolation and multiplying the sound position by (44100/samplerate) needs to be added to solve this.
  • The implementation is not very good at the moment. It lacks a save state interface so reloading a save from a older point in the game will not restore the MSU-1 status, continuing to play whatever was playing before the save was loaded.

@TrashRaccoonSnuffy TrashRaccoonSnuffy changed the title [WIP, do not merge] MSU-1 implementation and 4MB SuperFX and FastROM modes. [WIP] MSU-1 implementation and 4MB SuperFX and FastROM modes. Sep 8, 2023
@xyproto xyproto marked this pull request as ready for review September 8, 2023 20:12
@xyproto xyproto merged commit dd05812 into xyproto:main Sep 8, 2023
@xyproto
Copy link
Owner

xyproto commented Sep 8, 2023

Thank you for the PR.

LGTM! Merged.

@xyproto
Copy link
Owner

xyproto commented Sep 8, 2023

I also added you as a collaborator for this project.

@TrashRaccoonSnuffy
Copy link
Collaborator Author

Thank you! I pushed a commit to fix the sample rate issues and restore a OOM check in the Super FX code. The MSU-1 implementation should be all good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants