Conversation
417f405 to
6f306d3
Compare
6f306d3 to
1e88659
Compare
|
I appreciate the effort @kcgen , but frankly, it was better before. Before this change only a single scanline was glitching, now it's an entire row, so it's worse. See attached video (just remove the second If there's always gonna be glitching with the current DOSBox-side text output method, it's best to restrict the artifacts to a single scanline. Cool text demos, but as we were saying, proper emulated DOS programs are different, those are expected to work without artifacts anyway. |
This was deliberate because the smallest "logical unit" in text modes is a text cell, so switching from per-line to per-row chunks (or "atomic row changes") means we'll only see row-level changes, and never slice through the middle of a text character (or strange effects like that). But yeah - if we're just trying to shrink this region of change (as the frame is updated); then pixel-lines is the way to go.
I wasn't booted into real MS-DOS; so the text demo was making INT10 text calls into DOSBox's emulated DOS routines, and from there the drawn text is render to the VGA side where this per-line chunked behavior is seen. (In the videos, you will also see there's no tearing or sub-row slicing; and the demo is using a real text mode). But regardless, I'd rather the per-line updates anyway 😅 |
Ok, but do we get any slicing/tearing artifacts with these text demos prior to this change, when rendering by scanline? I think not, we established that the probable cause for text tearing at the DOS prompt is that our emulated DOS prompt implementation does "weird things" and doesn't quite go through the normal "emulation pathways" like regular DOS programs do, unlike our DOS commands. Can you post the names of these demos, links to them, or the demos themselves? Then I can also test if there's any tearing when rendering by line as before.
Let's take a step back 😄 I brought this up because the single scanline glitches annoyed me in our DOS prompt only. I never encountered these glitches on any other text programs, just with our DOS prompt. So, if running actual DOS programs that use text mode never glitch anyway with per scanline rendering (to be tested if you send links to the demos), then this change only magnifies the problem with the DOS prompt. So yeah, then it's worse because it's more noticeable now and more distracting 😄 Am I missing some benefits of the per-row rendering here? |
|
Before I close it out, I did a deeper dive into what's happening as the frame level. Notice that
|
Yup - that one is
I'm still digging; what I've concluded so far is that the our DOSBox-side commands (like Basically, we can call Compare that with DOS-side programs - if they want to print text, they use INT10H interrupt, which DOSBox emulates. Both text pathways ultimately terminate in the same BIOS text frame handling code.
I don't think so! (more to come.. :-) |
|
Couple of ideas:
The first option seems better to me.
Just for clarification @kcgen: many programs write character codes to the text mode video memory area directly (starts at I'm sure the text mode demo does the exact same thing, so it's quite impossible to get the same glitchy behaviour with it. |






Description
When in text video modes, we were drawing video video frames with per-line timings. Because DOSBox's own text console rasterizer just draws to the video memory as-is without doing fancy buffer-swapping or flipping, there could be instances where the updating frame "reveals" line-level differences during the frame update.
This PR adjusts the VGA draw part size to match the number of text rows (when in text mode), which granularizes the text updates at the row level to avoid revealing inter-row differences (at the pixel-line level).
Of course - differences can still occur mid-frame, but they will be at the text-row level.
Graphical modes are unaffected.
Manual testing
Tested rapidly running
ls, and also tested rapid text-based demos:out_001.mp4
out_003.mp4
out_004.mp4
out_005.mp4
Checklist
I have: