This commit is contained in:
Wengier 2022-07-13 22:40:09 -04:00
parent 7175758a77
commit 3d0237004b
37 changed files with 1086 additions and 112 deletions

View File

@ -10,6 +10,12 @@
option "drive z convert fat" (in [dos] section) to
control whether to convert virtual drive Z:. Much
of the code is imported from DOSBox Pure. (Wengier)
- Added code pages 856 (Hebrew) and 859 (Latin 9) for
the guest-to-host code page conversions. (Wengier)
- Added the "Limit disk transfer speed" menu group
(under "DOS") to toggle the hard & floppy disk data
rate function. Also moved "Quick launch program..."
menu from "DOS" menu to "Main" menu. (Wengier)
- Added config option to allow create of temporary
devices for piping operations when a temporary DOS
path is not available. (Wengier)
@ -17,10 +23,21 @@
READ CD command. (schellingb)
- Report bad sectors recorded in raw CD images as
ATAPI read errors. (schellingb)
- You can use CONFIG -set langcp=... to change the
current language along with the embedded code page.
Also improved -langcp option for SBCS code pages,
and the Windows installer will also set keyboard
layouts for the selected languages. (Wengier)
- When changing TTF font, DOSBox-X will try to show
the number of missing characters in the new TTF
font (if any). (Wengier)
- Fixed display of individual/total file sizes with
DIR command when they are very large. (Wengier)
- Fixed non-US code page conversions for mounted FAT
drives. (Wengier)
- Fixed incorrect message displays in Configuration
Tool and Mapper Editor when booting into guest
systems with language files. (Wengier)
- Fixed possible "Path not found" bug when switching
to code page 950 from another code page. (Wengier)
- Fixed creating directories may not work properly

303
contrib/mappings/CP856.TXT Normal file
View File

@ -0,0 +1,303 @@
#
# Name: cp856_Hebrew_PC to Unicode table
# Unicode version: 3.0
# Table version: 1.0
# Table format: Format A
# Date: 1999 July 27
# Authors: Ken Whistler (kenw@sybase.com)
#
# Copyright (c) 1998 - 1999 Unicode, Inc. All Rights reserved.
#
# This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
# No claims are made as to fitness for any particular purpose. No
# warranties of any kind are expressed or implied. The recipient
# agrees to determine applicability of information provided. If this
# file has been provided on optical media by Unicode, Inc., the sole
# remedy for any claim will be exchange of defective media within 90
# days of receipt.
#
# Unicode, Inc. hereby grants the right to freely use the information
# supplied in this file in the creation of products supporting the
# Unicode Standard, and to make copies of this file in any form for
# internal or external distribution as long as this notice remains
# attached.
#
# General notes:
#
# This table contains the data the Unicode Consortium has on how
# CP424 characters map into Unicode.
#
# Format: Three tab-separated columns
# Column #1 is the cp856_Hebrew_PC code (in hex)
# Column #2 is the Unicode (in hex as 0xXXXX)
# Column #3 is the Unicode name (follows a comment sign, '#')
#
# The entries are in cp856_Hebrew_PC order
#
# Version history
# 1.0 version new.
#
# Updated versions of this file may be found in:
# <ftp://ftp.unicode.org/Public/MAPPINGS/>
#
# Any comments or problems, contact <errata@unicode.org>
# Please note that <errata@unicode.org> is an archival address;
# notices will be checked, but do not expect an immediate response.
#
0x00 0x0000 #NULL
0x01 0x0001 #START OF HEADING
0x02 0x0002 #START OF TEXT
0x03 0x0003 #END OF TEXT
0x04 0x0004 #END OF TRANSMISSION
0x05 0x0005 #ENQUIRY
0x06 0x0006 #ACKNOWLEDGE
0x07 0x0007 #BELL
0x08 0x0008 #BACKSPACE
0x09 0x0009 #HORIZONTAL TABULATION
0x0A 0x000A #LINE FEED
0x0B 0x000B #VERTICAL TABULATION
0x0C 0x000C #FORM FEED
0x0D 0x000D #CARRIAGE RETURN
0x0E 0x000E #SHIFT OUT
0x0F 0x000F #SHIFT IN
0x10 0x0010 #DATA LINK ESCAPE
0x11 0x0011 #DEVICE CONTROL ONE
0x12 0x0012 #DEVICE CONTROL TWO
0x13 0x0013 #DEVICE CONTROL THREE
0x14 0x0014 #DEVICE CONTROL FOUR
0x15 0x0015 #NEGATIVE ACKNOWLEDGE
0x16 0x0016 #SYNCHRONOUS IDLE
0x17 0x0017 #END OF TRANSMISSION BLOCK
0x18 0x0018 #CANCEL
0x19 0x0019 #END OF MEDIUM
0x1A 0x001A #SUBSTITUTE
0x1B 0x001B #ESCAPE
0x1C 0x001C #FILE SEPARATOR
0x1D 0x001D #GROUP SEPARATOR
0x1E 0x001E #RECORD SEPARATOR
0x1F 0x001F #UNIT SEPARATOR
0x20 0x0020 #SPACE
0x21 0x0021 #EXCLAMATION MARK
0x22 0x0022 #QUOTATION MARK
0x23 0x0023 #NUMBER SIGN
0x24 0x0024 #DOLLAR SIGN
0x25 0x0025 #PERCENT SIGN
0x26 0x0026 #AMPERSAND
0x27 0x0027 #APOSTROPHE
0x28 0x0028 #LEFT PARENTHESIS
0x29 0x0029 #RIGHT PARENTHESIS
0x2A 0x002A #ASTERISK
0x2B 0x002B #PLUS SIGN
0x2C 0x002C #COMMA
0x2D 0x002D #HYPHEN-MINUS
0x2E 0x002E #FULL STOP
0x2F 0x002F #SOLIDUS
0x30 0x0030 #DIGIT ZERO
0x31 0x0031 #DIGIT ONE
0x32 0x0032 #DIGIT TWO
0x33 0x0033 #DIGIT THREE
0x34 0x0034 #DIGIT FOUR
0x35 0x0035 #DIGIT FIVE
0x36 0x0036 #DIGIT SIX
0x37 0x0037 #DIGIT SEVEN
0x38 0x0038 #DIGIT EIGHT
0x39 0x0039 #DIGIT NINE
0x3A 0x003A #COLON
0x3B 0x003B #SEMICOLON
0x3C 0x003C #LESS-THAN SIGN
0x3D 0x003D #EQUALS SIGN
0x3E 0x003E #GREATER-THAN SIGN
0x3F 0x003F #QUESTION MARK
0x40 0x0040 #COMMERCIAL AT
0x41 0x0041 #LATIN CAPITAL LETTER A
0x42 0x0042 #LATIN CAPITAL LETTER B
0x43 0x0043 #LATIN CAPITAL LETTER C
0x44 0x0044 #LATIN CAPITAL LETTER D
0x45 0x0045 #LATIN CAPITAL LETTER E
0x46 0x0046 #LATIN CAPITAL LETTER F
0x47 0x0047 #LATIN CAPITAL LETTER G
0x48 0x0048 #LATIN CAPITAL LETTER H
0x49 0x0049 #LATIN CAPITAL LETTER I
0x4A 0x004A #LATIN CAPITAL LETTER J
0x4B 0x004B #LATIN CAPITAL LETTER K
0x4C 0x004C #LATIN CAPITAL LETTER L
0x4D 0x004D #LATIN CAPITAL LETTER M
0x4E 0x004E #LATIN CAPITAL LETTER N
0x4F 0x004F #LATIN CAPITAL LETTER O
0x50 0x0050 #LATIN CAPITAL LETTER P
0x51 0x0051 #LATIN CAPITAL LETTER Q
0x52 0x0052 #LATIN CAPITAL LETTER R
0x53 0x0053 #LATIN CAPITAL LETTER S
0x54 0x0054 #LATIN CAPITAL LETTER T
0x55 0x0055 #LATIN CAPITAL LETTER U
0x56 0x0056 #LATIN CAPITAL LETTER V
0x57 0x0057 #LATIN CAPITAL LETTER W
0x58 0x0058 #LATIN CAPITAL LETTER X
0x59 0x0059 #LATIN CAPITAL LETTER Y
0x5A 0x005A #LATIN CAPITAL LETTER Z
0x5B 0x005B #LEFT SQUARE BRACKET
0x5C 0x005C #REVERSE SOLIDUS
0x5D 0x005D #RIGHT SQUARE BRACKET
0x5E 0x005E #CIRCUMFLEX ACCENT
0x5F 0x005F #LOW LINE
0x60 0x0060 #GRAVE ACCENT
0x61 0x0061 #LATIN SMALL LETTER A
0x62 0x0062 #LATIN SMALL LETTER B
0x63 0x0063 #LATIN SMALL LETTER C
0x64 0x0064 #LATIN SMALL LETTER D
0x65 0x0065 #LATIN SMALL LETTER E
0x66 0x0066 #LATIN SMALL LETTER F
0x67 0x0067 #LATIN SMALL LETTER G
0x68 0x0068 #LATIN SMALL LETTER H
0x69 0x0069 #LATIN SMALL LETTER I
0x6A 0x006A #LATIN SMALL LETTER J
0x6B 0x006B #LATIN SMALL LETTER K
0x6C 0x006C #LATIN SMALL LETTER L
0x6D 0x006D #LATIN SMALL LETTER M
0x6E 0x006E #LATIN SMALL LETTER N
0x6F 0x006F #LATIN SMALL LETTER O
0x70 0x0070 #LATIN SMALL LETTER P
0x71 0x0071 #LATIN SMALL LETTER Q
0x72 0x0072 #LATIN SMALL LETTER R
0x73 0x0073 #LATIN SMALL LETTER S
0x74 0x0074 #LATIN SMALL LETTER T
0x75 0x0075 #LATIN SMALL LETTER U
0x76 0x0076 #LATIN SMALL LETTER V
0x77 0x0077 #LATIN SMALL LETTER W
0x78 0x0078 #LATIN SMALL LETTER X
0x79 0x0079 #LATIN SMALL LETTER Y
0x7A 0x007A #LATIN SMALL LETTER Z
0x7B 0x007B #LEFT CURLY BRACKET
0x7C 0x007C #VERTICAL LINE
0x7D 0x007D #RIGHT CURLY BRACKET
0x7E 0x007E #TILDE
0x7F 0x007F #DELETE
0x80 0x05D0 #HEBREW LETTER ALEF
0x81 0x05D1 #HEBREW LETTER BET
0x82 0x05D2 #HEBREW LETTER GIMEL
0x83 0x05D3 #HEBREW LETTER DALET
0x84 0x05D4 #HEBREW LETTER HE
0x85 0x05D5 #HEBREW LETTER VAV
0x86 0x05D6 #HEBREW LETTER ZAYIN
0x87 0x05D7 #HEBREW LETTER HET
0x88 0x05D8 #HEBREW LETTER TET
0x89 0x05D9 #HEBREW LETTER YOD
0x8A 0x05DA #HEBREW LETTER FINAL KAF
0x8B 0x05DB #HEBREW LETTER KAF
0x8C 0x05DC #HEBREW LETTER LAMED
0x8D 0x05DD #HEBREW LETTER FINAL MEM
0x8E 0x05DE #HEBREW LETTER MEM
0x8F 0x05DF #HEBREW LETTER FINAL NUN
0x90 0x05E0 #HEBREW LETTER NUN
0x91 0x05E1 #HEBREW LETTER SAMEKH
0x92 0x05E2 #HEBREW LETTER AYIN
0x93 0x05E3 #HEBREW LETTER FINAL PE
0x94 0x05E4 #HEBREW LETTER PE
0x95 0x05E5 #HEBREW LETTER FINAL TSADI
0x96 0x05E6 #HEBREW LETTER TSADI
0x97 0x05E7 #HEBREW LETTER QOF
0x98 0x05E8 #HEBREW LETTER RESH
0x99 0x05E9 #HEBREW LETTER SHIN
0x9A 0x05EA #HEBREW LETTER TAV
0x9B #UNDEFINED
0x9C 0x00A3 #POUND SIGN
0x9D #UNDEFINED
0x9E 0x00D7 #MULTIPLICATION SIGN
0x9F #UNDEFINED
0xA0 #UNDEFINED
0xA1 #UNDEFINED
0xA2 #UNDEFINED
0xA3 #UNDEFINED
0xA4 #UNDEFINED
0xA5 #UNDEFINED
0xA6 #UNDEFINED
0xA7 #UNDEFINED
0xA8 #UNDEFINED
0xA9 0x00AE #REGISTERED SIGN
0xAA 0x00AC #NOT SIGN
0xAB 0x00BD #VULGAR FRACTION ONE HALF
0xAC 0x00BC #VULGAR FRACTION ONE QUARTER
0xAD #UNDEFINED
0xAE 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
0xAF 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
0xB0 0x2591 #LIGHT SHADE
0xB1 0x2592 #MEDIUM SHADE
0xB2 0x2593 #DARK SHADE
0xB3 0x2502 #BOX DRAWINGS LIGHT VERTICAL
0xB4 0x2524 #BOX DRAWINGS LIGHT VERTICAL AND LEFT
0xB5 #UNDEFINED
0xB6 #UNDEFINED
0xB7 #UNDEFINED
0xB8 0x00A9 #COPYRIGHT SIGN
0xB9 0x2563 #BOX DRAWINGS DOUBLE VERTICAL AND LEFT
0xBA 0x2551 #BOX DRAWINGS DOUBLE VERTICAL
0xBB 0x2557 #BOX DRAWINGS DOUBLE DOWN AND LEFT
0xBC 0x255D #BOX DRAWINGS DOUBLE UP AND LEFT
0xBD 0x00A2 #CENT SIGN
0xBE 0x00A5 #YEN SIGN
0xBF 0x2510 #BOX DRAWINGS LIGHT DOWN AND LEFT
0xC0 0x2514 #BOX DRAWINGS LIGHT UP AND RIGHT
0xC1 0x2534 #BOX DRAWINGS LIGHT UP AND HORIZONTAL
0xC2 0x252C #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
0xC3 0x251C #BOX DRAWINGS LIGHT VERTICAL AND RIGHT
0xC4 0x2500 #BOX DRAWINGS LIGHT HORIZONTAL
0xC5 0x253C #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
0xC6 #UNDEFINED
0xC7 #UNDEFINED
0xC8 0x255A #BOX DRAWINGS DOUBLE UP AND RIGHT
0xC9 0x2554 #BOX DRAWINGS DOUBLE DOWN AND RIGHT
0xCA 0x2569 #BOX DRAWINGS DOUBLE UP AND HORIZONTAL
0xCB 0x2566 #BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
0xCC 0x2560 #BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
0xCD 0x2550 #BOX DRAWINGS DOUBLE HORIZONTAL
0xCE 0x256C #BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
0xCF 0x00A4 #CURRENCY SIGN
0xD0 #UNDEFINED
0xD1 #UNDEFINED
0xD2 #UNDEFINED
0xD3 #UNDEFINEDS
0xD4 #UNDEFINED
0xD5 #UNDEFINED
0xD6 #UNDEFINEDE
0xD7 #UNDEFINED
0xD8 #UNDEFINED
0xD9 0x2518 #BOX DRAWINGS LIGHT UP AND LEFT
0xDA 0x250C #BOX DRAWINGS LIGHT DOWN AND RIGHT
0xDB 0x2588 #FULL BLOCK
0xDC 0x2584 #LOWER HALF BLOCK
0xDD 0x00A6 #BROKEN BAR
0xDE #UNDEFINED
0xDF 0x2580 #UPPER HALF BLOCK
0xE0 #UNDEFINED
0xE1 #UNDEFINED
0xE2 #UNDEFINED
0xE3 #UNDEFINED
0xE4 #UNDEFINED
0xE5 #UNDEFINED
0xE6 0x00B5 #MICRO SIGN
0xE7 #UNDEFINED
0xE8 #UNDEFINED
0xE9 #UNDEFINED
0xEA #UNDEFINED
0xEB #UNDEFINED
0xEC #UNDEFINED
0xED #UNDEFINED
0xEE 0x00AF #MACRON
0xEF 0x00B4 #ACUTE ACCENT
0xF0 0x00AD #SOFT HYPHEN
0xF1 0x00B1 #PLUS-MINUS SIGN
0xF2 0x2017 #DOUBLE LOW LINE
0xF3 0x00BE #VULGAR FRACTION THREE QUARTERS
0xF4 0x00B6 #PILCROW SIGN
0xF5 0x00A7 #SECTION SIGN
0xF6 0x00F7 #DIVISION SIGN
0xF7 0x00B8 #CEDILLA
0xF8 0x00B0 #DEGREE SIGN
0xF9 0x00A8 #DIAERESIS
0xFA 0x00B7 #MIDDLE DOT
0xFB 0x00B9 #SUPERSCRIPT ONE
0xFC 0x00B3 #SUPERSCRIPT THREE
0xFD 0x00B2 #SUPERSCRIPT TWO
0xFE 0x25A0 #BLACK SQUARE
0xFF 0x00A0 #NO-BREAK SPACE

275
contrib/mappings/CP859.TXT Normal file
View File

@ -0,0 +1,275 @@
#
# Name: cp859_DOSLatin9 to Unicode table
# Unicode version: 2.0
# Table version: 2.00
# Table format: Format A
# Date: 04/24/96
# Contact: Shawn.Steele@microsoft.com
#
# General notes: none
#
# Format: Three tab-separated columns
# Column #1 is the cp859_DOSLatin9 code (in hex)
# Column #2 is the Unicode (in hex as 0xXXXX)
# Column #3 is the Unicode name (follows a comment sign, '#')
#
# The entries are in cp859_DOSLatin9 order
#
# DOSBox-X: This has been modified to reflect the actual character codes on IBM PC MS-DOS CP437
0x00 0x0000 #NULL
0x01 0x263A #START OF HEADING
0x02 0x263B #START OF TEXT
0x03 0x2665 #END OF TEXT
0x04 0x2666 #END OF TRANSMISSION
0x05 0x2663 #ENQUIRY
0x06 0x2660 #ACKNOWLEDGE
0x07 0x2022 #BELL
0x08 0x25D8 #BACKSPACE
0x09 0x25CB #HORIZONTAL TABULATION
0x0a 0x25D9 #LINE FEED
0x0b 0x2642 #VERTICAL TABULATION
0x0c 0x2640 #FORM FEED
0x0d 0x266A #CARRIAGE RETURN
0x0e 0x266B #SHIFT OUT
0x0f 0x263C #SHIFT IN
0x10 0x25BA #DATA LINK ESCAPE
0x11 0x25C4 #DEVICE CONTROL ONE
0x12 0x2195 #DEVICE CONTROL TWO
0x13 0x203C #DEVICE CONTROL THREE
0x14 0x00B6 #DEVICE CONTROL FOUR
0x15 0x00A7 #NEGATIVE ACKNOWLEDGE
0x16 0x25AC #SYNCHRONOUS IDLE
0x17 0x21A8 #END OF TRANSMISSION BLOCK
0x18 0x2191 #CANCEL
0x19 0x2193 #END OF MEDIUM
0x1a 0x2192 #SUBSTITUTE
0x1b 0x2190 #ESCAPE
0x1c 0x221F #FILE SEPARATOR
0x1d 0x2194 #GROUP SEPARATOR
0x1e 0x25B2 #RECORD SEPARATOR
0x1f 0x25BC #UNIT SEPARATOR
0x20 0x0020 #SPACE
0x21 0x0021 #EXCLAMATION MARK
0x22 0x0022 #QUOTATION MARK
0x23 0x0023 #NUMBER SIGN
0x24 0x0024 #DOLLAR SIGN
0x25 0x0025 #PERCENT SIGN
0x26 0x0026 #AMPERSAND
0x27 0x0027 #APOSTROPHE
0x28 0x0028 #LEFT PARENTHESIS
0x29 0x0029 #RIGHT PARENTHESIS
0x2a 0x002a #ASTERISK
0x2b 0x002b #PLUS SIGN
0x2c 0x002c #COMMA
0x2d 0x002d #HYPHEN-MINUS
0x2e 0x002e #FULL STOP
0x2f 0x002f #SOLIDUS
0x30 0x0030 #DIGIT ZERO
0x31 0x0031 #DIGIT ONE
0x32 0x0032 #DIGIT TWO
0x33 0x0033 #DIGIT THREE
0x34 0x0034 #DIGIT FOUR
0x35 0x0035 #DIGIT FIVE
0x36 0x0036 #DIGIT SIX
0x37 0x0037 #DIGIT SEVEN
0x38 0x0038 #DIGIT EIGHT
0x39 0x0039 #DIGIT NINE
0x3a 0x003a #COLON
0x3b 0x003b #SEMICOLON
0x3c 0x003c #LESS-THAN SIGN
0x3d 0x003d #EQUALS SIGN
0x3e 0x003e #GREATER-THAN SIGN
0x3f 0x003f #QUESTION MARK
0x40 0x0040 #COMMERCIAL AT
0x41 0x0041 #LATIN CAPITAL LETTER A
0x42 0x0042 #LATIN CAPITAL LETTER B
0x43 0x0043 #LATIN CAPITAL LETTER C
0x44 0x0044 #LATIN CAPITAL LETTER D
0x45 0x0045 #LATIN CAPITAL LETTER E
0x46 0x0046 #LATIN CAPITAL LETTER F
0x47 0x0047 #LATIN CAPITAL LETTER G
0x48 0x0048 #LATIN CAPITAL LETTER H
0x49 0x0049 #LATIN CAPITAL LETTER I
0x4a 0x004a #LATIN CAPITAL LETTER J
0x4b 0x004b #LATIN CAPITAL LETTER K
0x4c 0x004c #LATIN CAPITAL LETTER L
0x4d 0x004d #LATIN CAPITAL LETTER M
0x4e 0x004e #LATIN CAPITAL LETTER N
0x4f 0x004f #LATIN CAPITAL LETTER O
0x50 0x0050 #LATIN CAPITAL LETTER P
0x51 0x0051 #LATIN CAPITAL LETTER Q
0x52 0x0052 #LATIN CAPITAL LETTER R
0x53 0x0053 #LATIN CAPITAL LETTER S
0x54 0x0054 #LATIN CAPITAL LETTER T
0x55 0x0055 #LATIN CAPITAL LETTER U
0x56 0x0056 #LATIN CAPITAL LETTER V
0x57 0x0057 #LATIN CAPITAL LETTER W
0x58 0x0058 #LATIN CAPITAL LETTER X
0x59 0x0059 #LATIN CAPITAL LETTER Y
0x5a 0x005a #LATIN CAPITAL LETTER Z
0x5b 0x005b #LEFT SQUARE BRACKET
0x5c 0x005c #REVERSE SOLIDUS
0x5d 0x005d #RIGHT SQUARE BRACKET
0x5e 0x005e #CIRCUMFLEX ACCENT
0x5f 0x005f #LOW LINE
0x60 0x0060 #GRAVE ACCENT
0x61 0x0061 #LATIN SMALL LETTER A
0x62 0x0062 #LATIN SMALL LETTER B
0x63 0x0063 #LATIN SMALL LETTER C
0x64 0x0064 #LATIN SMALL LETTER D
0x65 0x0065 #LATIN SMALL LETTER E
0x66 0x0066 #LATIN SMALL LETTER F
0x67 0x0067 #LATIN SMALL LETTER G
0x68 0x0068 #LATIN SMALL LETTER H
0x69 0x0069 #LATIN SMALL LETTER I
0x6a 0x006a #LATIN SMALL LETTER J
0x6b 0x006b #LATIN SMALL LETTER K
0x6c 0x006c #LATIN SMALL LETTER L
0x6d 0x006d #LATIN SMALL LETTER M
0x6e 0x006e #LATIN SMALL LETTER N
0x6f 0x006f #LATIN SMALL LETTER O
0x70 0x0070 #LATIN SMALL LETTER P
0x71 0x0071 #LATIN SMALL LETTER Q
0x72 0x0072 #LATIN SMALL LETTER R
0x73 0x0073 #LATIN SMALL LETTER S
0x74 0x0074 #LATIN SMALL LETTER T
0x75 0x0075 #LATIN SMALL LETTER U
0x76 0x0076 #LATIN SMALL LETTER V
0x77 0x0077 #LATIN SMALL LETTER W
0x78 0x0078 #LATIN SMALL LETTER X
0x79 0x0079 #LATIN SMALL LETTER Y
0x7a 0x007a #LATIN SMALL LETTER Z
0x7b 0x007b #LEFT CURLY BRACKET
0x7c 0x007c #VERTICAL LINE
0x7d 0x007d #RIGHT CURLY BRACKET
0x7e 0x007e #TILDE
0x7f 0x007f #DELETE
0x80 0x00c7 #LATIN CAPITAL LETTER C WITH CEDILLA
0x81 0x00fc #LATIN SMALL LETTER U WITH DIAERESIS
0x82 0x00e9 #LATIN SMALL LETTER E WITH ACUTE
0x83 0x00e2 #LATIN SMALL LETTER A WITH CIRCUMFLEX
0x84 0x00e4 #LATIN SMALL LETTER A WITH DIAERESIS
0x85 0x00e0 #LATIN SMALL LETTER A WITH GRAVE
0x86 0x00e5 #LATIN SMALL LETTER A WITH RING ABOVE
0x87 0x00e7 #LATIN SMALL LETTER C WITH CEDILLA
0x88 0x00ea #LATIN SMALL LETTER E WITH CIRCUMFLEX
0x89 0x00eb #LATIN SMALL LETTER E WITH DIAERESIS
0x8a 0x00e8 #LATIN SMALL LETTER E WITH GRAVE
0x8b 0x00ef #LATIN SMALL LETTER I WITH DIAERESIS
0x8c 0x00ee #LATIN SMALL LETTER I WITH CIRCUMFLEX
0x8d 0x00ec #LATIN SMALL LETTER I WITH GRAVE
0x8e 0x00c4 #LATIN CAPITAL LETTER A WITH DIAERESIS
0x8f 0x00c5 #LATIN CAPITAL LETTER A WITH RING ABOVE
0x90 0x00c9 #LATIN CAPITAL LETTER E WITH ACUTE
0x91 0x00e6 #LATIN SMALL LIGATURE AE
0x92 0x00c6 #LATIN CAPITAL LIGATURE AE
0x93 0x00f4 #LATIN SMALL LETTER O WITH CIRCUMFLEX
0x94 0x00f6 #LATIN SMALL LETTER O WITH DIAERESIS
0x95 0x00f2 #LATIN SMALL LETTER O WITH GRAVE
0x96 0x00fb #LATIN SMALL LETTER U WITH CIRCUMFLEX
0x97 0x00f9 #LATIN SMALL LETTER U WITH GRAVE
0x98 0x00ff #LATIN SMALL LETTER Y WITH DIAERESIS
0x99 0x00d6 #LATIN CAPITAL LETTER O WITH DIAERESIS
0x9a 0x00dc #LATIN CAPITAL LETTER U WITH DIAERESIS
0x9b 0x00f8 #LATIN SMALL LETTER O WITH STROKE
0x9c 0x00a3 #POUND SIGN
0x9d 0x00d8 #LATIN CAPITAL LETTER O WITH STROKE
0x9e 0x00d7 #MULTIPLICATION SIGN
0x9f 0x0192 #LATIN SMALL LETTER F WITH HOOK
0xa0 0x00e1 #LATIN SMALL LETTER A WITH ACUTE
0xa1 0x00ed #LATIN SMALL LETTER I WITH ACUTE
0xa2 0x00f3 #LATIN SMALL LETTER O WITH ACUTE
0xa3 0x00fa #LATIN SMALL LETTER U WITH ACUTE
0xa4 0x00f1 #LATIN SMALL LETTER N WITH TILDE
0xa5 0x00d1 #LATIN CAPITAL LETTER N WITH TILDE
0xa6 0x00aa #FEMININE ORDINAL INDICATOR
0xa7 0x00ba #MASCULINE ORDINAL INDICATOR
0xa8 0x00bf #INVERTED QUESTION MARK
0xa9 0x00ae #REGISTERED SIGN
0xaa 0x00ac #NOT SIGN
0xab 0x0153 #
0xac 0x0152 #
0xad 0x00a1 #INVERTED EXCLAMATION MARK
0xae 0x00ab #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
0xaf 0x00bb #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
0xb0 0x2591 #LIGHT SHADE
0xb1 0x2592 #MEDIUM SHADE
0xb2 0x2593 #DARK SHADE
0xb3 0x2502 #BOX DRAWINGS LIGHT VERTICAL
0xb4 0x2524 #BOX DRAWINGS LIGHT VERTICAL AND LEFT
0xb5 0x00c1 #LATIN CAPITAL LETTER A WITH ACUTE
0xb6 0x00c2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX
0xb7 0x00c0 #LATIN CAPITAL LETTER A WITH GRAVE
0xb8 0x00a9 #COPYRIGHT SIGN
0xb9 0x2563 #BOX DRAWINGS DOUBLE VERTICAL AND LEFT
0xba 0x2551 #BOX DRAWINGS DOUBLE VERTICAL
0xbb 0x2557 #BOX DRAWINGS DOUBLE DOWN AND LEFT
0xbc 0x255d #BOX DRAWINGS DOUBLE UP AND LEFT
0xbd 0x00a2 #CENT SIGN
0xbe 0x00a5 #YEN SIGN
0xbf 0x2510 #BOX DRAWINGS LIGHT DOWN AND LEFT
0xc0 0x2514 #BOX DRAWINGS LIGHT UP AND RIGHT
0xc1 0x2534 #BOX DRAWINGS LIGHT UP AND HORIZONTAL
0xc2 0x252c #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
0xc3 0x251c #BOX DRAWINGS LIGHT VERTICAL AND RIGHT
0xc4 0x2500 #BOX DRAWINGS LIGHT HORIZONTAL
0xc5 0x253c #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
0xc6 0x00e3 #LATIN SMALL LETTER A WITH TILDE
0xc7 0x00c3 #LATIN CAPITAL LETTER A WITH TILDE
0xc8 0x255a #BOX DRAWINGS DOUBLE UP AND RIGHT
0xc9 0x2554 #BOX DRAWINGS DOUBLE DOWN AND RIGHT
0xca 0x2569 #BOX DRAWINGS DOUBLE UP AND HORIZONTAL
0xcb 0x2566 #BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
0xcc 0x2560 #BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
0xcd 0x2550 #BOX DRAWINGS DOUBLE HORIZONTAL
0xce 0x256c #BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
0xcf 0x00a4 #CURRENCY SIGN
0xd0 0x00f0 #LATIN SMALL LETTER ETH
0xd1 0x00d0 #LATIN CAPITAL LETTER ETH
0xd2 0x00ca #LATIN CAPITAL LETTER E WITH CIRCUMFLEX
0xd3 0x00cb #LATIN CAPITAL LETTER E WITH DIAERESIS
0xd4 0x00c8 #LATIN CAPITAL LETTER E WITH GRAVE
0xd5 0x20ac #
0xd6 0x00cd #LATIN CAPITAL LETTER I WITH ACUTE
0xd7 0x00ce #LATIN CAPITAL LETTER I WITH CIRCUMFLEX
0xd8 0x00cf #LATIN CAPITAL LETTER I WITH DIAERESIS
0xd9 0x2518 #BOX DRAWINGS LIGHT UP AND LEFT
0xda 0x250c #BOX DRAWINGS LIGHT DOWN AND RIGHT
0xdb 0x2588 #FULL BLOCK
0xdc 0x2584 #LOWER HALF BLOCK
0xdd 0x0160 #
0xde 0x00cc #LATIN CAPITAL LETTER I WITH GRAVE
0xdf 0x2580 #UPPER HALF BLOCK
0xe0 0x00d3 #LATIN CAPITAL LETTER O WITH ACUTE
0xe1 0x00df #LATIN SMALL LETTER SHARP S
0xe2 0x00d4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX
0xe3 0x00d2 #LATIN CAPITAL LETTER O WITH GRAVE
0xe4 0x00f5 #LATIN SMALL LETTER O WITH TILDE
0xe5 0x00d5 #LATIN CAPITAL LETTER O WITH TILDE
0xe6 0x00b5 #MICRO SIGN
0xe7 0x00fe #LATIN SMALL LETTER THORN
0xe8 0x00de #LATIN CAPITAL LETTER THORN
0xe9 0x00da #LATIN CAPITAL LETTER U WITH ACUTE
0xea 0x00db #LATIN CAPITAL LETTER U WITH CIRCUMFLEX
0xeb 0x00d9 #LATIN CAPITAL LETTER U WITH GRAVE
0xec 0x00fd #LATIN SMALL LETTER Y WITH ACUTE
0xed 0x00dd #LATIN CAPITAL LETTER Y WITH ACUTE
0xee 0x00af #MACRON
0xef 0x017d #
0xf0 0x00ad #SOFT HYPHEN
0xf1 0x00b1 #PLUS-MINUS SIGN
0xf2 #UNDEFINED
0xf3 0x0178 #
0xf4 0x00b6 #PILCROW SIGN
0xf5 0x00a7 #SECTION SIGN
0xf6 0x00f7 #DIVISION SIGN
0xf7 0x017e #
0xf8 0x00b0 #DEGREE SIGN
0xf9 0x0161 #
0xfa 0x00b7 #MIDDLE DOT
0xfb 0x00b9 #SUPERSCRIPT ONE
0xfc 0x00b3 #SUPERSCRIPT THREE
0xfd 0x00b2 #SUPERSCRIPT TWO
0xfe 0x25a0 #BLACK SQUARE
0xff 0x00a0 #NO-BREAK SPACE


View File

@ -7,8 +7,10 @@
./sb2u.pl cp852_to_unicode <CP852.TXT >../../include/cp852_uni.h || exit 1
./sb2u.pl cp853_to_unicode <CP853.TXT >../../include/cp853_uni.h || exit 1
./sb2u.pl cp855_to_unicode <CP855.TXT >../../include/cp855_uni.h || exit 1
./sb2u.pl cp856_to_unicode <CP856.TXT >../../include/cp856_uni.h || exit 1
./sb2u.pl cp857_to_unicode <CP857.TXT >../../include/cp857_uni.h || exit 1
./sb2u.pl cp858_to_unicode <CP858.TXT >../../include/cp858_uni.h || exit 1
./sb2u.pl cp859_to_unicode <CP859.TXT >../../include/cp859_uni.h || exit 1
./sb2u.pl cp860_to_unicode <CP860.TXT >../../include/cp860_uni.h || exit 1
./sb2u.pl cp861_to_unicode <CP861.TXT >../../include/cp861_uni.h || exit 1
./sb2u.pl cp862_to_unicode <CP862.TXT >../../include/cp862_uni.h || exit 1

View File

@ -2151,11 +2151,11 @@ CHCP [nnn [file]]
Supported code pages for changing in the TrueType font output:
437,737,775,808,850,852,853,855,857,858,860-866,869,872,874,3021
437, 737, 775, 808, 850, 852, 853, 855-866, 869, 872, 874, 3021
Windows code pages: 1250,1251,1252,1253,1254,1255,1256,1257,1258
Also double-byte code pages including 932, 936, 949, and 950.
Also double-byte code pages including 932, 936, 949, and 950/951.
Customized code pages are supported by providing code page files.
@ -2887,6 +2887,15 @@ EMM386 emulation
:MENU:dos_ems_false
Disable EMS emulation
.
:MENU:DOSDiskRateMenu
Limit disk transfer speed
.
:MENU:limit_hdd_rate
Limit hard disk data rate
.
:MENU:limit_floppy_rate
Limit floppy disk data rate
.
:MENU:DOSWinMenu
Host system applications
.

View File

@ -2148,11 +2148,11 @@ CHCP [nnn]
Códigos de página compatibles para la salida de fuente TrueType:
437,737,775,808,850,852,853,855,857,858,860-866,869,872,874,3021
437, 737, 775, 808, 850, 852, 853, 855-866, 869, 872, 874, 3021
Páginas de códigos de Windows: 1250,1251,1252,1253,1254,1255,1256,1257,1258
También páginas de códigos de doble byte incluyendo 932,936,949,950.
También páginas de códigos de doble byte incluyendo 932,936,949,950/951.
Las páginas de códigos personalizadas son compatibles al proporcionar archivos de páginas de códigos.
@ -2892,6 +2892,15 @@ Emulación de EMM386
:MENU:dos_ems_false
Desactivar emulación de EMS
.
:MENU:DOSDiskRateMenu
Limitar la velocidad de transferencia del disco
.
:MENU:limit_hdd_rate
Limite la tasa de datos del disco duro
.
:MENU:limit_floppy_rate
Limite la velocidad de datos del disquete
.
:MENU:DOSWinMenu
Aplicaciones de host
.

View File

@ -1,5 +1,5 @@
:DOSBOX-X:LANGUAGE:French (France)
:DOSBOX-X:CODEPAGE:858
:DOSBOX-X:CODEPAGE:859
:DOSBOX-X:VERSION:0.84.2
:DOSBOX-X:REMARK:
:AUTOEXEC_CONFIGFILE_HELP
@ -2155,11 +2155,11 @@ CHCP [nnn [fichier]]
Pages de code prises en charge pour être modifiées dans la sortie
de la police TrueType :
437,737,775,808,850,852,853,855,857,858,860-866,869,872,874,3021
437, 737, 775, 808, 850, 852, 853, 855-866, 869, 872, 874, 3021
Pages de codes Windows: 1250,1251,1252,1253,1254,1255,1256,1257,1258
Également des pages de code à double octet, notamment 932, 936, 949 et 950.
Également des pages de code à double octet, notamment 932, 936, 949 et 950/951.
Les pages de codes personnalisées sont prises en charge en fournissant des fichiers de pages de codes.
@ -2893,6 +2893,15 @@ Activer l'émulation EMS
:MENU:dos_ems_false
Désactiver l'émulation EMS
.
:MENU:DOSDiskRateMenu
Limiter la vitesse de transfert du disque
.
:MENU:limit_hdd_rate
Limiter le débit de données du disque dur
.
:MENU:limit_floppy_rate
Limiter le débit de données des disquettes
.
:MENU:DOSWinMenu
Applications du système hôte
.

View File

@ -2138,11 +2138,11 @@ CHCP [nnn [file]]
TrueType フォント出力への変更をサポートするコードページ:
437,737,775,808,850,852,853,855,857,858,860-866,869,872,874,3021
437, 737, 775, 808, 850, 852, 853, 855-866, 869, 872, 874, 3021
Windows コードページ: 1250,1251,1252,1253,1254,1255,1256,1257,1258
932, 936, 949, 950 等の2バイト言語のコードページもサポートします。
932, 936, 949, 950/951 等の2バイト言語のコードページもサポートします。
カスタマイズされたコードページは、コードページファイルを提供することでサポートされます。
@ -2875,6 +2875,15 @@ EMM386 エミュレーション
:MENU:dos_ems_false
EMS エミュレーション:無効
.
:MENU:DOSDiskRateMenu
ディスク転送速度を制限する
.
:MENU:limit_hdd_rate
ハードディスクのデータレートを制限する
.
:MENU:limit_floppy_rate
フロッピーディスクのデータレートを制限する
.
:MENU:DOSWinMenu
ホストシステムのアプリケーション
.

View File

@ -2152,11 +2152,11 @@ CHCP [nnn [file]]
TrueType 글꼴 출력에 대한 변경을 지원하는 코드 페이지:
437,737,775,808,850,852,853,855,857,858,860-866,869,872,874,3021
437, 737, 775, 808, 850, 852, 853, 855-866, 869, 872, 874, 3021
윈도우즈 코드 페이지: 1250,1251,1252,1253,1254,1255,1256,1257,1258
932, 936, 949, 950 등의 2바이트 언어 코드 페이지도 지원합니다.
932, 936, 949, 950/951 등의 2바이트 언어 코드 페이지도 지원합니다.
맞춤 코드 페이지는 코드 페이지 파일을 제공함으로써 지원됩니다.
@ -2888,6 +2888,15 @@ EMM386 에뮬레이션
:MENU:dos_ems_false
EMS 에뮬레이션 : 비활성화
.
:MENU:DOSDiskRateMenu
디스크 전송 속도 제한
.
:MENU:limit_hdd_rate
하드 디스크 데이터 속도 제한
.
:MENU:limit_floppy_rate
플로피 디스크 데이터 속도 제한
.
:MENU:DOSWinMenu
호스트 시스템 응용 프로그램
.

View File

@ -194,7 +194,7 @@ Nome do idioma (opcional):
:INTRO_MESSAGE
Bem-vindo ao DOSBox-X, um emulador de DOS completo e livre.
O DOSBox-X cria um console DOS que funciona como um DOS real.
Você também pode executar o Windows 3.x e 9x/Me dentro da máquina DOS.
Você também pode executar o Windows 3.x/9x/Me dentro da máquina DOS.
.
:DRIVE
Unidade
@ -2172,11 +2172,11 @@ CHCP [nnn [arquivo]]
Páginas de código compatíveis para a saída de fonte TrueType:
437,737,775,808,850,852,853,855,857,858,860-866,869,872,874,3021
437, 737, 775, 808, 850, 852, 853, 855-866, 869, 872, 874, 3021
Páginas de códigos do Windows: 1250,1251,1252,1253,1254,1255,1256,1257,1258
Também páginas de códigos de duplo byte includindo 932,936,949,950.
Também páginas de códigos de duplo byte includindo 932,936,949,950/951.
As páginas de códigos personalizadas são compatíveis ao proporcionar
arquivos de páginas de códigos.
@ -2910,6 +2910,15 @@ Emulação de EMM386
:MENU:dos_ems_false
Desativar emulação de EMS
.
:MENU:DOSDiskRateMenu
Limitar a velocidade de transferência do disco
.
:MENU:limit_hdd_rate
Limitar a taxa de dados do disco rígido
.
:MENU:limit_floppy_rate
Limitar a taxa de dados do disquete
.
:MENU:DOSWinMenu
Aplicativos do sistema anfitrião
.

View File

@ -194,7 +194,7 @@ Dil adı (isteğe bağlı):
:INTRO_MESSAGE
Ücretsiz ve çok işlevli bir DOS öykünme paketi olan DOSBox-X'e hoş geldiniz.
DOSBox-X, bildiğiniz DOS istemine benzeyen bir DOS kabuğu oluşturur.
Bu kabuk içinde aynı zamanda Windows 3.x, 9x ve Me de çalıştırabilirsiniz.
Bu kabuk içinde aynı zamanda Windows 3.x/9x/Me de çalıştırabilirsiniz.
.
:DRIVE
Sürücü
@ -2152,11 +2152,11 @@ CHCP [nnn [dosya]]
TrueType yazıtipi çıktısında desteklenen kod sayfaları aşağıdaki gibidir:
437,737,775,808,850,852,853,855,857,858,860-866,869,872,874,3021
437, 737, 775, 808, 850, 852, 853, 855-866, 869, 872, 874, 3021
Windows kod sayfaları: 1250,1251,1252,1253,1254,1255,1256,1257,1258
Ek olarak 932, 936, 949 ve 950 numaralı çoklu bit kod sayfaları da desteklenir.
Ek olarak 932, 936, 949 ve 950/951 numaralı çoklu bit kod sayfaları da desteklenir.
Özel kod sayfaları, kod sayfası dosyaları sağlanarak desteklenir.
@ -2888,6 +2888,15 @@ EMM386 öykünmesi
:MENU:dos_ems_false
Genişletilmiş bellek öykünmesini devre dışı bırak
.
:MENU:DOSDiskRateMenu
Disk aktarım hızını sınırlayın
.
:MENU:limit_hdd_rate
Sabit disk veri hızını sınırlayın
.
:MENU:limit_floppy_rate
Disket veri hızını sınırla
.
:MENU:DOSWinMenu
Ana sistem uygulamaları
.

View File

@ -2089,11 +2089,11 @@ CHCP [nnn [文件]]
TrueType 字体输出方式所支持的代码页包括:
437,737,775,808,850,852,853,855,857,858,860-866,869,872,874,3021
437, 737, 775, 808, 850, 852, 853, 855-866, 869, 872, 874, 3021
Windows 代码页: 1250,1251,1252,1253,1254,1255,1256,1257,1258
以及双字节代码页,包括: 932, 936, 949, 950
以及双字节代码页,包括: 932, 936, 949, 950/951
通过提供代码页文件支持自定义代码页.
@ -2853,6 +2853,15 @@ EMM386 模拟
:MENU:dos_ems_false
禁用 EMS 内存模拟
.
:MENU:DOSDiskRateMenu
限制磁盘传输速度
.
:MENU:limit_hdd_rate
限制硬盘数据速率
.
:MENU:limit_floppy_rate
限制软盘数据速率
.
:MENU:DOSWinMenu
主机系统程序
.

View File

@ -2093,11 +2093,11 @@ CHCP [nnn [檔案]]
在 TrueType 字型輸出方式所支援變更的字碼頁包括:
437,737,775,808,850,852,853,855,857,858,860-866,869,872,874,3021
437, 737, 775, 808, 850, 852, 853, 855-866, 869, 872, 874, 3021
Windows 字碼頁: 1250,1251,1252,1253,1254,1255,1256,1257,1258
以及雙位元組字碼頁, 包括: 932, 936, 949, 950
以及雙位元組字碼頁, 包括: 932, 936, 949, 950/951
通過提供字碼頁檔案支援自訂字碼頁.
@ -2860,6 +2860,15 @@ EMM386 模擬
:MENU:dos_ems_false
停用 EMS 模擬
.
:MENU:DOSDiskRateMenu
限制磁碟傳輸速度
.
:MENU:limit_hdd_rate
限制硬碟數據速率
.
:MENU:limit_floppy_rate
限制軟碟數據速率
.
:MENU:DOSWinMenu
主機系統應用程式
.

View File

@ -597,11 +597,32 @@ begin
if (PageLang.Values[8]) and FileExists(ExpandConstant('{app}\languages\tr_TR.lng')) then
FileLines[i] := linetmp+' tr_TR';
end;
if (CompareText(linetmp, 'keyboardlayout') = 0) and (CompareText(section, 'dos') = 0) then
begin
linetmp := Trim(Copy(line, 1, Pos('=', line)));
if (PageLang.Values[1]) then
FileLines[i] := linetmp+' fr';
if (PageLang.Values[2]) then
FileLines[i] := linetmp+' jp';
if (PageLang.Values[3]) then
FileLines[i] := linetmp+' ko';
if (PageLang.Values[4]) then
FileLines[i] := linetmp+' br';
if (PageLang.Values[5]) then
FileLines[i] := linetmp+' cn';
if (PageLang.Values[6]) then
FileLines[i] := linetmp+' sp';
if (PageLang.Values[7]) then
FileLines[i] := linetmp+' tw';
if (PageLang.Values[8]) then
FileLines[i] := linetmp+' tr';
break;
end;
if (CompareText(linetmp, 'country') = 0) and (CompareText(section, 'config') = 0) then
begin
linetmp := Trim(Copy(line, 1, Pos('=', line)));
if (PageLang.Values[1]) then
FileLines[i] := linetmp+' 33,858';
FileLines[i] := linetmp+' 33,859';
if (PageLang.Values[2]) then
FileLines[i] := linetmp+' 81,932';
if (PageLang.Values[3]) then

35
include/cp856_uni.h Normal file
View File

@ -0,0 +1,35 @@
/* single-byte charset to unicode. 0x0000 means no mapping */
const uint16_t cp856_to_unicode[256] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, /* 0x00-0x07 */
0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x000e,0x000f, /* 0x08-0x0F */
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, /* 0x10-0x17 */
0x0018,0x0019,0x001a,0x001b,0x001c,0x001d,0x001e,0x001f, /* 0x18-0x1F */
0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, /* 0x20-0x27 */
0x0028,0x0029,0x002a,0x002b,0x002c,0x002d,0x002e,0x002f, /* 0x28-0x2F */
0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, /* 0x30-0x37 */
0x0038,0x0039,0x003a,0x003b,0x003c,0x003d,0x003e,0x003f, /* 0x38-0x3F */
0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, /* 0x40-0x47 */
0x0048,0x0049,0x004a,0x004b,0x004c,0x004d,0x004e,0x004f, /* 0x48-0x4F */
0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, /* 0x50-0x57 */
0x0058,0x0059,0x005a,0x005b,0x005c,0x005d,0x005e,0x005f, /* 0x58-0x5F */
0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, /* 0x60-0x67 */
0x0068,0x0069,0x006a,0x006b,0x006c,0x006d,0x006e,0x006f, /* 0x68-0x6F */
0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, /* 0x70-0x77 */
0x0078,0x0079,0x007a,0x007b,0x007c,0x007d,0x007e,0x007f, /* 0x78-0x7F */
0x05d0,0x05d1,0x05d2,0x05d3,0x05d4,0x05d5,0x05d6,0x05d7, /* 0x80-0x87 */
0x05d8,0x05d9,0x05da,0x05db,0x05dc,0x05dd,0x05de,0x05df, /* 0x88-0x8F */
0x05e0,0x05e1,0x05e2,0x05e3,0x05e4,0x05e5,0x05e6,0x05e7, /* 0x90-0x97 */
0x05e8,0x05e9,0x05ea,0x0000,0x00a3,0x0000,0x00d7,0x0000, /* 0x98-0x9F */
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, /* 0xA0-0xA7 */
0x0000,0x00ae,0x00ac,0x00bd,0x00bc,0x0000,0x00ab,0x00bb, /* 0xA8-0xAF */
0x2591,0x2592,0x2593,0x2502,0x2524,0x0000,0x0000,0x0000, /* 0xB0-0xB7 */
0x00a9,0x2563,0x2551,0x2557,0x255d,0x00a2,0x00a5,0x2510, /* 0xB8-0xBF */
0x2514,0x2534,0x252c,0x251c,0x2500,0x253c,0x0000,0x0000, /* 0xC0-0xC7 */
0x255a,0x2554,0x2569,0x2566,0x2560,0x2550,0x256c,0x00a4, /* 0xC8-0xCF */
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, /* 0xD0-0xD7 */
0x0000,0x2518,0x250c,0x2588,0x2584,0x00a6,0x0000,0x2580, /* 0xD8-0xDF */
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x00b5,0x0000, /* 0xE0-0xE7 */
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x00af,0x00b4, /* 0xE8-0xEF */
0x00ad,0x00b1,0x2017,0x00be,0x00b6,0x00a7,0x00f7,0x00b8, /* 0xF0-0xF7 */
0x00b0,0x00a8,0x00b7,0x00b9,0x00b3,0x00b2,0x25a0,0x00a0 /* 0xF8-0xFF */
};

35
include/cp859_uni.h Normal file
View File

@ -0,0 +1,35 @@
/* single-byte charset to unicode. 0x0000 means no mapping */
const uint16_t cp859_to_unicode[256] = {
0x0000,0x263a,0x263b,0x2665,0x2666,0x2663,0x2660,0x2022, /* 0x00-0x07 */
0x25d8,0x25cb,0x25d9,0x2642,0x2640,0x266a,0x266b,0x263c, /* 0x08-0x0F */
0x25ba,0x25c4,0x2195,0x203c,0x00b6,0x00a7,0x25ac,0x21a8, /* 0x10-0x17 */
0x2191,0x2193,0x2192,0x2190,0x221f,0x2194,0x25b2,0x25bc, /* 0x18-0x1F */
0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, /* 0x20-0x27 */
0x0028,0x0029,0x002a,0x002b,0x002c,0x002d,0x002e,0x002f, /* 0x28-0x2F */
0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, /* 0x30-0x37 */
0x0038,0x0039,0x003a,0x003b,0x003c,0x003d,0x003e,0x003f, /* 0x38-0x3F */
0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047, /* 0x40-0x47 */
0x0048,0x0049,0x004a,0x004b,0x004c,0x004d,0x004e,0x004f, /* 0x48-0x4F */
0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057, /* 0x50-0x57 */
0x0058,0x0059,0x005a,0x005b,0x005c,0x005d,0x005e,0x005f, /* 0x58-0x5F */
0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067, /* 0x60-0x67 */
0x0068,0x0069,0x006a,0x006b,0x006c,0x006d,0x006e,0x006f, /* 0x68-0x6F */
0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, /* 0x70-0x77 */
0x0078,0x0079,0x007a,0x007b,0x007c,0x007d,0x007e,0x007f, /* 0x78-0x7F */
0x00c7,0x00fc,0x00e9,0x00e2,0x00e4,0x00e0,0x00e5,0x00e7, /* 0x80-0x87 */
0x00ea,0x00eb,0x00e8,0x00ef,0x00ee,0x00ec,0x00c4,0x00c5, /* 0x88-0x8F */
0x00c9,0x00e6,0x00c6,0x00f4,0x00f6,0x00f2,0x00fb,0x00f9, /* 0x90-0x97 */
0x00ff,0x00d6,0x00dc,0x00f8,0x00a3,0x00d8,0x00d7,0x0192, /* 0x98-0x9F */
0x00e1,0x00ed,0x00f3,0x00fa,0x00f1,0x00d1,0x00aa,0x00ba, /* 0xA0-0xA7 */
0x00bf,0x00ae,0x00ac,0x0153,0x0152,0x00a1,0x00ab,0x00bb, /* 0xA8-0xAF */
0x2591,0x2592,0x2593,0x2502,0x2524,0x00c1,0x00c2,0x00c0, /* 0xB0-0xB7 */
0x00a9,0x2563,0x2551,0x2557,0x255d,0x00a2,0x00a5,0x2510, /* 0xB8-0xBF */
0x2514,0x2534,0x252c,0x251c,0x2500,0x253c,0x00e3,0x00c3, /* 0xC0-0xC7 */
0x255a,0x2554,0x2569,0x2566,0x2560,0x2550,0x256c,0x00a4, /* 0xC8-0xCF */
0x00f0,0x00d0,0x00ca,0x00cb,0x00c8,0x20ac,0x00cd,0x00ce, /* 0xD0-0xD7 */
0x00cf,0x2518,0x250c,0x2588,0x2584,0x0160,0x00cc,0x2580, /* 0xD8-0xDF */
0x00d3,0x00df,0x00d4,0x00d2,0x00f5,0x00d5,0x00b5,0x00fe, /* 0xE0-0xE7 */
0x00de,0x00da,0x00db,0x00d9,0x00fd,0x00dd,0x00af,0x017d, /* 0xE8-0xEF */
0x00ad,0x00b1,0x0000,0x0178,0x00b6,0x00a7,0x00f7,0x017e, /* 0xF0-0xF7 */
0x00b0,0x0161,0x00b7,0x00b9,0x00b3,0x00b2,0x25a0,0x00a0 /* 0xF8-0xFF */
};

View File

@ -56,6 +56,9 @@ static size_t dev_con_pos=0,dev_con_max=0;
static unsigned char dev_con_readbuf[64];
extern bool CheckHat(uint8_t code);
extern bool inshell;
#if defined(USE_TTF)
extern bool ttf_dosv;
#endif
uint8_t DefaultANSIAttr() {
return IS_PC98_ARCH ? 0xE1 : 0x07;
@ -691,10 +694,6 @@ public:
// Section 4-8.
//
// The PDF documents ANSI codes defined on PC-98, which may or may not be a complete listing.
#if defined(USE_TTF)
extern bool ttf_dosv;
#endif
bool device_CON::Read(uint8_t * data,uint16_t * size) {
uint16_t oldax=reg_ax;
uint16_t count=0;

View File

@ -38,6 +38,7 @@
#include "regs.h"
#include "timer.h"
#include "menu.h"
#include "menudef.h"
#include "mapper.h"
#include "drives.h"
#include "setup.h"
@ -68,6 +69,7 @@ extern std::string log_dev_con_str;
extern const char* RunningProgram;
extern bool use_quick_reboot, j3100_start;
extern bool enable_config_as_shell_commands;
extern bool checkwat, loadlang, pcibus_enable;
extern bool log_int21, log_fileio, pipetmpdev;
#if defined(USE_TTF)
extern bool ttf_dosv;
@ -158,7 +160,14 @@ Bitu XMS_EnableA20(bool enable);
Bitu XMS_GetEnabledA20(void);
bool XMS_IS_ACTIVE();
bool XMS_HMA_EXISTS();
void MSG_Init(void);
void JFONT_Init(void);
void SetNumLock(void);
void InitFontHandle(void);
void ShutFontHandle(void);
void DOSBox_SetSysMenu(void);
void runRescan(const char *str);
bool GFX_GetPreventFullscreen(void);
bool DOS_IS_IN_HMA() {
if (dos_in_hma && XMS_IS_ACTIVE() && XMS_HMA_EXISTS())
@ -2711,7 +2720,7 @@ static Bitu DOS_21Handler(void) {
reg_ax = dos.errorcode;
break;
}
if (!isSupportedCP(reg_bx))
if (!isSupportedCP(reg_bx) || IS_PC98_ARCH || IS_JEGA_ARCH || IS_DOSV)
{
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:Invalid codepage %d", reg_bx);
CALLBACK_SCF(true);
@ -2723,7 +2732,32 @@ static Bitu DOS_21Handler(void) {
#if defined(USE_TTF)
setTTFCodePage();
#endif
if (loadlang) {
MSG_Init();
#if DOSBOXMENU_TYPE == DOSBOXMENU_HMENU
mainMenu.unbuild();
mainMenu.rebuild();
if (!GFX_GetPreventFullscreen()) {
if (menu.toggle) DOSBox_SetMenu(); else DOSBox_NoMenu();
}
#endif
DOSBox_SetSysMenu();
}
if (isDBCSCP()) {
ShutFontHandle();
InitFontHandle();
JFONT_Init();
Section_prop * ttf_section = static_cast<Section_prop *>(control->GetSection("ttf"));
const char *font = ttf_section->Get_string("font");
if (!font || !*font) {
ttf_reset();
#if C_PRINTER
if (printfont) UpdateDefaultPrinterFont();
#endif
}
}
SetupDBCSTable();
runRescan("-A -Q");
CALLBACK_SCF(false);
break;
default:
@ -3839,8 +3873,6 @@ public:
::disk_data_rate = section->Get_int("hard drive data rate limit");
::floppy_data_rate = section->Get_int("floppy drive data rate limit");
if (::disk_data_rate < 0) {
extern bool pcibus_enable;
if (pcibus_enable)
::disk_data_rate = 8333333; /* Probably an average IDE data rate for mid 1990s PCI IDE controllers in PIO mode */
else
@ -4404,6 +4436,8 @@ public:
mainMenu.get_item("enable_a20gate").enable(true).refresh_item(mainMenu);
mainMenu.get_item("quick_reboot").check(use_quick_reboot).refresh_item(mainMenu);
mainMenu.get_item("shell_config_commands").check(enable_config_as_shell_commands).enable(true).refresh_item(mainMenu);
mainMenu.get_item("limit_hdd_rate").check(::disk_data_rate).enable(true).refresh_item(mainMenu);
mainMenu.get_item("limit_floppy_rate").check(::floppy_data_rate).enable(true).refresh_item(mainMenu);
#if defined(WIN32) && !defined(HX_DOS)
mainMenu.get_item("dos_win_autorun").check(winautorun).enable(true).refresh_item(mainMenu);
#endif
@ -4976,7 +5010,6 @@ void DOS_Int21_7156(char *name1, char *name2) {
}
}
extern bool checkwat;
void DOS_Int21_7160(char *name1, char *name2) {
MEM_StrCopy(SegPhys(ds)+reg_si,name1+1,DOSNAMEBUF);
if (*(name1+1)>=0 && *(name1+1)<32) {

View File

@ -1697,7 +1697,7 @@ void DOS_KeyboardLayout_Init() {
static const std::set<int> supportedCodepages =
{
437, 737, 775, 808, 850, 852, 853, 855, 857, 858, 860, 861, 862, 863, 864, 865, 866, 869, 872, 874,
437, 737, 775, 808, 850, 852, 853, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 869, 872, 874,
932, 936, 949, 950, 951, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 3021
};

View File

@ -102,7 +102,7 @@ bool qmount = false;
bool nowarn = false;
bool CodePageHostToGuestUTF8(char *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/), CodePageHostToGuestUTF16(char *d/*CROSS_LEN*/,const uint16_t *s/*CROSS_LEN*/);
extern bool systemmessagebox(char const * aTitle, char const * aMessage, char const * aDialogType, char const * aIconType, int aDefaultButton);
extern bool addovl, addipx, addne2k, prepared, inshell, usecon, uao, morelen, mountfro[26], mountiro[26], resetcolor, staycolors, printfont, tryconvertcp, askcp, internal_program;
extern bool addovl, addipx, addne2k, prepared, inshell, usecon, uao, morelen, mountfro[26], mountiro[26], resetcolor, staycolors, printfont, tryconvertcp, notrycp, internal_program;
extern bool clear_screen(), OpenGL_using(void), DOS_SetAnsiAttr(uint8_t attr), isDBCSCP();
extern int lastcp, FileDirExistCP(const char *name), FileDirExistUTF8(std::string &localname, const char *name);
extern uint8_t DOS_GetAnsiAttr(void);
@ -488,8 +488,8 @@ std::string GetNewStr(const char *str) {
wchar_t* wstr = NULL;
int reqsize = MultiByteToWideChar(CP_UTF8, 0, str, (int)(strlen(str)+1), NULL, 0);
if (reqsize>0 && (wstr = new wchar_t[reqsize]) && MultiByteToWideChar(CP_UTF8, 0, str, (int)(strlen(str)+1), wstr, reqsize)==reqsize) {
reqsize = WideCharToMultiByte(dos.loaded_codepage==808?866:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage)), WC_NO_BEST_FIT_CHARS, wstr, -1, NULL, 0, "\x07", NULL);
if (reqsize > 1 && (temp = new char[reqsize]) && WideCharToMultiByte(dos.loaded_codepage==808?866:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage)), WC_NO_BEST_FIT_CHARS, wstr, -1, (LPSTR)temp, reqsize, "\x07", NULL) == reqsize)
reqsize = WideCharToMultiByte(dos.loaded_codepage==808?866:(dos.loaded_codepage==859?858:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage))), WC_NO_BEST_FIT_CHARS, wstr, -1, NULL, 0, "\x07", NULL);
if (reqsize > 1 && (temp = new char[reqsize]) && WideCharToMultiByte(dos.loaded_codepage==808?866:(dos.loaded_codepage==859?858:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage))), WC_NO_BEST_FIT_CHARS, wstr, -1, (LPSTR)temp, reqsize, "\x07", NULL) == reqsize)
newstr = std::string(temp);
}
}
@ -1279,9 +1279,9 @@ public:
if(temp_line.size() > 3 && temp_line[temp_line.size()-1]=='\\') temp_line.erase(temp_line.size()-1,1);
if(temp_line.size() == 2 && toupper(temp_line[0])>='A' && toupper(temp_line[0])<='Z' && temp_line[1]==':') temp_line.append("\\");
if(temp_line.size() > 4 && temp_line[0]=='\\' && temp_line[1]=='\\' && temp_line[2]!='\\' && std::count(temp_line.begin()+3, temp_line.end(), '\\')==1) temp_line.append("\\");
askcp = true;
notrycp = true;
const host_cnv_char_t* host_name = CodePageGuestToHost(temp_line.c_str());
askcp = false;
notrycp = false;
if (!is_physfs && stat(temp_line.c_str(),&test)) {
#endif
#if defined(WIN32)
@ -7095,6 +7095,7 @@ void UTF8::Run()
int cp=dos.loaded_codepage;
char target[11] = "CP437";
if (dos.loaded_codepage==808) strcpy(target, "CP866");
if (dos.loaded_codepage==859) strcpy(target, "CP858");
else if (dos.loaded_codepage==872) strcpy(target, "CP855");
else if (dos.loaded_codepage==951 && !uao) strcpy(target, "BIG5HKSCS");
else if (dos.loaded_codepage==951) strcpy(target, "CP950");
@ -7173,6 +7174,7 @@ void UTF16::Run()
}
char target[11] = "CP437";
if (dos.loaded_codepage==808) strcpy(target, "CP866");
if (dos.loaded_codepage==859) strcpy(target, "CP858");
else if (dos.loaded_codepage==872) strcpy(target, "CP855");
else if (dos.loaded_codepage==951 && !uao) strcpy(target, "BIG5HKSCS");
else if (dos.loaded_codepage==951) strcpy(target, "CP950");

View File

@ -60,8 +60,10 @@
#include "cp852_uni.h"
#include "cp853_uni.h"
#include "cp855_uni.h"
#include "cp856_uni.h"
#include "cp857_uni.h"
#include "cp858_uni.h"
#include "cp859_uni.h"
#include "cp860_uni.h"
#include "cp861_uni.h"
#include "cp862_uni.h"
@ -105,7 +107,7 @@ uint16_t customcp_to_unicode[256], altcp_to_unicode[256];
extern uint16_t cpMap_AX[32];
extern uint16_t cpMap_PC98[256];
extern std::map<int, int> lowboxdrawmap, pc98boxdrawmap;
bool cpwarn_once = false, ignorespecial = false, tryconvertcp = false, askcp = false;
bool cpwarn_once = false, ignorespecial = false, tryconvertcp = false, notrycp = false;
std::string prefix_local = ".DBLOCALFILE";
char* GetCrossedName(const char *basedir, const char *dir) {
@ -618,10 +620,14 @@ bool CodePageHostToGuestUTF16(char *d/*CROSS_LEN*/,const uint16_t *s/*CROSS_LEN*
return String_HOST_TO_SBCS_UTF16<uint16_t>(d,s,cp853_to_unicode,sizeof(cp853_to_unicode)/sizeof(cp853_to_unicode[0]));
case 855:
return String_HOST_TO_SBCS_UTF16<uint16_t>(d,s,cp855_to_unicode,sizeof(cp855_to_unicode)/sizeof(cp855_to_unicode[0]));
case 856:
return String_HOST_TO_SBCS_UTF16<uint16_t>(d,s,cp856_to_unicode,sizeof(cp856_to_unicode)/sizeof(cp856_to_unicode[0]));
case 857:
return String_HOST_TO_SBCS_UTF16<uint16_t>(d,s,cp857_to_unicode,sizeof(cp857_to_unicode)/sizeof(cp857_to_unicode[0]));
case 858:
return String_HOST_TO_SBCS_UTF16<uint16_t>(d,s,cp858_to_unicode,sizeof(cp858_to_unicode)/sizeof(cp858_to_unicode[0]));
case 859:
return String_HOST_TO_SBCS_UTF16<uint16_t>(d,s,cp859_to_unicode,sizeof(cp859_to_unicode)/sizeof(cp859_to_unicode[0]));
case 860:
return String_HOST_TO_SBCS_UTF16<uint16_t>(d,s,cp860_to_unicode,sizeof(cp860_to_unicode)/sizeof(cp860_to_unicode[0]));
case 861:
@ -708,10 +714,14 @@ bool CodePageHostToGuestUTF8(char *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/) {
return String_HOST_TO_SBCS_UTF8<uint16_t>(d,s,cp853_to_unicode,sizeof(cp853_to_unicode)/sizeof(cp853_to_unicode[0]));
case 855:
return String_HOST_TO_SBCS_UTF8<uint16_t>(d,s,cp855_to_unicode,sizeof(cp855_to_unicode)/sizeof(cp855_to_unicode[0]));
case 856:
return String_HOST_TO_SBCS_UTF8<uint16_t>(d,s,cp856_to_unicode,sizeof(cp856_to_unicode)/sizeof(cp856_to_unicode[0]));
case 857:
return String_HOST_TO_SBCS_UTF8<uint16_t>(d,s,cp857_to_unicode,sizeof(cp857_to_unicode)/sizeof(cp857_to_unicode[0]));
case 858:
return String_HOST_TO_SBCS_UTF8<uint16_t>(d,s,cp858_to_unicode,sizeof(cp858_to_unicode)/sizeof(cp858_to_unicode[0]));
case 859:
return String_HOST_TO_SBCS_UTF8<uint16_t>(d,s,cp859_to_unicode,sizeof(cp859_to_unicode)/sizeof(cp859_to_unicode[0]));
case 860:
return String_HOST_TO_SBCS_UTF8<uint16_t>(d,s,cp860_to_unicode,sizeof(cp860_to_unicode)/sizeof(cp860_to_unicode[0]));
case 861:
@ -798,10 +808,14 @@ bool CodePageGuestToHostUTF16(uint16_t *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*
return String_SBCS_TO_HOST_UTF16<uint16_t>(d,s,cp853_to_unicode,sizeof(cp853_to_unicode)/sizeof(cp853_to_unicode[0]));
case 855:
return String_SBCS_TO_HOST_UTF16<uint16_t>(d,s,cp855_to_unicode,sizeof(cp855_to_unicode)/sizeof(cp855_to_unicode[0]));
case 856:
return String_SBCS_TO_HOST_UTF16<uint16_t>(d,s,cp856_to_unicode,sizeof(cp856_to_unicode)/sizeof(cp856_to_unicode[0]));
case 857:
return String_SBCS_TO_HOST_UTF16<uint16_t>(d,s,cp857_to_unicode,sizeof(cp857_to_unicode)/sizeof(cp857_to_unicode[0]));
case 858:
return String_SBCS_TO_HOST_UTF16<uint16_t>(d,s,cp858_to_unicode,sizeof(cp858_to_unicode)/sizeof(cp858_to_unicode[0]));
case 859:
return String_SBCS_TO_HOST_UTF16<uint16_t>(d,s,cp859_to_unicode,sizeof(cp859_to_unicode)/sizeof(cp859_to_unicode[0]));
case 860:
return String_SBCS_TO_HOST_UTF16<uint16_t>(d,s,cp860_to_unicode,sizeof(cp860_to_unicode)/sizeof(cp860_to_unicode[0]));
case 861:
@ -888,10 +902,14 @@ bool CodePageGuestToHostUTF8(char *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/) {
return String_SBCS_TO_HOST_UTF8<uint16_t>(d,s,cp853_to_unicode,sizeof(cp853_to_unicode)/sizeof(cp853_to_unicode[0]));
case 855:
return String_SBCS_TO_HOST_UTF8<uint16_t>(d,s,cp855_to_unicode,sizeof(cp855_to_unicode)/sizeof(cp855_to_unicode[0]));
case 856:
return String_SBCS_TO_HOST_UTF8<uint16_t>(d,s,cp856_to_unicode,sizeof(cp856_to_unicode)/sizeof(cp856_to_unicode[0]));
case 857:
return String_SBCS_TO_HOST_UTF8<uint16_t>(d,s,cp857_to_unicode,sizeof(cp857_to_unicode)/sizeof(cp857_to_unicode[0]));
case 858:
return String_SBCS_TO_HOST_UTF8<uint16_t>(d,s,cp858_to_unicode,sizeof(cp858_to_unicode)/sizeof(cp858_to_unicode[0]));
case 859:
return String_SBCS_TO_HOST_UTF8<uint16_t>(d,s,cp859_to_unicode,sizeof(cp859_to_unicode)/sizeof(cp859_to_unicode[0]));
case 860:
return String_SBCS_TO_HOST_UTF8<uint16_t>(d,s,cp860_to_unicode,sizeof(cp860_to_unicode)/sizeof(cp860_to_unicode[0]));
case 861:
@ -961,7 +979,7 @@ bool CodePageGuestToHostUTF8(char *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/) {
host_cnv_char_t *CodePageGuestToHost(const char *s) {
#if defined(host_cnv_use_wchar)
uint16_t cp = GetACP(), cpbak = dos.loaded_codepage;
if (tryconvertcp && !askcp && cpbak == 437 && (cp == 932 || cp == 936 || cp == 949 || cp == 950 || cp == 951)) {
if (tryconvertcp && !notrycp && cpbak == 437 && (cp == 932 || cp == 936 || cp == 949 || cp == 950 || cp == 951)) {
dos.loaded_codepage = cp;
if (CodePageGuestToHostUTF16((uint16_t *)cpcnv_temp,s)) {
dos.loaded_codepage = cpbak;
@ -981,7 +999,7 @@ host_cnv_char_t *CodePageGuestToHost(const char *s) {
char *CodePageHostToGuest(const host_cnv_char_t *s) {
#if defined(host_cnv_use_wchar)
uint16_t cp = GetACP(), cpbak = dos.loaded_codepage;
if (tryconvertcp && !askcp && cpbak == 437 && (cp == 932 || cp == 936 || cp == 949 || cp == 950 || cp == 951)) {
if (tryconvertcp && !notrycp && cpbak == 437 && (cp == 932 || cp == 936 || cp == 949 || cp == 950 || cp == 951)) {
dos.loaded_codepage = cp;
if (CodePageHostToGuestUTF16((char *)cpcnv_temp,(const uint16_t *)s)) {
dos.loaded_codepage = cpbak;
@ -1001,7 +1019,7 @@ char *CodePageHostToGuest(const host_cnv_char_t *s) {
char *CodePageHostToGuestL(const host_cnv_char_t *s) {
#if defined(host_cnv_use_wchar)
uint16_t cp = GetACP(), cpbak = dos.loaded_codepage;
if (tryconvertcp && !askcp && cpbak == 437 && (cp == 932 || cp == 936 || cp == 949 || cp == 950 || cp == 951)) {
if (tryconvertcp && !notrycp && cpbak == 437 && (cp == 932 || cp == 936 || cp == 949 || cp == 950 || cp == 951)) {
dos.loaded_codepage = cp;
if (CodePageHostToGuestUTF16((char *)cpcnv_ltemp,(const uint16_t *)s)) {
dos.loaded_codepage = cpbak;

View File

@ -137,6 +137,10 @@ static const char *def_menu_main[] =
{
"mapper_gui",
"mapper_mapper",
"--",
#if !defined(HX_DOS)
"mapper_quickrun",
#endif
"mapper_loadmap",
"--",
"MainSendKey",
@ -555,17 +559,15 @@ static const char *def_menu_video[] =
/* DOS menu ("DOSMenu") */
static const char *def_menu_dos[] =
{
#if !defined(HX_DOS)
"mapper_quickrun",
#endif
"DOSVerMenu",
"DOSLFNMenu",
"--",
"DOSMouseMenu",
"DOSEMSMenu",
#if defined(WIN32) && !defined(HX_DOS) || defined(LINUX) || defined(MACOSX)
"DOSWinMenu",
#endif
"--",
"DOSMouseMenu",
"DOSEMSMenu",
"DOSDiskRateMenu",
"--",
"enable_a20gate",
"quick_reboot",
@ -631,6 +633,14 @@ static const char *def_menu_dos_ems[] =
NULL
};
/* DOS disk rate menu ("DOSDiskRateMenu") */
static const char *def_menu_dos_diskrate[] =
{
"limit_hdd_rate",
"limit_floppy_rate",
NULL
};
#if defined(WIN32) && !defined(HX_DOS) || defined(LINUX) || defined(MACOSX)
/* DOS WIN menu ("DOSWinMenu") */
static const char *def_menu_dos_win[] =
@ -1267,6 +1277,7 @@ LPWSTR getWString(std::string str, wchar_t *def, wchar_t*& buffer) {
uint16_t len=(uint16_t)str.size();
if (cp>0) {
if (cp==808) cp=866;
else if (cp==859) cp=858;
else if (cp==872) cp=855;
else if (cp==951) cp=950;
reqsize = MultiByteToWideChar(cp, 0, str.c_str(), len+1, NULL, 0);
@ -1648,6 +1659,9 @@ void ConstructMenu(void) {
/* DOS EMS menu */
ConstructSubMenu(mainMenu.get_item("DOSEMSMenu").get_master_id(), def_menu_dos_ems);
/* DOS disk rate menu */
ConstructSubMenu(mainMenu.get_item("DOSDiskRateMenu").get_master_id(), def_menu_dos_diskrate);
#if defined(WIN32) && !defined(HX_DOS) || defined(LINUX) || defined(MACOSX)
/* DOS WIN menu */
ConstructSubMenu(mainMenu.get_item("DOSWinMenu").get_master_id(), def_menu_dos_win);

View File

@ -50,8 +50,8 @@ std::string savefilename = "";
extern SHELL_Cmd cmd_list[];
extern unsigned int page, hostkeyalt, sendkeymap;
extern int posx, posy, wheel_key, mbutton, enablelfn, dos_clipboard_device_access, aspect_ratio_x, aspect_ratio_y;
extern bool addovl, clearline, winrun, window_was_maximized, wheel_guest, clipboard_dosapi, clipboard_biospaste, direct_mouse_clipboard, sync_time, manualtime, pausewithinterrupts_enable, enable_autosave, enable_config_as_shell_commands, noremark_save_state, force_load_state, use_quick_reboot, use_save_file, dpi_aware_enable, pc98_force_ibm_layout, log_int21, log_fileio, x11_on_top, macosx_on_top, rtl, gbk, chinasea;
extern int posx, posy, wheel_key, mbutton, enablelfn, dos_clipboard_device_access, aspect_ratio_x, aspect_ratio_y, disk_data_rate, floppy_data_rate;
extern bool addovl, clearline, pcibus_enable, winrun, window_was_maximized, wheel_guest, clipboard_dosapi, clipboard_biospaste, direct_mouse_clipboard, sync_time, manualtime, pausewithinterrupts_enable, enable_autosave, enable_config_as_shell_commands, noremark_save_state, force_load_state, use_quick_reboot, use_save_file, dpi_aware_enable, pc98_force_ibm_layout, log_int21, log_fileio, x11_on_top, macosx_on_top, rtl, gbk, chinasea;
extern bool mountfro[26], mountiro[26];
extern struct BuiltinFileBlob bfb_GLIDE2X_OVL;
extern const char* RunningProgram;
@ -85,7 +85,7 @@ void GFX_ForceRedrawScreen(void);
bool GFX_GetPreventFullscreen(void);
bool isDBCSCP(void), toOutput(const char *what);
bool systemmessagebox(char const * aTitle, char const * aMessage, char const * aDialogType, char const * aIconType, int aDefaultButton);
int FileDirExistCP(const char *name), FileDirExistUTF8(std::string &localname, const char *name);
int setTTFMap(bool changecp), FileDirExistCP(const char *name), FileDirExistUTF8(std::string &localname, const char *name);
size_t GetGameState_Run(void);
void DBCSSBCS_mapper_shortcut(bool pressed);
void AutoBoxDraw_mapper_shortcut(bool pressed);
@ -780,6 +780,39 @@ bool dos_ems_menu_callback(DOSBoxMenu * const menu,DOSBoxMenu::item * const menu
return true;
}
bool dos_hdd_rate_menu_callback(DOSBoxMenu * const menu,DOSBoxMenu::item * const menuitem) {
(void)menu;//UNUSED
(void)menuitem;//UNUSED
Section_prop * section = static_cast<Section_prop *>(control->GetSection("dos"));
if (disk_data_rate == 0) {
if (pcibus_enable)
disk_data_rate = 8333333; /* Probably an average IDE data rate for mid 1990s PCI IDE controllers in PIO mode */
else
disk_data_rate = 3500000; /* Probably an average IDE data rate for early 1990s ISA IDE controllers in PIO mode */
} else
disk_data_rate = 0;
std::string tmp = std::to_string(disk_data_rate);
SetVal("dos", "hard drive data rate limit", tmp);
mainMenu.get_item("limit_hdd_rate").check(disk_data_rate).refresh_item(mainMenu);
return true;
}
bool dos_floppy_rate_menu_callback(DOSBoxMenu * const menu,DOSBoxMenu::item * const menuitem) {
(void)menu;//UNUSED
(void)menuitem;//UNUSED
Section_prop * section = static_cast<Section_prop *>(control->GetSection("dos"));
if(floppy_data_rate == 0)
floppy_data_rate = 22400; // 175 kbps
else
floppy_data_rate = 0;
std::string tmp = std::to_string(floppy_data_rate);
SetVal("dos", "floppy drive data rate limit", tmp);
mainMenu.get_item("limit_floppy_rate").check(floppy_data_rate).refresh_item(mainMenu);
return true;
}
bool dos_debug_menu_callback(DOSBoxMenu * const menu,DOSBoxMenu::item * const menuitem) {
(void)menu;//UNUSED
(void)menuitem;//UNUSED
@ -1506,6 +1539,7 @@ bool vid_select_ttf_font_menu_callback(DOSBoxMenu* const menu, DOSBoxMenu::item*
else
SetVal("ttf", "font", name);
ttf_reset();
if (!IS_PC98_ARCH) setTTFMap(false);
#if C_PRINTER
if (TTF_using() && printfont) UpdateDefaultPrinterFont();
#endif
@ -3272,6 +3306,18 @@ void AllocCallback1() {
}
}
{
DOSBoxMenu::item &item = mainMenu.alloc_item(DOSBoxMenu::submenu_type_id,"DOSDiskRateMenu");
item.set_text("Limit disk transfer speed");
{
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"limit_hdd_rate").set_text("Limit hard disk data rate").
set_callback_function(dos_hdd_rate_menu_callback);
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"limit_floppy_rate").set_text("Limit floppy disk data rate").
set_callback_function(dos_floppy_rate_menu_callback);
}
}
#if defined(WIN32) && !defined(HX_DOS) || defined(LINUX) || defined(MACOSX)
{
DOSBoxMenu::item &item = mainMenu.alloc_item(DOSBoxMenu::submenu_type_id,"DOSWinMenu");

View File

@ -90,6 +90,7 @@ extern unsigned char GFX_Gshift;
extern uint32_t GFX_Bmask;
extern unsigned char GFX_Bshift;
extern unsigned int maincp;
extern int aspect_ratio_x, aspect_ratio_y;
extern int statusdrive, swapInDisksSpecificDrive;
extern bool ttfswitch, switch_output_from_ttf, loadlang;
@ -242,9 +243,12 @@ static GUI::ScreenSDL *UI_Startup(GUI::ScreenSDL *screen) {
GFX_LosingFocus();//Release any keys pressed (buffer gets filled again). (could be in above if, but clearing the mapper input when exiting the mapper is sensible as well
SDL_Delay(20);
unsigned int cpbak = dos.loaded_codepage;
if (dos_kernel_disabled&&maincp) dos.loaded_codepage = maincp;
Section_prop *section = static_cast<Section_prop *>(control->GetSection("dosbox"));
LoadMessageFile(section->Get_string("language"));
if (font_14_init) GUI_LoadFonts();
dos.loaded_codepage = cpbak;
// Comparable to the code of intro.com, but not the same! (the code of intro.com is called from within a com file)
shell_idle = !dos_kernel_disabled && strcmp(RunningProgram, "LOADLIN") && first_shell && (DOS_PSP(dos.psp()).GetSegment() == DOS_PSP(dos.psp()).GetParent());
@ -2879,7 +2883,7 @@ protected:
GUI::Input *name;
public:
ShowHelpIntro(GUI::Screen *parent, int x, int y, const char *title) :
ToplevelWindow(parent, x, y, 580, 190, title) {
ToplevelWindow(parent, x, y, 610, 190, title) {
std::istringstream in(MSG_Get("INTRO_MESSAGE"));
int r=0;
if (in) for (std::string line; std::getline(in, line); ) {

View File

@ -176,7 +176,7 @@ struct KeyBlock {
static DOSBoxMenu mapperMenu;
#endif
extern unsigned int hostkeyalt;
extern unsigned int hostkeyalt, maincp;
extern uint8_t int10_font_14[256 * 14];
std::map<std::string,std::string> pending_string_binds;
@ -3642,6 +3642,8 @@ static void DrawText(Bitu x,Bitu y,const char * text,uint8_t color,uint8_t bkcol
#else
uint8_t * draw=((uint8_t *)mapper.surface->pixels)+(y*mapper.surface->pitch)+x;
#endif
unsigned int cpbak = dos.loaded_codepage;
if (dos_kernel_disabled&&maincp) dos.loaded_codepage = maincp;
while (*text) {
unsigned char c = *text;
uint8_t * font;
@ -3683,6 +3685,7 @@ static void DrawText(Bitu x,Bitu y,const char * text,uint8_t color,uint8_t bkcol
text++;
prvmc = 0;
}
dos.loaded_codepage = cpbak;
prvmc = 0;
}

View File

@ -51,6 +51,7 @@ int transparency=0;
int selsrow = -1, selscol = -1;
int selerow = -1, selecol = -1;
int middleunlock = 1;
unsigned int maincp = 0;
extern bool testerr;
extern bool blinking;
extern bool log_int21;
@ -7158,6 +7159,7 @@ bool VM_Boot_DOSBox_Kernel() {
dos_kernel_disabled = false; // FIXME: DOS_Init should install VM callback handler to set this
void DOS_Startup(Section* sec);
DOS_Startup(NULL);
maincp = 0;
#if DOSBOXMENU_TYPE == DOSBOXMENU_HMENU
Reflect_Menu();
@ -9147,7 +9149,7 @@ fresh_boot:
if (dos_kernel_shutdown) {
inshell = tryconvertcp = false;
uint16_t cp = dos.loaded_codepage;
maincp = dos.loaded_codepage;
if (!IS_PC98_ARCH&&!IS_JEGA_ARCH&&!IS_J3100&&dos.loaded_codepage!=437) dos.loaded_codepage=437;
/* NTS: we take different paths depending on whether we're just shutting down DOS
@ -9203,8 +9205,8 @@ fresh_boot:
/* shutdown the programs */
PROGRAMS_Shutdown(); /* FIXME: Is this safe? Or will this cause use-after-free bug? */
uint16_t cpbak = dos.loaded_codepage;
dos.loaded_codepage = cp;
unsigned int cpbak = dos.loaded_codepage;
dos.loaded_codepage = maincp;
Add_VFiles(false);
dos.loaded_codepage = cpbak;

View File

@ -41,7 +41,7 @@ extern bool int13_extensions_enable, bootguest, bootvm, use_quick_reboot;
extern bool isDBCSCP(), isKanji1_gbk(uint8_t chr), shiftjis_lead_byte(int c);
extern bool CodePageGuestToHostUTF16(uint16_t *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/);
#define TOFAT_TIMEOUT 5000
#define TOFAT_TIMEOUT 4000
#define STATIC_ASSERTM(A,B) static_assertion_##A##_##B
#define STATIC_ASSERTN(A,B) STATIC_ASSERTM(A,B)
#define STATIC_ASSERT(cond) typedef char STATIC_ASSERTN(__LINE__,__COUNTER__)[(cond)?1:-1]
@ -283,9 +283,8 @@ struct fatFromDOSDrive
bootstrap bootsec;
uint8_t fatSz;
uint8_t fsinfosec[BYTESPERSECTOR];
uint32_t sectorsPerCluster;
uint16_t codepage = 0;
bool readOnly = false, success = false, tomany = false;
uint32_t sectorsPerCluster, codepage = 0;
bool tryconvcp = false, readOnly = false, success = false, tomany = false;
struct ffddFile { char path[DOS_PATHLENGTH+1]; uint32_t firstSect; };
std::vector<direntry> root, dirs;
@ -724,6 +723,7 @@ struct fatFromDOSDrive
var_write((uint32_t *const)&fsinfosec[508], (const uint32_t)0xAA550000); //ending signature
}
codepage = dos.loaded_codepage;
tryconvcp = tryconvertcp;
success = true;
}
@ -842,9 +842,12 @@ struct fatFromDOSDrive
cachedf = NULL;
}
bool res = drive->FileOpen(&df, f.path, OPEN_READ);
if (!res && codepage && codepage != dos.loaded_codepage) {
uint16_t cp = dos.loaded_codepage;
if (!res && codepage && (codepage != dos.loaded_codepage || (tryconvcp && codepage == 437))) {
uint32_t cp = dos.loaded_codepage;
dos.loaded_codepage = codepage;
#if defined(WIN32)
if (tryconvcp && dos.loaded_codepage == 437) dos.loaded_codepage = GetACP();
#endif
res = drive->FileOpen(&df, f.path, OPEN_READ);
dos.loaded_codepage = cp;
}

View File

@ -310,7 +310,7 @@ error_recovery:
int delete_fluid_dsound_audio_driver(fluid_audio_driver_t* d)
{
fluid_dsound_audio_driver_t* dev = (fluid_dsound_audio_driver_t*)d;
fluid_return_if_fail(dev != NULL);
if (dev == NULL) return 0;
/* wait till the audio thread exits */
if (dev->thread != NULL)

View File

@ -33,12 +33,14 @@
#include "dosbox.h"
#include "setup.h"
#include "jfont.h"
#include "dos_inc.h"
#include <SDL.h>
#include "gui_tk.h"
#include <math.h> /* floor */
bool isDBCSCP();
extern unsigned int maincp;
extern bool dos_kernel_disabled, isDBCSCP();
uint8_t *GetDbcs14Font(Bitu code, bool &is14);
namespace GUI {
@ -491,9 +493,12 @@ void BitmapFont::drawChar(Drawable *d, const Char c) const {
int bit = 0, i = 0, w = 0, h = 0;
bool is14 = false;
if (c > last) {prvc = 0;return;}
unsigned int cpbak = dos.loaded_codepage;
if (dos_kernel_disabled&&maincp) dos.loaded_codepage = maincp;
if (IS_PC98_ARCH || IS_JEGA_ARCH || isDBCSCP()) {
if (isKanji1(c) && prvc == 0) {
prvc = c;
dos.loaded_codepage = cpbak;
return;
} else if (isKanji2(c) && prvc > 2) {
optr = GetDbcs14Font(prvc*0x100+c, is14);
@ -502,6 +507,7 @@ void BitmapFont::drawChar(Drawable *d, const Char c) const {
prvc = 0;
} else
prvc = 0;
dos.loaded_codepage = cpbak;
#define move(x) (ptr += (((x)+bit)/8-(((x)+bit)<0))*(prvc==1||prvc==2?2:1), bit = ((x)+bit+(((x)+bit)<0?8:0))%8)
int ht = prvc==1?16:height, at = prvc==1?11:ascent;
int rs = row_step;

View File

@ -57,13 +57,13 @@ bool Unicode2Ascii(const uint16_t* unicode) {
memNeeded = strlen(temp);
} else {
morelen=false;
int memNeeded = WideCharToMultiByte(dos.loaded_codepage==808?866:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage)), WC_NO_BEST_FIT_CHARS, (LPCWSTR)unicode, -1, NULL, 0, "\x07", NULL);
int memNeeded = WideCharToMultiByte(dos.loaded_codepage==808?866:(dos.loaded_codepage==859?858:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage))), WC_NO_BEST_FIT_CHARS, (LPCWSTR)unicode, -1, NULL, 0, "\x07", NULL);
if (memNeeded <= 1) // Includes trailing null
return false;
if (!(clipAscii = (uint8_t *)malloc(memNeeded)))
return false;
// Untranslated characters will be set to 0x07 (BEL), and later stripped
if (WideCharToMultiByte(dos.loaded_codepage==808?866:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage)), WC_NO_BEST_FIT_CHARS, (LPCWSTR)unicode, -1, (LPSTR)clipAscii, memNeeded, "\x07", NULL) != memNeeded) { // Can't actually happen of course
if (WideCharToMultiByte(dos.loaded_codepage==808?866:(dos.loaded_codepage==859?858:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage))), WC_NO_BEST_FIT_CHARS, (LPCWSTR)unicode, -1, (LPSTR)clipAscii, memNeeded, "\x07", NULL) != memNeeded) { // Can't actually happen of course
free(clipAscii);
clipAscii = NULL;
return false;
@ -724,10 +724,10 @@ void CopyClipboard(int all) {
if (CodePageGuestToHostUTF16(temp,token.c_str())) {
result+=(wchar_t *)temp;
} else {
int reqsize = MultiByteToWideChar(dos.loaded_codepage==808?866:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage)), 0, token.c_str(), token.size()+1, NULL, 0);
int reqsize = MultiByteToWideChar(dos.loaded_codepage==808?866:(dos.loaded_codepage==859?858:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage))), 0, token.c_str(), token.size()+1, NULL, 0);
if (reqsize>0) {
wch = new uint16_t[reqsize+1];
if (MultiByteToWideChar(dos.loaded_codepage==808?866:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage)), 0, token.c_str(), token.size()+1, (LPWSTR)wch, reqsize)==reqsize) {
if (MultiByteToWideChar(dos.loaded_codepage==808?866:(dos.loaded_codepage==859?858:(dos.loaded_codepage==872?855:(dos.loaded_codepage==951?950:dos.loaded_codepage))), 0, token.c_str(), token.size()+1, (LPWSTR)wch, reqsize)==reqsize) {
result+=(wchar_t *)wch;
delete[] wch;
continue;

View File

@ -43,7 +43,7 @@ typedef wchar_t host_cnv_char_t;
typedef char host_cnv_char_t;
#endif
extern std::string prefix_local;
extern bool gbk, hidenonrep, ignorespecial;
extern bool gbk, notrycp, hidenonrep, ignorespecial;
extern char *CodePageHostToGuest(const host_cnv_char_t *s);
bool isKanji1_gbk(uint8_t chr), CodePageHostToGuestUTF16(char *d/*CROSS_LEN*/,const uint16_t *s/*CROSS_LEN*/);
@ -267,7 +267,9 @@ static bool isDBCSlead(const wchar_t fchar) {
/* does the filename fit the 8.3 format? */
static bool is_filename_8by3w(const wchar_t* fname) {
if (CodePageHostToGuest(fname)==NULL) return false;
notrycp = true;
if (CodePageHostToGuest(fname)==NULL) {notrycp = false;return false;}
notrycp = false;
int i;
/* Is the first part 8 chars or less? */

View File

@ -27,6 +27,7 @@
#include "setup.h"
#include "render.h"
#include "control.h"
#include "shell.h"
#include "menu.h"
#include "jfont.h"
#include <map>
@ -37,12 +38,15 @@
#endif
using namespace std;
extern bool dos_kernel_disabled, force_conversion, showdbcs, dbcs_sbcs, enableime, tonoime;
int msgcodepage = 0, FileDirExistUTF8(std::string &localname, const char *name);
bool morelen = false, inmsg = false, loadlang = false, systemmessagebox(char const * aTitle, char const * aMessage, char const * aDialogType, char const * aIconType, int aDefaultButton);
Bitu DOS_LoadKeyboardLayout(const char * layoutname, int32_t codepage, const char * codepagefile);
bool morelen = false, inmsg = false, loadlang = false, uselangcp = false, systemmessagebox(char const * aTitle, char const * aMessage, char const * aDialogType, char const * aIconType, int aDefaultButton), OpenGL_using(void);
bool isSupportedCP(int newCP), CodePageHostToGuestUTF8(char *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/), CodePageGuestToHostUTF8(char *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/);
void InitFontHandle(void), ShutFontHandle(void), SetIME(void), menu_update_dynamic(void), menu_update_autocycle(void), update_bindbutton_text(void), set_eventbutton_text(const char *eventname, const char *buttonname), JFONT_Init();
void InitFontHandle(void), ShutFontHandle(void), SetIME(void), menu_update_dynamic(void), menu_update_autocycle(void), update_bindbutton_text(void), set_eventbutton_text(const char *eventname, const char *buttonname), JFONT_Init(), DOSBox_SetSysMenu(), toSetCodePage(DOS_Shell *shell, int newCP, int opt), UpdateSDLDrawTexture(), makestdcp950table(), makeseacp951table();
std::string langname = "", langnote = "", GetDOSBoxXPath(bool withexe=false);
const char *DOS_GetLoadedLayout();
extern int lastcp;
extern bool dos_kernel_disabled, force_conversion, showdbcs, dbcs_sbcs, enableime, tonoime, chinasea;
#define LINE_IN_MAXLEN 2048
@ -82,7 +86,7 @@ void MSG_Replace(const char * _name, const char* _val) {
bool InitCodePage() {
if (!dos.loaded_codepage || dos_kernel_disabled || force_conversion) {
if (control->opt_langcp && msgcodepage>0 && isSupportedCP(msgcodepage) && msgcodepage != dos.loaded_codepage) {
if (((control->opt_langcp && msgcodepage != dos.loaded_codepage) || uselangcp) && msgcodepage>0 && isSupportedCP(msgcodepage)) {
dos.loaded_codepage = msgcodepage;
return true;
}
@ -198,6 +202,19 @@ void AddMessages() {
MSG_Add("AUTO_CYCLE_OFF","Auto cycles [off]");
}
void SetKEYBCP() {
if (msgcodepage == 437) {dos.loaded_codepage=0;DOS_LoadKeyboardLayout("us", 437, "auto");dos.loaded_codepage=437;}
else if (msgcodepage == 857) {dos.loaded_codepage=437;DOS_LoadKeyboardLayout("tr", 857, "auto");dos.loaded_codepage=857;}
else if (msgcodepage == 858) {dos.loaded_codepage=437;DOS_LoadKeyboardLayout("es", 858, "auto");dos.loaded_codepage=858;}
else if (msgcodepage == 859) {dos.loaded_codepage=437;DOS_LoadKeyboardLayout("fr", 859, "auto");dos.loaded_codepage=859;}
else if (msgcodepage == 860) {dos.loaded_codepage=437;DOS_LoadKeyboardLayout("br", 860, "auto");dos.loaded_codepage=860;}
else if (msgcodepage == 932) {dos.loaded_codepage=437;DOS_LoadKeyboardLayout("jp", 932, "auto");dos.loaded_codepage=932;}
else if (msgcodepage == 936) {dos.loaded_codepage=0;DOS_LoadKeyboardLayout("us", 437, "auto");DOS_LoadKeyboardLayout("cn", 936, "auto");dos.loaded_codepage=936;}
else if (msgcodepage == 949) {dos.loaded_codepage=0;DOS_LoadKeyboardLayout("us", 437, "auto");DOS_LoadKeyboardLayout("ko", 949, "auto");dos.loaded_codepage=949;}
else if (msgcodepage == 950) {dos.loaded_codepage=0;DOS_LoadKeyboardLayout("us", 437, "auto");DOS_LoadKeyboardLayout("tw", 950, "auto");dos.loaded_codepage=950;}
else if (msgcodepage == 951) {dos.loaded_codepage=0;DOS_LoadKeyboardLayout("us", 437, "auto");DOS_LoadKeyboardLayout("hk", 951, "auto");dos.loaded_codepage=951;}
}
void LoadMessageFile(const char * fname) {
if (!fname) return;
if(*fname=='\0') return;//empty string=no languagefile
@ -277,7 +294,7 @@ void LoadMessageFile(const char * fname) {
*r=0;
if (!strcmp(p, "CODEPAGE")) {
int c = atoi(r+1);
if ((!res || control->opt_langcp) && c>0 && isSupportedCP(c)) {
if ((!res || control->opt_langcp || uselangcp) && c>0 && isSupportedCP(c)) {
if (((IS_PC98_ARCH||IS_JEGA_ARCH) && c!=437 && c!=932 && !systemmessagebox("DOSBox-X language file", "You have specified a language file which uses a code page incompatible with the Japanese PC-98 or JEGA/AX system.\n\nAre you sure to use the language file for this machine type?", "yesno","question", 2)) || (((IS_JDOSV && c!=932) || (IS_PDOSV && c!=936) || (IS_KDOSV && c!=949) || (IS_TDOSV && c!=950 && c!=951)) && c!=437 && !systemmessagebox("DOSBox-X language file", "You have specified a language file which uses a code page incompatible with the current DOS/V system.\n\nAre you sure to use the language file for this system type?", "yesno","question", 2))) {
fclose(mfile);
dos.loaded_codepage = cp;
@ -285,6 +302,8 @@ void LoadMessageFile(const char * fname) {
}
msgcodepage = c;
dos.loaded_codepage = c;
if (c == 950 && !chinasea) makestdcp950table();
if (c == 951 && chinasea) makeseacp951table();
}
} else if (!strcmp(p, "LANGUAGE"))
langname = r+1;
@ -339,7 +358,7 @@ void LoadMessageFile(const char * fname) {
menu_update_autocycle();
update_bindbutton_text();
dos.loaded_codepage=cp;
if (control->opt_langcp && msgcodepage>0 && isSupportedCP(msgcodepage) && msgcodepage != dos.loaded_codepage) {
if ((control->opt_langcp || uselangcp) && msgcodepage>0 && isSupportedCP(msgcodepage) && msgcodepage != dos.loaded_codepage) {
ShutFontHandle();
if (msgcodepage == 932 || msgcodepage == 936 || msgcodepage == 949 || msgcodepage == 950 || msgcodepage == 951) {
dos.loaded_codepage = msgcodepage;
@ -347,6 +366,21 @@ void LoadMessageFile(const char * fname) {
JFONT_Init();
dos.loaded_codepage = cp;
}
if (uselangcp) {
#if defined(USE_TTF)
if (ttf.inUse) toSetCodePage(NULL, msgcodepage, -1); else
#endif
{
dos.loaded_codepage = msgcodepage;
DOSBox_SetSysMenu();
#if C_OPENGL && DOSBOXMENU_TYPE == DOSBOXMENU_SDLDRAW
if (OpenGL_using() && control->opt_lang.size() && lastcp && lastcp != dos.loaded_codepage)
UpdateSDLDrawTexture();
#endif
}
SetKEYBCP();
}
}
LOG_MSG("Loaded language file: %s",fname);

View File

@ -57,7 +57,7 @@ extern const char *modifier;
extern unsigned int sendkeymap;
extern std::string langname, configfile, dosbox_title;
extern int autofixwarn, enablelfn, fat32setver, paste_speed, wheel_key, freesizecap, wpType, wpVersion, wpBG, wpFG, lastset, blinkCursor;
extern bool dos_kernel_disabled, force_nocachedir, wpcolon, convertimg, lockmount, enable_config_as_shell_commands, lesssize, load, winrun, winautorun, startcmd, startwait, startquiet, starttranspath, mountwarning, wheel_guest, clipboard_dosapi, noremark_save_state, force_load_state, sync_time, manualtime, ttfswitch, loadlang, showbold, showital, showline, showsout, char512, printfont, rtl, gbk, chinasea, uao, showdbcs, dbcs_sbcs, autoboxdraw, halfwidthkana, ticksLocked, outcon, enable_dbcs_tables, show_recorded_filename, internal_program, pipetmpdev;
extern bool dos_kernel_disabled, force_nocachedir, wpcolon, convertimg, lockmount, enable_config_as_shell_commands, lesssize, load, winrun, winautorun, startcmd, startwait, startquiet, starttranspath, mountwarning, wheel_guest, clipboard_dosapi, noremark_save_state, force_load_state, sync_time, manualtime, ttfswitch, loadlang, showbold, showital, showline, showsout, char512, printfont, rtl, gbk, chinasea, uao, showdbcs, dbcs_sbcs, autoboxdraw, halfwidthkana, ticksLocked, outcon, enable_dbcs_tables, show_recorded_filename, internal_program, pipetmpdev, notrysgf, uselangcp;
/* This registers a file on the virtual drive and creates the correct structure for it*/
@ -97,6 +97,7 @@ public:
static std::vector<InternalProgramEntry*> internal_progs;
uint8_t DOS_GetAnsiAttr(void);
int setTTFMap(bool changecp);
char *FormatDate(uint16_t year, uint8_t month, uint8_t day);
bool isDBCSCP(void), CheckBoxDrawing(uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4), DOS_SetAnsiAttr(uint8_t attr), GFX_GetPreventFullscreen(void), toOutput(const char *what);
void EMS_DoShutDown(void), UpdateDefaultPrinterFont(void), GFX_ForceRedrawScreen(void), resetFontSize(void), ttf_reset_colors(void), makestdcp950table(void), makeseacp951table(void), clearFontCache(void), DOSBox_SetSysMenu(void), MSG_Init(void), initRand(void), PRINTER_Init(void);
@ -667,10 +668,10 @@ void ApplySetting(std::string pvar, std::string inputline, bool quiet) {
#if DOSBOXMENU_TYPE == DOSBOXMENU_HMENU
mainMenu.unbuild();
mainMenu.rebuild();
#endif
if (!GFX_GetPreventFullscreen()) {
if (menu.toggle) DOSBox_SetMenu(); else DOSBox_NoMenu();
}
#endif
#if defined(USE_TTF)
if (TTF_using()) resetFontSize();
#endif
@ -931,7 +932,13 @@ void ApplySetting(std::string pvar, std::string inputline, bool quiet) {
if (!strcasecmp(inputline.substr(0, 5).c_str(), "font=")) {
#if defined(USE_TTF)
if (TTF_using()) {
std::string font = section->Get_string("font");
if (font.empty() && !IS_PC98_ARCH && !isDBCSCP()) notrysgf = true;
ttf_reset();
notrysgf = false;
int missing = IS_PC98_ARCH ? 0 : setTTFMap(false);
if (missing > 0 && first_shell) first_shell->WriteOut(MSG_Get("SHELL_CMD_CHCP_MISSING"), missing);
#if C_PRINTER
if (printfont) UpdateDefaultPrinterFont();
#endif
@ -1557,6 +1564,9 @@ void CONFIG::Run(void) {
if (!sec&&pvars[0].size()>4&&!strcasecmp(pvars[0].substr(0, 4).c_str(), "ttf.")) {
pvars[0].erase(0,4);
sec = control->GetSectionFromProperty(pvars[0].c_str());
} else if (!sec && pvars[0].size() && !strcasecmp(pvars[0].c_str(), "langcp")) {
pvars[0] = "language";
sec = control->GetSectionFromProperty(pvars[0].c_str());
}
if (!sec) {
unsigned int maxWidth, maxHeight;
@ -1811,6 +1821,7 @@ void CONFIG::Run(void) {
sec = control->GetSectionFromProperty(p.c_str());
}
uselangcp = false;
if ((equpos != std::string::npos) &&
((spcpos == std::string::npos) || (equpos < spcpos) || sec)) {
// If we have a '=' possibly before a ' ' split on the =
@ -1821,10 +1832,15 @@ void CONFIG::Run(void) {
if (!sec&&pvars[0].size()>4&&!strcasecmp(pvars[0].substr(0, 4).c_str(), "ttf.")) {
pvars[0].erase(0,4);
sec = control->GetSectionFromProperty(pvars[0].c_str());
} else if (!sec && pvars[0].size() && !strcasecmp(pvars[0].c_str(), "langcp")) {
pvars[0] = "language";
sec = control->GetSectionFromProperty(pvars[0].c_str());
if (sec) uselangcp = true;
}
if (sec) pvars.insert(pvars.begin(),std::string(sec->GetName()));
else {
WriteOut(MSG_Get("PROGRAM_CONFIG_PROPERTY_ERROR"));
uselangcp = false;
return;
}
// order in the vector should be ok now
@ -1871,6 +1887,7 @@ void CONFIG::Run(void) {
}
if(pvars.size() < 3) {
WriteOut(MSG_Get("PROGRAM_CONFIG_SET_SYNTAX"));
uselangcp = false;
return;
}
// check if the property actually exists in the section
@ -1880,6 +1897,7 @@ void CONFIG::Run(void) {
WriteOut("Cannot set property %s in section %s.\n", pvars[1].c_str(),pvars[0].c_str());
else
WriteOut(MSG_Get("PROGRAM_CONFIG_NO_PROPERTY"), pvars[1].c_str(),pvars[0].c_str());
uselangcp = false;
return;
}
bool applynew=false;
@ -1945,6 +1963,7 @@ next:
else ApplySetting(pvars[0], inputline, false);
} else WriteOut(MSG_Get("PROGRAM_CONFIG_VALUE_ERROR"),
value.c_str(),pvars[1].c_str());
uselangcp = false;
return;
}
case P_WRITELANG: case P_WRITELANG2:

View File

@ -83,6 +83,7 @@ bool initttf = false;
bool copied = false;
bool firstset = true;
bool forceswk = false;
bool notrysgf = false;
bool wpExtChar = false;
int wpType = 0;
int wpVersion = 0;
@ -494,6 +495,43 @@ void CheckTTFLimit() {
}
}
int setTTFMap(bool changecp) {
char text[2];
uint16_t uname[4], wcTest[256];
int cp = dos.loaded_codepage;
for (int i = 0; i < 256; i++) {
text[0]=i;
text[1]=0;
uname[0]=0;
uname[1]=0;
if (cp == 932 && (halfwidthkana || IS_JEGA_ARCH)) forceswk=true;
if (cp == 932 || cp == 936 || cp == 949 || cp == 950 || cp == 951) dos.loaded_codepage = 437;
if (CodePageGuestToHostUTF16(uname,text)) {
wcTest[i] = uname[1]==0?uname[0]:i;
if (cp == 932 && lowboxdrawmap.find(i)!=lowboxdrawmap.end() && TTF_GlyphIsProvided(ttf.SDL_font, wcTest[i]))
cpMap[i] = wcTest[i];
}
forceswk=false;
if (cp == 932 || cp == 936 || cp == 949 || cp == 950 || cp == 951) dos.loaded_codepage = cp;
}
uint16_t unimap;
int notMapped = 0;
for (int y = ((customcp&&(dos.loaded_codepage==customcp||changecp))||(altcp&&(dos.loaded_codepage==altcp||changecp))?0:8); y < 16; y++)
for (int x = 0; x < 16; x++) {
if (y<8 && (wcTest[y*16+x] == y*16+x || wcTest[y*16+x] == cp437_to_unicode[y*16+x])) unimap = cpMap_copy[y*16+x];
else unimap = wcTest[y*16+x];
if (!TTF_GlyphIsProvided(ttf.SDL_font, unimap)) {
cpMap[y*16+x] = 0;
notMapped++;
LOG_MSG("Unmapped character: %3d - %4x", y*16+x, unimap);
} else
cpMap[y*16+x] = unimap;
}
if (eurAscii != -1 && TTF_GlyphIsProvided(ttf.SDL_font, 0x20ac))
cpMap[eurAscii] = 0x20ac;
return notMapped;
}
int setTTFCodePage() {
if (!copied) {
memcpy(cpMap_copy,cpMap,sizeof(cpMap[0])*256);
@ -509,38 +547,7 @@ int setTTFCodePage() {
if (cp) {
LOG_MSG("Loaded system codepage: %d\n", cp);
char text[2];
uint16_t uname[4], wcTest[256];
for (int i = 0; i < 256; i++) {
text[0]=i;
text[1]=0;
uname[0]=0;
uname[1]=0;
if (cp == 932 && (halfwidthkana || IS_JEGA_ARCH)) forceswk=true;
if (cp == 932 || cp == 936 || cp == 949 || cp == 950 || cp == 951) dos.loaded_codepage = 437;
if (CodePageGuestToHostUTF16(uname,text)) {
wcTest[i] = uname[1]==0?uname[0]:i;
if (cp == 932 && lowboxdrawmap.find(i)!=lowboxdrawmap.end() && TTF_GlyphIsProvided(ttf.SDL_font, wcTest[i]))
cpMap[i] = wcTest[i];
}
forceswk=false;
if (cp == 932 || cp == 936 || cp == 949 || cp == 950 || cp == 951) dos.loaded_codepage = cp;
}
uint16_t unimap;
int notMapped = 0;
for (int y = ((customcp&&dos.loaded_codepage==customcp)||(altcp&&dos.loaded_codepage==altcp)?0:8); y < 16; y++)
for (int x = 0; x < 16; x++) {
if (y<8 && (wcTest[y*16+x] == y*16+x || wcTest[y*16+x] == cp437_to_unicode[y*16+x])) unimap = cpMap_copy[y*16+x];
else unimap = wcTest[y*16+x];
if (!TTF_GlyphIsProvided(ttf.SDL_font, unimap)) {
cpMap[y*16+x] = 0;
notMapped++;
LOG_MSG("Unmapped character: %3d - %4x", y*16+x, unimap);
} else
cpMap[y*16+x] = unimap;
}
if (eurAscii != -1 && TTF_GlyphIsProvided(ttf.SDL_font, 0x20ac))
cpMap[eurAscii] = 0x20ac;
int notMapped = setTTFMap(true);
if (strcmp(RunningProgram, "LOADLIN") && !dos_kernel_disabled)
initcodepagefont();
#if defined(WIN32) && !defined(HX_DOS)
@ -642,7 +649,7 @@ void OUTPUT_TTF_Select(int fsize) {
bool trysgf = false;
if (!*fName) {
std::string mtype(static_cast<Section_prop *>(control->GetSection("dosbox"))->Get_string("machine"));
if (IS_PC98_ARCH||mtype.substr(0, 4)=="pc98"||(InitCodePage()&&isDBCSCP())) trysgf = true;
if (IS_PC98_ARCH||mtype.substr(0, 4)=="pc98"||(!notrysgf&&InitCodePage()&&isDBCSCP())) trysgf = true;
}
force_conversion = false;
dos.loaded_codepage = cp;

View File

@ -65,8 +65,10 @@ uint16_t shell_psp = 0;
Bitu call_int2e = 0;
std::string GetDOSBoxXPath(bool withexe=false);
const char* DOS_GetLoadedLayout(void);
int Reflect_Menu(void);
void SetIMPosition(void);
void SetKEYBCP();
void initRand();
void initcodepagefont(void);
void runMount(const char *str);
@ -814,6 +816,7 @@ void DOS_Shell::Prepare(void) {
}
section = static_cast<Section_prop *>(control->GetSection("dos"));
bool zdirpath = section->Get_bool("drive z expand path");
std::string layout = section->Get_string("keyboardlayout");
strcpy(config_data, "");
section = static_cast<Section_prop *>(control->GetSection("config"));
if ((section!=NULL&&!control->opt_noconfig)||control->opt_langcp) {
@ -824,7 +827,7 @@ void DOS_Shell::Prepare(void) {
else {
if (r!=NULL) *r=0;
country = atoi(trim(countrystr));
int newCP = r==NULL||IS_PC98_ARCH||IS_JEGA_ARCH||IS_DOSV?dos.loaded_codepage:atoi(trim(r+1));
int32_t newCP = r==NULL||IS_PC98_ARCH||IS_JEGA_ARCH||IS_DOSV?dos.loaded_codepage:atoi(trim(r+1));
if (control->opt_langcp && msgcodepage>0 && isSupportedCP(msgcodepage) && msgcodepage != newCP)
newCP = msgcodepage;
if (r!=NULL) *r=',';
@ -841,12 +844,14 @@ void DOS_Shell::Prepare(void) {
else if (IS_KDOSV) newCP=949;
else if (IS_TDOSV) newCP=950;
}
const char* name = DOS_GetLoadedLayout();
if (newCP==932||newCP==936||newCP==949||newCP==950||newCP==951) {
dos.loaded_codepage=newCP;
SetupDBCSTable();
runRescan("-A -Q");
DOSBox_SetSysMenu();
}
} else if (control->opt_langcp && !name && (layout.empty() || layout=="auto"))
SetKEYBCP();
}
}
if (country>0&&!control->opt_noconfig) {
@ -1674,7 +1679,7 @@ void SHELL_Init() {
MSG_Add("SHELL_CMD_ASSOC_HELP", "Displays or changes file extension associations.\n");
MSG_Add("SHELL_CMD_ASSOC_HELP_LONG", "ASSOC [.ext[=command] ... ]\n\nType ASSOC without parameters to display the current file associations.\nFile extensions must start with a dot (.); wildcards (* and ?) are allowed.\n");
MSG_Add("SHELL_CMD_CHCP_HELP", "Displays or changes the current DOS code page.\n");
MSG_Add("SHELL_CMD_CHCP_HELP_LONG", "CHCP [nnn [file]]\n\n nnn Specifies a code page number.\n file Specifies a code page file.\n\nSupported code pages for changing in the TrueType font output:\n\n437,737,775,808,850,852,853,855,857,858,860-866,869,872,874,3021\n\nWindows code pages: 1250,1251,1252,1253,1254,1255,1256,1257,1258\n\nAlso double-byte code pages including 932, 936, 949, and 950.\n\nCustomized code pages are supported by providing code page files.\n");
MSG_Add("SHELL_CMD_CHCP_HELP_LONG", "CHCP [nnn [file]]\n\n nnn Specifies a code page number.\n file Specifies a code page file.\n\nSupported code pages for changing in the TrueType font output:\n\n437, 737, 775, 808, 850, 852, 853, 855-866, 869, 872, 874, 3021\n\nWindows code pages: 1250,1251,1252,1253,1254,1255,1256,1257,1258\n\nAlso double-byte code pages including 932, 936, 949, and 950/951.\n\nCustomized code pages are supported by providing code page files.\n");
MSG_Add("SHELL_CMD_CHCP_ACTIVE", "Active code page: %d\n");
MSG_Add("SHELL_CMD_CHCP_MISSING", "ASCII characters not defined in TTF font: %d\n");
MSG_Add("SHELL_CMD_CHCP_INVALID", "Invalid code page number - %s\n");

View File

@ -1588,8 +1588,10 @@ for /d %%i in ($(SolutionDir)\..\contrib\translations\*) do copy %%i\*.lng "$(Ou
<ClInclude Include="..\include\cp852_uni.h" />
<ClInclude Include="..\include\cp853_uni.h" />
<ClInclude Include="..\include\cp855_uni.h" />
<ClInclude Include="..\include\cp856_uni.h" />
<ClInclude Include="..\include\cp857_uni.h" />
<ClInclude Include="..\include\cp858_uni.h" />
<ClInclude Include="..\include\cp859_uni.h" />
<ClInclude Include="..\include\cp860_uni.h" />
<ClInclude Include="..\include\cp861_uni.h" />
<ClInclude Include="..\include\cp862_uni.h" />

View File

@ -1934,12 +1934,18 @@
<ClInclude Include="..\include\cp855_uni.h">
<Filter>Includes</Filter>
</ClInclude>
<ClInclude Include="..\include\cp856_uni.h">
<Filter>Includes</Filter>
</ClInclude>
<ClInclude Include="..\include\cp857_uni.h">
<Filter>Includes</Filter>
</ClInclude>
<ClInclude Include="..\include\cp858_uni.h">
<Filter>Includes</Filter>
</ClInclude>
<ClInclude Include="..\include\cp859_uni.h">
<Filter>Includes</Filter>
</ClInclude>
<ClInclude Include="..\include\cp860_uni.h">
<Filter>Includes</Filter>
</ClInclude>