Skip to content

Hyperspeed: Should not require extra zero page addresses #975

Open

Description

@markusC64

I currently cannot find the discussion, but years ago I discussed it with Gideon: Hyperpeed kernal should not rely on zero oage addresses not being used by the C64 programm. We came to the conclusion that using addresses e. g. $DF17-$DF1A which could be enabled by the UCI would be much better. Just 4 Bytes of extra RAM in the REU/UCI Region. Hyperspeed can only be used when UCI is turned on so that is no limitation at all. And typically a C64 program does not assume having RAM there in the I/O region (not the RAM beyond the I/O), so it will not use it.

On the other hand, a C64 kernal can use that RAM, but it is not force to do so, so no incompability to current implementation.

C64 OS hangs when using hyperspeed, and I cannot tell if it is because a zero page conflict or because of a bug. It would be so great if a zero page conflict would be impossible.

In short: Add 4Byte of RAM (RW registers) in the UCI area $DF17-$Df1A and we are done, assembling the hyperspeed keral with that addresses is an easy task... It would significantly improve compatibility.

Activity

  1. radius75 commented on Oct 8, 2026

    @radius75
    Contributor

    @markusC64
    I also tried running C64 OS 1.09 from SoftIEC using HyperSpeed KERNAL (including the fix from #931).

    First, I performed a fresh installation of C64 OS directly on SoftIEC using JiffyDOS, with the Ultimate IEC driver (U64IEC.R) enabled. C64 OS boots and works correctly with JiffyDOS.

    However, when switching to HyperSpeed with UCI enabled, C64 OS consistently hangs while loading App Launcher. I also tested SoftIEC in UCI Only mode, with the same result.

    I then tried a different approach:

    1. Booted C64 OS successfully using JiffyDOS and SoftIEC.
    2. Saved the REU contents to a backup file
    3. Switched to HyperSpeed KERNAL with UCI enabled.
    4. Restored the REU backup before starting C64 OS.
    5. This time, C64 OS successfully reached Desktop 1 (App Launcher).

    Unfortunately, attempting to switch to Desktop 2 caused C64 OS to hang again.

    It seems that restoring the REU contents allows C64 OS to get past the point where it normally hangs during startup, but the problem is still present when switching desktops.

  2. markusC64 commented on Oct 8, 2026

    @markusC64
    Author

    Well, let's not debug C64 OS here, other software may have the same problem using zero page, so the feature request is more universal. But of cause C64 OS is one motivation to do so.

    PS: I am not absolutely sure, but I think your approach caches the loaded files in the REU so after that hyperspeed is bypassed...

  3. added
    soft iec
    ui
    uci
    and removed
    ui
    on Oct 8, 2026
  4. chrisgleissner commented on Oct 8, 2026

    @chrisgleissner
    Collaborator

    When we discuss problems, it always helps to state exactly which version we tested it, using the Git ID. This will make it much easier to track things down. Many thanks.

  5. added
    enhancement
    on Oct 8, 2026
  6. radius75 commented on Oct 8, 2026

    @radius75
    Contributor

    The case I described was tested on the current master branch d568642.

    I'm attaching two debug logs: one showing Desktop 2 loading successfully with SoftIEC/JiffyDOS/UCI-disabled +, and another showing C64 OS hanging when attempting to load Desktop 2 from exactly the same point, using SoftIEC/HyperSpeed/UCI-enabled.

    uci hskernel hang.log
    iec jiffy ok.log

  7. markusC64 commented on Oct 9, 2026

    @markusC64
    Author

    Well, honestly I coud write: Really every build of the last ten years. But we could mention the latest I have tested: update_package_v3.15-339-gd5686424f.zip.

    There is no version that had RAM there... The topic is to add 4 Bytes of RAM. For a kernal that benefits from using it.

  8. markusC64 commented on Oct 9, 2026

    @markusC64
    Author

    Just to clarify the scope of this issue: I'm not trying to investigate why C64 OS does not work with Hyperspeed enabled. That is a separate debugging task.

    The purpose of this issue is to eliminate a potential source of incompatibility by moving the four bytes currently used in the C64's zero page to more suitable RAM locations in the UCI area.

    This is a design improvement in its own right, independent of whether a particular software incompatibility can be traced back to these addresses. The C64 OS observation is merely an example of why avoiding unnecessary conflicts with software memory usage is desirable.

    I'd prefer to keep this issue focused on the memory allocation change itself.

  9. chrisgleissner commented on Oct 9, 2026

    @chrisgleissner
    Collaborator

    Hi @bvl1999 , you are mentioned as domain expert on the Hyperspeed kernal in our new CONTRIBUTING.md based in your past contributions.

    Before we go ahead with any change, what are your thoughts?

  10. changed the title [-]Hyperspeed: Should not require extra zero page addressses[/-] [+]Hyperspeed: Should not require extra zero page addresses[/+] on Oct 12, 2026
  11. added
    kernal
    on Oct 12, 2026
  12. grue74 commented on Oct 13, 2026

    @grue74

    Is it documented somewhere what those extra zeropage locations are? I've been doing c64 game modifications and it would be nice to support hyperspeed kernal also.

  13. markusC64 commented on Oct 13, 2026

    @markusC64
    Author

    Remember, we're discussing changing that. And a combined JiffyDOS-Hyperspeed-kernal cannot use the same addresses, since they are conflicting.

    That's the setting the current hyperspeed kernal from the sources here uses:

        MY_OUTLEN       = $9b
        UCI_PENDING_CMD = $9c
        UCI_LAST_CMD    = $be
        UCI_LAST_SA     = $96
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementkernalsoft iecuci

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions