Post Reply 
HP-41 ROM Checksum
08-18-2024, 01:42 PM (This post was last modified: 08-18-2024 01:43 PM by Allen.)
Post: #2
RE: HP-41 ROM Checksum
An interesting test! Just to double check, I also implemented in python and got the same results as you did for all ROMS in common.. Unless i missed one by accident.

Code:

import struct
def GetChecksum(ROMFILE):
    fin = open(ROMFILE,'rb').read()
    if len(fin)>0:
        struct_string = '>'+'H'*(len(fin)//2)
        ints = struct.unpack(struct_string,fin)
        csum = sum(ints[:-1]) % 1023
        print(f'{os.path.split(ROMFILE)[-1]}\t{hex((-csum & 1023))}\t{hex(ints[-1])}')

Code:

AdvL1-1B.rom    0x318    0x318
AdvU1-1B.rom    0x2b8    0x2b8
AdvU2-1B.rom    0x4d    0x4d
aecromL.rom    0x3f7    0x3f7
aecromU.rom    0x2bf    0x2bf
Astro-1.rom    0x23c    0x23c
Aviation.rom    0x34f    0x34f
CCD-OSX.ROM    0x397    0x397
CCDL-1B.rom    0x47    0x47
CCDU-2B.rom    0x37f    0x37f
Circt-1A.rom    0x1c    0x1c
Clinc-1A.rom    0x249    0x249
CLRAM1.ROM    0x2af    0x0
CLRAM2.ROM    0x1ef    0x0
DAcqL-1B.rom    0x1bf    0x1bf
DAcqU-1B.rom    0x179    0x179
DatAcL1B.rom    0x1bf    0x1bf
DatAcU1B.rom    0x179    0x179
David-2C.rom    0x362    0x362
ES41L.ROM    0x3bd    0x3bd
ES41U.ROM    0x31b    0x31b
ESMLOS7B.ROM    0x1e    0x1e
EXT-IL.ROM    0x16e    0x16e
EXTFN-1A.ROM    0x119    0x119
ExtIO-1A.rom    0xb6    0xb6
Financ1B.rom    0x32f    0x32f
forth4.rom    0x44    0x44
Forth5.rom    0x130    0x130
Games-1A.rom    0x19e    0x19e
HEPX1D_1.ROM    0x100    0x100
HEPX1D_2.ROM    0x100    0x100
HEPX1D_3.ROM    0x100    0x100
HEPX1D_4.ROM    0x100    0x100
Home-1A.rom    0x3db    0x3db
HPILDv1A.rom    0x327    0x327
HPILDv1B.rom    0x287    0x287
IL-DIAG.ROM    0x55    0x55
Labels.rom    0x361    0x361
LandNav.rom    0x115    0x115
Machn-1A.rom    0x34e    0x34e
Math-1A.rom    0x3a    0x3a
Math-1B.rom    0x4e    0x4e
Math-1C.rom    0xfb    0xfb
Mlrom.rom    0x260    0x260
NavL-1B.rom    0x36b    0x36b
NavU-1B.rom    0x115    0x115
PetrlL1A.rom    0x3e4    0x3e4
PetrlU2A.rom    0x2a2    0x2a2
PlottL1A.rom    0x2a1    0x2a1
PlottU2A.rom    0x260    0x260
PPCL.rom    0x1a7    0x1a7
Ppcrom2.rom    0x113    0x389
PPCU.rom    0x2cd    0x2cd
RAMBOX32.rom    0x389    0x389
Rambx2L.rom    0x22a    0x22a
Rambx2U.rom    0x0    0x0
RealEstL.rom    0x355    0x355
RealEstU.rom    0x1fc    0x1fc
ROMIMG1.ROM    0x3db    0x3db
RSU3_OSL.ROM    0x69    0x69
RSU3_OSU.ROM    0x12    0x12
SANDB-3D.ROM    0x73    0x73
SANDBXL.ROM    0x22e    0x22e
SANDBXU.ROM    0xd9    0xd9
Secur-1A.rom    0x5d    0x5d
ServiceC.rom    0x6b    0x6b
ServiceP.ROM    0x2cc    0x2cc
ServiceX.rom    0x1c7    0x1c7
SGS-GAS.ROM    0x1a7    0x1a7
skwidbc.rom    0x206    0x206
Stat-1B.rom    0x2f1    0x2f1
STNDRD1A.ROM    0x267    0x267
Stress-1A.rom    0x1c2    0x1c2
Stress1A.rom    0x1c2    0x1c2
StructL.rom    0x355    0x355
StructU.rom    0x3a4    0x3a4
Survey1B.rom    0x272    0x272
Therml1A.rom    0x13c    0x13c
Zenrom3b.rom    0x81    0x81
ZEPROM.ROM    0x29f    0x29f

17bii | 32s | 32sii | 41c | 41cv | 41cx | 42s | 48g | 48g+ | 48gx | 50g | 30b

Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP-41 ROM Checksum - Sylvain Cote - 08-18-2024, 02:14 AM
RE: HP-41 ROM Checksum - Allen - 08-18-2024 01:42 PM
RE: HP-41 ROM Checksum - J-F Garnier - 08-18-2024, 04:46 PM
RE: HP-41 ROM Checksum - Sylvain Cote - 08-18-2024, 09:26 PM
RE: HP-41 ROM Checksum - J-F Garnier - 08-19-2024, 02:13 PM
RE: HP-41 ROM Checksum - Sylvain Cote - 08-19-2024, 03:54 PM
RE: HP-41 ROM Checksum - Sylvain Cote - 08-19-2024, 03:04 AM
RE: HP-41 ROM Checksum - HP67 - 08-19-2024, 08:46 AM
RE: HP-41 ROM Checksum - Sylvain Cote - 08-19-2024, 11:19 AM
RE: HP-41 ROM Checksum - HP67 - 08-19-2024, 03:13 PM
RE: HP-41 ROM Checksum - Sylvain Cote - 08-19-2024, 10:59 PM



User(s) browsing this thread: 1 Guest(s)