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

casio/cfx9850.cpp: Various fixes #12137

Merged
merged 4 commits into from
Mar 18, 2024
Merged

casio/cfx9850.cpp: Various fixes #12137

merged 4 commits into from
Mar 18, 2024

Conversation

qufb
Copy link
Contributor

@qufb qufb commented Mar 14, 2024

  • Fix CFX9850GB display_ram mapping, this one doesn't write to segment 0x60;
  • Debugger edits to register values were all being incorrectly applied to the first register, now they should go to the corresponding set of 4 registers;
  • Implement TIME register;
  • Add more instructions tested on hardware;
  • Fix swap flags, they are always cleared regardless of values;
  • Fix timer so that it expires on KO enabled key input;
  • Add an infinite timer variant, which seems to only be used along with the low power variant of timer_wait;
  • Prefer more accurate palette taken from an online Casio manual, although it isn't clear what contrast levels they used for those screenshots;

src/devices/cpu/hcd62121/hcd62121.cpp Outdated Show resolved Hide resolved
src/devices/cpu/hcd62121/hcd62121.cpp Outdated Show resolved Hide resolved
src/devices/cpu/hcd62121/hcd62121.cpp Outdated Show resolved Hide resolved
src/devices/cpu/hcd62121/hcd62121.cpp Outdated Show resolved Hide resolved
src/devices/cpu/hcd62121/hcd62121.cpp Outdated Show resolved Hide resolved
src/devices/cpu/hcd62121/hcd62121.h Outdated Show resolved Hide resolved
src/devices/cpu/hcd62121/hcd62121.h Outdated Show resolved Hide resolved
Comment on lines +349 to +351
m_timer = timer_alloc(FUNC(hcd62121_cpu_device::timer_tick), this);
m_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1));
Copy link
Member

Choose a reason for hiding this comment

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

Where does this one-second tick come from? Does the CPU have a secondary clock input? Is it an external 1-second tick input, or is it pre-scaled on the chip? (Seiko Epson PDA CPUs have a secondary oscillator that’s usually connected to a 32.768kHz watch crystal that has configurable dividers for generating the clock tick signal.)

Copy link
Contributor Author

@qufb qufb Mar 16, 2024

Choose a reason for hiding this comment

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

There's a secondary 2-pin crystal oscillator that can be connected to the CPU, but it seems to be unrelated, since it's optional: it's present on Picky Talk, but on CFX9850GB both ends are connected with a resistor.

The 1-second tick feature is present on both systems. The way I measured it was by sampling the TIME register value after various timer waits, and it was being incremented roughly every second, including the cutoff at 60. It isn't very clear to me yet how the CPU is configuring this timer.

src/devices/cpu/hcd62121/hcd62121.cpp Outdated Show resolved Hide resolved
src/devices/cpu/hcd62121/hcd62121.cpp Outdated Show resolved Hide resolved
src/devices/cpu/hcd62121/hcd62121.cpp Outdated Show resolved Hide resolved
@cuavas cuavas merged commit 758a61e into mamedev:master Mar 18, 2024
0 of 5 checks passed
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.

None yet

2 participants