VOGONS


Art of CGA

Topic actions

Reply 40 of 106, by Jo22

User metadata
Rank l33t++
Rank
l33t++
emosun wrote:

Would it be easy to convert a 16 color bitmap to cga becuase thats all I can make in my program

For completeness, there's also a CGA utility called imgconv (see dr.zeissler's CGA thread)
It creates four colour pictures only, though, and requires some manual editing for good results.
It can't produce those awesome pictures reenigne's CGAArt can create. 😀

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 41 of 106, by Tronix

User metadata
Rank Member
Rank
Member
Jo22 wrote:

For completeness, there's also a CGA utility called imgconv (see dr.zeissler's CGA thread)

Hello, I am the author of this program. I create it for make my CGA intro called CGA Dots. 😀

https://github.com/Tronix286/

Reply 42 of 106, by Jo22

User metadata
Rank l33t++
Rank
l33t++
Tronix wrote:

Hello, I am the author of this program. I create it for make my CGA intro called CGA Dots. 😀

Hey, that's cool! 😎 Nice to meet you!
Your program helped me a lot in converting pictures when I put together that little CGA viewer for dr.zeissler. 😀
By coincidence, I recorded a quick video of your work (CGA Dots intro) a while ago, too.
(Captured off a TV at the time. A green monitor would have been better. 😅)

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 43 of 106, by VileR

User metadata
Rank l33t
Rank
l33t

I should probably mention (because reenigne hasn't!) that CGAArt isn't just an image converter: its other function lets you view dumps of a CGA card's state on its emulated display. This may be useful because CGAart's emulation is far more flexible and tweakable than the ones in DOSBox or PCem, and the scaling/aspect correction are better as well.

To do that, instead of a PNG you need to feed it a .CGAD file, which includes the CGA/MC6845 register contents plus the VRAM buffer (CGAArt also produces these files as output when you convert something). I also wrote a simple DOSBox patch that saves a .CGAD dump along with each screenshot you take, as long as you're running with machine=cga:

Filename
dosbox_r4115_cgad_capture.diff
File size
3.72 KiB
Downloads
89 downloads
File license
Fair use/fair dealing exception

(EDIT - updated patch, after testing against current DOSBox SVN + fixing the unrealistic low values that DOSBox sets for the CGA hsync position.)

Last edited by VileR on 2018-06-12, 22:50. Edited 1 time in total.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 44 of 106, by VileR

User metadata
Rank l33t
Rank
l33t

As a few examples, you can have it do comb filtering...

combscr1_out.png
Filename
combscr1_out.png
File size
69.83 KiB
Views
2812 views
File license
Fair use/fair dealing exception

Or do very nice aspect correction; these shots are RGBI which emphasizes how sharp and smooth the scaling is (here it also separates subpixels for better effect on LCDs, although this can be disabled):

cga_comp_000_out.png
Filename
cga_comp_000_out.png
File size
34.51 KiB
Views
2812 views
File license
Fair use/fair dealing exception
digger_rgb_out.png
Filename
digger_rgb_out.png
File size
21.25 KiB
Views
2812 views
File license
Fair use/fair dealing exception

Or just play with the luma/chroma bandwidth, and lots of other settings:

digger_lol_out.png
Filename
digger_lol_out.png
File size
188.63 KiB
Views
2812 views
File license
Fair use/fair dealing exception
keen4c16_out.png
Filename
keen4c16_out.png
File size
277.89 KiB
Views
2812 views
File license
Fair use/fair dealing exception

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 46 of 106, by emosun

User metadata
Rank Oldbie
Rank
Oldbie

i decided to try my hand at converting a cga esc image that i imagine could maybe be made to work on real cga.

for some reason i like the black/white/pink/cyan limitation.

Attachments

  • vice_6.png
    Filename
    vice_6.png
    File size
    25.97 KiB
    Views
    2752 views
    File license
    Fair use/fair dealing exception

Reply 47 of 106, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
emosun wrote:

i decided to try my hand at converting a cga esc image that i imagine could maybe be made to work on real cga.

Nice! Did you do that with CGAArt or another program? If another program, can you point me at the source image? I'd be interested to see what CGAArt can do with it.

emosun wrote:

for some reason i like the black/white/pink/cyan limitation.

I know what you mean - while a lot of people describe that palette as ugly, it may still be one of the CGA's best RGBI palettes in terms of gamut. Plus, nostalgia factor.

Reply 48 of 106, by emosun

User metadata
Rank Oldbie
Rank
Oldbie
reenigne wrote:

Nice! Did you do that with CGAArt or another program? If another program, can you point me at the source image? I'd be interested to see what CGAArt can do with it.

used adobe and mspaint as i couldnt get the cgaart program to work

Reply 49 of 106, by Jo22

User metadata
Rank l33t++
Rank
l33t++

You, too ? I can't figure out how to fix my installation of Visual C++. Anytime I try, I fail. 🙁
I'm running XP and Win 7. Other prorgrams sometimes work, if I manually download a missing file and copy it in the program's folder.

Attachments

  • error.gif
    Filename
    error.gif
    File size
    9.12 KiB
    Views
    2726 views
    File license
    Fair use/fair dealing exception

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 50 of 106, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote:

You, too ? I can't figure out how to fix my installation of Visual C++. Anytime I try, I fail. 🙁

Sorry about that... I'll have to look into making a proper installer for it that takes care of the prerequisites. In the meantime, https://www.microsoft.com/en-gb/download/deta … s.aspx?id=48145 is the link for the Visual Studio 2015 C++ redist - installing that *should* fix the problem.

Reply 51 of 106, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Thank you very much, it works now. On XP, even. 😀

fluffy_out.png
Filename
fluffy_out.png
File size
411.98 KiB
Views
2698 views
File license
Fair use/fair dealing exception

Attachments

  • cgaart_xp.png
    Filename
    cgaart_xp.png
    File size
    391.03 KiB
    Views
    2700 views
    File license
    Fair use/fair dealing exception

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 53 of 106, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
emosun wrote:

Whats the maximum resolution for the 4 color mode (pink/cyan/black/white) for when i make these?

The normal CGA standard for 2bpp mode is 320x200. With a CRTC tweak a slightly larger image (320x204) can be used on IBM CGA cards and some (but not all) clones. CGAArt can handle images of whatever size you throw at it (the idea being that you might want to convert a large image and display it on a real CGA card via scrolling).

Reply 54 of 106, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Thanks a lot for this awesome program, reenigne.
May I ask you a question ? It's related to CGA but not completely on-topic:
Is it possible to fix an original CGA card's logic to display 4 colours in 640x200 resolution mode ?
I don't know where I read this, but from what I remember, IBMs address decoding was said to be incomplete somehow.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 55 of 106, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote:
Thanks a lot for this awesome program, reenigne. May I ask you a question ? It's related to CGA but not completely on-topic: Is […]
Show full quote

Thanks a lot for this awesome program, reenigne.
May I ask you a question ? It's related to CGA but not completely on-topic:
Is it possible to fix an original CGA card's logic to display 4 colours in 640x200 resolution mode ?
I don't know where I read this, but from what I remember, IBMs address decoding was said to be incomplete somehow.

I have actually played around with this, and there are two problems. One is that the CGA card only has 16kB of VRAM, which is only enough to cover half of a 640x200x4 screen. This by itself would be a huge problem - you could have a reduced viewport rectangle or use CRTC trickery to make a non-rectangular viewport as long as it only covers about half of the screen area.

The more serious problem is that the snow suppression circuitry on the CGA card is always active in graphics modes, which means that the data bytes are latched on the wrong cycles to display correctly. That means that if you write bytes ABCDEFGH to VRAM it won't display ABCDEFGH but ABCBEFGF (every fourth byte will be a repeat of the byte two bytes before it). So you don't get a true all-pixels-addressable display. You can see the effect of this in CGAArt (which emulates this behavior of an IBM CGA card correctly) by choosing "high-res 2bpp graphics" in Video card->Registers->Mode. I hope one to do something with this "improper mode" in a demo.

Reply 56 of 106, by Jo22

User metadata
Rank l33t++
Rank
l33t++
reenigne wrote:

I have actually played around with this, and there are two problems. One is that the CGA card only has 16kB of VRAM, which is only enough to cover half of a 640x200x4 screen. This by itself would be a huge problem - you could have a reduced viewport rectangle or use CRTC trickery to make a non-rectangular viewport as long as it only covers about half of the screen area.

The more serious problem is that the snow suppression circuitry on the CGA card is always active in graphics modes, which means that the data bytes are latched on the wrong cycles to display correctly. That means that if you write bytes ABCDEFGH to VRAM it won't display ABCDEFGH but ABCBEFGF (every fourth byte will be a repeat of the byte two bytes before it). So you don't get a true all-pixels-addressable display. You can see the effect of this in CGAArt (which emulates this behavior of an IBM CGA card correctly) by choosing "high-res 2bpp graphics" in Video card->Registers->Mode. I hope one to do something with this "improper mode" in a demo.

Ah, I see. Thanks a lot for explaining this, too! 😀 I always wondered if that "mode" could be ever used something for.
Personally, I'm looking forward a demo, as well. Maybe it could be used for some special effects (moving stars, abstract objects, etc).
Anyway, please don't feel rushed. I'm glad CGAArt's emulation is somewhat complete already, so we can experiment a little bit
with these kind of things without the need for having original CGA hardware that normally would be required for that.

(I and I suppose many others from PAL lands had/have less of a chance to get hands on real CGA cards, so this is really fascinating.
For example, back in time. clone cards and Mono/Color combo cards were seemingly more common in Germany than IBM CGA cards, I believe.
Not sure about the UK, though or why it was that way at all (if it was, my memories are a bit sketchy).
Maybe it was like this because printer ports and hi-res graphics (Hercules) were considered to be more relevant for business.
Also, the home computer market and console market of the 80s in Europe was healthier than in NA, or so I heard.
No Atari VCS desaster here. At least not in that dimension. The VCS was sold well intol the early 90s, I heard.

In contrast, PC games in north america were much more popular, so CGA graphics got tuned very well. Esp. Composite CGA.
The best we got in terms of CGA was CGA in 4 colours via RGB. On the bright side, this allowed many SCART-equipped TVs to be used as CGA monitors.
The RCA outputs of the clone cards and internal CGAs did read "monochrome" more than often. I still wonder why the NTSC facility got artificially
removed or disabled. And how it was done. Was only the colour-burst signal surpressed or was the removal more complex ?)

Edit: I apologize for the long post. Just realized how long it really is. 😅
I hope you don't mind. I didn't mean to overrun your thread.
I'm too chatty sometimes (a bad habit of mine, my sister says).

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 57 of 106, by VileR

User metadata
Rank l33t
Rank
l33t
Jo22 wrote:

The best we got in terms of CGA was CGA in 4 colours via RGB. On the bright side, this allowed many SCART-equipped TVs to be used as CGA monitors.

Interesting. Was that commonly done with PCs?
I'm in a PAL country too, but when CGA was standard I never saw this done even once - back then I don't think that SCART had a huge presence here yet (if at all). I guess it would've been a popular solution otherwise, since RGBI monitors were pretty damn expensive.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 58 of 106, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote:

Ah, I see. Thanks a lot for explaining this, too! 😀 I always wondered if that "mode" could be ever used something for.
Personally, I'm looking forward a demo, as well. Maybe it could be used for some special effects (moving stars, abstract objects, etc).

Yeah, it should be possible to design some effects for which the repeated columns don't matter, and which would would be impossible in any other mode (too many colours for 1bpp, detail too fine for 2bpp and bit patterns that don't appear in the character ROM so not text mode either).

Jo22 wrote:

(I and I suppose many others from PAL lands had/have less of a chance to get hands on real CGA cards, so this is really fascinating.

I never did either until I lived in the US.

Jo22 wrote:

For example, back in time. clone cards and Mono/Color combo cards were seemingly more common in Germany than IBM CGA cards, I believe.
Not sure about the UK, though or why it was that way at all (if it was, my memories are a bit sketchy).

Our first family PC was an Amstrad PC1512 which had a clone CGA onboard. It didn't have a real CRTC so a lot of tricks were not possible, and it didn't have any improper modes either (I know, I tried all possible mode register values in an attempt to find new modes). It used NTSC-compatible timings if I remember correctly, but didn't have any kind of composite output.

Jo22 wrote:

The best we got in terms of CGA was CGA in 4 colours via RGB. On the bright side, this allowed many SCART-equipped TVs to be used as CGA monitors.

I never saw this but I have heard that it was done (at least sometimes the intensity bit was not wired up at all so you just got 8 colours). I seem to remember that the school BBC Micros in the late 80s (possibly also mid 80s) used SCART leads to connect to their monitors too.

Jo22 wrote:

The RCA outputs of the clone cards and internal CGAs did read "monochrome" more than often. I still wonder why the NTSC facility got artificially
removed or disabled. And how it was done. Was only the colour-burst signal surpressed or was the removal more complex ?)

It was probably not removed or disabled, just never added in the first place (on a real CGA card the composite output stage is just an extra bit of circuitry which a designer could just leave out when designing a clone CGA card with no composite output).

Jo22 wrote:

Edit: I apologize for the long post. Just realized how long it really is. 😅
I hope you don't mind. I didn't mean to overrun your thread.
I'm too chatty sometimes (a bad habit of mine, my sister says).

No worries - if a thread drifts too far off-topic it can always be split off. I think this is all relevant though.

Reply 59 of 106, by emosun

User metadata
Rank Oldbie
Rank
Oldbie
reenigne wrote:

The normal CGA standard for 2bpp mode is 320x200.

ah ok. i have no idea if these will work on an older machine but they're fun to make

Attachments