CPCWiki forum

General Category => Technical Support - Software related => Topic started by: darkhalf on 08:27, 02 March 25

Title: File hex search / replace
Post by: darkhalf on 08:27, 02 March 25
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 (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?
Title: Re: File hex search / replace
Post by: darkhalf on 09:02, 02 March 25
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 (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

Powered by SMFPacks Menu Editor Mod