source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Strings.asm @ 491

Last change on this file since 491 was 491, checked in by krille_n_@…, 11 years ago

Changes:

  • Added a new define (USE_UNDOC_INTEL) that enables optimizations possible by using undocumented instructions available on all Intel processors and truly compatible clones. AFAIK the only exceptions are the NEC V-series and the Sony CXQ70108 processors so this option should be safe for use on the AT builds.
  • Building BIOSDRVS or the BIOS without MODULE_STRINGS_COMPRESSED would fail due to the recent code exclusions so I changed them a bit. Also fixed the mistaken change to Main.asm
  • Changed the Tandy specific info in Configuration_FullMode.txt so it matches the info in the Wiki.
  • Optimizations and fixes in general.
File size: 10.9 KB
Line 
1; Project name  :   XTIDE Universal BIOS
2; Description   :   Strings and equates for BIOS messages.
3
4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
7;
8; This program is free software; you can redistribute it and/or modify
9; it under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2 of the License, or
11; (at your option) any later version.
12;
13; This program is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16; GNU General Public License for more details.
17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18;
19
20%ifdef MODULE_STRINGS_COMPRESSED_PRECOMPRESS
21    %include "Display.inc"
22%endif
23
24; Section containing code
25SECTION .text
26
27; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
28; To support an optimization in that code, these strings must start on the same 256 byte page,
29; which is checked at assembly time below.
30;
31g_szDetectStart:
32g_szDetectMaster:       db  "Master",NULL
33g_szDetectSlave:        db  "Slave ",NULL
34g_szDetectOuter:        db  "%s at %s: ",NULL
35%ifdef MODULE_SERIAL
36g_szDetectCOM:          db  "COM%c%s",NULL
37g_szDetectCOMAuto:      db  " Detect",NULL
38g_szDetectCOMSmall:     db  "/%u%u00",NULL                  ; IDE Master at COM1/9600:
39g_szDetectCOMLarge:     db  "/%u.%uK",NULL                  ; IDE Master at COM1/19.2K:
40%endif
41g_szDetectEnd:
42g_szDetectPort:         db  "%x",NULL                       ; IDE Master at 1F0h:
43
44%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
45    %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
46        %error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP.  Please move this block up or down within Strings.asm"
47    %endif
48%endif
49
50
51; POST drive detection strings
52g_szDashForZero:    db  "- ",NULL   ; Required by Display Library
53g_szRomAt:          db  LF,CR
54                    db  "%s @ %x",LF,CR                     ; -=XTIDE ... =- @ Segment
55                    db  "%s",LF,CR                          ; version string
56                    db  "Released under GNU GPL v2",LF,CR
57                    db  LF,CR,NULL
58%ifdef MODULE_BOOT_MENU
59g_szBootMenuTitle:  db  "%s%c",LF,CR                        ; -=XTIDE ... =- and null (eaten)
60                    db  "%s",NULL                           ; version string
61%endif
62g_szDriveName:      db  "%z",LF,CR,NULL
63
64
65; Boot loader strings
66g_szTryToBoot:          db  "Booting %c",ANGLE_QUOTE_RIGHT,"%c",LF,CR,NULL
67g_szBootSectorNotFound: db  "Boot sector "
68g_szNotFound:           db  "not found",LF,CR,NULL
69g_szReadError:          db  "Error %x!",LF,CR,NULL
70
71
72%ifdef MODULE_HOTKEYS
73; Hotkey Bar strings
74g_szFDD:        db  "FDD [%c]",NULL         ; "FDD [A]"
75g_szHDD:        db  "HDD [%c]",NULL         ; "HDD [C]"
76g_szBootMenu:   db  "%sMnu",NULL            ; "BootMnu"
77g_szRomBoot:    db  "Rom%s",NULL            ; "RomBoot"
78g_szBoot:       db  "Boot",NULL
79g_szHotkey:     db  "%A%c%c%A%s%A ",NULL    ; "C»HDD [A] ", "F2BootMnu " or "F8RomBoot "
80
81
82%ifdef MODULE_BOOT_MENU
83; Boot Menu Floppy Disk strings
84;
85; The following strings are used by BootMenuPrint_RefreshInformation
86; To support optimizations in that code, these strings must start on the same 256 byte page,
87; which is checked at assembly time below.
88;
89g_szFddStart:
90g_szFddUnknown:     db  "Unknown",NULL
91g_szFddSizeOr:      db  "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
92g_szFddSize:        db  "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
93g_szFddThreeHalf:   db  "3",ONE_HALF,NULL
94g_szFddEnd:
95g_szFddFiveQuarter: db  "5",ONE_QUARTER,NULL
96
97%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
98    %if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
99        %error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within Strings.asm"
100    %endif
101%endif
102
103
104g_szAddressingModes:
105g_szNORMAL:     db  "NORMAL",NULL
106g_szLARGE:      db  "LARGE ",NULL
107g_szLBA:        db  "LBA   ",NULL
108g_szAddressingModes_Displacement equ (g_szLARGE - g_szAddressingModes)
109;
110; Ensure that addressing modes are correctly spaced in memory
111;
112%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
113    %if g_szNORMAL <> g_szAddressingModes
114        %error "g_szAddressingModes Displacement Incorrect 1"
115    %endif
116    %if g_szLARGE <> g_szNORMAL + g_szAddressingModes_Displacement
117        %error "g_szAddressingModes Displacement Incorrect 2"
118    %endif
119    %if g_szLBA <> g_szLARGE + g_szAddressingModes_Displacement
120        %error "g_szAddressingModes Displacement Incorrect 3"
121    %endif
122%endif
123
124
125g_szDeviceTypeValues:
126g_szDeviceTypeValues_16bit:     db  " 16",NULL
127g_szDeviceTypeValues_32bit:     db  " 32",NULL
128g_szDeviceTypeValues_8bit:      db  "  8",NULL
129g_szDeviceTypeValues_XTIDEr1:   db  "D8 ",NULL  ; Dual 8-bit
130g_szDeviceTypeValues_XTIDEr2:   db  "X8 ",NULL  ; A0<->A3 swapped 8-bit
131g_szDeviceTypeValues_XTCFpio8:  db  "T8 ",NULL  ; True 8-bit
132g_szDeviceTypeValues_XTCFdma:   db  "8MA",NULL  ; DMA 8-bit
133g_szDeviceTypeValues_XTCFmem:   db  "M8 ",NULL  ; Memory Mapped 8-bit
134g_szDeviceTypeValues_JrIde:     db  "M8 ",NULL
135g_szDeviceTypeValues_Serial:    db  "SER",NULL
136
137g_szDeviceTypeValues_Displacement equ (g_szDeviceTypeValues_32bit - g_szDeviceTypeValues)
138;
139; Ensure that device type strings are correctly spaced in memory
140;
141%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
142    %if g_szDeviceTypeValues_16bit <> g_szDeviceTypeValues
143        %error "g_szDeviceTypeValues Displacement Incorrect 1"
144    %endif
145    %if g_szDeviceTypeValues_32bit <> g_szDeviceTypeValues_16bit + g_szDeviceTypeValues_Displacement
146        %error "g_szDeviceTypeValues Displacement Incorrect 2"
147    %endif
148    %if g_szDeviceTypeValues_8bit <> g_szDeviceTypeValues_32bit + g_szDeviceTypeValues_Displacement
149        %error "g_szDeviceTypeValues Displacement Incorrect 2"
150    %endif
151    %if g_szDeviceTypeValues_XTIDEr1 <> g_szDeviceTypeValues_8bit + g_szDeviceTypeValues_Displacement
152        %error "g_szDeviceTypeValues Displacement Incorrect 3"
153    %endif
154    %if g_szDeviceTypeValues_XTIDEr2 <> g_szDeviceTypeValues_XTIDEr1 + g_szDeviceTypeValues_Displacement
155        %error "g_szDeviceTypeValues Displacement Incorrect 4"
156    %endif
157    %if g_szDeviceTypeValues_XTCFpio8 <> g_szDeviceTypeValues_XTIDEr2 + g_szDeviceTypeValues_Displacement
158        %error "g_szDeviceTypeValues Displacement Incorrect 5"
159    %endif
160    %if g_szDeviceTypeValues_XTCFdma <> g_szDeviceTypeValues_XTCFpio8 + g_szDeviceTypeValues_Displacement
161        %error "g_szDeviceTypeValues Displacement Incorrect 6"
162    %endif
163    %if g_szDeviceTypeValues_XTCFmem <> g_szDeviceTypeValues_XTCFdma + g_szDeviceTypeValues_Displacement
164        %error "g_szDeviceTypeValues Displacement Incorrect 7"
165    %endif
166    %if g_szDeviceTypeValues_JrIde <> g_szDeviceTypeValues_XTCFmem + g_szDeviceTypeValues_Displacement
167        %error "g_szDeviceTypeValues Displacement Incorrect 8"
168    %endif
169    %if g_szDeviceTypeValues_Serial <> g_szDeviceTypeValues_JrIde + g_szDeviceTypeValues_Displacement
170        %error "g_szDeviceTypeValues Displacement Incorrect 9"
171    %endif
172%endif
173
174
175g_szSelectionTimeout:   db  DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
176
177
178; Boot Menu information strings
179g_szCapacity:           db  "Capacity : %s",NULL
180g_szCapacityNum:        db  "%5-u.%u %ciB",NULL
181g_szInformation:        db  "%s",LF,CR
182    db  "Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,"IRQ",SINGLE_VERTICAL,"Reset",LF,CR
183    db  "%s",SINGLE_VERTICAL,"%5-u",SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",NULL
184
185
186; Boot Menu menuitem strings
187;
188; The following strings are used by BootMenuPrint_* routines.
189; To support optimizations in that code, these strings must start on the same 256 byte page,
190; which is checked at assembly time below.
191;
192g_szBootMenuPrintStart:
193g_szDriveNum:           db  "%x %s",NULL
194g_szDriveNumBOOTNFO:    db  "%x %z",NULL
195g_szFloppyDrv:          db  "Floppy Drive %c",NULL
196g_szBootMenuPrintEnd:
197g_szForeignHD:          db  "Foreign Hard Disk",NULL
198
199%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
200    %if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
201        %error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within Strings.asm"
202    %endif
203%endif
204
205%endif ; MODULE_BOOT_MENU
206%endif ; MODULE_HOTKEYS
207
208
209;------------------------------------------------------------------------------------------
210;
211; Tables for StringsCompress.pl
212;
213; Items can be added and removed from this table as needed, with the following rules:
214;  * Formats follow the special characters.  But other than that, order makes no difference.
215;  * Some of the formats require "even" and "odd" numbering.  Even tells the code that
216;    it is a "number-" format, otherwise it doesn't interpret a number first.  The easiest
217;    way to maintain this is to move one of the "n/a" items to/from the front of the format
218;    list to maintain the even/odd.
219;  * Values do not need to remain consistent across versions.  This table is only used
220;    internally to this file.
221;  * There can only be 32 of these (0-31).
222;  * Keeping the list short is good - this translates to a table in the compressed version.
223;    An error will be reported if a character or format is no longer being used by any
224;    strings above.
225;  * Please keep items sequential for ease of further editing.
226;
227;$translate{ord(' ')} = 0;
228;$translate{172}      = 1;     # ONE_QUARTER
229;$translate{171}      = 2;     # ONE_HALF
230;$translate{179}      = 3;     # SINGLE_VERTICAL
231;$translate{175}      = 4;     # ANGLE_QUOTE_RIGHT
232;$translate{ord('!')} = 5;
233;$translate{ord('"')} = 6;
234;$translate{ord(',')} = 7;
235;$translate{ord('-')} = 8;
236;$translate{ord('.')} = 9;
237;$translate{ord('/')} = 10;
238;$translate{ord('1')} = 11;
239;$translate{ord('2')} = 12;
240;$translate{ord('3')} = 13;
241;$translate{ord('5')} = 14;
242;$translate{ord('6')} = 15;
243;$translate{ord('8')} = 16;
244;$translate{200}      = 17;    # DOUBLE_BOTTOM_LEFT_CORNER
245;$translate{181}      = 18;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL
246;$translate{ord('0')} = 19;
247;
248; Formats begin immediately after the last Translated character (they are in the same table)
249;
250;$format_begin = 20;
251;
252;$format{"2-I"} = 20;        # must be even
253;$format{"u"}   = 21;        # must be odd
254;$format{"5-u"} = 22;        # must be even
255;$format{"x"}   = 23;        # must be odd
256;$format{"5-x"} = 24;        # must be even
257;$format{"nl"}  = 25;        # n/a
258;$format{"2-u"} = 26;        # must be even
259;$format{"A"}   = 27;        # n/a
260;$format{"c"}   = 28;        # n/a
261;$format{"s"}   = 29;        # n/a, normal string from DS
262;$format{"z"}   = 30;        # n/a, boot string from BDA
263;
264; NOTE: The last $format cannot exceed 31 (stored in a 5-bit quantity).
265;
266; Starting point for the "normal" range, typically around 0x40 to cover upper and lower case
267; letters.  If lower case 'z' is not used, 0x3a can be a good choice as it adds ':' to the
268; front end.
269;
270;$normal_base = 0x3a;
271;
272; End of StringsCompress.pl information
273;
274;------------------------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.