What does your sleep paralysis demon ask you?

  • brisk
    link
    fedilink
    arrow-up
    1
    ·
    4 months ago

    Can you just drop to assembly for what you want to do? Gnu compilers even have inline assembly, but with any compiler you should at least be able to built a separate, assembly, object file.

    • mindbleach@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      4 months ago

      I can and have, and it’s still a tremendous pain in the ass to launder the addresses for labels. The hottest loop in the game draws an arbitrary span of the same tile. It should be trivial to do a jump table - to grab an address from an array and go there. 13 tiles? goto jump[13]. (Or really some stack / return shenanigans, because the 6502 is odd.) But if there’s any way to get cc65 to shove the location of an instruction into an array, I haven’t found it.