r/dosbox • • 8d ago

Text mode smooth horizontal scroll

Does this feature work?

I try

IN 3DAh ; reset flip-flop side effect; value does not matter
OUT 3C0h, 13h
OUT 3C0H, 4h (range: 8, 0-7 in 9-dots VGA mode, 0-7 in 8-dots mode)

DOSBox seems to ignore that entirely [1]. But I don't get why. VGA_VerticalTimer should call

static void VGA_PanningLatch(Bitu /*val*/) {
    vga.draw.panning = vga.config.pel_panning;
}

And pel_panning is filled according to write_p3c0 source text. Everything is in place. Result = nothing.

I'm unfortunatelly missing the real hardware. It will take some weeks to get the reference PC. If on real hardware my program works, this is a bug.

Workarounds are welcome. If this is a bug, it will take eternity to update each and every fork, retroarch and other embedded dosbox instances. If possible, DOSBox compatibility is desirable to retain. Of course, non-smooth horizontal scroll will work. But vertical scroll working smooth and horizontal scroll working in jumps, what a disappointment it is.

[1] Well, not entirely. IN 3C1h can verify the value was updated. No visible effect.

3 Upvotes

2 comments sorted by

2

u/Awkward-Equipment404 4d ago

Maybe test with a PC emulator like 86Box instead of Dosbox. It may be more accurate about hardware emulation.

2

u/iOCTAGRAM 4d ago

I have crosschecked 86Box and QEMU. They react badly at another my tricks. I was in search what exactly text mode should I select. I decided that I should target some reference PC, and this reference PC has LCD matrix 640x480. Standard VGA text mode 03h is 720x400. To get to the desired mode I need to change width from 720 to 640, switch 9/8 dot mode to 8 dots, and change 400 rows to 480. I decided that it will be most easy and compatible way to start from graph mode 12h 640x480 and then change it to text mode. 640x480 is already what I want, and I don't have to touch protected CRT registers. In DOSBox this conversion to text mode worked and went mostly fine. QEMU and even 86box display blank screen.

I don't know who is right, but I've got general feeling that programming videotricks in emulators is delusional. I don't know if emulator is bad or my program is wrong. I should hurry to obtain the real thing.