Hallo Besucher, der Thread wurde 3,1k mal aufgerufen und enthält 13 Antworten

letzter Beitrag von Snoopy am

C65 patched Kernel to change Drive ID of internal drive from 8 to 10

  • Hi all,


    even if i ask the whole community, i would like to adress this question to Snoopy primarily.

    Did you find, while you were digging through the C65 Kernel, a place where the Drive ID is specified ?

    Normally the C65 automatically mounts the internal drive to ID 8. (which makes sense, since this is the prime drive)

    Do you know of any way, to change this ID to 10 by any chance ?

    We would probably dig in ourselves, but since you are quite experienced with the Kernel already and we really don't have much spare time,

    we would like to ask you, if you could think of a way doing this.


    We need this, so that drive ID8 is free for external drives. (while this kernel would be used).

    We can do this change already in the MEGA65 Freeze menu, but at the moment we have to change this after every power cycle, which is

    for our current testing let's say...sub-optimal. (We are testing the external drives 1541/1581 at the moment on our new Revision 3 board).


    If you have some spare minutes and your interested, let us please know, if you find anything.


    Thanks !!!

  • Do you know of any way, to change this ID to 10 by any chance ?

    You have to modify the 911001 (or patches of it) ROM at address $03E15 from $08 (default unit 8 ) to $0A (default unit 10).


    You can use a hex editor for doing this or use the attached little patch for the 911001.bin (or patches of it) ROM file.


    For instance if you use bspatch 911001.bin 911001_u10.bin patch_u10.bin the patched ROM has the name 911001_u10.bin. Rename it, if you want another name.


    I tested it with the xmega65 emulator:


    DIR now shows a "device not present" error, because it assumes to use unit 8.


    DIR "*",U10 shows the directory of unit 10 (now the default drive).



    One thing, that maybe can causes problems with two external drives and using the internal one is, that in the ROM the number of drives ("Number of drives supported by the system") is set to two.


    I can't test it, but you will see if it works with three disc drives. ;)

  • I can only repeat: The internal controler can drive 2 Drives. just like old "Dual-Drive" Units.

    It confuse people because one "Floppydrive" (1541/71/81) are in CBM-Notation "Units".

    That's also why you must use ",u9/u10" to acces other 'Drives'. It's U because they are units.

  • Snoopy you're a star !!!


    It works perfect, so now i can access directly the external, via IEC bus connected 1541-II as drive 8

    Thanks !!!

  • We did discover something funny with this overnight, though, where it seems that the initial transaction to 8 or 9 might still be intercepted by the ROM. We would get DEVICE NOT FOUND error once, and then it would be fine. But if we used a stock C64 ROM, then it would be fine from the first time. Will have to investigate this further.


    Paul.

  • We did discover something funny with this overnight, though, where it seems that the initial transaction to 8 or 9 might still be intercepted by the ROM. We would get DEVICE NOT FOUND error once, and then it would be fine. But if we used a stock C64 ROM, then it would be fine from the first time. Will have to investigate this further.

    Hi Paul, I just read your blog posts and because it's a lot of text, I ask whether I understand the problem right: :)


    If you use the patched C65 ROM (which change the default unit from 8 to 10) with an external disc drive as unit 8 at the Mega65 board (R2 or R3), you get a "device not present error" at the first access to this disc drive? After that it always works correctly?


    If you use a C64 ROM it works even at the first access?


    Is this your described problem or do I have understand something wrong? :)

  • I found the address ($17418) in the "DOS parser routine" of the BASIC 10 part of the C65 ROM which should also be modified from $08 to $0A (default unit 10 instead 8).


    Please give this new patch "patch_u10b" a try! :)


    bspatch 911001.bin 911001_u10b.bin patch_u10b.bin


    Rename the patched "911001_u10b.bin" ROM for your use!

  • Hi Snoopy,


    thanks alot ! i have already patched it and will test it later today (very late, i have wedding anniversary today (wife demands me to stay away from MEGA65 ;-) ))


    So i'll report back later. But great job !!!

  • All good things come in threes! :)


    There is another location in the system part ($1F10F) (init-io routine) of the C65 ROM, which maybe needs a modification from $08 to $0A.


    In BASIC 10 you can set and display the default drive unit with PRINT PEEK(DEC("1106")) or PRINT PEEK(4358). With the original 911001-ROM you get 8 as the default value.


    Now with this patch BASIC commands uses unit 10 as default. Maybe this works better with the external drives now?


    Please give this new patch "patch_u10c" (it includes all three modifications for default unit 10) also a try! ;)


    bspatch 911001.bin 911001_u10c.bin patch_u10c.bin


    Rename the patched "911001_u10c.bin" ROM for your use!