←  Programs

ComputerCraft | Programmable Computers for Minecraft

»

HexIt - The ultimate Hex Editor for comput...

Lewisk3's Photo Lewisk3 25 Jun 2017

Hex It

Posted Image

What is HexIt?
HexIt is a Hex Editor for CC meaning, You can edit files Byte by Byte and not Character by Character.
This is extremely useful for, editing already compiled programs, editing ROMs, even writing Assembly from scratch!


What are the features of HexIt, so far?
HexIt features not only a way to edit just Hex, clicking on the Ascii side you can also input characters.
HexIt also features tons of ways to edit your program more efficiently like,
  • Changeable hex file sizes.
  • Find string/hex.
  • Insert/delete hex and ascii.
  • 2 edit modes, one that automatically submits the edit once you fill the text (fill), and a manual mode. (Return, Which changes when you press enter).
  • Temporary hex files that are only created when you save them.
  • Address jumping
  • A saveable address which you can use later to jump back to.
Where can i download this?
The program is available on pastebin: pastebin get DxWtA0LA HexIt



No pics, no clicks? No problem!
Screenshots
Spoiler

My awkward attempt at a tutorial video:


Changelog:
Spoiler

Edited by Lewisk3, 29 June 2017 - 10:46 PM.
Quote

Dahknee's Photo Dahknee 25 Jun 2017

This is pretty cool! :D
Edited by DannySMc, 25 June 2017 - 11:39 PM.
Quote

Wojbie's Photo Wojbie 25 Jun 2017

View PostDannySMc, on 25 June 2017 - 10:10 PM, said:

This is pretty cool, although I do have one thing which I do not like is where you are using a whole 20% of the screen just to put basically your name and about the program. I must admit from my own standpoint I won't use programs that have someone else's name plastered on the main application view. Maybe create a start screen that shows for a second or two that has your name, take note; Sketch, Ink, etc.

But again well done, pretty cool!

I do believe that stuff on right is preview of hex data in middle? Like most hex editors do? You can even decode in manually. It matches exactly data shown in middle of program.
Edited by Wojbie, 25 June 2017 - 11:36 PM.
Quote

Dahknee's Photo Dahknee 25 Jun 2017

View PostWojbie, on 25 June 2017 - 11:35 PM, said:

View PostDannySMc, on 25 June 2017 - 10:10 PM, said:

This is pretty cool, although I do have one thing which I do not like is where you are using a whole 20% of the screen just to put basically your name and about the program. I must admit from my own standpoint I won't use programs that have someone else's name plastered on the main application view. Maybe create a start screen that shows for a second or two that has your name, take note; Sketch, Ink, etc.
But again well done, pretty cool!
I do believe that stuff on right is preview of hex data in middle? Like most hex editors do? You can even decode in manually. It matches exactly data shown in middle of program.

Oh I didn't notice that, I looked at the screenshot and thought it was awesome! Apologies.
Quote

Lewisk3's Photo Lewisk3 26 Jun 2017

Wojbie, on 25 June 2017 - 11:35 PM, said:

I do believe that stuff on right is preview of hex data in middle? Like most hex editors do? You can even decode in manually. It matches exactly data shown in middle of program.

My apologies for the confusion, the text on the right is the translation of the hex on the left into Ascii. In this case the screenshots show the code from my 6502 emulator.
Edited by Lewisk3, 26 June 2017 - 01:27 AM.
Quote

oeed's Photo oeed 26 Jun 2017

Nice work! I'm actually rather surprised something like this hasn't been made before!
Quote

Bomb Bloke's Photo Bomb Bloke 27 Jun 2017

Just the other day I was bemoaning the lack of hex editing functionality in CC, and the unlikeness that anyone would ever produce a "decent" script to fill the gap. I reckon I'll find uses for this! :)

If you'd consider it, I wouldn't mind an upgrade to the search system - being able to search up / down from the cursor would be handy, as would the option to repeat the last search.

Perhaps rather more difficult, but also useful, would be the option to switch from hex to binary or decimal display modes.
Quote

Lewisk3's Photo Lewisk3 27 Jun 2017

View PostBomb Bloke, on 27 June 2017 - 12:57 AM, said:

Just the other day I was bemoaning the lack of hex editing functionality in CC, and the unlikeness that anyone would ever produce a "decent" script to fill the gap. I reckon I'll find uses for this! :)

If you'd consider it, I wouldn't mind an upgrade to the search system - being able to search up / down from the cursor would be handy, as would the option to repeat the last search.

Perhaps rather more difficult, but also useful, would be the option to switch from hex to binary or decimal display modes.

Search system has been upgraded, now features Up and Down as well as saved searches. (Which can be cleared from the search menu.)

As far as rendering decimal or binary, that would require massive changes to the renderer for each. Might be able to figure out something though.

Thanks for the suggestions!
Edited by Lewisk3, 27 June 2017 - 06:46 AM.
Quote

SquidDev's Photo SquidDev 27 Jun 2017

This looks great! I'm impressed that you've added keyboard shortcuts - always a plus!

View PostLewisk3, on 27 June 2017 - 06:27 AM, said:

View PostBomb Bloke, on 27 June 2017 - 12:57 AM, said:

Perhaps rather more difficult, but also useful, would be the option to switch from hex to binary or decimal display modes.
As far as rendering decimal or binary, that would require massive changes to the renderer for each. Might be able to figure out something though.
A interim solution might be to add a "status bar", with information such as the current address and binary/decimal representations of the selected character.
Quote

Lewisk3's Photo Lewisk3 27 Jun 2017

View PostSquidDev, on 27 June 2017 - 08:28 AM, said:

This looks great! I'm impressed that you've added keyboard shortcuts - always a plus!

A interim solution might be to add a "status bar", with information such as the current address and binary/decimal representations of the selected character.

Thanks, also, Nice idea.

Will be sure to add something like that.
Quote

CrazedProgrammer's Photo CrazedProgrammer 27 Jun 2017

This looks very nice!
I haven't seen a program like this for CC, so this will be very useful
for making and debugging binary files.
Thanks for making this! :D
Quote

Bomb Bloke's Photo Bomb Bloke 28 Jun 2017

View PostLewisk3, on 27 June 2017 - 06:27 AM, said:

Search system has been upgraded, now features Up and Down as well as saved searches. (Which can be cleared from the search menu.)

I'm having difficulty with this; requesting a search "up" goes from the top of the file down (instead of going upwards from the cursor), and requesting a search "down" often does the same (seemingly dependant on where you scroll the view to first - it also doesn't seem to care where the cursor is).

"Downwards" searches furthermore tend to simply re-find the already selected value (if it's a match), which is less than useful.

A simple hotkey to repeat the last search (eg F5) would be much faster than manually having to reselect the past text, reselect the past direction, and reselect the "jump to position" option. Speaking of which, being forced to use the keyboard to "press a key" before simply being given another yes/no prompt is a bit annoying, especially when the answer is always going to be "yes". Just display the address for a half-second (if at all: really the current cursor position should be constantly visible somewhere) and then do the jump. Ditto for jumps via the Address menu.

Goto's address history seems to be sharing Search's value history.
Quote

Lewisk3's Photo Lewisk3 29 Jun 2017

View PostBomb Bloke, on 28 June 2017 - 11:49 PM, said:

I'm having difficulty with this; requesting a search "up" goes from the top of the file down (instead of going upwards from the cursor), and requesting a search "down" often does the same (seemingly dependant on where you scroll the view to first - it also doesn't seem to care where the cursor is).

"Downwards" searches furthermore tend to simply re-find the already selected value (if it's a match), which is less than useful.

A simple hotkey to repeat the last search (eg F5) would be much faster than manually having to reselect the past text, reselect the past direction, and reselect the "jump to position" option. Speaking of which, being forced to use the keyboard to "press a key" before simply being given another yes/no prompt is a bit annoying, especially when the answer is always going to be "yes". Just display the address for a half-second (if at all: really the current cursor position should be constantly visible somewhere) and then do the jump. Ditto for jumps via the Address menu.

Goto's address history seems to be sharing Search's value history.

All the above issues should now be fixed. Thanks for the suggestions!
Quote

Bomb Bloke's Photo Bomb Bloke 02 Jul 2017

That seems to've done the trick. Good job, and thanks! :)
Quote

LDDestroier's Photo LDDestroier 03 Jul 2017

Finally, I can edit NES roms in ComputerCraft. Good job!
Quote

Pyuu's Photo Pyuu 21 Aug 2017

This looks amazing!
The only thing I'm concerned about is if the program doesn't take encoding into the equation.
It really depends on how the screen is displayed. If the string is completely concatenated, I'm not sure it would display correctly on the screen.

Try Japanese characters in the file you use and you should be able to figure out if it displays correctly (the Japanese character should be 3 separate bytes if I remember correctly on my experiments on CC. If it displays as a Single character though, it might through the program off.)
Quote

Beeskee's Photo Beeskee 21 Aug 2017

Looks awesome but I'm stuck on the older version of Computercraft for now lol
Quote