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

add Z80 SIO #32

Open
nippur72 opened this issue Apr 30, 2020 · 6 comments
Open

add Z80 SIO #32

nippur72 opened this issue Apr 30, 2020 · 6 comments

Comments

@nippur72
Copy link
Contributor

do you have plans for adding the Z80 SIO to the list of emulated chips?

@floooh
Copy link
Owner

floooh commented Apr 30, 2020

Only if it's an integral component of an emulated home computer (because otherwise it's hard to test whether the emulation is somewhat correct), I just looked around a bit, and the only use I've found is as the East German clone UB8563 in this serial I/O module:

http://www.mpm-kc85.de/html/m003_v24.htm

Do you know of a computer which has a Z80 SIO integrated?

@nippur72
Copy link
Contributor Author

not a real home computer of the '80s, there is this DIY project called LM80C which uses the SIO to read from the host PC.

I have written an JavaScript emulator for it (find it here) but it lacks a proper SIO. And since I'm planning to switch using your chips I was wondering about the SIO. BTW the LM80C also uses Z80 CTC and PIO which you already have covered 😄.

I'll look into MAME if I there is an implementation to start with.

BTW, I have your Z80 cpu working in a experimental branch, curiously it's a lot slower than the JavaScript one because it has to go back and forth from WASM to JS on every memory read or I/O. But of course I expect it to be faster when everything will be coded in C.

@flypie
Copy link

flypie commented Apr 30, 2020

I know someone who had a NorthStar CPM machine at home in the late 70s. That has an SIO option. http://www.s100computers.com/Hardware Index Page.htm With the SIO, you can go on to integrate them into the KIO and the Z84C or Z180.
The Camputers Lynx has some serial not sure what https://en.wikipedia.org/wiki/Camputers_Lynx or the https://en.wikipedia.org/wiki/Enterprise_(computer)

@floooh
Copy link
Owner

floooh commented May 1, 2020

curiously it's a lot slower than the JavaScript one because it has to go back and forth from WASM to JS on every memory read or I/O

Yes, that's totally expected. Switching between WASM and JS that often isn't a good idea. Even though calling between WASM and JS got a lot faster over time, it's still not that fast :)

For a mixed WASM/JS emulator I think it's best to expose a higher-level function to JS which runs the entire emulated system for one host system frame and only returns to Javascript for "rendering" display and audio and receiving input (or do all of this also within WASM, and only expose something like a "scripting interface" to JS, like starting and stopping the emulation, loading a data file into the emulation, etc....

@floooh
Copy link
Owner

floooh commented May 1, 2020

@nippur72 I really like your JS emulators btw, impressive stuff :)

@RichCini
Copy link

RichCini commented Feb 8, 2022

Impressive work on this, especially the portability. I don't see the SIO much in "home computer" stuff but it comes up often in "vintage" or single-board computer creations, particularly new efforts (Z80 MBC, MembershipCard, RetroBrew Computers, etc.). It's also sometimes paired with the CTC (which is already emulated), with the CTC functioning as a baud rate generator.

I'm hoping to use the CTC in an emulation of a Standard-BUS data acquisition system I have, but having the SIO would be a nice add eventually.

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

No branches or pull requests

4 participants