JonAbbott wrote:Are you going to implement a VIDC20 native version of LCDGameModes? I wonder if it's worth making it support both VIDC1 and VIDC20 in the same module, it's fairly easy to detect if VIDC20 is present from legal OS calls.
Been thinking about this.
How would a VIDC20 version of LCDgm actually work?
Currently LCDgm works by monitoring Service_ModeChange and Service_ModeExtension on VIDC1 computers and after a TV resolution mode has been entered, it patches the necessary registers (VCR, CR, etc.) to suitable values for VGA/LCD screens.
When running under ADFFS, LCDgm works on VIDC20 by virtue of the VIDC1 translation. If a VIDC1 game enters a TV resolution mode and patches it for overscan by setting VIDC1 registers, ADFFS catches these and LCGgm issues its LCD patches using VIDC1 parameters, which ADFFS also catches.
But on native VIDC20 with VIDC20 software there is no need for this. As far as I know, there are no VIDC20 mode extension modules in existence (other than my "AnyMode" programme, which is RPi only) and I'm not aware of any game that patches VIDC20 registers to achieve overscan - everything is now done by mode definition files, and even then there were very few VIDC20 games which used specific overscan mode definitions.
So would LCDgm on VIDC20 still be patching VIDC1 mode extensions? And if so, how?
Options:
1) First thought, as an immediate "LCDgmVIDC20", I could provide a pre-patched VIDC20 mode definition file for all standard TV resolution modes (9, 13, 12, 15 etc), I've already tested this and it gives nice square, LCD-compatible low resolution modes on the Risc PC. It won't solve VIDC1 overscan modes provided in extension
modules, but it will work for the large number of games which generate overscan by selecting a standard TV mode and setting HCR/HDSR/HDER for overscan, since ADFFS will still catch those VIDC1 registers and translate them - this should work at least as well as the current combination of LCDgm-under-ADFFS.
2) Next step up from the above, is to include the pre-patched VIDC20 TV resolution modes as a VIDC20 compatible mode extension module, this avoids need for users to add a new mode definition file...however I don't know which would have priority - the original mode definition file, or the extension module - need to check.
3) Long term option...would be for LCDgm or another module, to detect VIDC1 mode extension modules as they load, then patch their extensions to be VIDC20 compatible and LCD compatible. This would be a lot more work and I'm not quite sure as yet on a good way to do the detection as the module loads...I suspect we'd have to scan all mode numbers 32-127 for extensions each time any module loads, which could be s....l....o....w....
Thoughts?
Steve