Skip to content

Conversation

holub
Copy link
Contributor

@holub holub commented Jul 11, 2025

No description provided.

sinclair/pentevo.cpp: Removed hacks around RTC registers
@ajrhacker ajrhacker merged commit fee3830 into mamedev:master Jul 11, 2025
6 checks passed
@holub holub deleted the glukrs branch July 11, 2025 13:45
Comment on lines 16 to +17
glukrs_device::glukrs_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: mc146818_device(mconfig, GLUKRS, tag, owner, clock)
: mc146818_device(mconfig, GLUKRS, tag, owner, 32'768)
Copy link
Member

Choose a reason for hiding this comment

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

Ignoring the clock frequency is bad form. Wouldn’t this use a 32768 Hz watch crystal for timing in practice? It should still be passed in from machine configuration.

Copy link
Member

@happppp happppp Jul 11, 2025

Choose a reason for hiding this comment

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

I presume the OSC is internal here? Then the driver mcfg should not 'know' the clock and should not pass any value to it. (in other words, what holub did is correct in that case)

Copy link
Contributor

Choose a reason for hiding this comment

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

I doubt it's internal, but every clock chip I've read the datasheet for wants a 32768 Hz crystal and several of them say any other value is not guaranteed to work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This device is specific to ZX Evolution usage and have clock "defined". I would like to avoid ability to modify this clock value as it implies additional configuration in RTC registers to work correctly.
As a option I can add validation to device which will check if supplied clock is desired.

Copy link
Member

Choose a reason for hiding this comment

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

We allow changing the “standard” clock on other real-time clocks and chips that have standard clocks defined. There are systems that abuse chips by using non-standard clock frequencies. An example is the Zaccaria arcade games that overclock Signetics video/sound chips to get higher horizontal resolutions than they were designed for. If someone runs an RTC with a non-standard clock input, they should get non-standard seconds.

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.

5 participants