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

Emulate 8080 and front end hardware #37

Open
larsbrinkhoff opened this issue Aug 26, 2018 · 9 comments
Open

Emulate 8080 and front end hardware #37

larsbrinkhoff opened this issue Aug 26, 2018 · 9 comments

Comments

@larsbrinkhoff
Copy link
Member

It would be nice to run the 8080 software.

For practical use, KLH10's front end is very convenient with its ability to load programs directly from the host file system. But this leaves a gap when it comes to running ALL THE SOFTWARE.

@larsbrinkhoff
Copy link
Member Author

@eswenson1, this is what we discussed the other day.

@brouhaha
Copy link

brouhaha commented Sep 5, 2018

Back in 2011 I had a hard time finding an accurate 8080 simulator; many of them didn't get the processor flags correct. I wrote one that I think is fairly accurate, aside from not yet including any interrupt support:
https://github.com/brouhaha/ksim/blob/master/ksim.c
If you want to use the code, I'm willing to relicense it under the klh10 license, though I would request permission to include any non-klh10-specific changes in the GPL3 ksim.

@larsbrinkhoff
Copy link
Member Author

Wow, sometimes good things just fall into your lap. Thanks Eric, I'll consider taking you up on your offer. I'll certainly contribute any changes back. I specially like how your simulator has KS in its name.

@eswenson1
Copy link
Member

For practical use, KLH10's front end is very convenient with its ability to load programs directly from the host file system. But this leaves a gap when it comes to running ALL THE SOFTWARE.

I would say we should update it to ALSO allow loading from the 8080 FE file system, but keep the existing functionality too. Best of both worlds.

@larsbrinkhoff
Copy link
Member Author

Certainly. It makes no sense to remove useful features.

@larsbrinkhoff
Copy link
Member Author

I made a branch which adds the ksim files. I merged in @brouhaha's repository and moved the files to src/ksim. This way, version history has been preserved.

https://github.com/PDP-10/klh10/commits/lars/8080

@larsbrinkhoff
Copy link
Member Author

ksim is implemented in a single ksim.c file. In order to make it a reusable component, I split the simulator proper from the main application. A new file ksim.h defines the API to the simulator.

@larsbrinkhoff
Copy link
Member Author

I now reconstructed the source files from the 4.2 listing, and have them assembled with CROSS: PDP-10/its#1228.

@larsbrinkhoff
Copy link
Member Author

Version 5.2 is here: ftp://ftp.dbit.com/pub/pdp10/ks10/csl52.asm

And it has an interesting comment:

; I/O ports (very partial list):
; 41	(w) lights in low 3 bits (1=on), b4=DTR for KLINIK
; 42	(r) may be switches?  40=RESET
; 80	(r/w) CTY data
; 81	(w) CTY ctrl bits (b7=# stop bits, b2=# data bits, b0=ready)
; 82	(r/w) KLINIK data
; 83	(r) KLINIK ctrl bits (see above)

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

3 participants