PDP-10 / klh10

Community maintained version of Kenneth L. Harrenstien's PDP-10 emulator.
Other
59 stars 7 forks source link

Emulate 8080 and front end hardware #37

Open larsbrinkhoff opened 5 years ago

larsbrinkhoff commented 5 years ago

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 commented 5 years ago

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

brouhaha commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Certainly. It makes no sense to remove useful features.

larsbrinkhoff commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

larsbrinkhoff commented 5 years ago

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)