HP related projects

Olivier De Smet

Topics  

Ti related projects

Sharp related projects

Other computers projects

Rom endianness :

If your rom cause trouble in an emulation, use this python 3.x script to change endianness :

------------------------------

f=open("hp28s-bad.rom", "rb") # name of bad rom

g=open("hp28s-good.rom", "wb") # name of changed rom

ba=bytearray(1)

for i in range(128*1024): # size of rom in byte

   a=ord(f.read(1))

   ba[0] = (a & 0xF) << 4

   ba[0] |= (a >> 4)

   g.write(ba)

f.close()

g.close()

------------------------------

Change the names of files and the size as needed (here parameters for an HP28S rom of 128 KB).

(c) 2006 - 2022 by OdS