Fix bad pointer dereference and other issues with *ScreenLoad
Jeffrey Lee authored
Detail:
  s/vdu/vdugrafj - Rewrite WritePaletteFromSprite to fix some issues with the logic which decides whether to change screen mode:
  - ModeNo was always being treated as if it was a mode selector block, causing bad pointer dereferences if it was actually a numbered mode. Prior to zero page protection the code would have eventually stumbled its way through to the mode change code.
  - For checking the pixel format, only the Log2BPP was being compared, resulting in code deciding that (e.g.) modes with differing RGB order were the same
  - However the eigen value checking was also broken (checking wrong part of generated mode selector block), causing the mode change logic to always be taken
  s/vdu/vdugrafdec - Increase size of SloadModeSel so it's actually large enough to hold the generated mode selector - old code would have run off the end a bit (thankfully, it was the last thing in that particular workspace block)
Admin:
  Tested on BB-xM, *ScreenLoad'ing sprites from various modes
  Fixes issue reported on forums:
  https://www.riscosopen.org/forum/forums/4/topics/3649


Version 5.35, 4.79.2.294. Tagged as 'Kernel-5_35-4_79_2_294'
0617a359
Name Last commit Last update
..
vdu23 Assorted GraphicsV improvements
vdu5 Commit of kernel as featured in release 5.00.
vducursoft Add builtin software pointer support
vdudecl Replace WriteBuffer_Drain ARMop with a suite of memory barrier ARMops
vdudriver Add initial support for "physical memory pools"
vdufont Import from cleaned 360 CD
vdufontl1 Kernel now sets "interlaced" mode flag itself from mode control parameters; this simplifies the Interlace module's job significantly.
vdugrafa Strip out some old build switches
vdugrafb Add compressed ROM support. Make more use of ARMv5+ instructions. Other misc tweaks.
vdugrafc Import from cleaned 360 CD
vdugrafd Strip out some old build switches
vdugrafdec Fix bad pointer dereference and other issues with *ScreenLoad
vdugrafe Rationalise some old switches.
vdugraff Reindent Arthur2.
vdugrafg Fix OS_SpriteOp 41 (read pixel) for 4K colour sprites. Update ECF patterns to work sensibly in true colour modes.
vdugrafh More alpha mask read/write fixes
vdugrafhal Add builtin software pointer support
vdugrafi Add support for the new RISC OS 5 style sprite mode word. Add partial support for alpha channel sprite masks. Implement OS_ScreenMode reasons 13-15
vdugrafj Fix bad pointer dereference and other issues with *ScreenLoad
vdugrafk Fix new format *ScreenSave'd sprites containing lefthand wastage
vdugrafl ModeFlag_GreyscalePalette handling improvements. Issue service calls on certain GraphicsV events. Sprite tweaks and fixes.
vdugrafv Miscellaneous fixes
vdumodes Fix VGA/SVGA mode 7 VIDC list to be correct resolution/BPP when HiResTTX/TTX256 in use
vdupal10 Add support for the new RISC OS 5 style sprite mode word. Add partial support for alpha channel sprite masks. Implement OS_ScreenMode reasons 13-15
vdupal20 Add support for the new RISC OS 5 style sprite mode word. Add partial support for alpha channel sprite masks. Implement OS_ScreenMode reasons 13-15
vdupalette
vdupalxx
vduplot
vdupointer
vduswis
vduttx
vduwrch