diff --git a/include/dos_inc.h b/include/dos_inc.h index a51085cb..c76ba885 100644 --- a/include/dos_inc.h +++ b/include/dos_inc.h @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dos_inc.h,v 1.82 2009-10-04 14:28:06 c2woody Exp $ */ +/* $Id: dos_inc.h,v 1.83 2009-10-28 21:45:12 qbix79 Exp $ */ #ifndef DOSBOX_DOS_INC_H #define DOSBOX_DOS_INC_H @@ -627,6 +627,7 @@ struct DOS_Block { RealPt dbcs; RealPt filenamechar; RealPt collatingseq; + RealPt upcase; Bit8u* country;//Will be copied to dos memory. resides in real mem Bit16u dpb; //Fake Disk parameter system using only the first entry so the drive letter matches } tables; diff --git a/src/dos/dos.cpp b/src/dos/dos.cpp index ce723fac..db640ddb 100644 --- a/src/dos/dos.cpp +++ b/src/dos/dos.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dos.cpp,v 1.120 2009-10-04 14:28:07 c2woody Exp $ */ +/* $Id: dos.cpp,v 1.121 2009-10-28 21:45:12 qbix79 Exp $ */ #include #include @@ -69,6 +69,7 @@ static Bitu DOS_21Handler(void) { char name1[DOSNAMEBUF+2+DOS_NAMELENGTH_ASCII]; char name2[DOSNAMEBUF+2+DOS_NAMELENGTH_ASCII]; + switch (reg_ah) { case 0x00: /* Terminate Program */ DOS_Terminate(mem_readw(SegPhys(ss)+reg_sp+2),false,0); @@ -924,13 +925,18 @@ static Bitu DOS_21Handler(void) { reg_cx = 5; CALLBACK_SCF(false); break; + case 0x02: // Get pointer to uppercase table + mem_writeb(data + 0x00, reg_al); + mem_writed(data + 0x01, dos.tables.upcase); + reg_cx = 5; + CALLBACK_SCF(false); + break; case 0x06: // Get pointer to collating sequence table mem_writeb(data + 0x00, reg_al); mem_writed(data + 0x01, dos.tables.collatingseq); reg_cx = 5; CALLBACK_SCF(false); break; - case 0x02: // Get pointer to uppercase table case 0x03: // Get pointer to lowercase table case 0x04: // Get pointer to filename uppercase table case 0x07: // Get pointer to double byte char set table diff --git a/src/dos/dos_tables.cpp b/src/dos/dos_tables.cpp index c4d659f1..a56e9e01 100644 --- a/src/dos/dos_tables.cpp +++ b/src/dos/dos_tables.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dos_tables.cpp,v 1.31 2009-05-27 09:15:41 qbix79 Exp $ */ +/* $Id: dos_tables.cpp,v 1.32 2009-10-28 21:45:12 qbix79 Exp $ */ #include "dosbox.h" #include "mem.h" @@ -134,10 +134,15 @@ void DOS_SetupTables(void) { mem_writeb(Real2Phys(dos.tables.filenamechar)+0x15,0x3d); mem_writeb(Real2Phys(dos.tables.filenamechar)+0x16,0x3b); mem_writeb(Real2Phys(dos.tables.filenamechar)+0x17,0x2c); - /* COLLATING SEQUENCE TABLE */ - dos.tables.collatingseq=RealMake(DOS_GetMemory(17),0); + /* COLLATING SEQUENCE TABLE + UPCASE TABLE*/ + // 256 bytes for col table, 128 for upcase, 4 for number of entries + dos.tables.collatingseq=RealMake(DOS_GetMemory(25),0); mem_writew(Real2Phys(dos.tables.collatingseq),0x100); for (i=0; i<256; i++) mem_writeb(Real2Phys(dos.tables.collatingseq)+i+2,i); + dos.tables.upcase=RealMake(dos.tables.collatingseq,258); + mem_writew(Real2Phys(dos.tables.upcase),0x80); + for (i=0; i<128; i++) mem_writeb(Real2Phys(dos.tables.upcase)+i+2,0x80+i); + /* Create a fake FCB SFT */ seg=DOS_GetMemory(4);