randyrossi / bmc64

A bare metal Commodore 64 emulator for the Raspberry Pi with true 50hz/60hz smooth scrolling, low input latency and better audio/video sync.
GNU General Public License v3.0
479 stars 56 forks source link

[FR] Ability to browse D64 (T64, TAP) image contents in file browser and LOAD a specific file. #137

Open moogthedog opened 4 years ago

moogthedog commented 4 years ago

The facility in VICE on the PC when mounting an image, where you can select the file within the image to boot, is very useful if you have a large archive of disks, or where the disk image filenames may not be descriptive. It's also helpful where you have more than one app/game on a disk image.

(In PC VICE, the image catalogue is displayed under the file list as a small preview. Clicking the list boots the emulator, starting that file (eg LOAD "PARADROID",8,1 rather than just LOAD "*",8,1.)

CCS64 provides a similar image browser, allowing the user to see the contents of an image as a full-screen menu when a disk image is selected in the file browser.

It could be that I have missed an option to allow this sort of operation in BMC64, but I cannot find it.

I would like to update the interface to allow this sort of file selection - Pressing RETURN on a disk image in autostart would boot it in the current way. Pressing right-arrow would instead open the image browser, allowing the user to select a file to autostart. Escape/Runstop/Menu Back would close the browser and return the user to the file list.

Initially I would work on D64, but the code would be structured to allow easy later addition of other image types.

moogthedog commented 4 years ago

Having examined the code, all the blocks are already there - disk_contents.c/h has all the image reading code (returning a list of filenames and types), and the autostart code already has facility to take a program index to apply to the post-boot LOAD command. I'd just need to display a scrollable menu of the disk's contents, and then pass the program index number (or 0 if the user chooses to boot the whole disk) through to the VICE API (replicating emux_autostart_file(...), but with an additional parameter)...