Hallo Besucher, der Thread wurde 5k mal aufgerufen und enthält 10 Antworten

letzter Beitrag von umueller-wsw am

Patch for C65 ROM

  • As discussed in this post, I made a very little patch '911001_ab.bin' for the latest available C65 ROM (911001.bin).


    Only three little things are changed:


    - the demo programs which are in the ROM area from $4000 to $7000 are removed (filled with $00) because sometimes they make problems after start


    - the values for 'top of bank 0' and 'top of bank 1' are changed to $FFFF (bank 0) and $F800 (bank 1), so by default there is more free BASIC memory for program (bank 0) and variables (bank 1).


    - the display of the version number is shifted one digit left and '.AB' is added at the end so you can see which ROM version is actually installed.


    The ROM CHECKSUM of the patched ROM '911001_ab.bin" is $2680.





    How to patch:


    1.) Buy a used C65 at ebay for the original ROM, save the ROM in a binary file on disc, name the file '911001.bin' and transfer it to your PC. :bgdev


    2.) Download the attached 'patch_ab.bin' and save it into the same folder as your ROM file '911001.bin' is in.


    3.a) If you use Windows: Download BSPatch e.g. from this site and unzip the file in the ROM folder.


    3.b) If you use Linux: Install 'bsdiff' if not yet done with:


    sudo apt install bsdiff


    4.) Open the command line (Windows) or terminal (Linux) in the folder there your ROM and patch files are.


    5.) Patch the file with this command:


    bspatch 911001.bin 911001_ab.bin patch_ab.bin


    6.) The created file '911001_ab.bin' is the patched rom and you can rename and use it for your needs. E.g. for Xemu 'c65-system.rom' or 'MEGA65.ROM' for Mega65 or the Nexys board.


  • How to patch:


    1.) Buy a used C65 at ebay for the original ROM, save the ROM in a binary file on disc, name the file '911001.bin' and transfer it to your PC. :bgdev

    How do you guarantee that the buyed used C65 from eBay has a 911001 ROM??

    You are right. I think it would be better to buy at least four C65 to be sure one of them has the right ROM insight. :D

  • Excellent solution Snoopy ! and thanks for the description how to patch !

    I'll try it immediately !

  • It works like a charm !


    Great job Snoopy ! Thanks !!!


    :thumbsup::dafuer:

  • Hi Snoopy,


    Deft asked me, if this patched Kernel really has more available Basic memory now ?

    57340 BASIC BYTES FREE would be amazing !


    And since Variables are stored in Bank 1 this means, they wouldn't interfere with the BASIC program...

  • For variables the free 55296 bytes can be used.


    I attached a zipped D81 image with a little test program 'TESTFRE'.


    You can enter a number between 0 and about 11.000. The program reserve the variable memory for DIM A(). A DIM command reserves 5 bytes for every real number (see e.g. here).


    For example: Input I=11000. This reserves memory for 11.001 (from 0 to 11.000) numbers: 11.001 x 5 bytes = 55005 bytes. 55296 bytes - 55005 bytes = 291 bytes. 14 bytes are used for other variables (like I) and then 277 bytes are free for variables.



    After reserving the memory with DIM A(I) all A(I) are set with I in a loop and after that all A(I) are printed to the screen. That takes a while with I=11000. But all A(I) are shown correct, so I think that the memory for the variables is really over 55000 bytes and working.