[Diy_efi] checksums

Andrew Hopton ahopton at optusnet.com.au
Wed Dec 29 08:54:53 GMT 2004


RE: "I just wondered if checksums can be eliminated ... "

I have a HAC from an Aussie 4cyl 1227808 (very similar to a '165) =
running
AMXY $5D code.

It is quite clear from the hac that if you change the prog id byte to =
$AA,
the checksum
error bit (flag) is always cleared.  Note that the checksum routine is =
still
called - the=20
$AA prog id just bypasses the code which sets the error bit if the check
fails. =20
here is the snippet of code from the hac:

		;
		; Check the EPROM's checksum
		;
		ldX		#$C008	;start of checksum area
		ldD		#$3FF8	;length
		call	SumCheck		;does checksum match?
		ldX		#L0100
		cmpY	KKSUM			;match checksum at $c006?
		bne		@2		;BR if NO match
		ldaA	KKPGMID		;match - compare with REAL program
ID
		cmpA	#kProgramID		;program ID is $5D in AMXY
		beq		@3		;both checksum and ID match
@2
		ldaA	KKPGMID		;Mismatch - should we ignore
checksum
		cmpA	#$AA			;Program ID zapped with a
$AA?
		beq		@3		;yes, ignore checksum error
		bset	0, X, #bit4		;no, set Checksum error bit
4 of L0100
		jr		@4		;continue
@3
		bclr	0, X, #bit4		;clear any checksum error
bit

Cheers.

PS This is untried (by me, anyway)

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.806 / Virus Database: 548 - Release Date: 5/12/2004
=20

_______________________________________________
diy_efi mailing list
diy_efi at diy-efi.org
http://lists.diy-efi.org/mailman/listinfo/diy_efi



More information about the Diy_efi mailing list