News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_darkhalf

File hex search / replace

Started by darkhalf, 08:27, 02 March 25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

darkhalf

Today was looking at modifying Atic Atac. I found in the source code LA A, 03 (0x3E 0x03) for setting initial lives

After pulling the DSK apart with CPCDiscXP found this hex string easily with Hex Workshop on PC in GAMECODE.BIN 

Question - On the CPC - Are there any tools for open file, search (hex), edit and save file? 

Most utilities seem to involve direct disc sector editing, or the searches are ASCII only (need hex)

Using disc demon print the AMSDOS header info. File starts at 0x0100 with 0x36AA length.

So I've used disc demon to load in at various memory locations (0x4000 or 0x8000) but the applications (disc demon, disc power) themselves tend to use those areas of memory and overwrite the loaded file.

So I do
memory &3fff
load"GAMECODE",&4000

Then search and edit in Superpower (diiscpower)
https://cpcrulez.fr/applications_disk_superpower-disk_users_utilities__DOC_ENGLISH.htm

After edit, I <esc> to leave the program and it returns to basic and resets that area, so it cannot save. 

Is there a better way to do this?
CPC464/GT64, CPC464 Plus/CTM640, 2 x CPC6128/CTM644

darkhalf

Managed to fix the problem. The ROM dump on cpcrulez is bad. Found another one CPC-Power which works
https://www.cpc-power.com/index.php?page=detail&onglet=dumps&num=6352

There is a utility menu section in the ROM for loading/saving files but that was freezing.

Take note of the file size reported by the tool when loading, and make sure to put end address = start address+length and it all works fine. Everything can be done in this tool. I'm using PicoROM to hold the ROMs which is a really nice bit of kit

CPC464/GT64, CPC464 Plus/CTM640, 2 x CPC6128/CTM644

Powered by SMFPacks Menu Editor Mod