Following on from issue #36, I've modified the C128 codebase to dynamically load a TGI driver at startup, and adjust scaling tables etc. based on the resolution of the loaded driver.
I couldn't get VDC RAM size auto detection to work, and since trying to use 640x480 on a 16k VDC will cause an unusable display, it's probably not appropriate to make this a config option. Instead, I just use wildcards to load the first file whose name begins with TGI- as the TGI driver. The disk image is created with the interlaced TGI driver coming first in the directory, so 640x480 is still the default, but if that file is renamed or deleted, the 640x200 driver gets selected instead.
Additionally, I removed the NMI trampoline, since it didn't seem to be correct for the 128 (in 128 mode, RAM/ROM selection is done by the MMU at $D500, rather than the CPU IO lines at $01), and with the VDC RAM in its own address space, we don't need to do any bank switching on the 128 anyway.
Following on from issue #36, I've modified the C128 codebase to dynamically load a TGI driver at startup, and adjust scaling tables etc. based on the resolution of the loaded driver.
I couldn't get VDC RAM size auto detection to work, and since trying to use 640x480 on a 16k VDC will cause an unusable display, it's probably not appropriate to make this a config option. Instead, I just use wildcards to load the first file whose name begins with
TGI-
as the TGI driver. The disk image is created with the interlaced TGI driver coming first in the directory, so 640x480 is still the default, but if that file is renamed or deleted, the 640x200 driver gets selected instead.Additionally, I removed the NMI trampoline, since it didn't seem to be correct for the 128 (in 128 mode, RAM/ROM selection is done by the MMU at
$D500
, rather than the CPU IO lines at$01
), and with the VDC RAM in its own address space, we don't need to do any bank switching on the 128 anyway.