• Please review our updated Terms and Rules here

Tek 4051 BASIC Simulator

Thanks for your response, Dave. Here's what I see when I click on someone's name:

forum-popup.png

None of these seems to be a way to send a PM :-/
 
In case anybody's interested, here's the program I'm trying to run:
http://pastebin.com/m4jUdFjm
I transcribed it from an old printout. The most confusing thing was that some of the strings had underlined characters whose pattern of occurrence seemed to indicate that the underlining was semantically meaningful. I added comments (look for "REM TEKFAN") to note where this occurs.
The JHHHHHHH ones seem to be equivalent to a linefeed and a character-by-character carriage return. I'm not sure about the G's.

Regarding my inability to send private messages, is it possible that I have insufficient reputation/karma/whatever on this site? All of my posts still await moderator approval---is that standard, or just for new members like myself?
 
Brad-4051 may not have posted enough posts to acquire the rights to have PMs sent to him yet. For example, I can't send either him or you a PM at the moment - but I can to more 'seasoned' posters on the Forum. In fact, May 14th 2014 was his last post and he hasn't logged back onto his account since.

There may be no way of contacting him...

Dave
 
And (of course) you may not be able to send PMs to anyone else until you have posted more messages...

Dave
 
Woodchips,

I am looking at the schematic diagram in the service manual and it states that the devices are MCM6832 with pin 24 = +5V, pin 23 = +12V (switched via a transistor), pin 1 = -5V and pin 12 = 0V.

The replaceable parts list seems to identify two part numbers for each ROM?

U101 156-0712-00 MICROCIRCUIT,DI:ROM CUSTOM MASK
U101 156-0712-01 MICROCIRCUIT,DI:16K ROM, CUSTOM MASK

I suspect they are really the same thing - as Bills of Materials sometime contain 'funny' items.

Dave
 
Last edited:
And (of course) you may not be able to send PMs to anyone else until you have posted more messages...

Dave

It's probably that. I guess I'll just have to keep posting ;-)

Actually, I'm attempting to contact Brad-4051 via the email listed at his aureliandesign.com website as he mentions in the YouTube video he posted. We'll see how that goes.
 
Dave, thanks. This raises a problem, the 4051 is in store and only just managed to reach it to remove the comms pack, and can't face shifting piles of stuff to actually extract it. So will have to work just with the pack itself.

Still can't find the service manual, perhaps have to download it again from bitsavers, but that will have to wait until I have a faster connection. Tomorrow!
 
When looking at my 4051 I found that I have four cartridges with it. Three software only, matrix, file manager and editor and one RS-232 printer cartridge.

CRuDb0Cl.jpg


There is also a pile of documentation with it:

B0SkFzAl.jpg


Is there any specific documentation that I should look for?
 
Nice machine - and nice museum too! I used to visit Nykoping quite a bit in the past - I see you are not too far away from there.

I now have together a first release of my Javascript Tektronix 4051 emulator if anyone would like me to post it here for people to play with. I have added emulated GPIB devices so that OLD and INPUT work as follows:

You can specify a plain ASCII text file within the browser and this will be loaded into the Tektronix emulator with the command "OLD @1:".

By using this technique I have managed to get the LINES program to work satisfactorily.

I have added a GPIB device #2 which can read the date and time. This has enabled me to get a modified CLOCK to work by substituting the CALL "RDTIME" command with "INPUT @2:A$".

PRINT @2: also works to display text messages to the log.

The cursor bright-up is one thing that is not working properly. You currently get green text/vectors on a blue square which is where the bright-up should have been.

The keyboard handling is a little poor at the moment. The key entry is a bit 'slow' as I have had to simulate the keyboard interrupt a bit slowly at the moment. I will work on this for a next release. Also, the keys have been mapped the best I can do onto an iMac keyboard - but the 'shifted' characters are what they would have been on the Tektronix keyboard not as they are marked on the iMac keyboard (so you need a printed picture of the tektronix keyboard in front of you)!

Still - anything is better than nothing at the moment!

If anyone wants a copy I will post it and then I am quite happy to extend the emulation as required. However, you get all the sources (which are a bit terse at the moment) so you can modify it yourself if you wish.

An HTML5 browser is required (I use SAFARI Version 7.1.2 with OS X Version 10.9.5) and a wired keyboard with a numeric pad - which maps onto the Tektronix numeric pad with a few keys missing like 'E', '(', ')' and '^'.

Regards,

Dave
 
Last edited:
Nice machine - and nice museum too! I used to visit Nykoping quite a bit in the past - I see you are not too far away from there.
Thanks!

Do you need the contents of those ROM cartridges for your emulation project? I could try extracting them (if that hasn't already been done). Or scanning a missing manual if I have it.

I now have together a first release of my Javascript Tektronix 4051 emulator if anyone would like me to post it here for people to play with.
Yes. I am interested in testing it!
 
For what it is worth, I am somewhat familiar with the Tektronix 4051 since I worked for that company for over two decades.
I have two 4051's and likely over a dozen ROMPACKs, some of which I created many years ago (Fast Graphics and Extended
Fonts to name but 2 of them). I also have the firmware listings for the 4051 and some of the ROMPACKs (obviously including
my own generated ones). If you need a hex dump of anything (within reason) let me know since I have created a way to hot
patch the 4051 debugger so that whatever goes to the screen also goes to the RS232 port. I capture the text results into a file
with HyperTerm on my workstation.

I am also actively working on a RAMPACK (somewhat misnamed) for the 4051 to allow saving and reading program and data
files as the replacement for the mag tape drive since the mag tape cartridges only last for a few decades before the tension
bands fail. Each RAMPACK holds the equivalent of 7 DC300A mag tapes worth of files in very high reliably (100+ year) flash
memories. I am creating this RAMPACK for the Tektronix museum in Oregon (which is not in any way affiliated with Tektronix
- it is entirely composed of former long term Tektronix employees).

The RAMPACK will support around 21 different BASIC instructions and CALLs, including dumping a complete directory with named
files on the storage display. SAVE, OLD, PRINT, INPUT and many other BASIC commands are supported.
 
The most confusing thing was that some of the strings had underlined characters whose pattern of occurrence seemed to indicate that the underlining was semantically meaningful.

In the Tektronix 4051 non-executed control characters (ASCII values below 32) are printed with underlining. This is done by using executed control characters. For example, a Line Feed (Control J) is displayed as this character sequence: "J<Control H>_". Since
Control H is backspace, the above 3 character sequence will display an underlined J when displayed in a PRINT statement. When
the PRINT statement executes the Control J will cause a Line Feed.

Control G is the BEL character in ASCII, so the 4051 beeps when it encounters that in a PRINT statement. When you SAVE a program
into a file any PRINT statement control characters remain control characters. If you elect to LIST the program to a file instead, control
characters get expanded into 3 character sequences so that a line printer (remember those) can perform the correct operations to print
an underlined character. The control J and control H sequences that I see in your program are merely repositioning the cursor so that the
text lines up in columnar form.
 
Al,
The bit I am interested in is the ROM images within the communication adapter

You can dump any part of the 4051 firmware using the debugger (DDT51.x). It is unclear to me which part of the 4051 firmware you
actually want. The ROMPACK holder on the back of the 4051 holds the communications interface option as well as the overflow ROMs.
Getting the communications firmware is easy since it has an entry in the PIA table, clearly showing which bank it is located in. Are you
trying to get a hex dump or a disassembly? A hex dump can be done taking only a few minutes of effort by hot patching the debugger.
 
... then invoke 'OLD @40:' from the emulator keyboard which (if memory serves me correctly) should load an ASCII program from the communications port. Ditto with 'SAVE @40:' which should output the current BASIC program to the communications port.

Now the problem - does anyone have the ROM images for the 4051 communications port adapter?

OLD @40 will eventually fail unless you slow down the sending end so much that it becomes an overnight process. The 4051 does not use flow control and as a result any serial incoming data can easily overrun the input buffer when an OLD is being performed. Transferring data
with an INPUT statement generally works fine, because long running time internal routines are not being invoked. When a program is being
loaded in an OLD statement the amount of time required per line of input is highly variable, depending on the complexity of the line and if
operations like garbage collection happen during the compilation of that line. SAVE @40: on the other hand will always work fine.

As far as ROM images go for the communications port option, I can fairly easily acquire that, but I have no idea of how to get that to you
via this forum since I am quit new here.
 
Still here :)

Still here :)

Brad-4051 may not have posted enough posts to acquire the rights to have PMs sent to him yet. For example, I can't send either him or you a PM at the moment - but I can to more 'seasoned' posters on the Forum. In fact, May 14th 2014 was his last post and he hasn't logged back onto his account since.

There may be no way of contacting him...

Dave

Hi, everyone. I'm still here - just hadn't checked this thread and seen the new posts.

Anyone can contact me by watching the Youtube video about my simulator. To find
it search for "Tektronix 4051 BASIC Simulator". Contact info is at the end of
the demonstration of the simulator. I've made some advancements since I shot
that video.

Also, the tekfan guy did find me eventually. He found a bug in the simulator which
I fixed, but I haven't heard back from him after e-mailing him to let him know that
I fixed it.

Note that I do not (sigh) own a 4051, or have any downloads of ROM's. The assembly
for the main 4051 code is online, in PDF form, I believe. Wish I could read it more
easily, as I have questions about some strange cases with the graphics behavior.
If anyone worked on that code back in the day, please contact me!
 

Attachments

  • Version.0.11.AppleAd.jpg
    Version.0.11.AppleAd.jpg
    72.7 KB · Views: 1
Hi tekfan and welcome to the forum.

If you need to send a private message - click on the person's name the original post was from and a pop-up menu will appear. One of the options is to send a private message.

If you want a copy of the simulator from brad-4051 you will need to send him a PM. If you want a copy of my Java script emulator - send me a PM enclosing your 'proper' e-mail address and I will ZIP up a copy and forward it to you. I still have no way to load and save programs yet because I have not been able to locate a copy of the communications cart ROMS yet. I am also still working on the screen and keyboard handling. Unfortunately - real work (!) and lack of ROMS has hampered any further progress. Perhaps I will have another look around the internet for the communications ROM images over this break.

Regards,

Dave

Just posted a long reply to this, but not sure it went through, so trying a test before I re-type it all...
 
Hi Brad-4051 - welcome back :)...

We are both working on two complementary simulators. As I understand it, you are writing a simulation of the Tektronix BASIC language whereas I am developing an emulator of the 6800 CPU and the associated Tektronix 4051 hardware that will 'run' the existing ROM code.

My first microprocessor system was the Motorola 6800 D2 kit - so I am 'well at home' with 6800 assembly language and I also had to understand the Tektronix 4051 hardware interfaces to the code as I had to emulate all that in Javascript for my emulator. I still haven't fully got the keyboard or display working to my satisfaction yet (e.g. the video bright up) - but all this is a hobby and, therefore, work in progress!

If you need any help with the video interface - just post your questions and I will see if I can answer them.

Like you - I also don't have a 4051 system :-(. We had some Commodore PETs and a Tektronix 4051 in the electrical engineering faculty of Aston University when I was a student many years ago. The Tektronix 4051 was such a nice machine to use at the time.

Dave

PS: If you get another post in we may be able to PM each other. Or ask the mods nicely...
 
Last edited:
Cor, you used the 4051 at Aston! So did I, 1979, was a bit of a shock to see one in a sale and I bought it. Needed some repair, dead chip I think, and was fully working apart from the tape but even got one of those now. Just no room to drag it out and no time to play. Retirement is tough!
 
Hi Zetopan,

Sorry to not have responded to your earlier posts. I have been away on business - so I generally do not have time to catch up with my private work then...

It is great to see that you worked for Tektronix and have access to (a) a load of hardware/software/firmware and (b) a lot of experience.

The initial problem is that I don't own a Tek 4051 myself - so I am having to rely on other sites (e.g. bitsavers) for the ROM images etc. There is such a shortage of ROM images for the Tektronix 4051 - and even less for the 4052.

Having obtained the ROM images and documentation from bitsavers for the Tek 4051 I was able to put together a rudimentary Javascript emulator. I didn't want the hassle of developing an emulation for the tape drive - so I was hoping to locate a ROM image for the serial communications adaptor to 'download' programs for the emulator. Unfortunately I have been completely unable to locate the required ROM images anywhere. I need them either as binary or a HEX dump. The issues regarding speed and overruns wouldn't actually apply to my Javascript emulator - as the hardware is completely emulated within my Javascript. I therefore 'know' when the firmware has read the last character from the ACIA receive buffer and I can insert the next character from the text file I am processing. As there is no 'real' serial line here - I am not constrained by the slow Baud rate etc.

As I couldn't locate the communications adapter ROM image - I developed by own 'special' GPIB device to respond to the 'OLD' command. I can select a text file via the web browser interface of the emulator and enter the command 'OLD @1:' to effectively load the text file character by character down into the emulator. This seems to work fine.

I have also added a GPIB device #2 to return the time and date string as per the real-time-clock module (which may have only been available for the 4052?) and slightly modified the CLOCK BASIC code to work with it.

I would be interested to discuss with you the possibility of scanning some of the documentation and imaging the ROMS you have (over time that is) and placing them on bitsavers for posterity if that is something that you would be interested in doing?

I have also been trying to locate the documentation related to creating custom ROMPACKs (i.e. the assembler code necessary to define the ROM entry points etc.) so that I can create my own 'virtual' ROMPACKs for my emulator rather than developing GPIB emulation stuff. So your joining the board at this time is most fortuitous.

Many thanks for your helpful posts and it is nice to see that work is still ongoing with the 4051 after all this time!

Dave
 
Woodchips,

If you were there in 1979 we probably passed each other in the corridors a few times! I was there from 1979 to 1982.

Dave
 
Back
Top