• Please review our updated Terms and Rules here

Can Tektronix 4051 Serial COMM be added to the 405x Emulator?

nikola-wan

Veteran Member
Joined
Mar 7, 2018
Messages
1,230
Location
Texas, USA
@daver2

I think adding Serial COMM to the 405x Emulator would be extremely helpful.

It would allow your original 405x Emulator to be used to load and save ASCII programs or data using Serial (@40: ) commands as a second storage device.

I currently have to use the 4054A serial interface connected to my laptop to load huge (100's of KB) ASCII SVG image files into BASIC and convert to R12 graphics and write binary blocks to the Flash Drive. If I could use the 405x Emulator it would speed up my BASIC program development. Alternatively - I've asked @WaveyDipole if he could add a second Flash Drive to his version of the emulator here:
https://github.com/Twilight-Logic/Tek405xEmulator/blob/master/experimental/JonStanley-Mod-Storage-Class2-06.zip

I would have to redesign my Flash Drive board to add GPIB buffers in order to support having two Flash Drives plugged into my 4054A. We do have one Flash Drive user that has built a Flash Drive breadboard and added GPIB buffers and got that working - so we know it can be done.

Clay Archer posted the 4051 ROMs from his 4051 including the two 2KB Backpack Overflow ROMs, and the four 2KB Backpack Option 1 COMM ROMs on his website back in 2019 - see this thread: https://forum.vcfed.org/index.php?threads/tektronix-board-bucket-6800.54128/post-837031

I looked at the 405x Emulator TEKTRONIX4051.js and RomExp.js files and see the code for the BP Overflow ROMs in the TEKTRONIX4051.js switch(BANK_SWITCH_SELECTOR) code - but don't see a case statement for the BP COMM ROMs.

My 4051 ROM Checksum BASIC program
https://github.com/mmcgraw74/Tektronix-4051-4052-4054-Program-Files/blob/master/4051_ROM_Checksums/4051%20ROM%20plus%20Expander%20Checksums.UNI (modified from MDC's original BASIC program) running on @WaveyDipole experimental Emulator shows the BP Overflow ROMs are in the Emulator - but I couldn't find where they are located in either of those two files.

MDC's code lists the checksums of his COMM backpack ROMs and indicates they are in bank 10.

If the BP COMM ROMs could be added to the emulator - we would need a way to emulate the ACIA too.

Would it be hard to add to the emulator as a windows serial comm port?

Then putty or other windows serial comm apps could send and receive data from that device?



4051_ROM_Checksums.png
 
Last edited:

daver2

10k Member
Joined
Jun 19, 2012
Messages
13,062
Location
UK - Worcester
Hi Monty,

It is already in my 4051 emulator - but it may not have made it to my Google Drive...

Give me half an hour or so and I will upload it to my Google Drive and send you a link...

Dave
 

daver2

10k Member
Joined
Jun 19, 2012
Messages
13,062
Location
UK - Worcester
See under: https://drive.google.com/drive/folders/15HuvHmnsS7mwEo5PanKR8AICxn-EH9u1?usp=sharing

I have created a temporary directory and copied my latest emulator code into it.

I have also copied the COMMUNICATION ROMs I have as 72345.js. They were originally named 0712, 0713, 0714 and 0715. I have concatenated them together in address order and made one file out of them.

Just check that these are the droids ROMs you want first!

Dave
 

nikola-wan

Veteran Member
Joined
Mar 7, 2018
Messages
1,230
Location
Texas, USA
Dave,

I tried your emulator with COMM ROMs and tried OLD@1: LINES.TXT, but it appears to hang even though the debug console says the tape was loaded.

I see that the LINES.TXT had CR/LF and also tried just LF and just CR - but after typing the RETURN I can't type anything else.

see emulator screenshot below. The screenshot shows I first typed "list" and pressed ENTER and got a new line as expected.
But after trying to OLD@1: a program file pressing ENTER does nothing.

I refreshed the web page each time between tests.

I just tried typing PRINT @40:"HELLO" to see if the COMM option ROMs were there - but nothing happened after pressing Enter.

Did your new files have COMM emulation too or did you just add the ROMs?

Monty

1700411067782.png
 
Last edited:

daver2

10k Member
Joined
Jun 19, 2012
Messages
13,062
Location
UK - Worcester
It is slowly coming back to me... I was working on the tape drive emulation - hence there are now boxes to specify both GPIB PROGRAM LOAD: and TAPE LOAD:.

I suspect you have plugged a tape into the non-working tape drive!

Try the GPIB PROGRAM LOAD: box instead...

I have just tried it myself and LINES.txt works fine.

Dave
 

nikola-wan

Veteran Member
Joined
Mar 7, 2018
Messages
1,230
Location
Texas, USA
Ok - I was able to GPIB PROGRAM LOAD the LINES.TXT. I just don't have the Mac keyboard so I need to figure out how to add PAGE and BREAK keys.

PRINT @40:"Hello" does hang the emulator - I imagine there is no handler for the 6850?
 

nikola-wan

Veteran Member
Joined
Mar 7, 2018
Messages
1,230
Location
Texas, USA
I loaded my latest 4051 ROM Checksum program (which uses data from MDC's original checksum program along with his 6800 assembly code) from my Flash Drive folder on my repo into your emulator and got this result:

Looks like the Backpack ROMs are added in bank 10 in the screenshot below. They are different than the MDC checksums, but I believe Clay Archer reported when he posted those ROMs that they were -01 version, so maybe MDC had -00 version.

Monty

1700414003248.png
 

nikola-wan

Veteran Member
Joined
Mar 7, 2018
Messages
1,230
Location
Texas, USA
Yes, no ACIA - so the electrons are leaking out onto the floor!

Dave
Dave,

Would it be possible to simply PRINT all the characters transmitted to a file or INPUT the characters from a file like your GPIB tape emulation?

Monty
 
Last edited:

nikola-wan

Veteran Member
Joined
Mar 7, 2018
Messages
1,230
Location
Texas, USA
John and I have added the 4051 COMM ROMs to John's experimental 405x Emulator which has Flash Drive and all the 4051 Option ROMs added.

Here is the CALL "CLIST" command in that emulator with the COMM ROMs added to Tek4051Rom.js and TEKTRONIX4051.js updated to enable the COMSPAKROM in BANK_SWITCH_SELECTOR == 2 on line 1873.

CALL "TERMIN" and the other COMM calls are at the beginning of the CLIST

On the second screenshot - I typed CALL "PRLIST" which returns the current COMM parameters - and it worked correctly without hanging the emulator. PRINT @40:"Hello" does hang - but you can return to BASIC by pressing the emulator BREAK key.

Emulator with ROM labeled COMSPAKROM in Tektronix4051 too.png

screen - 2023-11-19T160907.674.png

This screenshot shows running my 4051 ROM Checksum program which indicates the COMM ROMs are now present in the Backpack - like it showed on your original emulator with COMM ROMs!

You can also see the other option ROMs are present in the LEFT ROM Expansion Slots 1, 2, 3, 5, and 8. I'm not sure what is in RIGHT ROM Expansion Slot 1 - unless it is your DERROM


4051 ROM checksums with COMM ROMs added.png

Monty
 

daver2

10k Member
Joined
Jun 19, 2012
Messages
13,062
Location
UK - Worcester
I was just thinking last night about adding the ACIA and sending the TX characters to the debug screen as a test.

Dave
 

nikola-wan

Veteran Member
Joined
Mar 7, 2018
Messages
1,230
Location
Texas, USA
I was just thinking last night about adding the ACIA and sending the TX characters to the debug screen as a test.

Dave
I have attached my 4052 assembler (actually only 6800 opcodes used) source code for Motorola MINIBUG. Too bad this won't run on your 4052 - the CALL "EXEC" was only implemented on the 4052A/4054A. But you could assemble it for your 405x emulator by changing the address of the ACIA.

All I had to do to get this working on my 4054A was define the address of the ACIA control/status register and ACIA data register and the assembled MINIBUG worked using the serial port connected to my PC running a terminal program.

I don't even think the ACIA emulator needs to handle the ACIA status register (including baud rate settings) if the characters are being sent to or received from a file on the PC (or your emulator debug console).

I have also attached my Tektronix 4051 Memory Dump BASIC program written by me in the late 1970's - assembled by the Tektronix Microprocessor Development System using my 4051 as the serial terminal. At that time I had no information on the 4051 ROM CALLs, but I had figured out the CALL "EXEC" BASIC instruction to jump to simple (less than 255 bytes) 6800 assembly code. Since I didn't know the ROM entry point for screen character display - my code writes directly to the display D/A hardware registers - documented in the service manual which I did have. My assembly code also includes my custom text fonts for the HEX characters used in the memory dump program.

Now we have the Tektronix 4051 Assembler program and documentation including the BASIC system call entry points - which I have posted on my repo: https://github.com/mmcgraw74/Tektronix-4051-4052-4054-Program-Files/tree/master/4051-Assembler

This folder includes my 1979 Memory Dump source code as scanned Tektronix 4631 hard copy pages in a pdf file - and it includes MDC 4051 assembly code documentation along with Tektronix 4051 Assembler autoexec BASIC program that loads 4051 DDT 51.7 from file 2 into RAM for assembly/disassembly. The Tektronix 4051 Assembler documentation including all the BASIC ROM entry points is also in this folder.

Here is a screendump of your emulator running my Tektronix 4051 Memory Dump BASIC program and dumping the contents of page FF (last page in the BASIC ROM):

1700480897154.png



Monty
 

Attachments

  • MINIBUG4052.zip
    2 KB · Views: 0
  • 4051TekMemDump.zip
    1.2 KB · Views: 0
Last edited:

daver2

10k Member
Joined
Jun 19, 2012
Messages
13,062
Location
UK - Worcester
Yes, the ACIA just needs to be very simple - Always ready to accept a character and no received character. Anything else is just ignored (as you say).

It might be sensible to consider a TCP/IP port on the emulator to handle the ACIA? Just thinking out aloud...

Dave
 

nikola-wan

Veteran Member
Joined
Mar 7, 2018
Messages
1,230
Location
Texas, USA
TCP/IP sounds too sophisticated for the 4051 emulator - although there was someone at VCF Southwest 2023 demonstrating network adapters for the C64 and other vintage consumer computers that connected them to the internet.

But since Putty could connect to either serial or TCP/IP - it could work fine :biggrin:
 

stepleton

Experienced Member
Joined
Jan 1, 2020
Messages
498
Location
London, UK
I think TCP/IP is pretty normal for this kind of application and pretty portable as well: you won't easily get UNIX domain sockets on your Windows box, for example. (Sounds like newer versions of windows have it, but they'll probably be harder to access from Putty.)
 
Top