-
Notifications
You must be signed in to change notification settings - Fork 138
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
m32x+md fixes #1807
m32x+md fixes #1807
Conversation
TascoDLX
commented
Feb 2, 2025
- Revised pwm emulation, mostly to align with documentation. Not likely to affect much except for rare edge cases. Also, added a dc filter to prevent audio popping in certain situations (like window losing focus), but pops on init are correct behavior. Fixes [Mega 32X] BC Racers. Sound Samples are not played back #937 by implementing byte-wide fifo writes from the SH2 side.
- Various fixups to 32x io access by the 68k. Fixes [MEGA CD-32X] Night Trap: video/sound stuttering #1196 and missing music in Brutal.
- Follow-up to a previous PR: cram dots were not limited properly, and line buffer adjustment was crashing 32x in certain cases (as reported in the discord).
ares/md/m32x/pwm.cpp
Outdated
@@ -11,7 +10,8 @@ auto M32X::PWM::unload(Node::Object parent) -> void { | |||
} | |||
|
|||
auto M32X::PWM::main() -> void { | |||
n12 clocks = cycle - 1; | |||
int clocks = cycle > 0 ? cycle-1 : 4095; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change shouldn’t have been necessary, if clocks was 0, being an n5 it should have underflowed and wrapped to 4095 anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct. I had changed this at some point but I guess it just wound up back where it started.
Added fix to pixel alignment between H32 and H40 modes. This is also follow-up to the previous PR where borders were added. |