Hardware Cursor support

Discuss development specific to the Pi version of ADFFS
Post Reply
JonAbbott
Posts: 1736
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Hardware Cursor support

Post by JonAbbott » Thu Sep 10, 2015 9:57 am

Changes required to provide VIDCx Hardware cursor support:
  1. Claim GraphicsV 5, store bit 0 of R0 (on/off), update HCSR based on R1 (X) and VCSR based on R2 (Y) and copy the pixel data to the original RO Cursor address of 1F03800 (Coded)
  2. Blitter changes:
    • Calculate cursor start as an offset from the GPU start (R1 on entry to blitters) (Coded)
    • If VCSR < VDSR or VCSR < VBSR, clip the top
    • If HCSR < HDSR or HCSR < HDER, clip the left
    • If HCSR+32 > HDER or HCSR+32 > HBER, clip the right
    • If VCER > VDER or VCER > VBER, clip the bottom (Coded)
    • After a full screen blit, blit the cursor stored at 1F03800 over it (Coded)
  3. GraphicsV 10 and GraphicsV 11 need to store Cursor palette changes (Coded)
  4. VIDC1 emulator needs to store Cursor palette changes and set Cursor_state=((VCER-VCSR) > 0, 1, 0) (Coded)
  5. VIDC20 emulator needs to store Cursor palette changes and set Cursor_state=((VCER-VCSR) > 0, 1, 0)
Testing:
  • Caverns uses a full screen height cursor for the highscore and ship
  • Manchester United Europe changes the cursor legally, but changes the cursor palette via VIDC1 register writes

JonAbbott
Posts: 1736
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Re: Hardware Cursor support

Post by JonAbbott » Fri Sep 11, 2015 9:20 pm

Now coded, updated Modules on the dev site. I've renamed the last build of 2.51 to adffs500251n, adffs500 and adffs500db are now 2.52 with VIDC1 hardware cursor emulation.

All cursors under the JIT are now displayed by the blitter. I've yet to add clipping to the top/left and right side of the screen, so they will wrap if not in a bounding box.

Caverns is now working, Diggers now loads although there are further issues to resolve. The only other games I tested were Manchester United for a standard cursor and Manchester United Europe for a game set cursor with VIDC palette changes, both appeared to be okay.

The only other change in this build from 2.51n is that it should now fully support Chocolate flavour OS's, previously only Vanilla was supported so it would touch every page to essentially switch Chocolate to Vanilla. This may have a knock on effect on some games depending on what state the CPU is in when pages are touched. We'll have to compare against 2.51n if games are now failing.

Chocolate - The compiler flag to turn on lazy page mapping in RISCOS, RO5 is Chocolate flavour, RO3.71 is Vanilla.

Post Reply