VOGONS


CGA Composite Mode under DOSBOX (Commited r3804)

Topic actions

Reply 40 of 758, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

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.

Reply 41 of 758, by KiyoteLockeWolf

User metadata
Rank Newbie
Rank
Newbie

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.

Reply 42 of 758, by KiyoteLockeWolf

User metadata
Rank Newbie
Rank
Newbie

@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!

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.

Reply 43 of 758, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

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.

Reply 44 of 758, by KiyoteLockeWolf

User metadata
Rank Newbie
Rank
Newbie

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.

Reply 45 of 758, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

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.

Reply 46 of 758, by KiyoteLockeWolf

User metadata
Rank Newbie
Rank
Newbie

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.

Reply 47 of 758, by KiyoteLockeWolf

User metadata
Rank Newbie
Rank
Newbie

More CGA screenshots.

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.

Reply 48 of 758, by KiyoteLockeWolf

User metadata
Rank Newbie
Rank
Newbie

continued..

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.

Reply 49 of 758, by KiyoteLockeWolf

User metadata
Rank Newbie
Rank
Newbie

ZOMG.. MORE!!

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

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.

Reply 50 of 758, by KiyoteLockeWolf

User metadata
Rank Newbie
Rank
Newbie

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.

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.

Reply 51 of 758, by KiyoteLockeWolf

User metadata
Rank Newbie
Rank
Newbie

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!!!

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.

Reply 52 of 758, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

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.

Reply 53 of 758, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

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).

Reply 54 of 758, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
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:

Reply 55 of 758, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

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.

Reply 56 of 758, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

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.

Reply 57 of 758, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well then "fix" composite emulation and you may get a switch. Or not because nobody cares.

Reply 58 of 758, by robertmo

User metadata
Rank l33t++
Rank
l33t++

Great Hierophant could you be a bit more polite 😉

Reply 59 of 758, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Nah he's fine 😀