First post, by beard
Hi, I'm a newbie with a special problem.
I have a problem with an emulator for my first home computer. A SHARP MZ-700.
It works perfect, but.... only below WinNT.
To use it in Windows XP I tried several DOS emulators and VMs.
All with the same effect, that the graphic resolution is not working as in reality.
The graphic card is initialized with:
void InitVGA(void)
{
union REGS Register;
// set 200 scan lines -> 8x8 font will be activated
Register.w.ax = 0x1200;
Register.w.bx = 0x0030;
int86(0x10, &Register, &Register);
// mode 1, 40 x 25 colour mode
// with MSB set, the screen is not cleared
Register.w.ax = 0x0081;
int86(0x10, &Register, &Register);
// activate page 0
Register.w.ax = 0x0500;
int86(0x10, &Register, &Register);
// read Cursorsize
Register.h.ah = 0x03;
Register.h.bh = 0x00; // page 0
int86(0x10, &Register, &Register);
CursorStartLine = Register.h.ch;
CursorEndLine = Register.h.cl;
}
And it uses the possibility of an own characterset:
void CGRAMToVGA(void)
{
/*
* Copy the MZ-CharacterFont (CG-RAM) into the VGA-Card
*
*/
__dpmi_regs Register;
unsigned char MZMirrorCGRAM[4096];
unsigned short i;
for(i = 0; i < 4096; i++) MZMirrorCGRAM[i] = Mirror(MZCGRAM[i]);
dosmemput(&MZMirrorCGRAM[0], 0x800, __tb);
Register.h.ah = 0x11;
Register.h.al = 0x10;
Register.h.bh = 8; // 8 scan lines
Register.h.bl = 0; // in table 0
Register.x.cx = 256; // 256 characters
Register.x.dx = 0; // first character is ASCII 0
Register.x.es = __tb >> 4;
Register.x.bp = __tb & 0x0F;
__dpmi_int(0x10, &Register);
dosmemput(&MZMirrorCGRAM[0x800], 0x800, __tb);
Register.h.ah = 0x11;
Register.h.al = 0x00;
Register.h.bh = 8; // 8 scan lines
Register.h.bl = 1; // in table 1
Register.x.cx = 256; // 256 characters
Register.x.dx = 0; // first character is ASCII 0
Register.x.es = __tb >> 4;
Register.x.bp = __tb & 0x0F;
__dpmi_int(0x10, &Register);
Register.h.ah = 0x11;
Register.h.al = 0x03;
Register.h.bl = 0x04;
__dpmi_int(0x10, &Register);
// Cursor off (have placed here, of course above INT's switches cursor on)
Register.h.ah = 0x01;
Register.x.cx = 0x2100;
__dpmi_int(0x10, &Register);
}
It works with DOSBox, (the own charactreset) but the screenresolution is not changed to 320 by 200. I always see garbage on the lower part of the DOSBox screen.
That's 1. ugly and 2. the characters are very small.
The emulator is freeware and you can download it from:
http://www.sharpmz.org/bkkemu.htm
If someone want to test this.
The sourcecode is also downloadable.
I tried all available -machine switches.
It is independent from the PC which I use.
I think it is a general problem of the VGA emulation of DOSBox.
Any ideas?
Best regards,
Beard