Skip to content

sh4: make RTC R64CNT tick - #2547

Open
JoeMatt wants to merge 1 commit into
flyinghead:masterfrom
Provenance-Emu:fix/sh4-r64cnt-tick
Open

JoeMatt wants to merge 1 commit into
flyinghead:masterfrom
Provenance-Emu:fix/sh4-r64cnt-tick

Conversation

@JoeMatt

@JoeMatt JoeMatt commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

R64CNT is a free-running 7-bit counter incremented at 128 Hz (bit 0 is
the 64 Hz bit, bit 6 the 1 Hz bit). It was registered read-only with no
handler, so it always read 0. Code that waits for it to change, such as
a BIOS boot delay loop, never exits.

Derive it from the SH4 cycle count so it advances in emulated time, at
the same rate as MAME's SH4 RTC.

Testing: compiles in the libretro core and the standalone build (macOS arm64). Not run on content.

🤖 Generated with Claude Code

R64CNT is a free-running 7-bit counter incremented at 128 Hz (bit 0 is
the 64 Hz bit, bit 6 the 1 Hz bit). It was registered read-only with no
handler, so it always read 0. Code that waits for it to change, such as
a BIOS boot delay loop, never exits.

Derive it from the SH4 cycle count so it advances in emulated time, at
the same rate as MAME's SH4 RTC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 21:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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