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

Improve CIC emulation timings #45

Open
Polprzewodnikowy opened this issue Aug 9, 2023 · 4 comments
Open

Improve CIC emulation timings #45

Polprzewodnikowy opened this issue Aug 9, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Polprzewodnikowy
Copy link
Owner

Describe the bug
CIC emulation doesn't adhere to timings generated by real CIC chip in two locations: before sending encoded checksum and before sending x105 algorithm result. This makes games boot faster than on real cartridge.

To Reproduce
Steps to reproduce the behavior:

  1. Run game on SC64 with direct mode enabled
  2. Measure timings
  3. Run game on retail cartridge
  4. Measure timings

Screenshots
No screenshots.

Expected behavior
Timings should be close to the real CIC chip.

Possible solution
Add delay between detecting falling edge of CIC clock and falling edge of CIC data in locations mentioned above.

@Polprzewodnikowy Polprzewodnikowy added the bug Something isn't working label Aug 9, 2023
@networkfusion
Copy link
Contributor

Was this not fixed with V2.18?

@Polprzewodnikowy
Copy link
Owner Author

Not really, I still need to measure differences between real CIC and emulated one.

@jago85
Copy link

jago85 commented Feb 11, 2024

Why is that even a problem? Or does it have something to do with speedrunning, where everyone has to have the same prerequisites?

@Polprzewodnikowy
Copy link
Owner Author

I've got one report where SC64 booted the game couple of frames faster than retail cartridge. Test was done with direct boot (there was no code running before loading the game). I haven't done such testing myself so I couldn't be 100% sure if the CIC timings are at fault here, but it seems that's the only difference between retail cartridge and SC64. I've noticed that PIF waits for CIC response in couple of places but I'm not sure if this wait time could extend to several milliseconds, as boot time difference was measured in 16 ms frames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants