Page 1 of 1

Hex editor HxD is PB friendly

Posted: Thu Jan 28, 2021 8:37 am
by infratec
I'm using HxD for a long time.
As version 2.0 was available, it has the possibility to write own plugins.
I tried this with PB and after some correspondence with the author, I was able to do this.

Maybe this was the reason why he also looked a bit to PB :mrgreen:

Yesterday I need to copy a graphic palette out of an exe file.
I was surprised that it is possible to export directly to Purebasic.

It generates a file like this:

Code: Select all

; C:\tmp\Debris32\debris32.exe (02.01.1999 11:15:52)
; StartOffset(h): 00000050, EndeOffset(h): 00000075, Länge(h): 00000026

#RawDataItemCount = 38

DataSection
  DS_RawData:
  Data.b $54, $68, $69, $73, $20, $70, $72, $6F, $67, $72, $61, $6D, $20, $6D
  Data.b $75, $73, $74, $20, $62, $65, $20, $72, $75, $6E, $20, $75, $6E, $64
  Data.b $65, $72, $20, $57, $69, $6E, $33, $32, $0D, $0A
EndDataSection

Structure RawDataArray
  Items.b[#RawDataItemCount]
EndStructure

Define *rawData.RawDataArray = ?DS_RawData
I thought: how nice is this :!:

I no longer need an editor and search and replace many things.

Simply mark the area you want to export and do it.

You can find it here:
https://mh-nexus.de/en/programs.php

Re: Hex editor HxD is PB friendly

Posted: Thu Jan 28, 2021 11:39 am
by BarryG
A very nice addition by HxD's author, indeed. Thanks for the heads-up!

Re: Hex editor HxD is PB friendly

Posted: Thu Jan 28, 2021 2:15 pm
by davido
@infratec ,
Very useful.
Thank you for sharing this little gem. :D

Re: Hex editor HxD is PB friendly

Posted: Thu Jan 28, 2021 2:24 pm
by chi
Thanks for the info... Was still on 1.7.7.0

Re: Hex editor HxD is PB friendly

Posted: Thu Jan 28, 2021 3:30 pm
by NicTheQuick
How funny is it that the author of that software comes from the same city as me? :D

Re: Hex editor HxD is PB friendly

Posted: Thu Jan 28, 2021 5:16 pm
by Mijikai
Thanks was still on an old version.

Re: Hex editor HxD is PB friendly

Posted: Fri Jan 29, 2021 5:33 am
by TassyJim
Thank you,
I was on version 2.3 but hadn't noticed that option.

Very handy

Jim

Re: Hex editor HxD is PB friendly

Posted: Fri Jan 29, 2021 8:33 am
by BarryG
LOL, I actually was on an older version, too. Seems like a lot of us were! Just goes to show how stable and good HxD is - that we never felt the need to check for updates!

Re: Hex editor HxD is PB friendly

Posted: Sun Jan 31, 2021 5:57 pm
by Kwai chang caine
Waouuuuh !!! i believe it's the first time i see an export menu to PureBasic :shock:
It's the begining of the glory of our love PB 8)
it's FRED who will be happy and proud to see his baby enter the big leagues :shock: 8)

Thanks for the tip INFRATEC 8)