Skip to content

Commit f10dbf0

Browse files
Tandy emulation: Add the string "Tandy" somewhere in the DOS kernel if machine=tandy so The Train: Escape to Normandy can detect a Tandy system [#5918 (comment)]
1 parent 000272e commit f10dbf0

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
NEXT VERSION
2+
- Tandy emulation: Add the string "Tandy" somewhere in the DOS kernel
3+
at startup if machine=tandy. The game "The Train: Escape to Normandy"
4+
scans from FFFF:0000 for the string "Tandy" which of course wraps
5+
around to the first 64KB of memory where the DOS kernel resides. If
6+
it does not see this string, it does not think it is running on a Tandy.
7+
Such a detection routine will obviously break if you're on a 286 based
8+
Tandy with HMA enabled, or you're running normal MS-DOS on a Tandy
9+
system. This change allows the game to run (joncampbell123).
210
- Tseng ET4000 emulation: Mode 0x24 is unusual in that it is a 130x28
311
text mode with a 13-pixel high character cell. The ET4000 VGA BIOS
412
apparently has a specific font for that mode, so, incorporate that

src/dos/dos_tables.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,25 @@ void DOS_SetupTables(void) {
301301
/* create SDA */
302302
DOS_SDA(DOS_SDA_SEG,0).Init();
303303

304+
/* For Tandy emulation, put the string "Tandy" somewhere in the DOS kernel.
305+
* "The Train: Escape to Normandy" apparently detects Tandy hardware by
306+
* whether or not the string "Tandy" appears in the first 64KB of base
307+
* memory. [https://github.com/joncampbell123/dosbox-x/issues/5918].
308+
*
309+
* It does a REPNE SCASB in FFFF:0000 for the string "Tandy", which on the
310+
* older hardware, wraps around to the base memory and finds it that way.
311+
* Of course if you're on a 286 Tandy and the HMA is enabled, this isn't
312+
* going to work, but, that's what the game does. */
313+
if(machine == MCH_TANDY) {
314+
seg = DOS_GetMemory(8,"Tandy signature");
315+
real_writeb(seg,0x00,'T');
316+
real_writeb(seg,0x01,'a');
317+
real_writeb(seg,0x02,'n');
318+
real_writeb(seg,0x03,'d');
319+
real_writeb(seg,0x04,'y');
320+
real_writeb(seg,0x05,0);
321+
}
322+
304323
/* create a CON device driver */
305324
if(IS_DOSV) {
306325
seg = DOS_GetMemory(2, "device $IBMADSP");

0 commit comments

Comments
 (0)