1
0
Fork 0

Added double byte stuff the proper way (empty table)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1820
This commit is contained in:
Peter Veenstra 2004-06-10 08:48:53 +00:00
parent c94459d6d3
commit b7fb90dbd5
3 changed files with 17 additions and 5 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_inc.h,v 1.44 2004-05-15 07:57:02 harekiet Exp $ */
/* $Id: dos_inc.h,v 1.45 2004-06-10 08:48:53 qbix79 Exp $ */
#ifndef DOS_H_
#define DOS_H_
@ -563,6 +563,7 @@ struct DOS_Block {
struct {
RealPt mediaid;
RealPt tempdta;
RealPt dcbs;
} tables;
};

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos.cpp,v 1.71 2004-05-04 18:34:07 qbix79 Exp $ */
/* $Id: dos.cpp,v 1.72 2004-06-10 08:48:53 qbix79 Exp $ */
#include <stdio.h>
#include <stdlib.h>
@ -801,6 +801,14 @@ static Bitu DOS_21Handler(void) {
case 0x62: /* Get Current PSP Address */
reg_bx=dos.psp();
break;
case 0x63: /* DOUBLE BYTE CHARACTER SET */
if(reg_al == 0) {
SegSet16(ds,RealSeg(dos.tables.dcbs));
reg_si=RealOff(dos.tables.dcbs);
reg_al = 0;
CALLBACK_SCF(false); //undocumented
} else reg_al = 0xff; //Doesn't officially touch carry flag
break;
case 0x64: /* Set device driver lookahead flag */
E_Exit("Unhandled Dos 21 call %02X",reg_ah);
break;
@ -895,7 +903,6 @@ static Bitu DOS_21Handler(void) {
break;
case 0x68: /* FFLUSH Commit file */
case 0x63: /* Weirdo double byte stuff (fails but say it succeeded) available only in MSDOS 2.25 */
CALLBACK_SCF(false); //mirek
case 0xE0:
case 0x18: /* NULL Function for CP/M compatibility or Extended rename FCB */

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_tables.cpp,v 1.10 2004-05-04 18:34:08 qbix79 Exp $ */
/* $Id: dos_tables.cpp,v 1.11 2004-06-10 08:48:53 qbix79 Exp $ */
#include "dosbox.h"
#include "mem.h"
@ -78,9 +78,13 @@ void DOS_SetupTables(void) {
//CON string
real_writew(0x54,0x20+0x00, (Bit16u) 0x4f43);
real_writew(0x54,0x20+0x02, (Bit16u) 0x204e);
/* Allocate DCBS DOUBLE BYTE CHARACTER SET LEAD-BYTE TABLE */
dos.tables.dcbs=RealMake(DOS_GetMemory(3),0);
mem_writew(Real2Phys(dos.tables.dcbs),0); //empty table
/* Allocate some fake memory else pharlab doesn't like the indos pointer */
sdaseg=DOS_GetMemory(12);
sdaseg=DOS_GetMemory(3);
DOS_SDA(sdaseg,0).Init();
}