1
0
Fork 0

Add very simple and not entirely correct upcase table. Makes doswin32 happy.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3488
This commit is contained in:
Peter Veenstra 2009-10-28 21:45:12 +00:00
parent ee5f6c5a92
commit b10cd0e073
3 changed files with 18 additions and 6 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.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;

View file

@ -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 <stdlib.h>
#include <string.h>
@ -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

View file

@ -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);