Skip to content

Clarify clock terminology and speed #597

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bbbbbr
Copy link
Contributor

@bbbbbr bbbbbr commented May 8, 2025

Currently there is some ambiguity about clock terminology and speed. This attempts to differentiate between a System Clock / PHI of ~1MHz and a Master Clock of ~4MHz (2x those in Double-speed mode).

Alternatively "Oscillation Clock" could be used if that's preferable to "Master Clock"

Testing the water with this approach, but open to other ideas

Currently there is some ambiguity about clock terminology and speed.
This attempts to differentiate between a System Clock of ~1MHz and a Master Clock of ~4MHz (2x those in Double-speed mode).

Alternatively "Oscillation Clock" could be used if that's preferable to "Master Clock"
@@ -5,7 +5,7 @@
Pin | Name | Explanation
------|--------|--------------
1 | VDD | Power Supply +5V DC
2 | PHI | System Clock
2 | PHI | System Clock ≅ 1.05 MHz <br> (CGB Double-speed mode: ≅ 2.10 MHz)
Copy link
Member

Choose a reason for hiding this comment

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

I could find only one other usage of ≅for "approx equivalent to" but many more ~. Maybe this should be clarified document wise as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right - I looked for examples of shortened MHz values and duplicated from that one instance. I think it is useful to indicate that it's an approximated value vs the full one in some way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, to answer more directly "~" seems fine to me 👍

The reason for that is that the sensor chip sometimes handles the signals on the rising edge of the clock, but other times on the falling edge.

:::tip NOTE

This means that the GB Camera shouldn't be used in GBC double speed mode!
Since the PHI signal runs twice as fast in CGB Double-speed mode the values used for exposure time should be doubled.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Since the PHI signal runs twice as fast in CGB Double-speed mode the values used for exposure time should be doubled.
Since the PHI signal runs twice as fast in CGB Double-speed mode, the values used for exposure time should be doubled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks good to me. (BTW on this I confirmed the behavior with toxa based on his open source GB Camera rom)

Copy link
Member

@ISSOtm ISSOtm left a comment

Choose a reason for hiding this comment

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

Thank you!

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.

3 participants