Sunday, May 28, 2023

Tested module to extract and list the virtual 2315 cartridge files on the SD Card

CHOOSING VIRTUAL CARTRIDGES FROM THE SD CARD DIRECTORY

The user of this system will put virtual 2315 disk cartridges as files in a specific directory of the SD Card on the DE10-Nano board, allowing them to select one of them to virtually mount on the IBM 1130 disk drive. I have configured the product initially to support up to 128 cartridge images, but this is configuration from a header file if an institution every needs to increase the capacity.

The user interface program displays 20 of the file names at a time on the LCD screen, allowing the user to move the selection point up or down by pushing Up or Down buttons on the screen. Think of this as a window of 20 entries that can slide up and down across the entire list of installed files. If the user scrolls past the bottom or top of the screen we will shift the window down or up to move that window. 

This module - opencarts - looks at the directory and extracts the file names of all the virtual disk files. It ensures they are files of the correct size and makes other checks before adding them to an in-memory array of file names. At any point in time, one of the twenty lines of file names is highlighted, which will be the cartridge loaded if the user touches the Select button on the screen. 

The display of twenty names from the list based on the history of Up and Down button pushes is accomplished by another module - showscreen - using the list of filenames that was populated by opencarts

TEST PROGRAM VALIDATED FUNCTIONALITY

I dashed off a small test program to verify that opencarts worked correctly. I first ran it with no virtual files on the SD Card, to verify that it handled the edge case. Eight disk images were installed and showed up correctly in the list. 

No comments:

Post a Comment