VOGONS

Common searches


First post, by VileR

User metadata
Rank Oldbie
Rank
Oldbie

1) The game Bruce Lee has this weird issue with text when the composite option is selected - check out the two screenshots attached:
- one is from MobyGames, by a user who apparently captured it from real CGA hardware
- the other is what I get using latest DOSBox - see the differences with the status bar at the top.

The game appears to use the 640x200 mode, but I'm not sure what's happening with the text. Going by the moby screenshot, real CGA shows the characters as double width (40 col) in this mode.
My (uneducated) guess is that it halves the character generator's pixel clock to show the double-width text, but there's probably more to it, since the "TOP" text and score are a different color implying a different bit pattern... whatever it's doing, guess it's something not supported by current CGA emulation?

2) For games with a composite setting that sticks to 320x200x4, it's currently not possible to get accurate colors. Artifact colors appear to work (not sure how accurately), but solid palette colors all appear as grey, with varying brightness.
are there any plans anywhere to improve support for these games? Wouldn't surprise me if i'm the only one who cares, but since I can't code worth a damn, i'm constrained to boring all of you instead...

Attachments

  • brucelee_dosbox.png
    Filename
    brucelee_dosbox.png
    File size
    4.15 KiB
    Views
    2075 views
    File comment
    Bruce Lee under DOSBox .74
    File license
    Fair use/fair dealing exception
  • brucelee_mobygames.jpg
    Filename
    brucelee_mobygames.jpg
    File size
    77.52 KiB
    Views
    2075 views
    File comment
    Bruce Lee screenshot from MobyGames (running on actual hardware, captured from composite output)
    File license
    Fair use/fair dealing exception

Reply 1 of 11, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

How are you switching to composite mode? Or is the game switching automatically?

Something along those lines came up at CGA Composite Mode under DOSBOX (Commited r3804) (look at the Ultima II screenshots); the fix amounted to using a different TSR.

Reply 2 of 11, by VileR

User metadata
Rank Oldbie
Rank
Oldbie

If you're referring to 1) - Bruce Lee switches to composite output automatically, there's a separate option when you load the game. No TSRs involved in this case (those two programs work for games that don't set the color burst by themselves).

If you're referring to 2) - depends on the game... but in general there's currently no way to get the colors right with composite games running at 320x200x4.
You can see the "greying" problem with most of the screenshots in that thread (and I've personally tried Archon and Below The Root)... ripsaw's post over there explains why.

Reply 3 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

the characters on mobyscreen are much larger and thus there is less colour bleed.
but our algorithm introduces always some colour bleed. A more complex algorithm could reduce that somewhat. But I am quite happy with our emulation looks.

Water flows down the stream
How to ask questions the smart way!

Reply 4 of 11, by VileR

User metadata
Rank Oldbie
Rank
Oldbie

yeah, I don't really mind the color bleed at all... the algorithm might not be "perfect" but Bruce Lee looks great in DosBox (just like other games that use the same mode). What I was wondering is why those larger text characters don't show up though.

The only games where colors don't look right ("greying") seem to be 320x200 games that use non-white solid colors.

Reply 6 of 11, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The game was probably designed to use mode 4 (40 column text), and someone hacked it to use mode 6 (80 column text) because DOSBox has full support for composite color in mode 6. They simply changed an 04 byte to 06 and presto: composite color works... but with 80 column text.

Can easily change that 06 byte back to 04:

Attachments

  • brucelee_002.png
    Filename
    brucelee_002.png
    File size
    3.54 KiB
    Views
    1978 views
    File comment
    With mode 4 and the COMP4 program from the Fooblitzky thread
    File license
    Fair use/fair dealing exception
  • brucelee_001.png
    Filename
    brucelee_001.png
    File size
    1.73 KiB
    Views
    1978 views
    File comment
    With mode 4
    File license
    Fair use/fair dealing exception

Reply 7 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The characters are still not at the same place as in the moby screenshot.

Maybe we should try a get a clean copy to be sure about the 6<->4 trick.

Water flows down the stream
How to ask questions the smart way!

Reply 8 of 11, by VileR

User metadata
Rank Oldbie
Rank
Oldbie
ripsaw8080 wrote:

The game was probably designed to use mode 4 (40 column text), and someone hacked it to use mode 6 (80 column text) because DOSBox has full support for composite color in mode 6. They simply changed an 04 byte to 06 and presto: composite color works... but with 80 column text.

Can easily change that 06 byte back to 04:

Interesting... how come that mode 4 w/COMP4 (especially when using non-white RGB colors) yields the exact same artifact color set as mode 6 does?
Those colors are a pretty good match for the Mobygames screenshot (by Servo), so if that shot is truly representative, then emulation appears correct in this case.
On the other hand, his composite captures of other mode 4 games, with the same palette even, yield very different results (solid bright cyan doesn't translate as grey, for one), so I'm probably just not getting it.

Also, good to know that just hacking the mode-set byte can still produce non-garbled, recognizable graphics... wouldn't have thought it possible (what with the different resolutions and color depths between modes), but I don't know much, certainly not compared to you. 😁 Which byte offset was it?

Reply 9 of 11, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The wall color and thin artifact bands in Servo's screenshots are consistent with mode 6; mode 4 only seems to fit for the font appearance, but not the position as Qbix pointed out. Is there a way to get 40-column text in mode 6?

The game code also supports that composite should use mode 6, as there is code like: "if RGB selected then set mode 4, else set mode 6", which would be pointless if the condition resulted in mode 4 either way. I think the game was originally a booter, and the executable form is a DOS conversion. Could be that the conversion is incorrectly displaying the status line for RGB mode in composite mode... that would make sense. The byte I changed is at offset 0xf224 in the executable if you'd like to experiment.

Reply 11 of 11, by VileR

User metadata
Rank Oldbie
Rank
Oldbie

Guess mode 6 might be original behavior then... and the fact that the exact same composite colors are achieved when it's forced to mode 4 is simply an emulation quirk.
You're right about it being a DOS conversion. It does have some definite hacks in it (like adding that "T - Terminer" exit option to the menu, and possibly setting "Keyboard Mode" as the default choice), so maybe the position of the status bar text was also changed, perhaps even by accident.

About 40-column text showing up in mode 6:

my (again, uneducated) guess was based on something I read both here and here, about CGA register 03D8h (mode control), specifically bits 0 and 4. Apparently bit 4 sets 640x200x1bpp mode, but bit 0 does some additional timing stuff (like doubling the character clock rate, resulting in 80c text).
It isn't mentioned what happens when bit 4 is set BUT bit 0 is clear... possibly a real CGA would go into high-res mode but show 40-column ("half-clocked") text characters?