Friday, May 6, 2016

Completing 2310 and 2501 device implementations


Restructuring the GUI

The 2310 function is converted and ready for testing. The virtual disk drive pops up a window with a picture of a disk cartridge to its right, the name of the PC file that is mounted on the virtual drive. Two lamp blocks are in the window, Disk Unlock and File Ready, which harken to the two lamp blocks on the keyboard panel of the 1130.

When it starts, the file name is **empty**, Disk Unlock is 'lit' and File Ready is dimmed out. Clicking on the 2315 cartridge icon brings up a file open dialog where the user selects a suitable file. The file is opened, validated, the file name is displayed, the Disk Unlock lamp is dimmed out and the File Ready lamp is 'lit'.

I then worked on completing the 2501 card reader function, building a window that pops up when the device is activated. It has an icon of a punched card and the name of the PC file to its right (or **hopper empty** when no file is open). A button, Prog Load and a lamp block, Ready, are on the next row. Finally, three checkboxes run across the bottom row - one to set up the last card status and two to choose between 029 and binary file modes.

The 2501 device is more complex, with more state information in the model and more fpga interactions. I also must decide whether to expose some of the state as output on the GUI window - such as card deck size and current card being processed.

I have icons for the other PC file types to open for the remaining device types - punch cards, a sheet of printout and core memory - which will be placed in the windows for those device types.


  1. This sounds very nice, you are clearly becoming a Wx guru!

    Re the 2310, how do you map the disk structure of tracks and sectors onto the file? Do you just treat the file as an array of bytes and map sector units onto it? Do you in fact keep an in-memory 1MB array to represent the disk contents, or what? Do you provide a "formatted blank disk" file that can be copied to make a "new" cartridge?

  2. Yes, the file is an array (although of words, pairs of bytes). First 321 words are sector 0, etc. I use file IO, using a seek command and read or write to get the 642 bytes for the desired sector, rather than tying up 512000 words in memory.

    Yes, I used Brian Knittel's IBM 1130 simulator to run the DCIP standalone utility to format a blank disk, which creates the 1MB disk file image that can then be mounted as a new blank cartridge.

    In a way, this all fits the analogy to cartridges. You don't format a new blank cartridge out of thin air, you have to buy a new cartridge (or format an old one) before you can slide it into the drive and mount it.