CGALIB Now Supports Hercules!
Sunday, 21st January 2024
CGALIB was updated a few weeks ago to support Hercules graphics cards, and those changes have now been uploaded to the Cyningstan web site and to Itch, and the Github repo has also been updated.
Hercules graphics cards were designed to use the original IBM 5151 monochrome monitor. IBM's Monochrome Display Adapter could output high quality 80x25 text at a screen resolution of 720x350, but it lacked the memory to allow high-resolution graphics. The Hercules card rectified this deficiency, having 64KB which was enough for two pages of 720x348 graphics.
Hercules was not compatible with CGA, but the memory layout of the graphics was close enough to make emulation possible. There were some third-party programs allowing CGA games to be played on Hercules systems, and many games supported Hercules by emulating CGA internally, allowing players with Hercules graphics to play the game in monochrome using the CGA 4-colour game assets.
It's this latter capability that I've added to CGALIB. Games and other programs compiled with CGALIB will now check for Hercules monochrome graphics when initialising the screen, and if found, will automatically set up the Hercules Graphics mode for displaying CGA graphics.
It's easy for developers to add Hercules support to existing CGA games: just recompile the game against the latest version of the library. I've done this with Team Droid already, and other games will be updated over the coming weeks. Keep an eye out for the updated games if you have a Hercules compatible system to run them on!
CGALIB Source Code
Download: cgasrc.zip
Size 71kb, downloads 485.
This is the source code distribution for CGALIB, useful for seeing how CGALIB works or porting it to other compilers. (read more...)
CGALIB Binaries
Download: cgalib.zip
Size 99kb, downloads 405.
This is the CGALIB binary distribution. Download this if you want to create your own projects based on CGALIB. (read more...)
Comments