Menu

#1873 Custom Kernal ROM image not loaded if the file checksum matches known Kernal image

v3.x
closed-fixed
gpz
None
2023-04-28
2023-04-23
Durandal
No

The attached modified Kernal rev3 file wont be loaded by X64sc and will instead load the normal rev3 Kernal.
The 'set kernal version' function will reload the kernal with the matching checksum so it can install the device traps.

This modified Kernal happens to have the same checksum than the original.
Reverting the 'version' byte at $E4AC back to the original value fixes the issue.

command line was: ./src/x64sc -default -verbose -kernal kernal.rom
Loading system file `/home/groepaz/Desktop/vice/vice-emu/trunk/vice/kernal.rom'.
c64rom_get_kernal_chksum_id chksum: 50954 id: 3
c64rom_get_kernal_chksum_id: rev:3
loaded known kernal revision:3 chksum: 50954
set_kernal_revision(val:3) was kernal_revision: 3
set_kernal_revision found rev:3 name: kernal-901227-03.bin
set_kernal_rom_name val:kernal-901227-03.bin.
Loading system file `/usr/games/share/vice/C64/kernal-901227-03.bin'.
c64rom_get_kernal_chksum_id chksum: 50954 id: 3
c64rom_get_kernal_chksum_id: rev:3
loaded known kernal revision:3 chksum: 50954
set_kernal_revision(val:3) was kernal_revision: 3
set_kernal_revision found rev:3 name: kernal-901227-03.bin
set_kernal_rom_name val:kernal-901227-03.bin.
set_kernal_revision new kernal_revision: 3
set_kernal_revision new kernal_revision: 3
1 Attachments

Discussion

  • Durandal

    Durandal - 2023-04-23
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,25 @@
     The attached modified Kernal rev3 file wont be loaded by X64sc and will instead load the normal rev3 Kernal.
    -The modified Kernal happens to have the same checksum than the original.
    +The 'set kernal version' function will reload the kernal with the matching checksum so it can install the device traps.
    +
    +This modified Kernal happens to have the same checksum than the original.
     Reverting the 'version' byte at $E4AC back to the original value fixes the issue.
    +
    +~~~
    +command line was: ./src/x64sc -default -verbose -kernal kernal.rom
    +Loading system file `/home/groepaz/Desktop/vice/vice-emu/trunk/vice/kernal.rom'.
    +c64rom_get_kernal_chksum_id chksum: 50954 id: 3
    +c64rom_get_kernal_chksum_id: rev:3
    +loaded known kernal revision:3 chksum: 50954
    +set_kernal_revision(val:3) was kernal_revision: 3
    +set_kernal_revision found rev:3 name: kernal-901227-03.bin
    +set_kernal_rom_name val:kernal-901227-03.bin.
    +Loading system file `/usr/games/share/vice/C64/kernal-901227-03.bin'.
    +c64rom_get_kernal_chksum_id chksum: 50954 id: 3
    +c64rom_get_kernal_chksum_id: rev:3
    +loaded known kernal revision:3 chksum: 50954
    +set_kernal_revision(val:3) was kernal_revision: 3
    +set_kernal_revision found rev:3 name: kernal-901227-03.bin
    +set_kernal_rom_name val:kernal-901227-03.bin.
    +set_kernal_revision new kernal_revision: 3
    +set_kernal_revision new kernal_revision: 3
    +~~~
    
     
  • Querino

    Querino - 2023-04-28

    this seems to work now.

    but... sha1 might be a bit of an overkill just for this. :)

     
  • gpz

    gpz - 2023-04-28

    Sure overkill - then again, its not much code (same as eg crc32 would be) and we can be pretty sure it will work for this, and pretty much everything else we might come up with that needs checksums :)

     
  • gpz

    gpz - 2023-04-28
    • status: open --> closed-fixed
    • assigned_to: gpz
     

Log in to post a comment.