Skip to content

Add graphical disk visualization with real-time sector highlighting - #269

Open
wjeiv wants to merge 1 commit into
pi1541:masterfrom
wjeiv:diskimage-enhancement
Open

Add graphical disk visualization with real-time sector highlighting#269
wjeiv wants to merge 1 commit into
pi1541:masterfrom
wjeiv:diskimage-enhancement

Conversation

@wjeiv

@wjeiv wjeiv commented Apr 15, 2026

Copy link
Copy Markdown

Add Real-time Disk Visualization
Replaces the old rectangular BAM grid with a circular floppy disk visualization that shows real-time drive activity.

Changes:

DiskVisualizer.h/cpp - New rendering engine with track/sector layout, BAM coloring, and animated read head
FileBrowser.cpp - Integrated into DisplayDiskInfo() for full disk render on load
main.cpp - Added UpdateHead() hook in UpdateScreen() for real-time head movement
Features:

Concentric rings show D64 track layout (21/19/18/17 sectors per track zone)
BAM-based coloring: green=allocated, black=free, cyan=directory track
Red highlighting for active sector during drive LED activity
Moving read head on south edge with current track number
Integer-only math (no floating point dependencies)
Files Added:

src/DiskVisualizer.h (91 lines)
src/DiskVisualizer.cpp (500+ lines)
Files Modified:

src/FileBrowser.cpp (+20 lines)
src/main.cpp (+5 lines)
See attached MP4 and screenshots for the visual improvements.

Tested on:
Pi Zero 2 W

20260415_193337.mp4
20260415_193331

@pottendo

Copy link
Copy Markdown

hi, looks pretty cool - don't know what Steve will do with it;
You may give it a try to merge into my https://github.com/pottendo/pottendo-Pi1541
...though, pls. be aware: users are very sensitive when compatibility is degrading. I found that the whole GFX output impedes real-time responsiveness on the timing critical I/Os and therefore implemented the option to turn off the local Pi output; the average user won't connect a display anyways, so no need to waste cycles. Steve implemented a similar option in his 1.25, which is now also the base for my fork. Compatibility is pretty good... whatever you do pls. test high-end loaders, bitnax, etc. in combination with your code running and check if the system performance remains stable.

Thanks for your contribution in advance, looking forward, pottendo
PS: Steve and myself are loosely collaborating on this project: https://www.lemon64.com/forum/viewtopic.php?p=1075173#p1075173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants