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

Integrate 64DD into RTC subsystem #674

Merged
merged 4 commits into from
Jan 31, 2025
Merged

Integrate 64DD into RTC subsystem #674

merged 4 commits into from
Jan 31, 2025

Conversation

meeq
Copy link
Contributor

@meeq meeq commented Jan 30, 2025

N64brew Discord Thread

Highlights

  • Add functions to get and set the 64DD RTC
  • Change rtctest example ROM media category to C (Expandable Game Pak with optional 64DD support)
  • Add support for 64DD as a clock source in RTC subsystem
  • Allow switching RTC source in rtctest example (if both Joybus and DD RTCs are available)

Outstanding items

  • Investigating weird issues with clock drift
  • Needs more testing

Caveats

  • 64DD is currently rather obnoxious to enable in emulators/flashcarts:
    • Ares only enables 64DD for N64 ROMs if they have category code C and an expansion disk is loaded
    • SC64 only enables 64DD registers if a 64DD IPL and expansion disk are provided
      • The test ROM will hang indefinitely if you try to load with just the 64DD IPL and no expansion disk
      • The test ROM will hang indefinitely on 64DD access if you detach sc64deployer
  • SC64 only has one physical RTC, so things get weird when both clocks are being used
    • Still investigating the nature of this; need clarity from Korgeaux on expected behavior here

Testing

Ares

To test with Ares, you need to specify the US 64DD IPL in the Firmware settings and provide a "dummy" 64DD Disk:

ares rtctest.z64 dummy_disk.ndd

LuigiBlood has good documentation for using 64DD with Ares on 64DD.org. The critical piece is that the Game Pak ROM MUST have a Game ID Category Code of C for Ares to trigger the 64DD codepath. The F-Zero Expansion Disk makes for a good "dummy" disk.

SC64

To test with SC64, you also need to provide the US 64DD IPL and a "dummy" 64DD Disk:

sc64deployer 64dd 64DD_IPL_US.n64 dummy_disk.ndd   --rom rtctest.z64

Note that if you don't provide a dummy disk, SC64 will not fully emulate the 64DD and the test ROM will hang.

@meeq meeq mentioned this pull request Jan 30, 2025
@meeq meeq marked this pull request as ready for review January 31, 2025 17:06
@meeq meeq changed the title [WIP] Integrate 64DD into RTC subsystem Integrate 64DD into RTC subsystem Jan 31, 2025
@rasky rasky merged commit 672c13b into DragonMinded:preview Jan 31, 2025
4 checks passed
@meeq meeq deleted the dd-rtc branch February 1, 2025 01:56
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