jonbstanley / Tek405xEmulator

Tektronix 405x Emulator
24 stars 8 forks source link

Various enhancements to the emulator #27

Open Twilight-Logic opened 2 years ago

Twilight-Logic commented 2 years ago

I have added some enhanancements to the emulator including:

Storage Module

A storage module has been added that allows files to be imported/exported and stored in browser storage or saved to the host computer. Files can still be loaded into the emulator using the existing OLD@1: command by dragging and dropping the file in the emulator windows and clicking the 'Select' button. Alternatively they can be saved to storage and loaded using OLD@5:x where x is the file number. Files can also be saved directly from the emulator out to the host computer file storage by issuing a FIND@5:0 before SAVE@5:. This will open a file save dialogue allowing the file to be saved to a convenient location.

The Storage module provides a number of features allowing files to be exported individually, as an archive of the complete storage (like a tape) or in a format compatible with Monty McGraws flash drive. A description can be added to files and they can be viewed, moved or deleted as required.

Commands implemented include: FIND, OLD, APPEND, SAVE, INPUT, PRINT, READ, WRITE, BOLD, BSAVE, BAPPEN and CLOSE.

A 'Storage' button replaces the original 'Choose file' button on the main screen. This opens up the storage module.

4050E01 ROM Extender

The emulator has been modified to support additional ROM storage. The file Tek4051Rom.js now has arrays for both left and right ROM slots. It also has been extended to include support for the 4050E01 ROM expander. A new file called RomExp.js has been added for this purpose and stores ROM code that would otherwise be stored in the 4050E01 expander.

Mute/Unmute Sound Button

A mute button has been added to the main screen to mute/activate beeping.

Improved Keyboard Layout

The keyboard layout has been modified to more closely match the PC keyboard layout. Keys such as @ and ; and : are now correctly mapped. TekKeyboard.js has been substantially modified to use the recommended event.key method rather scancode.

Other changes:

The HTML launchers 'jsTEKTRONIX4051.html' and 'jsTEKTRONIX4051_universal.html' have been substantially modified to work with both the new storage module and the modified keyboard module. The stylesheet file 'styleSheet.css' has been updated to add styling elements to the storage module. The original styling has been retained.

Known issues:

The emulator crashes in Firefox when the Delete key is used in the 4051 emulator window. There appears to be no problem with Chrome, Edge or other browsers. This problem seems to be unique to Firefox.

mmcgraw74 commented 2 years ago

The emulated 4050E01 ROM Expander image in this commit also includes 4051R05 BINARY PROGRAM LOADER and 4051R12 Graphics Enhancement ROM PACKs for compatibility with the 4050 Flash Drive FlashDrive.zip file image containing the latest ASCII and BINARY programs requiring those ROM PACKs.

mmcgraw74 commented 2 years ago

This commit also includes changes to the 4051 RND() command to provide true random numbers based on system entropy with help from David Roberts - see this vcfed.org thread: https://forum.vcfed.org/index.php?threads/tektronix-405x-emulator-issue-rnd-after-init-doesnt-work.1227487/

LegalizeAdulthood commented 2 years ago

I'm not the owner of this repository, but I'd suggest a couple things:

  1. Squish all your incremental commits into a single commit. All these commits with dates for the commit description aren't useful to anyone but you while you're developing.
  2. Move the description of your enhancements to the commit message instead of the description of the pull request.
jonbstanley commented 2 years ago

@Twilight-Logic thanks for your contributions. Could you please resolve conflicts with TekKeyboard.js and then I'll review the pull request to merge into main.