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
Y8950 ADPCM implementation #1160
Comments
This patch might fix issues 1 and 3... |
Manuel, thank you. I am doing testing, will be editing original post (if it is possible) adding more relevant information. |
You should be able to. If not, just add a new comment. No problem! :) Please let me know if the patch does what it should do... assuming you can compile and run the latest openMSX code and apply the patch before that. |
@MBilderbeek: I don't think your patch for point 1 is not correct (point 3 seems fine): @Eugeny1 : point 2 is (only) about the timing of the flags in the status register, right? Currently openMSX does not emulate this timing (see comment in src/sound/Y8950Adpcm.cc:271) |
Wouter, let me explain and then you will decide if it will require implementation:
This code hangs on real module because when status is read second time EOS bit is not set yet. But this code works in openMSX because it sets EOS immediately without delay.
This code works on real module, because delay is enough for EOS to raise, but it hangs on openMSX because EOS gets set immediately and flags reset following port write resets EOS bit. |
@Eugeny1: now that you've created a detection routine it's really required to implement this in openMSX ;-) |
@Eugeny1 Were you already able to test the other fixes? |
This fixes points 1 and 3 of #1160 See the discussion on that issue for more details. Very short summary: 1) openMSX sets EOS one byte too late 3) continue to write after EOS wraps around Still TODO: 2) Timing of the BUFRDY and EOS status bits
I just found out that e5dc580 causes a regression:
@m9710797 What is the best way to proceed? |
In case of EOS, BUF_RDY must be set as well. See comments in the code for details.
Regression caused by e5dc580 should be fixed now. |
We are performing testing on the real module, and will be adding information here on the discrepancies between openMSX and real module.
returns
8E 8E 8E 8E 8E 9E 9E 9E 9E 9E
thus BUFRDY flag appears set before EOS flag is being set. Thus if application reads status register once within 5 * 18 * 279= ~25 us and checks for EOS, it will miss this flag. Code similar to Unknown Reality
does also miss the EOS flag as read is performed within ~11 us. UR code does not fail because it does not track end of sequence using the flag but using number of bytes written.
When reading data from sample RAM there' no delay in EOS setting, and flag gets set immediately after reading from the data port.
The text was updated successfully, but these errors were encountered: