Open larsbrinkhoff opened 5 years ago
@eswenson1, this is what we discussed the other day.
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.
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.
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.
Certainly. It makes no sense to remove useful features.
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.
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.
I now reconstructed the source files from the 4.2 listing, and have them assembled with CROSS: PDP-10/its#1228.
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)
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.