File Hex Editor for X16

Post Reply
voidstar
Posts: 445
Joined: Thu Apr 15, 2021 8:05 am

File Hex Editor for X16

Post by voidstar »

X16HXD is a file hex editor.

Version 1.3 updates
- Can press ESCAPE during first character of HEX edit in order to cancel the edit
- Fixed missing fclose, so can now re-open same file after multiple runs (without having to power cycle)
- Help will keep you at same location instead of going back to HOME.

Version 1.2 updates
- Tests available memory (low memory), max editable file ~20KB (reported at startup)
- Wrap around left/right movement
- GOTO feature (go to a specific offset)
- Start in 80x30 mode (instead of 40x30)

Other features:
- Can INS/DEL bytes (add/remove)
- Just start typing hex values to modify
- H for command list help
- "***" indicator at bottom left indicates file buffer is modified (use W to write it back to disk)
- Top right is total file size
- Bottom right is current file offset of cursor position

Written using cc65. Hybrid use of conio.h and some direct assembly for the main table updates.

Mostly cc65 helped with the file I/O routines, I was surprised they all worked "out of the box" for its C standard library implemented for the X16 R44.

I think X16HXD is usable enough to start sharing this with others, but as a reminder: make backups first of any files you modify just in case.

The yellow numbers at the bottom center are the last keyboard code and key modifies (if any) that were last pressed.

Still lacking many features, such as: no Search, no Bulk Fill. Also, not sure how case-sensitive the file input prompt at the beginning is (across Linux and Windows).


Main next focus is adjustments to being able to modify files larger than the first BANK. Bit of a challenge since I want to support the INS/DEL feature, and modifying the file in memory before saving back to disk.


Source at: https://github.com/voidstar78/X16HXD


A short video preview is here: https://www.youtube.com/watch?v=fTP-gpYEN3I
Attachments
X16HXD.PRG
(15.6 KiB) Downloaded 264 times
x16hxd_2.png
x16hxd_2.png (36.11 KiB) Viewed 3277 times
x16hxd_1.png
x16hxd_1.png (53.41 KiB) Viewed 3277 times
Last edited by voidstar on Tue Sep 19, 2023 8:18 am, edited 2 times in total.
voidstar
Posts: 445
Joined: Thu Apr 15, 2021 8:05 am

Re: File Hex Editor for X16

Post by voidstar »

Source at:
https://github.com/voidstar78/X16HXD

Added GOTO feature, can now quickly get to end of file.
Increased editing capacity to ~20KB.
voidstar
Posts: 445
Joined: Thu Apr 15, 2021 8:05 am

Re: File Hex Editor for X16

Post by voidstar »

1.3 updates:

- Fixed where EOF is no longer read as an input character to the buffer
- Fixed a missing fclose after fopen (this prevented same filename from being re-opened across runs)
- Returning from HELP now returns to the same position (instead of going back to HOME)
- Can press ESCAPE to abort an initial (first character) edit of a byte
Post Reply