CGA Composite Mode under DOSBOX (Commited r3804)

Here you can discuss the development of patches.

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby ripsaw8080 » 2009-5-29 @ 05:54

I am well aware it's not an accurate representation. If nothing else, the RGB modes allow a background color which offers a lot of color artifact possibilities that the mode 6 algorithm won't take into consideration at all. For my part, none of this is intended as a substitute for real support in the emulation. I have to say, though, that Fooblitzky (in particular) works remarkably well with this hack.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4183
Joined: 2006-4-25 @ 23:24

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby KiyoteLockeWolf » 2009-5-29 @ 07:28

Someone should put [SOLVED] on the title of this thread now.

I was going to make a joke..

""Well dang it.. I think my enthusiasm just went and exploded.. All I have left is regret and taxes. ~ @what's his name..

Got less and less funny the more I ruminated about it.



More screen shots!!! Want more!

I have to admit.. You're one good ASM programmer. Any tips on learning me a bit up to it too? I'm still crawling.

It's interesting how the colors match lo-res on an apple.

I'm going to work on some games that exploit CGA/NTSC now. Or at least little funny screen savers and odd toys. (Probably a drawing program.)

Does anyone (besides me) still program in BASICA/GWBASIC? This hack is good for tinkering around with in such tinkering ways.



Kiyote!
If it ain't borked, fix it 7 times.. Reinvent the wheel every day. Compile 8085/8086 code daily. Drink lots of instant coffee. Look both ways before cooking a turkey.
User avatar
KiyoteLockeWolf
Newbie
 
Posts: 23
Joined: 2008-4-06 @ 16:08

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby KiyoteLockeWolf » 2009-5-30 @ 04:58

@ripsaw8080

Dear ripsaw..

I was wondering if you could possibly re-write my bulky TSR into a compact *.COM TSR.

The guts of my COMPCGA3.EXE code that worked well was this.

mem[0:1040]:=(mem[0:1040] and $cf) or $20;
port[$3d8]:=port[$3d8] and 251;

Of all the stuff I coded, this combination is what worked really well.



I included two screen shots of my CGA/NTSC animated GIF decoder I converted.

The framerate is horrid on a regular DOS pc, but in DOSBOX, it's 10 times worse.

I'm going to have to re-write the decoder into a transcoder which will create a 640x200x2 data stream (file) that can be displayed much quicker in DOSBOX.

The snapshots are what it looks like. I did watch an animated GIF under emulation though. Twas interesting.



Kiyote!
You do not have the required permissions to view the files attached to this post.
If it ain't borked, fix it 7 times.. Reinvent the wheel every day. Compile 8085/8086 code daily. Drink lots of instant coffee. Look both ways before cooking a turkey.
User avatar
KiyoteLockeWolf
Newbie
 
Posts: 23
Joined: 2008-4-06 @ 16:08

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby ripsaw8080 » 2009-5-30 @ 07:29

That's a pretty simple program, and would be useful practice if you're interested in writing assembly code. BTW, port 0x3d8 always reads 0xff in DOSBox as far as I can tell, so not much reason to read it before writing it.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4183
Joined: 2006-4-25 @ 23:24

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby KiyoteLockeWolf » 2009-5-30 @ 13:23

I am finding tutorials on 8086 assembly and stuff that are (for once) really descriptive.

I'm trying to learn. I also found a free 8086 compiler.



Since I couldn't figure it out on my own, (i will learn eventually), would you help me put that into a hotkey (ALT-P) TSR of that code? It would be just like my COMPCGA3.EXE program, where the hotkey triggers the writes to the address and the port, but much much much tinier. Or, could you add a hotkey function to run that bit of code from within your existing TSR? It traps for mode switching, but if I'm running something that doesn't get into those modes, 640x200x2, it stays dormant and the hotkey code would flip it into composite mode for stuff that doesn't venture into mode 4 and mode 5.

If not, don't worry.. I did make COMPCGA3.EXE. It's huge like a rhino, but it DOES work. Plus I have the satisfaction of making it.



BTW,.. what do you think of the screenshots of youtube videos? I'm hoping to have the transcoder and viewer done today.



I'm missing some of my good CGA based games. I gotta go digging to see if I still have some more for some more cool screenshots.



Kiyote!

@everyone else.. ~ more screen shots? plz? kthnx..
If it ain't borked, fix it 7 times.. Reinvent the wheel every day. Compile 8085/8086 code daily. Drink lots of instant coffee. Look both ways before cooking a turkey.
User avatar
KiyoteLockeWolf
Newbie
 
Posts: 23
Joined: 2008-4-06 @ 16:08

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby ripsaw8080 » 2009-5-30 @ 14:59

Maybe start another thread for the stuff you're making.

To get this thread back on track for what it was originally about, I've attached a 1 minute video of Fooblitzky running in DOSBox 0.73 with the mode 6 composite hack. It uses DOSBox's zmbv codec and I stripped out the audio to make it much smaller. Comparing how it looks to the screenshots on Mobygames, I think the reason the hack works so well in this case is because although the game uses mode 4, it's all in black and white, and the mode 6 composite palette is highly applicable to black and white.
You do not have the required permissions to view the files attached to this post.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4183
Joined: 2006-4-25 @ 23:24

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby KiyoteLockeWolf » 2009-5-30 @ 21:29

Some of those animations in the video remind me of the Monty Python intro.



Kiyote!
If it ain't borked, fix it 7 times.. Reinvent the wheel every day. Compile 8085/8086 code daily. Drink lots of instant coffee. Look both ways before cooking a turkey.
User avatar
KiyoteLockeWolf
Newbie
 
Posts: 23
Joined: 2008-4-06 @ 16:08

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby KiyoteLockeWolf » 2009-6-01 @ 06:52

More CGA screenshots.
You do not have the required permissions to view the files attached to this post.
If it ain't borked, fix it 7 times.. Reinvent the wheel every day. Compile 8085/8086 code daily. Drink lots of instant coffee. Look both ways before cooking a turkey.
User avatar
KiyoteLockeWolf
Newbie
 
Posts: 23
Joined: 2008-4-06 @ 16:08

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby KiyoteLockeWolf » 2009-6-01 @ 06:54

continued..
You do not have the required permissions to view the files attached to this post.
If it ain't borked, fix it 7 times.. Reinvent the wheel every day. Compile 8085/8086 code daily. Drink lots of instant coffee. Look both ways before cooking a turkey.
User avatar
KiyoteLockeWolf
Newbie
 
Posts: 23
Joined: 2008-4-06 @ 16:08

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby KiyoteLockeWolf » 2009-6-01 @ 07:06

ZOMG.. MORE!!

I think Dangerous Dave might've been made for CGA/NTSC.



Kiyote!
You do not have the required permissions to view the files attached to this post.
If it ain't borked, fix it 7 times.. Reinvent the wheel every day. Compile 8085/8086 code daily. Drink lots of instant coffee. Look both ways before cooking a turkey.
User avatar
KiyoteLockeWolf
Newbie
 
Posts: 23
Joined: 2008-4-06 @ 16:08

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby KiyoteLockeWolf » 2009-6-01 @ 19:09

99% of those I used COMP6_2.COM, which is Ripsaw's TSR.

Chess is one of the few I used COMPCGA3.EXE, my TSR on.



Kiyote!

[EDIT]

Actually, Bubble Bobble wouldn't run, period, without Ripsaw's TSR.

I got to level 30.
You do not have the required permissions to view the files attached to this post.
If it ain't borked, fix it 7 times.. Reinvent the wheel every day. Compile 8085/8086 code daily. Drink lots of instant coffee. Look both ways before cooking a turkey.
User avatar
KiyoteLockeWolf
Newbie
 
Posts: 23
Joined: 2008-4-06 @ 16:08

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby KiyoteLockeWolf » 2009-6-11 @ 18:30

More fun with CGA/NTSC..

Simulated Apple screen!



Kiyote!

[EDIT]

I'm supposed to be getting a real CGA card soon from a friend! YAY!!!
You do not have the required permissions to view the files attached to this post.
If it ain't borked, fix it 7 times.. Reinvent the wheel every day. Compile 8085/8086 code daily. Drink lots of instant coffee. Look both ways before cooking a turkey.
User avatar
KiyoteLockeWolf
Newbie
 
Posts: 23
Joined: 2008-4-06 @ 16:08

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby HunterZ » 2009-7-07 @ 04:01

Took a couple screenshots with Ultima 2, which falls under the same category of these other games. Doesn't look quite right, but arguably better than 4-color CGA I guess.
You do not have the required permissions to view the files attached to this post.
User avatar
HunterZ
l33t++
 
Posts: 6073
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby ripsaw8080 » 2009-7-07 @ 04:38

After examining the DOSBox code, I learned that it isn't necessary to switch mode 4 to mode 6 to get composite decoding; just need another port write to generate the composite palette. The attached TSR program will enable the color burst while staying in mode 4, which has the advantage of correct 40-column text instead of the more smeary 80-column text you get with mode 6.

The colors are not accurate for mode 4, and I think that may be for reasons explained here.
We can do slightly better if we sample the signal 1280 times per line instead of 640. This sample rate smoothes out the transitions between colours a little more, but also has the advantage that it allows us to decode colours from modes other than 640x200 palette 15 accurately (something that Dosbox currently does not do).
You do not have the required permissions to view the files attached to this post.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4183
Joined: 2006-4-25 @ 23:24

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby HunterZ » 2009-7-08 @ 01:12

ripsaw8080 wrote:After examining the DOSBox code, I learned that it isn't necessary to switch mode 4 to mode 6 to get composite decoding; just need another port write to generate the composite palette. The attached TSR program will enable the color burst while staying in mode 4, which has the advantage of correct 40-column text instead of the more smeary 80-column text you get with mode 6.

The colors are not accurate for mode 4, and I think that may be for reasons explained here.
We can do slightly better if we sample the signal 1280 times per line instead of 640. This sample rate smoothes out the transitions between colours a little more, but also has the advantage that it allows us to decode colours from modes other than 640x200 palette 15 accurately (something that Dosbox currently does not do).

Would that really make a grey dragon green?

Retook the screenshots with the new TSR:
You do not have the required permissions to view the files attached to this post.
User avatar
HunterZ
l33t++
 
Posts: 6073
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby ripsaw8080 » 2009-7-08 @ 02:32

Would that really make a grey dragon green?

The author of the blog I linked (who also made some related comments in an old thread) specifically mentions how certain colors can be confused at a lower sample rate. However, DOSBox's current algorithm may not be entirely applicable to mode 4 for other reasons.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4183
Joined: 2006-4-25 @ 23:24

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby Great Hierophant » 2009-7-08 @ 15:39

The screenshots are getting a bit better, but this is not a substitute for real Mode 4 Composite emulation. We need an option to select the out device emulated.
User avatar
Great Hierophant
l33t
 
Posts: 2361
Joined: 2003-4-27 @ 08:20

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby wd » 2009-7-08 @ 17:14

Well then "fix" composite emulation and you may get a switch. Or not because nobody cares.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby robertmo » 2009-7-08 @ 17:39

Great Hierophant could you be a bit more polite ;)
User avatar
robertmo
l33t
 
Posts: 4345
Joined: 2003-6-18 @ 10:35

Re: How do you switch to CGA Composite Mode? (Fooblitzky)

Postby wd » 2009-7-08 @ 17:55

Nah he's fine :)
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests