Testing some turbo C programs on PCEM, I discovered everything works great. But I think I found a "bug" in the VGA emulation, so I'll post my tests here.
I made a simple program to scroll the screen using VGA hardware registers, based on this: ega-and-vga-smooth-scrolling-and-panning.
I got a nice smooth per pixel scrolling (never thought it was possible) working well on dosbox, and according to the info in the link, and other sources, this should also work on original hardware.
The VGA emulation on PCEM worked perfect with the vertical scroolling which I changed using these in my test:
Code: Select all
/*change scroll registers: HIGH_ADDRESS = 0x0C; LOW_ADDRESS = 0x0D */
outport(0x03d4, 0x0C | (x+y & 0xff00));
outport(0x03d4, 0x0D | (x+y << 8));
To move the screen 1 pixel to the left or right, I used this:
Code: Select all
inp(0x3da);
outp(0x3c0, 0x33);
outp(0x3c0, value); /* "value" can take an int, from 0 to 3 */
Here I leave two test programs with source.
DOCVIEW: A doc viewer taken from the fisrt link (www.drdobbs.com), It should work on EGA and VGA, even on a 8088 PC. Testing on pcem, scrolling is not smooth at all.
PGAME: A little program I made, it first scrolls down, and then it scrolls to the right to see the difference. Sometimes you will see some little "jumps" when using X and Y scroll at the same time (even in dosbox), but they are probably caused by the code itself. This demo works even on an emulated 8088 with VGA. (Can a real 8088 be used with a VGA card?).
Hope somebody is interested.
Thanks!