VOGONS

Common searches


Reply 80 of 758, by BdR

User metadata
Rank Newbie
Rank
Newbie

Thanks VileRancour. I made another GWBASIC program that can display a .BMP file in color using the dithering technique. The .BMP files must have a 4bit palette (16 colors) and make use of the CGA composite colors. I converted some images to 160*200 .BMPs using Paint Shop Pro, so the actual image processing like scaling and anti-aliasing etc. is done in Paint Shop Pro; I'm not going to re-program all that (let alone in GW-BASIC). The image loading is pretty slow, oh well.. in dosbox you can speed it up by tapping CTRL-F12 a few times. See attachment for a zip with the BMPDITH.BAS and some .BMP example files.

I'm probably enjoying this CGA composite stuff a bit more than I should, but whatever (the GW-BASIC nostalgia is nice too btw 😀). It's just that I'm surprised that CGA was capable of more than the 4 colors with a horrible default color palette (magenta, cyan, white and black). Back in the mid-to-late 1980s, I used to play pc games on an EGA-adapter and CGA had always seemed pretty useless to me. And until now I never understood why some games supported a monochrome dithering mode, because that usually made the game look even worse on my EGA monitor. So this composite color-burst stuff is a bit of a "aha" moment for me. 😁

Attachments

  • Filename
    bmpdith.zip
    File size
    90.5 KiB
    Downloads
    430 downloads
    File comment
    GW-BASIC program to load a BMP in CGA composite mode, includes examples
    File license
    Fair use/fair dealing exception
  • treefrog.png
    Filename
    treefrog.png
    File size
    11.81 KiB
    Views
    4518 views
    File comment
    an example of a photo in CGA composite mode
    File license
    Fair use/fair dealing exception

Reply 81 of 758, by VileR

User metadata
Rank l33t
Rank
l33t

Yeah my XT clone went from a monochrome monitor with CGA (actually a clone card that had an MDA-like text mode) to EGA... and besides my country uses PAL, so I had never actually seen Composite CGA in action until DOSbox came along really.

Does your GWBASIC program switch DOSbox into composite "mode" by itself? Because I'm having trouble with COMPCGA3.EXE for some reason - it doesn't appear to function at all in hi-res mode or cga's text mode as the screenshots indicate it should... at least Alt+P does nothing.

Reply 82 of 758, by BdR

User metadata
Rank Newbie
Rank
Newbie

My GWBASIC program doesn't switch into composite mode by itself. And COMPCGA3.EXE only works when you start DosBox with machine type CGA. There should be a line in the dosbox .config file with "machine=cga" or you can also just use this parameter:

dosbox -machine cga

You will recognise normal CGA mode right away at the startup by the blocky looking letters. 😁 btw I also remember my dad trying to connect a normal TV to our 286 and we tried out some games to see how they looked. Of course this was a PAL tv (i'm from the Netherlands) so it didn't work very well, and that's when my dad bought an EGA monitor.

Reply 83 of 758, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

FYI, you can easily toggle composite color with BASIC code:

SCREEN 2: REM cga mode 6 (640x200x2)
OUT &H3D8,&H1A: REM enable color burst
OUT &H3D8,&H1E: REM disable color burst

Reply 84 of 758, by VileR

User metadata
Rank l33t
Rank
l33t

Oh, of course I was trying with "machine=cga", it just didn't occur to me to mention the obvious 😀
My silly mistake was something entirely different, it seems.... the first composite screenshots of gwbasic in this thread showed just white text, so I assumed that it was text mode (while it was in fact mode 6), since the characters look the same. So when compcga3 didn't work for me in text mode, I imagined there was a problem.
Don't remember in which time of day this occured, so it was probably either too much beer, or too little coffee

Reply 85 of 758, by BdR

User metadata
Rank Newbie
Rank
Newbie

@ripsaw8080: That's great, thanks for the code example. I've changed my BMPDITH to make use of this, so now you can press 'c' to switch color burst mode on and off. 😁

Attachments

  • Filename
    bmpdith2.zip
    File size
    101.69 KiB
    Downloads
    390 downloads
    File comment
    updated GW-BASIC program to load a BMP in CGA composite mode, includes examples
    File license
    Fair use/fair dealing exception

Reply 86 of 758, by VileR

User metadata
Rank l33t
Rank
l33t

Thanks BdR, this is quite fun

Check out DOOM and DOOM II in CGA composite mode 😁 title screens adapted with some tweaking, and viewed in DOSbox/BMPDITH with 4:3 aspect correction

Attachments

  • doom2.png
    Filename
    doom2.png
    File size
    82.02 KiB
    Views
    4359 views
    File comment
    DOOM II title screen for composite CGA
    File license
    Fair use/fair dealing exception
  • doom1.png
    Filename
    doom1.png
    File size
    112.71 KiB
    Views
    4359 views
    File comment
    DOOM title screen for composite CGA
    File license
    Fair use/fair dealing exception

Reply 87 of 758, by Riyune

User metadata
Rank Newbie
Rank
Newbie

Is there a way in Zdosbox 0.74 to select the alternative third palette in CGA (cyan, red, white)? I was wondering if a small TSR program could be written to add palette options to CGA games.

Jesus loves you, unless you have tatoos. Then you are going to hell.

Reply 89 of 758, by Riyune

User metadata
Rank Newbie
Rank
Newbie

I dusted off my MS QuickBASIC Bible and see it is as simple as this:

OUT &H3D8, PEEK(&H465) OR 4

So I'll compile that as an .EXE and load just before running a CGA game, with DOSBOX graphics set of course to cga. I will see what happens.

Jesus loves you, unless you have tatoos. Then you are going to hell.

Reply 90 of 758, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

If you want to hack a different palette for some game, a pre-selection like
you're intending to do it may not work since registers are reset on mode switch.

Easiest would be changing the respective functions in the dosbox sources to
permanently override the 4-color palette to the one you want to try.

Reply 91 of 758, by Paul_Holmlund

User metadata
Rank Newbie
Rank
Newbie

This thread still lives!!!

Awesome!

And those new images you're making look, to quote Peter Griffen.. "Frick'n Sweet!"

I'm working on am image editor that will export game graphics to composite CGA.

My aim is to recreate HiRes or DoubleHiRes Apple style games.

BTW, I'm Kiyote and Kiyotewolf and Kiyotelockewolf.. My accounts seem to get screwed up easily on this forum site for some reason.

~Kiyote!

I made that TSR in Turbo Pascal. If anyone wants any help with it, or anything remotely like it, let me know. I have line routines & plotting routines which draw with CGA composite colors properly adaptable to QBasic and GWbasic.

Reply 92 of 758, by Paul_Holmlund

User metadata
Rank Newbie
Rank
Newbie

Ooh yeah..

I made a video filetype called *.CGA.

It is a string of SCREEN 2 images, converted from an animated GIF, converted from a video file.

I am going to put together the files and upload it so you guys can tinker with it.

<.< I meant to do it awhile ago, but got sidetracked.

The converter was made from an animated GIF viewer in QBasic.

~Kiyote!

I use it to watch short youtube videos in beautiful composite CGA.

Reply 93 of 758, by VileR

User metadata
Rank l33t
Rank
l33t
wd wrote:
If you want to hack a different palette for some game, a pre-selection like you're intending to do it may not work since registe […]
Show full quote

If you want to hack a different palette for some game, a pre-selection like
you're intending to do it may not work since registers are reset on mode switch.

Easiest would be changing the respective functions in the dosbox sources to
permanently override the 4-color palette to the one you want to try.

Now you got me wondering how hard it would be to write a patch, which would add hotkeys to cycle each one of the 4 colors between all possible CGA color-values (0 to 15)... so you'd be able to customize the palette on the fly. I think one C64 emulator has/had something similar.

The hard part would probably be getting the custom palette to "lock" for its respective screen mode... since so many CGA games feature a lot of palette changes.

Last edited by VileR on 2010-09-13, 16:46. Edited 1 time in total.

Reply 95 of 758, by VileR

User metadata
Rank l33t
Rank
l33t
h-a-l-9000 wrote:

On PCJr and Tandy you can do this with a TSR.

Interesting... as a matter of fact, I thought of this after seeing your recent PCJr/Tandy palette patch.
Does such a TSR already exist (and if so where)? And would it work by simply running it before any CGA game when machine=pcjr or tandy (I assume your patch would be required)?

Reply 96 of 758, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

You'd have to hook INT10 and maybe the timer interrupt to catch even direct register writes.

I'm not sure to what extent it would work in SVN without the patch. I don't know if such a TSR already exists.

1+1=10

Reply 97 of 758, by BdR

User metadata
Rank Newbie
Rank
Newbie

You don't have to make your own file format for CGA video, you can use the very old .GL file format. It supports 640*200*2 format too. This was an early animation format used by GRASP (GRaphical System for Presentation), it simply contained a script file and a number of .PIC files (PC-Paint format).

And then hack the GLVIEW.EXE so it turns to color burst, that would be totally oldschool 😁

Attachments

  • Filename
    glview.zip
    File size
    47.04 KiB
    Downloads
    310 downloads
    File comment
    how to make a .GL file, an old dos animation format by GRASP
    File license
    Fair use/fair dealing exception

Reply 99 of 758, by Paul_Holmlund

User metadata
Rank Newbie
Rank
Newbie

@Bdr

Do you have the original B/W line version of the tree frog, so I can directly port it back into GW-Basic (well, QBasic for me.. ) and have the original source image?

Pretty please?

~Kiyote!