Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compare files on a C64 and 128?

90 views
Skip to first unread message

Harry Potter

unread,
Dec 19, 2012, 11:26:42 AM12/19/12
to
Hi! As I said before, I am working on file compression for some Commodore computers and need a method to compare files other than programs. The BASIC VERIFY command could help, but I'm looking for something more visual. I want actually see which bytes are off. Can anybody help me?

rusure

unread,
Dec 19, 2012, 11:43:30 PM12/19/12
to
On Wednesday, December 19, 2012 9:26:42 AM UTC-7, Harry Potter wrote:
> I need a method to compare files other than
> programs. I want actually see which bytes are off.

This method could work for the C128 for files residing on disk.
First, for program files, enter the command BLOAD"file name". For sequential files with S!H!O!R!T file names follow the file name with a ",s".
Enter the command MONITOR.
The file is in BANK 0 starting at the beginning of load, given by $AC and $AD. You may want to append the PETSCI values in the beginning of load to the beginning of the file. The first byte is given by $AD & the second is given by $AC. The end of load is given by $AE and $AF. You may want the MONITOR to move the file to more apprpriate memory locations.

For the second file, enter the command BLOAD"file name",b1, for program files. Again, you will need to append ",s" to a sequential file name. The file will be in BANK 1 at locations between the beginning of load and the end of load.

To display the bytes where the files are in disagreement, use the MONITOR compare operation for the BANKS & memory locations occupied by the two files.

Should either file load into critical system locations, you may want to acquire "DAVES'S TERM" published in issues 26 to 31 of the LOADSTAR C 128 quarterly. DT allows access to the C128 MONITOR. You will have to learn some pecularities about DT like where DT loads files, Where the DT end of load is stored, and where DT resides in memory. I have forgotten this DT stuff. IIRC, I had to fuss with DT for a couple of weeks to discover these details. On a positive note, you won't need to play the beginning file games given by my previous section of this response.

Sometime in July 2002, comp.sys.cbm had a thread concerning an LS 128 auction on EBAY. The auctioner could be contacted at

Fender Tucker
443 Gladstone Blvd
Shreveport LA 71104
fen...@loadstar.com<fen...@loadstar.com>

Harry Potter

unread,
Dec 20, 2012, 9:46:59 AM12/20/12
to
On Wednesday, December 19, 2012 11:43:30 PM UTC-5, rusure wrote:
> On Wednesday, December 19, 2012 9:26:42 AM UTC-7, Harry Potter wrote: > I need a method to compare files other than > programs. I want actually see which bytes are off. This method could work for the C128 for files residing on disk. First, for program files, enter the command BLOAD"file name". For sequential files with S!H!O!R!T file names follow the file name with a ",s". Enter the command MONITOR. The file is in BANK 0 starting at the beginning of load, given by $AC and $AD. You may want to append the PETSCI values in the beginning of load to the beginning of the file. The first byte is given by $AD & the second is given by $AC. The end of load is given by $AE and $AF. You may want the MONITOR to move the file to more apprpriate memory locations. For the second file, enter the command BLOAD"file name",b1, for program files. Again, you will need to append ",s" to a sequential file name. The file will be in BANK 1 at locations between the beginning of load and the end of load. To display the bytes where the files are in disagreement, use the MONITOR compare operation for the BANKS & memory locations occupied by the two files. Should either file load into critical system locations, you may want to acquire "DAVES'S TERM" published in issues 26 to 31 of the LOADSTAR C 128 quarterly. DT allows access to the C128 MONITOR. You will have to learn some pecularities about DT like where DT loads files, Where the DT end of load is stored, and where DT resides in memory. I have forgotten this DT stuff. IIRC, I had to fuss with DT for a couple of weeks to discover these details. On a positive note, you won't need to play the beginning file games given by my previous section of this response. Sometime in July 2002, comp.sys.cbm had a thread concerning an LS 128 auction on EBAY. The auctioner could be contacted at Fender Tucker 443 Gladstone Blvd Shreveport LA 71104

Thank you. That's just what I need. :)

rusure

unread,
Dec 20, 2012, 5:07:48 PM12/20/12
to
On Thursday, December 20, 2012 7:46:59 AM UTC-7, Harry Potter wrote:

> On Wednesday, December 19, 2012 11:43:30 PM UTC-5, rusure wrote:
> > Should either file load into critical system locations, you may
> > want to acquire "DAVES'S TERM" published in issues 26 to 31 of the
> > LOADSTAR C 128 quarterly. DT allows access to the C128 MONITOR.


> Thank you. That's just what I need. :)

The LOADSTAR COMPLEAT CD can be purchased here:

http://www.ramblehouse.com/loadstarcompleat.htm

You will need a PAYPAL account to buy the disk. The current
cost, including S&H is $27 for US locations and $30 for other
locations. I just visited the WEB site less than an hour ago.

Groepaz

unread,
Dec 21, 2012, 12:26:06 PM12/21/12
to
i would seriously recommend to compare the files using one of he various
diff tools on PC. unless you are a masochist ofcourse =P

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

Man who stands on toilet is high on pot.


Harry Potter

unread,
Dec 21, 2012, 12:32:29 PM12/21/12
to gro...@gmx.net
On Friday, December 21, 2012 12:26:06 PM UTC-5, Groepaz wrote:
> Harry Potter wrote: > Hi! As I said before, I am working on file compression for some Commodore > computers and need a method to compare files other than programs. The > BASIC VERIFY command could help, but I'm looking for something more > visual. I want actually see which bytes are off. Can anybody help me? i would seriously recommend to compare the files using one of he various diff tools on PC. unless you are a masochist ofcourse =P -- http://www.hitmen-console.org http://magicdisk.untergrund.net http://www.pokefinder.org http://ftp.pokefinder.org Man who stands on toilet is high on pot.

I have that. I just wanted to do the task without taking the files off the .d64.

Christian Brandt

unread,
Dec 26, 2012, 9:46:59 PM12/26/12
to Harry Potter, gro...@gmx.net
On 21.12.2012 18:32, Harry Potter wrote:

> I have that. I just wanted to do the task without taking the files >
off the .d64.

Someone should urgently port busybox to 6502 systems :-) seriously,
having a unixish shell with diff/cmp/find&Co would be awesome.

I remember that one of the first portable computers from HP did
something similiar, they used an ancient subset of HP-UX running
completely from ROM - read that again, the binaries where not "loaded"
but where already runable memory mapped. The system had a Z80, 128k
memory and a 80x12 Display in 1982.

--
Christian Brandt

life is short and in most cases it ends with death
but my tombstone will carry the hiscore

Harry Potter

unread,
Dec 27, 2012, 9:41:31 AM12/27/12
to gro...@gmx.net
On Friday, December 21, 2012 12:32:29 PM UTC-5, Harry Potter wrote:
> On Friday, December 21, 2012 12:26:06 PM UTC-5, Groepaz wrote: > Harry Potter wrote: > Hi! As I said before, I am working on file compression for some Commodore > computers and need a method to compare files other than programs. The > BASIC VERIFY command could help, but I'm looking for something more > visual. I want actually see which bytes are off. Can anybody help me? i would seriously recommend to compare the files using one of he various diff tools on PC. unless you are a masochist ofcourse =P -- http://www.hitmen-console.org http://magicdisk.untergrund.net http://www.pokefinder.org http://ftp.pokefinder.org Man who stands on toilet is high on pot. I have that. I just wanted to do the task without taking the files off the .d64.

I just realized: I am using WinVice to do my work, and can use the monitor. Which command and format can compare memory locations? What about loading from disk into memory?

rusure

unread,
Dec 27, 2012, 12:44:17 PM12/27/12
to gro...@gmx.net
On Thursday, December 27, 2012 7:41:31 AM UTC-7, Harry Potter wrote:
> On Friday, December 21, 2012 12:32:29 PM UTC-5, Harry Potter wrote:
>
> I just realized: I am using WinVice to do my work, and can use the monitor. Which command and format can compare memory locations? What about loading from disk into memory?



A complete description of the C128 machine language monitor is in APPENDIX J of the C128 SYSTEM GUIDE. If you don't have a hard copy, download it from:

http://project64.c64.org/hw/c128%20System%20Guide.txt

The command descriptions are in section J.3

Most monitors for the C64 have similar instruction sets except that they won't refer to memory BANKS like in a C128. You will have to modify my post for file comparison on a C128 for file comparison on a C64 emulator. I never use a C64 or a C64 emulator if I can help it. IIRC, to load a file into C64 memory enter LOAD"file name",U,1. Where the disk with the file written on it is inserted in drive U. U is usually 8. Append a ",s" to the file name for sequential files. I don't know where the beginning and end of loads are located in the C64. Instead of loading files into BANK 0 and BANK 1, you may need to offset the memory location(s) of either or both files in the C64's memory.



Payton Byrd

unread,
Dec 28, 2012, 9:36:28 AM12/28/12
to Harry Potter, gro...@gmx.net
You should look at EasyCLI (http://easycli.codeplex.com). It's a command line interface for the C64 that has a very accessible programming model. If you create the commandlets (programs that run in EasyCLI) for these functions I'll include them in the official package.

Harry Potter

unread,
Dec 31, 2012, 10:36:46 AM12/31/12
to gro...@gmx.net
I have the System Guide. However, I want to do compression on multiple computers, i.e. the C64, Plus4 and Apple2[e] among others, not just the C128. Unfortunately, the 16-bit PC version isn't reaching my first desired compression ratio. :(
0 new messages