carlos12
Experienced Member
Since several decades ago I have an old CGA emulator for Hercules. It's just a TSR wich takes only 512 bytes. It's the best CGA emulator I know. As far as I tried, it seems that only works on real hardware, it hangs every emulator...
In real hardware, it works so great and accurate that I would love to use it's "secrets" to implement them into my programs, so an Hercules card could show CGA graphics converting them automatically. I already do it: I just set the Hercules CRT parameters to use the B800 memory space instead of defauly B000, and configure the card to set a 620x300 resolution with three scanlines (the 3rd one is blank). It definitely works and there's no need to program special routines for the Hercules, the CGA ones work perfectly.
So, what's the problem? The image quality is poor and plane. But this emulator manages to reproduce what seems 3 shades of gray. I tried to disassemble but got a little lost. With a lot of effort, I got the CRT parameters it sets (comments are mine):
They set a 620x200, two scanline mode. It kind of works but something is still missing. No shades emulation and no correct aspect ratio on real hardware. What's missing?
I attach the CGA emulator if someone wants to disassemble it.
Thanks everybody.
In real hardware, it works so great and accurate that I would love to use it's "secrets" to implement them into my programs, so an Hercules card could show CGA graphics converting them automatically. I already do it: I just set the Hercules CRT parameters to use the B800 memory space instead of defauly B000, and configure the card to set a 620x300 resolution with three scanlines (the 3rd one is blank). It definitely works and there's no need to program special routines for the Hercules, the CGA ones work perfectly.
So, what's the problem? The image quality is poor and plane. But this emulator manages to reproduce what seems 3 shades of gray. I tried to disassemble but got a little lost. With a lot of effort, I got the CRT parameters it sets (comments are mine):
Code:
CRTCParms DB 00h,38h ; Horizontal Total: 56 characters
DB 01h,28h ; Horizontal Displayed: 40 characters
DB 02h,2Dh ; Horizontal Sync Position: at 45th character
DB 03h,0Ah ; Horizontal Sync Width: 10 character clocks
DB 04h,7Fh ; Vertical Total: 127 characters
DB 05h,1Fh ; Vertical Adjust: 31 scan lines
DB 06h,64h ; Vertical Displayed: 100 character rows
DB 07h,70h ; Vertical Sync Position: after 112th char row
DB 08h,02h
DB 09h,01h ; Max Scan Line: 2 scan lines per char
DB 0Ah,06h
DB 0Bh,07h
DB 0Ch,00h
They set a 620x200, two scanline mode. It kind of works but something is still missing. No shades emulation and no correct aspect ratio on real hardware. What's missing?
I attach the CGA emulator if someone wants to disassemble it.
Thanks everybody.