TIP: Click on subject to list as thread! ANSI
echo: cbm
to: HARRY POTTER
from: PEKKA TAKALA
date: 2015-11-11 00:48:00
subject: Re: Compare two files in

On 10.11.2015 16:18, Harry Potter wrote:

>>
> Well, I *could* simply extract a test file from a disk image and
> compare it to another file already in the PC file system.  There are
> two problems, though: 1. This will require a little extra work, even
> when using batch files, and; 2. it won't help with testing a SFX
> file: I can't compare memory to a file on disk.  I know about the
> VERIFY command, but it will not be available after decrunching
> (spelling check!) the program in memory and before running the
> program.

I suggest that you do like this:

-first load a program you are crunching testing.
-Modify the program so that it actually does not run the program - just
change it to make poke1,55 and then execute setnam, setlfs and load
routine with verify flag (c-flag) set. After all, you do _not_ need to
execute the actual program, just verifying it is enough.
-Save the name in the program as original.prg and then save the
_uncrunched_ program with EXACTLY that name.
-Crunch the program
-Execute the sfx

If everything goes right, the system, when starting, actually does
verify to check. If something is wrong, it wont start the verify or the
verify fails. After all, when your sfx routine starts the program, the
sfx routine has /no idea/ about that the code does not run a game,
instead a short verify routine.

On basic, you accomplish this easily by just setting verify"name",
on first line and then end. If verify says, that the code is same, then
it is.

This requires assembly language knowledge, but the routine is VERY
short. It takes about 50 bytes including the name. If your sfx routine
disables roms, you can enable them in your code and test. After all, you
can use 38 or 50 kilobytes test routines.

I would do things like that. It is _not_ needed to execute the test
data, your sfx should not know shit about your verify routine. just put
a simple compare routine there and let it do the thing. If you need more
exact, then you can write a open - getchr-compare routine and just load
the file byte by byte and you get the exact place of error.

If you cannot write a verify routine in a program file that your sfx can
execute directly after decrunching, then I cannot help. I would use a
machine language monitor program for that̀£ purpose, after all the code is
not long.

You can even write a patcher that patches the test program so that it is
just a verify tester. Then save original, and then let it crunch.


>
> I am mainly trying to compare two files on a floppy disk image or one
> on a floppy image to a program in memory for the purpose of debugging
> file compression.
>


--- news://freenews.netfront.net/ - complaints: news@netfront.net ---

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.