• Jeffrey Lee's avatar
    Evict ECFIndex and PalIndex from VDU workspace · bcc668c7
    Jeffrey Lee authored
      ECFIndex and PalIndex claim to be mode variables, but it's impossible for extension modes to specify their values.
      Since they're easy to calculate from the ModeFlags and Log2BPP values, drop them from the mode workspace (+ table of builtin modes) and calculate them on the fly instead.
      File changes:
      - hdr/KernelWS - Drop ECFIndex & PalIndex from workspace
      - s/vdu/vdumodes - Adjust workspace definition, drop ECFIndex & PalIndex values from VWSTAB
      - s/vdu/vdudriver - Remove now-redundant copy loop from ModeChangeSub. Remove code from GenerateModeSelectorVars that sets up the ECFIndex & PalIndex values on the stack
      - s/vdu/vdugrafl - Adjust copy loop in SwitchOutputToSprite/Mask
      - s/vdu/vdupalette, s/vdu/vdupalxx - Add GetPalIndex routine to generate PalIndex on the fly. Drop the obsolete 16bpp palette/gamma table and shuffle the other entries to simplify GetPalIndex a bit.
      - s/vdu/vduplot - Add GetECFIndex routine to generate ECFIndex on the fly. Also, fix things so that mode 0 isn't the only rectangular-pixel mode which uses the special rectangular-pixel ECF patterns (index 0 vs. index 4). Fiddle with ExportedHLine a bit to avoid an out-of-range ADR.
      - s/NewReset - Fix UAL warning for MOV R0, AppSpaceStart. Adjust memset to not assume 512KB is the correct amount
      Tested on Raspberry Pi 3
    Version 6.11. Tagged as 'Kernel-6_11'
VersionASM 1006 Bytes