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

machine/z80scc.cpp: Added support for RTxC transmit/receive clock source #12050

Merged

Conversation

colinleroy
Copy link
Contributor

@colinleroy colinleroy commented Feb 21, 2024

Fixes serial emulation at 115200bps.

This leaves some things unimplemented (like TRxC and DPLL clock sources), but makes programs communicating at 115.200bps function properly.

For context, toggling this chip to 115200bps or 230400bps is done by

  1. setting the clock multiplier to 16 (230400bps) or 32 (115200bps), WR4 bits 6 or 7
  2. setting the clock source for TX and RX to /RTxC instead of BRG, WR11
  3. stopping the baud rate generator, WR14 bit 0

I hope this is a good first PR.
Thanks!

@colinleroy colinleroy changed the title Z80scc: Implement RTxC clock source Z80scc: Implement RTxC clock source for 115200bps Feb 21, 2024
Copy link
Member

@cuavas cuavas left a comment

Choose a reason for hiding this comment

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

The content of the changes looks OK, but you should follow the formatting of the file you’re editing.

src/devices/machine/z80scc.cpp Outdated Show resolved Hide resolved
Fixes serial emulation at 115200 or 230400bps.
@colinleroy colinleroy force-pushed the z80scc-implement-rtxc-clock-source branch from 1c4fac4 to 4d91bb0 Compare February 21, 2024 16:41
Copy link
Member

@cuavas cuavas left a comment

Choose a reason for hiding this comment

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

The code looks OK and matches the style of the file now.

Could someone who’s more familiar with the Z8530, and its implementation in MAME, please check to ensure this matches the documented behaviour and isn’t baking in overly specific assumptions about how the chip is hooked up in the system?

Maybe @rb6502, @pmackinlay or @MooglyGuy since you’ve worked on systems using the Z8530?

@cuavas cuavas changed the title Z80scc: Implement RTxC clock source for 115200bps machine/z80scc.cpp: Added support for RTxC transmit/receive clock source Feb 22, 2024
@rb6502 rb6502 merged commit 83c8259 into mamedev:master Feb 24, 2024
5 checks passed
Mokona pushed a commit to Mokona/mame that referenced this pull request Feb 28, 2024
Fixes serial emulation at 115200 or 230400bps.

Co-authored-by: Colin Leroy-Mira <colin.leroy-mira@sigfox.com>
stonedDiscord pushed a commit to stonedDiscord/mame that referenced this pull request Apr 8, 2024
Fixes serial emulation at 115200 or 230400bps.

Co-authored-by: Colin Leroy-Mira <colin.leroy-mira@sigfox.com>
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

3 participants