Jump to content




HexIt - The ultimate Hex Editor for computercraft!

utility lua computer

16 replies to this topic

#1 Lewisk3

  • Members
  • 150 posts

Posted 25 June 2017 - 02:50 AM

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.


#2 Dahknee

  • Members
  • 1,808 posts
  • Location/home/da

Posted 25 June 2017 - 10:10 PM

This is pretty cool! :D

Edited by DannySMc, 25 June 2017 - 11:39 PM.


#3 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 25 June 2017 - 11:35 PM

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.


#4 Dahknee

  • Members
  • 1,808 posts
  • Location/home/da

Posted 25 June 2017 - 11:39 PM

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.

#5 Lewisk3

  • Members
  • 150 posts

Posted 26 June 2017 - 12:00 AM

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.


#6 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 26 June 2017 - 01:01 AM

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

#7 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 27 June 2017 - 12:57 AM

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.

#8 Lewisk3

  • Members
  • 150 posts

Posted 27 June 2017 - 06:27 AM

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.


#9 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 27 June 2017 - 08:28 AM

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.

#10 Lewisk3

  • Members
  • 150 posts

Posted 27 June 2017 - 09:11 AM

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.

#11 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 27 June 2017 - 11:54 AM

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

#12 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 28 June 2017 - 11:49 PM

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.

#13 Lewisk3

  • Members
  • 150 posts

Posted 29 June 2017 - 10:47 PM

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!

#14 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 02 July 2017 - 11:24 AM

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

#15 LDDestroier

  • Members
  • 1,095 posts
  • LocationACDC Town

Posted 03 July 2017 - 03:48 PM

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

#16 Pyuu

  • Members
  • 203 posts

Posted 21 August 2017 - 01:50 AM

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.)

#17 Beeskee

  • Members
  • 27 posts

Posted 21 August 2017 - 04:45 AM

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





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users