Thursday, June 22, 2023

Revamping the screen layout now that touch interface is out of the design

SPACE CAN BE RECLAIMED

The bottom of the screen was set up with two arrow buttons and the selection rectangle button. Now that the touch interface will not be used, that space is available for other information, either the file name list or some status messages. It was roughly 40% of the screen space tied up in the user interface objects that I can now use more effectively for output purposes rather than input. 

SWITCHES ORDERED TO REPLACE THE TOUCH INTERFACE OBJECTS

I ordered a rocker switch that implements two momentary positions, on-off-on, which will be oriented vertically so that it intuitively signals its use to scroll the file list up or down by one entry. I have also ordered a larger round button that will toggle the selection of the currently highlighted filename. 

Up/Down Scroll

Selection Toggle Button

IMPLEMENTING PINS TO CONNECT THE THREE BUTTONS

I will expand the input PIO function in the FPGA side of the design to detect the closure of the switches in the rocker switch and pushbutton. I can give up two external pins, one in the input PIO and one in the output PIO, as they were used as slave select for the touch controller chip and to test for a touch having occurred. On balance, then, this uses only one more pin than the prior approach. 

EXPLORING LARGER FONTS AND DIFFERENT NUMBER OF FILES PER SCREEN

I tried a larger 20 point font to see what the filename looks like at that scale. I found it more readable and adopted it. That gives me 38 characters across the screen in a line and room for slightly more vertical spacing between lines. This still works with a maximum of 13 file names on a screen. 

I then conducted an exhaustive series of tests for various scrolling amounts and conditions of highlighting and selection. The behavior I intend is to have the system come up with the first 13 filenames in the directory on the screen, with the highlight position at the top line. 

20 point font, showing highlight of first filename

Each time the rocker switch is pushed downwards, the highlight will move to a lower line, e.g. from 1 to 2. When the highlight is on the last line of the screen and a further down is requested, we scroll the highlighted filename to the top and display up to 12 more filenames on the screen. Attempting to move down when the last filename in the list is highlighted does nothing.

Each time the rocker switch is pushed upwards, the highlight will move up by one line. If it is at the top of the screen but there are files above it that are not visible, then we scroll by putting the highlighted line at the bottom and displaying the previously unseen filenames above it, up to 12. Attempting to move up when the first file in the directory is already highlighted has no effect. 

When the Selection Toggle button is pushed, the highlighted filename entry becomes selected. It will be displayed with different background and font coloring to indicate this. The logic will open the file on the SD card and load its contents down through the FPGA into the hidden RAM so that if the drive is powered up and attempts to load disk heads, this data will be accessed as if it were a physical 2315 cartridge mounted in the drive. 

Scrolled and with the entry selected

Pushing Selection Toggle when the highlighted entry is already selected will invalidate the downloaded cartridge image and show the line in its normal highlighted state. When scrolling by using the up and down presses of the rocker switch, we will never move the highlighting off the screen. In other words, if we have 100 file names on the SD card and we have scrolled down to highlight the 30th file name, then toggled to make it selected, we cannot scroll down to move the 30th filename off the list. 

If it is at the top because we are pushing up, once it hits the top all subsequent up pushes are ignored unless the file is deselected by toggling. Similarly pushing down when a selected entry is at the bottom of the screen won't have any effect. One has to deselect in order to move around to filenames more than +/- 12 entries from the highlighted filename. 

 CARTRIDGE IMAGE BITMAP TESTED

Part of the planned user experience is to have the screen show a picture of a 2315 cartridge while the drive is in operation. This happens when a filename has been selected by the user toggling on a highlighted name, then the drive is switched on and begins spinning up the dummy physical cartridge that is inside it. Once the drive is at speed it attempts to load the heads down onto the disk surface and when that physical movement is detected by a microswitch, it makes the drive ready for access by the IBM 1130.

With the modification to the drive, when the switch is set to virtual mode, the signal to load the heads does not activate the solenoid to really make that happen. Instead, our FPGA logic sees that signal, knows we have a virtual cartridge loaded into the hidden RAM, so it sends the signal substituting for the physical microswitch. This turns on the Ready lamp for the disk drive and it can now be used by software in the 1130. 

To indicate that the virtual cartridge is loaded, once we see that head load signal from the drive arrives and the user has selected and thus loaded a file, we replace the user interface screen with a picture of a 2315 cartridge. When the drive goes out of ready, usually because the user has switched off the drive, we see that head load signal go away. That is the signal to remove the static picture of the cartridge and go back to our user interface screen. 

My first test produced some garbled image on the screen, but I quicky spotted the problem and corrected it. I see the bitmap - although it is reversed in both vertical and horizontal orientation. Since this is a placeholder to be replaced by a photograph I will take of a cartridge, I didn't do anything to flip it.

Placeholder image on the screen

1 comment:

  1. It might be too much work, but I would think a more useful graphic, once the virtual cart is loaded, would be a simple schematic of the disk and arm with the "arm" (which could be a simple horizontal line) moving in and out (getting longer or shorter) in proportion to the seek position.

    ReplyDelete