Philcogrump
Experienced Member
Branching this thread off the "Saving ROM data from Tek 4052" to specifically discuss Tek 405x emulation. As far as I know, there have been two approaches, one is documented in another thread titled "Tek 4051 BASIC simulator" that was written in C++ by Brad-4051 and runs on Windows, and the second approach is a Javascript based emulator that runs in a web browser and does a native emulation of the actual 4051 hardware with an emulated 6800 running binaries from actual ROM dumps, started by daver2?
Dave - could you place the code in some repository that supports version tracking, github perhaps, to make it easier for multiple contributors (even if it's just us two) and post a link here for this thread.
Last month I skimmed through mc6800.js and TEKTRONIX4051.js. Today I spent several hours reviewing mc6800.js to better understand how the processor emulation is done, at least it's a good excuse for me to finally learn 6800 assembly and understand the processor's features. I've been adding more comments, documentation, and reorganizing a few functions around in mc6800.js. Eventually I will add placeholders for the Tek extended instructions to the Instruction Register case statement list so once we can locate documentation that describes what they do, we can flesh those out to support the 4052/54 emulation. Is there any reason to add an argument to the 6800 function to specify if it should ignore Tek extended instructions for 4051 emulation? I suspect it shouldn't be a problem to support those instructions because the 4051 ROM binaries will not even use those extended instructions at all.
One general question or complaint, I'm not sure why we need to use "this" in front of everything, if the 6800 function is called then all these "this.whatever" variables and functions become global to the window accessible by all other javascript functions? I'm wondering why that is necessary, I'd think all 6800 internal registers and functions should remain within the 6800 and inaccessible for other Javascript code outside of the 6800?
Dave - did you ever hear back from the guy who might have the documentation on the Tek extended instructions? Worst-case we probably could reverse engineer the 4052/54 processor microcode to figure out what the extended instructions do but that would be a real painful challenge.
Dave - could you place the code in some repository that supports version tracking, github perhaps, to make it easier for multiple contributors (even if it's just us two) and post a link here for this thread.
Last month I skimmed through mc6800.js and TEKTRONIX4051.js. Today I spent several hours reviewing mc6800.js to better understand how the processor emulation is done, at least it's a good excuse for me to finally learn 6800 assembly and understand the processor's features. I've been adding more comments, documentation, and reorganizing a few functions around in mc6800.js. Eventually I will add placeholders for the Tek extended instructions to the Instruction Register case statement list so once we can locate documentation that describes what they do, we can flesh those out to support the 4052/54 emulation. Is there any reason to add an argument to the 6800 function to specify if it should ignore Tek extended instructions for 4051 emulation? I suspect it shouldn't be a problem to support those instructions because the 4051 ROM binaries will not even use those extended instructions at all.
One general question or complaint, I'm not sure why we need to use "this" in front of everything, if the 6800 function is called then all these "this.whatever" variables and functions become global to the window accessible by all other javascript functions? I'm wondering why that is necessary, I'd think all 6800 internal registers and functions should remain within the 6800 and inaccessible for other Javascript code outside of the 6800?
Dave - did you ever hear back from the guy who might have the documentation on the Tek extended instructions? Worst-case we probably could reverse engineer the 4052/54 processor microcode to figure out what the extended instructions do but that would be a real painful challenge.