• Please review our updated Terms and Rules here

Tek 405x web-browser emulator

Monty:

Thanks, that was what I needed.

In effect, I am "building" a tape in the storage popup window by importing individual program files, assigning them a unique file number, and saving the bundle to the emulator's "tape drive."

At that point, on exiting the storage popup, I can load the individual program file using the sequence you provided above.

What interested me here was your 4051 Memory Dump program since you are writing to the emulated 4051 screen from an assembly language program.

Thanks again -

Nelson
Be sure to put the 124 LAST file into your folder bundle. This file is used by the Flash Drive code to stop searching for a file in the FIND command. The FAT file system does not keep the files in sequential file number order as they are added or deleted - so multiple passes through the files in a folder may be required to find each of the sequential files in my TLIST program for example.

I typically also copy in the 119 TLIST program and run it to make sure my file headers have the correct format including the length of the comment field.

If I need a data file I save any of the files in emulator storage changing the file number in the lower left corner of the storage popup and changing the format to ASCII or BINARY and PROGRAM or DATA and then saving that file regardless of the current contents. Then when your program prints to an ASCII DATA file the previous data is replaced by the new data. Same thing for writes to a BINARY DATA file.

I wrote that memory dump assembler program on a Tektronix 8002 Microprocessor Development Lab for a 4051 in the late 1970's and did screen dumps to hard copy for all the BASIC ROMs. I still have the hard copy of those ROMs and all the programs I created in the 70's including the hard copy of that memory dump assembly program that I used to recreate the memory dump program I posted on github using the 4051 Assembler.

You can save or load the entire 'folder' of files in the emulator storage popup by changing the file pulldown from Single File to 4050 Tape Emulator Files and using Export to save a zip of all the files currently in storage. The Import button can be used after unzipping the exported files and selecting one or more of them (include LAST if you have used DelFile to delete all the current files from storage).
 
Be sure to put the 124 LAST file into your folder bundle. This file is used by the Flash Drive code to stop searching for a file in the FIND command. The FAT file system does not keep the files in sequential file number order as they are added or deleted - so multiple passes through the files in a folder may be required to find each of the sequential files in my TLIST program for example.

I typically also copy in the 119 TLIST program and run it to make sure my file headers have the correct filename (which emulates the 4050 file header block) format including the length of the comment field.

If I need a data file I save any of the files in emulator storage changing the file number in the lower left corner of the storage popup and changing the format to ASCII or BINARY and PROGRAM or DATA and then saving that file regardless of the current contents. Then when your program prints to an ASCII DATA file the previous data is replaced by the new data. Same thing for writes to a BINARY DATA file.

I wrote that memory dump assembler program on a Tektronix 8002 Microprocessor Development Lab for a 4051 in the late 1970's and did screen dumps to hard copy for all the BASIC ROMs. I still have the hard copy of those ROMs and all the programs I created in the 70's including the hard copy of that memory dump assembly program that I used to recreate the memory dump program I posted on github using the 4051 Assembler.

You can save or load the entire 'folder' of files in the emulator storage popup by changing the file pulldown from Single File to 4050 Tape Emulator Files and using Export to save a zip of all the files currently in storage. The Import button can be used after unzipping the exported files and selecting one or more of them (include LAST if you have used DelFile to delete all the current files from storage).
 
@WaveyDipole has improved the 405x web-browser emulator again!
  1. It now handles HUGE files like the Mandelorian and Grogu BMP file of 558KB!
  2. It also handles READ/WRITE changes to the Flash Drive file header - so it can run Main Menu first time setup!
Here is a screenshot of the emulator displaying the Mandelorian and Grogu BMP picture I created:

Mandelorian - latest experimental emulator06.png

Here is how to load and run the emulator to view my Flash Drive BMP picture files:

  1. Download this version of the emulator: https://github.com/Twilight-Logic/Tek405xEmulator/blob/master/experimental/JonStanley-Mod-Storage-Class2-06.zip unzip and navigate into the directory and double-click (on windows) this file jsTEKTRONIX4051storage_universal.html
  2. This should open the emulator in your default browser. Click the mute button and then click the start button to start the emulator. The emulator is now running and you can type programs manually by clicking in the black display window.
  3. Click the storage button to open the storage window and change the pulldown to the right of the Import button to 4050 Flash Drive files
  4. Download my latest Flash Drive program files: https://github.com/mmcgraw74/Tektronix-4051-4052-4054-Program-Files/blob/master/Flash_Drive/FlashDrive-5Oct2023.zip unzip and navigate to the BMP directory
  5. In the emulator Storage window - click the Import button and navigate the file explorer window that pops up to the Flash Drive BMP directory and select all the files in that directory from 1 to 124 and click the Open button to import them into emulator file storage. After the files are imported click the Done button to close that popup. Now click the Cancel button to close the Storage window.
  6. Click the emulator black display and type:
  7. Code:
    FIND@5:1
    OLD@5:
    RUN

screen - 2023-10-20T143254.191.png

You should now see my BMP Menu program. Type 8 and press the Enter key (It is labeled RETURN on the 4050 keyboard)

This program runs on the emulator at the original speed of the Tektronix 4051 introduced in 1975 with a Motorola 6800 CPU clocked at 800KHz!

I takes 4 minutes and 52 seconds to display the Mandelorian 558KB file (almost two full DC300 tapes for this single image file) dithered dot image at the state-of-the-art (in 1975) 1024x780 vector resolution!

Emulator Speed - since I use this experimental emulator to develop and test most of my new Tektronix 4050 programs - I increase the emulator speed by editing the mc6800.js file and changing the 6800 emulator "InstructionsPerInterval" on line 64 from 368 to 36.8 for a 10x speedup or 3.68 for a 100x speedup. 10x speedup puts the emulator close to the speed of the 4052 or 4054 and 100x speedup is about 10x faster than the 4052 or 4054.

The GAMES will be too fast doing this as several of them have timers based on detecting whether it is running on a 4051 (like the emulator) or 4052 or 4054.

Emulator Notes
  1. This version of the emulator will lose all the storage if you refresh the browser window. But you can quickly use the storage feature to import any of the Flash Drive folders into the emulator
  2. The emulator can only handle one Flash Drive folder at a time - so the Main Menu program in the ROOT folder will only be able to launch programs that are in the root folder, or individually copied into the emulator storage.
  3. Some of the Flash Drive programs will NOT run on the Emulator such as the programs in these Flash Drive directories:
  4. Code:
    4052Asmblr
    ADV4052
    Adventure
    Asteroids
    OldOpt30
    Opt30Demo
    Opt30Games
  5. Emulator storage supports Flash Drive ASCII and BINARY program and data files with the Flash Drive file header format described in the Flash Drive User Guide.
  6. The emulator runs the MDC Fast Graphics ROM Pack which was productized as the Tektronix 4050R12 ROM Pack with versions for the 4051 and 4052/4054 computers. The 4050R12 ROM Pack uses a CALL "MUSIC" command - but the original Fast Graphics ROM used CALL "MUZAKT". My Flash Drive programs are compatible with the emulator - except programs that use CALL "MUSIC" like my port of MDC's Invader I game. Simply change the ASCII program statements that have CALL "MUSIC" to CALL "MUZAKT" and now they run without error on the emulator BUT the emulator does not (YET?--hint hint Dave) support those commands with PC sounds.

ENJOY!
 
Last edited:
This is great news! --- of course it arrives about a month after I was using the emulator to develop a 405x game that uses R12 if you've got it :)
I had to test the R12 functionality on the real machine.

My game is a two-player game where users of two 405x machines (connected via serial cable) take turns trying to force their opponent to drop Tetris pieces that overflow the "well". It's good fun, and while there's probably a good strategy to it, I haven't figured out what it is yet.

If you'd like to match wits with me (or one of your friends) on my 4051s, come to the Retro Computer Festival in Cambridge, UK on November 4th and 5th. I'll be there with the machines below and with a 4006-1 terminal that's drawing pictures all day long (if it holds up). There'll be lots of other great exhibits there, too!

(Note: I've fixed the space bar for the right-hand 4051 since this photo was taken.)

IMG_20231003_005923.jpg
 
Hi Tom! Thanks for the link to your Pascal to Tek transpiler!
I looked for your game on your repo - but didn't see it.

You commented in my thread about adding a Vectrex gamepad to the unused pins on my Flash Drive.
The Vectrex gamepad includes an analog joystick - without the issues of interrupting graphics to digitize the joystick.

This gamepad made a lot of difference on my Battlestar Galactica - Vipers on Patrol game - that I also created both Option 30 and R12 versions.

I would expect it could help your game - but then you would need two Flash Drives - one for each of the 4051 computers and two Vectrex gamepads :)

Some video game console gamepads (Atari 2600) plug directly into the Vectrex, and there are adapters to connect some of the other video game console gamepads to the Vectrex - most are just connecting the buttons.
 
I haven't released the game yet since I like to clear the rights for my projects with my kind employer. I'll do it in time...

The game you see on the screens doesn't really need keypad control: it's a very simple, static game where you use A, B, C keys to choose a piece to drop and then 1, 2, 3, 4 keys to say where to drop it.

And I think we have different tastes in some respects --- I don't usually adapt out-of-context hardware except by some necessity (like the Flash Drive) and tend to try to stick close to the strengths and constraints of what's to hand. There's absolutely nothing wrong with blending in other devices --- it's pretty cool, it's just not how I do my hobby. I like to imagine that you could have turned up at a lab of 4051s with a tape that had my code on it and load it up and go. Still, I bet if you showed Tek engineers in 1982 the joystick and game, they probably would have got a kick out of it! Maybe some of the 405x engineers are reading now and getting a kick out of it today.

In a related way, displaying raster image files isn't my thing. Those bitmaps look absolutely gorgeous, but I'm most excited about 405x graphics made out of lines --- to me the 405x series is all about lines: vectors! I want to draw images with lines. I've been interested in string art pictures like this one and have been trying to write some software that converts images to combinations of lines that go from one edge of the screen to another, preparing files for display on the 4051s, the 4054A, or the 4006-1. I want to see the lines pile up on the screen like random pick-up sticks as the image slowly starts to reveal itself. Unfortunately I decided I had a better algorithm than existing greedy methods and am now in a deep mess of Fourier transforms, line integrals, and Metropolis-Hastings code that does not work at all! This is typical for me.

I'll keep trying for a little while longer. If you want to find out if I've succeeded, the first place to learn will be Cambridge on November 4th :biggrin:
 
I haven't released the game yet since I like to clear the rights for my projects with my kind employer. I'll do it in time...
And now I have done it. You can find the Pascal-like source code here:


I've also got my cooperative line-bounce screensaver for a pair of 405x machines connected over a serial port:


If you want to find out if I've succeeded, the first place to learn will be Cambridge on November 4th
I did not succeed! Oh well.
 
Great work Tom! I will have to try your muPas transpiler and foursprite and perplex programs!

Good luck with your graphics images.

I'm still working on my Tek BASIC SVG creator program - trying to have it convert all the SVG images and finding out new ways to get R12 images created.
 
@WaveyDipole has improved the 405x web-browser emulator again!
  1. It now handles HUGE files like the Mandelorian and Grogu BMP file of 558KB!
  2. It also handles READ/WRITE changes to the Flash Drive file header - so it can run Main Menu first time setup!
Here is a screenshot of the emulator displaying the Mandelorian and Grogu BMP picture I created:

View attachment 1266436

Here is how to load and run the emulator to view my Flash Drive BMP picture files:

  1. Download this version of the emulator: https://github.com/Twilight-Logic/Tek405xEmulator/blob/master/experimental/JonStanley-Mod-Storage-Class2-06.zip unzip and navigate into the directory and double-click (on windows) this file jsTEKTRONIX4051storage_universal.html
  2. This should open the emulator in your default browser. Click the mute button and then click the start button to start the emulator. The emulator is now running and you can type programs manually by clicking in the black display window.
  3. Click the storage button to open the storage window and change the pulldown to the right of the Import button to 4050 Flash Drive files
  4. Download my latest Flash Drive program files: https://github.com/mmcgraw74/Tektronix-4051-4052-4054-Program-Files/blob/master/Flash_Drive/FlashDrive-5Oct2023.zip unzip and navigate to the BMP directory
  5. In the emulator Storage window - click the Import button and navigate the file explorer window that pops up to the Flash Drive BMP directory and select all the files in that directory from 1 to 124 and click the Open button to import them into emulator file storage. After the files are imported click the Done button to close that popup. Now click the Cancel button to close the Storage window.
  6. Click the emulator black display and type:
  7. Code:
    FIND@5:1
    OLD@5:
    RUN

View attachment 1266437

You should now see my BMP Menu program. Type 8 and press the Enter key (It is labeled RETURN on the 4050 keyboard)

This program runs on the emulator at the original speed of the Tektronix 4051 introduced in 1975 with a Motorola 6800 CPU clocked at 800KHz!

I takes 4 minutes and 52 seconds to display the Mandelorian 558KB file (almost two full DC300 tapes for this single image file) dithered dot image at the state-of-the-art (in 1975) 1024x780 vector resolution!

Emulator Speed - since I use this experimental emulator to develop and test most of my new Tektronix 4050 programs - I increase the emulator speed by editing the mc6800.js file and changing the 6800 emulator "InstructionsPerInterval" on line 64 from 368 to 36.8 for a 10x speedup or 3.68 for a 100x speedup. 10x speedup puts the emulator close to the speed of the 4052 or 4054 and 100x speedup is about 10x faster than the 4052 or 4054.

The GAMES will be too fast doing this as several of them have timers based on detecting whether it is running on a 4051 (like the emulator) or 4052 or 4054.

Emulator Notes
  1. This version of the emulator will lose all the storage if you refresh the browser window. But you can quickly use the storage feature to import any of the Flash Drive folders into the emulator
  2. The emulator can only handle one Flash Drive folder at a time - so the Main Menu program in the ROOT folder will only be able to launch programs that are in the root folder, or individually copied into the emulator storage.
  3. Some of the Flash Drive programs will NOT run on the Emulator such as the programs in these Flash Drive directories:
  4. Code:
    4052Asmblr
    ADV4052
    Adventure
    Asteroids
    OldOpt30
    Opt30Demo
    Opt30Games
  5. Emulator storage supports Flash Drive ASCII and BINARY program and data files with the Flash Drive file header format described in the Flash Drive User Guide.
  6. The emulator runs the MDC Fast Graphics ROM Pack which was productized as the Tektronix 4050R12 ROM Pack with versions for the 4051 and 4052/4054 computers. The 4050R12 ROM Pack uses a CALL "MUSIC" command - but the original Fast Graphics ROM used CALL "MUZAKT". My Flash Drive programs are compatible with the emulator - except programs that use CALL "MUSIC" like my port of MDC's Invader I game. Simply change the ASCII program statements that have CALL "MUSIC" to CALL "MUZAKT" and now they run without error on the emulator BUT the emulator does not (YET?--hint hint Dave) support those commands with PC sounds.

ENJOY!
The links in Step 1 and Step 4 have changed as both the experimental 405x emulator and my Flash Drive zip files have been updated.

I recommend you find the latest version of both by navigating to those folders and selecting the latest versions:

1 - https://github.com/Twilight-Logic/Tek405xEmulator/tree/master/experimental
2 - https://github.com/mmcgraw74/Tektronix-4051-4052-4054-Program-Files/tree/master/Flash_Drive

The latest emulator version now supports two (or more) Flash Drives - which I used one as the input file and the second for the output file to create my latest SVG images posted in my latest release of the Flash Drive. I also typically change the emulator speed as described in the post to 100x faster than the Tektronix 4051 800KHz Motorola 6800 CPU - during development - which makes the emulator about 10x faster than my 4054A computer!
 
I use an emulator at home for a machine we use at work. It is not as fast as my native iMac, but still reasonably fast.

I went to one of our sites the other month and had cause to reboot one of the 'real' offline test and development machines.

Boy, was that s-l-o-w...

I had forgotten just how slow these machines really were - and these machines were fast in their day!

Dave
 
I use an emulator at home for a machine we use at work. It is not as fast as my native iMac, but still reasonably fast.

I went to one of our sites the other month and had cause to reboot one of the 'real' offline test and development machines.

Boy, was that s-l-o-w...

I had forgotten just how slow these machines really were - and these machines were fast in their day!

Dave
I think we were just more patient with these early micro-computers back in the day.

I had only previously experienced using the university IBM 360 mainframe - punching cards for the program and waiting minutes for the printed output :biggrin:
 
Back
Top