CPCWiki forum

General Category => General Discussion - Introductions => Topic started by: merlinkv on 11:24, 02 March 16

Title: Best Hex Editor for ROMs?
Post by: merlinkv on 11:24, 02 March 16
Hi,

What's the best Hex editor (Windows) for ROMs ... I want to do some jobs on my ROM images to test it on X-MEM ....  :)
Title: Re: Best Hex Editor for ROMs?
Post by: robcfg on 11:33, 02 March 16
HxD (https://mh-nexus.de/en/downloads.php) with no doubt!
Title: Re: Best Hex Editor for ROMs?
Post by: Bryce on 11:48, 02 March 16
Lots of doubt. There are many to choose from. I use the editor in Prog-Express from Batronix: Software - Prog-Express (http://www.batronix.com/shop/software/prog-express/index.html)

It's made for Batronix programmers, but it's freeware and the editor etc works without needing a programmer. It can also calculate and insert Checksums and even unique serial numbers.

Bryce.
Title: Re: Best Hex Editor for ROMs?
Post by: Kris on 11:50, 02 March 16
Use to edit several files type with HxD as well.......
Title: Re: Best Hex Editor for ROMs?
Post by: merlinkv on 12:07, 02 March 16
OK guys.

Thanks for the info... I will try later at home.

To start I want to do some changes in ParaDOS 1.2 following the instructions from here: ParaDOS 1.2 (http://www.cpcwiki.eu/forum/applications/new-version-of-parados-finally-released/)

QuoteBit 4 - (0) Bit 2 Selects ROMDOS D1/IBM, (1) Bit 2 Selects Vortex/PCW
Bit 3 - (0) Disable, (1)Enable Ultraform format rather than ROMDOS D10 (*Config says D1)
Bit 2 - (0) Disable, (1)Enable IBM format rather than ROMDOS D1 (*Config says D10).
Bit 1 - (0) Disable, (1)Enable extended DATA and SYSTEM formats (Electro Formats)
Bit 0 - Drive configuration (DDB) usage affected by formats. (0 = Unlocked, 1 = Locked)

Vortex, PCW (SS40) and PCW (DS80) are new to ParaDOS 1.2.

So to make a temporary change to the drive definition, poke &baff or &bafe with the new value. To
make a semi-permanent change, poke &bafd or &bafc and the corresponding byte at &baff or
&bafe. To make a permanent change, change the ROM at address #3ffe (DDB) or #3ffd (DPB). If these
values are changed, the ROM checksum at #3fff should be adjusted accordingly.

The correct default values for 40 track, single-sided drive B should be 0 and 0.

To allow 80 track, double-sided discs to be used in Drive B: use DDB=#03. Disabling Electro
formats allows 40 track, single-sided DATA and SYSTEM format discs to be used in drive B

Specially I have doubts to calculate the checksum at #3FFF.


Thanks again  :)
Title: Re: Best Hex Editor for ROMs?
Post by: merlinkv on 12:30, 02 March 16
I will try also with this one XVI32 2.55 (http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm) ...  :)
Title: Re: Best Hex Editor for ROMs?
Post by: TotO on 12:56, 02 March 16
You can edit a CPC ROM, using the EDITOR tool from the X-MEM floppy disc.
Title: Re: Best Hex Editor for ROMs?
Post by: Executioner on 12:59, 02 March 16
Quote from: merlinkv on 12:07, 02 March 16
Specially I have doubts to calculate the checksum at #3FFF.

Subtract the current bytes at #3FFD (DPB) and #3FFE (DDB) from the checksum byte at #3FFF, modify them, then add it back in. It's just a simple checksum of all bytes (#3FFF) = SUM(0..#3FFE).
Title: Re: Best Hex Editor for ROMs?
Post by: merlinkv on 14:03, 02 March 16
I have made next changes in ParaDOS 1.2 rom:

#3FFD = &02 / 00000010
#3FFE = &03 / 00000011

Te correct checksum (8 bit) for the whole file will be:  #3FFF = &OC / 00001100 ?? or &97 / 10010111

Other example:

#3FFD = &12 / 00010010
#3FFE = &03 / 00000011

Te correct checksum (8 bit) for the whole file will be:  #3FFF = &A3 / 10100011 ??
or &97 / 10010111 (8 bit checksum of all blocks minus #3FFF)

Sorry, I know is like a noob question, but too may years without working on Hex & Binary files .....
:picard:
Title: Re: Best Hex Editor for ROMs?
Post by: merlinkv on 16:26, 02 March 16
Quote from: Executioner on 12:59, 02 March 16
Subtract the current bytes at #3FFD (DPB) and #3FFE (DDB) from the checksum byte at #3FFF, modify them, then add it back in. It's just a simple checksum of all bytes (#3FFF) = SUM(0..#3FFE).


Wll I've made a test rom following your post ....


- Original value at #3FFF = &E5


- &E5-&12-&03 = &D0 (I'm not sure 100%)


Anyway, ROM burned with #3FFF = &D0 then flashed in X-MEM ....it appears like working fine : Read, write, copy .....


Edited: &D0 fails ... then reflashed wwoth #3FFF = &A3 ... working fine now  :)  crossing fingers
Title: Re: Best Hex Editor for ROMs?
Post by: merlinkv on 19:34, 02 March 16
Well, finally I have found my setup thanks to @all for the Hex Editors recommendations ...

- Original values: #3FFF = &E5, #3FFD = &00, #3FFE = &03

- My new value at #3FFD = &02 (ELECTRO Formats, ROMDOS D1 & ROMDOS D10 = Enabled)

- New checksum at #3FFF = &E7

My new ParaDOS 1.2 is working 100%





Title: Re: Best Hex Editor for ROMs?
Post by: Executioner on 22:02, 02 March 16
Is the original values are #00, #03 and the checksum is #E5, then subtracting the original values gives #E5 - #00 - #03 = #E2.

With the new values of #02, #03, adding them back in you get #E2 + #02 + #03 = #E7, so you are correct.

For the past 20 years ParaDOS had the wrong checksum anyway, so I wouldn't be too concerned even if you do get it wrong, it will just annoy TFM's ROM Manager.
Title: Re: Best Hex Editor for ROMs?
Post by: merlinkv on 23:23, 02 March 16
Thanks again for your help mate  :)

Now I will try with new options .... but I will use WinApe to test it (is not a real CPC, but not bad for testing purpouses).  :D
Title: Re: Best Hex Editor for ROMs?
Post by: merlinkv on 00:20, 10 February 20
Hello,
I'm doing some jobs with ROM's but after log time I've forget how to do some task ...  :picard: :picard: :picard:

Mi idea is to patch the ParaDOS 1.2 to:

- Drive A -> Standard 3" disk, 40 tracks, one side (nothing to change)
- Drive B -> 3.5" drive with Vortex 720Kb format

What I need to do to change the default format to drive B to Vortex and set it as permanent?

Thanks & Kind Regards.
Title: Re: Best Hex Editor for ROMs?
Post by: merlinkv on 12:05, 10 February 20
Hello,
Job done! Everything is OK.
Title: Re: Best Hex Editor for ROMs?
Post by: TotO on 12:47, 10 February 20
The X-MEM EDITOR program provided into its DSK allows to do that task from the CPC.
Title: Re: Best Hex Editor for ROMs?
Post by: Ast on 13:50, 10 February 20
iMPdos can do it easily.
Title: Re: Best Hex Editor for ROMs?
Post by: merlinkv on 15:46, 10 February 20
Hello,

Thanks.

I have done the job with HxD because I need to make changes on ParaDOSFile.rom to make a custom rom to be recorded on one W27C512 (I have a mod inside the CPC that allow to change internally 4xLower_ROM0 & 4xROM7 on a single & small PCB).

Now, I have two versions (with correct checksums), one for RomDOS and other for Vortex defaults.

Thanks again  :)
Title: Re: Best Hex Editor for ROMs?
Post by: GUNHED on 19:47, 10 February 20
Quote from: merlinkv on 12:07, 02 March 16
Specially I have doubts to calculate the checksum at #3FFF.
You can use the ROManager to implement checksums at the last byte of a ROM.

But why using apps for the PC? There are much good tools for the CPC.  :)


Quote from: merlinkv on 15:46, 10 February 20
Now, I have two versions (with correct checksums), one for RomDOS and other for Vortex defaults.


You can look for VaraDOS (that's the ParaDOS with Vortex formats enables). Aside of X-DDOS it's my favorite.  :)
Powered by SMFPacks Menu Editor Mod