Conversation
|
The branch |
… files: home/F2 (start of file) and end/F8 (end of file)
541af31 to
b8f5d0d
Compare
There was a problem hiding this comment.
Pull request overview
Adds a dedicated hex viewer mode to the existing file viewer/editor flow in the firmware UI, along with new navigation shortcuts to jump to start/end of file. This supports browsing binary files more reliably (per issue #320) without relying on text rendering behavior.
Changes:
- Introduces
HexEditor(hex/ASCII-style row rendering) and wires it into the UI as a new “Hex View” context menu action. - Refactors
UserInterface::run_editorto accept anEditor*and addsrun_hex_editor(...)for hex-view launch. - Adds Home/F2 (start) and End/F8 (end) navigation to the editor, and updates build rules/Makefiles to compile the new source.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Makefile | Adds ESP-IDF invocation variables and routes ESP32 builds through them |
| target/common/rules.mk | Makes gitinfo depend on $(OUTPUT) so the generated header has a destination |
| software/userinterface/userinterface.h | Adds hex-view constants and run_hex_editor declaration; internal editor runner overload |
| software/userinterface/userinterface.cc | Refactors editor runner to take an Editor* and adds run_hex_editor implementation |
| software/userinterface/user_file_interaction.h | Adds EditorType and S_hex_view declaration |
| software/userinterface/user_file_interaction.cc | Adds “Hex View” context action and shared view_file(...) implementation |
| software/userinterface/editor.h | Makes rendering extensible via virtual draw(int, Line*); declares HexEditor |
| software/userinterface/editor.cc | Routes drawing through virtual per-line draw; adds Home/End shortcuts |
| software/userinterface/hex_editor.cc | New hex viewer rendering implementation |
| target/u64ii/riscv/ultimate/Makefile | Adds hex_editor.cc to build |
| target/u64/riscv/ultimate/Makefile | Adds hex_editor.cc to build |
| target/u64/nios2/ultimate/Makefile | Adds hex_editor.cc to build |
| target/u2plus_L/riscv/ultimate/Makefile | Adds hex_editor.cc to build |
| target/u2plus/nios/ultimate/Makefile | Adds hex_editor.cc to build |
| target/u2plus/nios/recovery/Makefile | Adds hex_editor.cc to build |
| target/u2/zpu/update_to_mb/Makefile | Adds hex_editor.cc to build |
| target/u2/zpu/ultimate/Makefile | Adds hex_editor.cc to build |
| target/u2/riscv/ultimate/Makefile | Adds hex_editor.cc to build |
| target/u2/microblaze/mb_ultimate/Makefile | Adds hex_editor.cc to build |
| target/u2/microblaze/mb_ui/Makefile | Adds hex_editor.cc to build |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b8f5d0d to
feb64c3
Compare
|
@GideonZ I have updated this PR with the latest changes from your repository to ensure it can be merged cleanly. I also added a unit test. Thanks for kicking off a workflow run. Build and DeployVerified to work on my Ultimate 64 Elite I using Quartus 18.1 Lite and the following commands executed from the root of this repo, with my Kubuntu 24.04 PC connected via USB and USB Blaster to the JTAG interface of the U64. cd /home/chris/dev/c64/1541ultimate
export QUARTUS_ROOTDIR=/home/chris/intelFPGA_lite/18.1/quartus
export QSYS_ROOTDIR=/home/chris/intelFPGA_lite/18.1/quartus/sopc_builder/bin
export PATH="/home/chris/intelFPGA_lite/18.1/quartus/bin:/home/chris/intelFPGA_lite/18.1/nios2eds/bin:/home/chris/intelFPGA_lite/18.1/nios2eds/bin/gnu/H-x86_64-pc-linux-gnu/bin:/home/chris/intelFPGA_lite/18.1/nios2eds/sdk2/bin:/home/chris/intelFPGA_lite/18.1/quartus/sopc_builder/bin:$PATH"
source /home/chris/.espressif/v5.5.3/esp-idf/export.sh >/dev/null
make -C /home/chris/dev/c64/1541ultimate -j"$(nproc)" u64
mkdir -p /home/chris/dev/c64/1541ultimate/build/output
cp -f /home/chris/dev/c64/1541ultimate/external/u64.sof /home/chris/dev/c64/1541ultimate/build/output/ultimate64-elite.sof
cp -f /home/chris/dev/c64/1541ultimate/target/u64/nios2/updater/output/u64.pof /home/chris/dev/c64/1541ultimate/build/output/ultimate64-elite.pof
jtagconfig
nios2-download -g /home/chris/dev/c64/1541ultimate/target/u64/nios2/ultimate/result/ultimate.elfScreenshotsThese were captured using C64 Stream, showing main features, as mentioned earlier in this PR:
|



Features
Design Notes
Examples
New "Hex View" entry in context-sensitive menu:

New "Hex View":

Same file opened via existing "View" which was left unchanged. In this example, byte 0x00 at offset 0x3b terminates the string rendering:

New "Hex View" using sample file containg contiguous sequence of numbers from 1 through 255:
