Reply 27 of 72, by qv90
- Rank
- Newbie
Hi,
I updated code to support DosBox 0.70. You'll find a full source at http://syncgw.com/forum-de/category/11.html.
//########################################################################################################//// Name: Enable Special German characters in file names// Version: DosBox 0.70 - 0.1// Last Update: 2007/06/10// Created by: Florian Daeumling, Jaballa Software// Description: In the good old days of DOS, characters were encoded in// one byte (8 bits). At the beginning, a 7-bit character set was defined.// This was enough for all English users ;-). As DOS was spread over the// world, requirements for internationalization raised. As you can imagine,// the remaining 128 characters available in a byte were far not enough// to provide all characters needed in all countries. To provide localization// the extended ASCII char set (consisting of 256 different characters)// was born, but never standardized. The "new" 128 characters were// filled up depending on the code pages used (For a detailed discussion// about code page see// http://www.freedos.org/freedos/news/technote/141.txt).// Those code page has basically nothing to do with DOS file names.// File names (and directory names as well) are restricted.// Legal characters for DOS file names include the following://// * Upper case letters A-Z// * Numbers 0-9// * Space (though trailing spaces are considered to be padding// and not a part of the file name)// * ! # $ % & ( ) - @ ^ _ ` { } ~ '// * Values 128-255//// (see: http://en.wikipedia.org/wiki/File_Allocation_Table)//// MS-DOS (which is only one out of a couple of DOS provided by// MicroSoft) makes more restrictions. It does not allow the character// values 128-255. (see:// http://support.microsoft.com/default.aspx?scid=kb;EN-US;q120138)//// DOSBox itself supports the MS-DOS approach. If you've ever used a// different DOS then you probably need more characters.//// Another problem arises when trying to create files in the host// environment (in my case Windows XP). Due to the fact that the// extended ASCII character set was not properly adapted to the// ANSI code used in Windows XP, the German characters// has different code page positions. You may notice this, if you open// a DOS text file and the special characters looks very strange.// To circumvent this situation are mapping is done by this patch.// If you create a file named "ÄÖÜ" it would also appear as "ÄÖÜ"// in your Windows XP operating system.//// Please keep in mind, this patch takes care only about the// translation of "Umlaute" characters to the Windows XP file system//// Howto test:// - copy Z:\autoexec.bat c:\äÄöÖüÜß// - dir c:\äÄöÖüÜß//#define PATCH_GERFILECHAR//// Name: Set German country settings// Version: DosBox 0.70 - 0.1
// Last Update: 2007/06/10// Created by: Florian Daeumling, Jaballa Software// Description: Some DOS programs expects correct settings in country// settings. This patch enables Euro currency, proper date&time format,// decimal separator and other for Germany//#define PATCH_COUNTRY_DE//// Name: Add "Set file date and time" interrupt// Version: DosBox 0.70 - 0.1// Last Update: 2007/06/10// Created by: Florian Daeumling, Jaballa Software// Description: Add missing function (INT 21H, 0x5701) for setting date// and time to files//// Howto test:// - Create empty directory// - Compare existing directory with new directory using Norton// Commander for DOS// - Copy "newer" files// - Compare existing directory with new directory again// - All files should be equal//#define PATCH_FILEDATETIME//// Name: Enable read/write access to devices// Version: DosBox 0.70 - 0.1// Last Update: 2007/06/10// Created by: Florian Daeumling, Jaballa Software// Description: Enable read/write access to device names (e.g. CON, LPT1)// Howto test:// - copy <existing file> con//#define PATCH_RWDEV//// Name: Printer device LPT1-4 support// Version: DosBox 0.70 - 0.1// Last Update: 2007/06/10// Created by: Florian Daeumling, Jaballa Software// Description: Printer output for LPT1-4 is captures and written into// a file "devLPTx.prn" (x-device 1-4) in the DoxBox directory. If print is// terminated (DOS program closes the device) a system command// (defined in dosbox.conf) is executed to deliver output to host// printing system.// All output from the issued command is echoed to the DosBox console.// At termination of DosBox, the temporary "device" files were// automatically deleted.//// Howto setup:// 1. Compile the DosBox Jaballa Edition.// 2. Call dosbox.exe// 3. Enter "config -writeconf dosbox.conf"// 4. Load dosbox.conf into editor// 5. Search for "[printer]" section// 6. Print output is discarded by default:// ...// LPT1=disable// ...// 7. Change "disable" to a command which sends output file to your// host printing system. If you're working on a Windows system,// you may use "copy %s LPT1 >Nul". "%s" is replaced at runtime// with the full path name to the directory where DosBox.Exe is located.// 8. Parameter "printer_timeout" specifies how long print output will// be "spooled" before output is delivered to host printing system// (1000 ticks is approx. 1 second).//// Some hints:// - The ">Nul" parameter is used to minimize output to DosBox// console (error message will still be shown on DosBox console// window). Check out as required. For debugging purposes you// may discard that parameter.// - You may use more complex commands. If the DOS program// generated // PostScript output and you've only a PCL printer,// then you can convert the print output by sending print file to// GhostScript (which is able to convert output from PostScript// to PCL) and then send it to your printer.// - You can easily redirect output from one printer device to a// different host system printer device by modifying the output// command (e.g. "LPT2=copy %s LPT1 >Nul").//// Hoto test: Test can only be performed, if you've enabled// "PATCH_RWDEV" patch!// - Specify "LPT1=copy %s C:\dummy" in dosbox.conf// - copy existing file to LPT2// - a message should appear in console window showing output// is discarded// - copy existing file to LPT1// - a new file "C:\dummy" should be created//#define PATCH_LPTX//// Name: Enable CLPBOARD as clipboard device// Version: DosBox 0.70 - 0.1// Last Update: 2007/06/10// Created by: Florian Daeumling, Jaballa Software// Description: Enable read/write access to Windows Clipboard.// Exit has some limitations:// 1. Works only on Windows host operating systems// 2. Supports only text read/write to/from clip board// 3. Due to DosBox coding, only 32767 bytes can be read or// written from/to clip board per each operation//// Howto test: Test can only be performed, if you've enabled// "PATCH_RWDEV" patch!// - start notepad.exe// - copy z:\autoexec.bat clpboard in DosBox// - switch to notepad and enter <CTRL><V>// - you should see content of autoexec.bat// - modify content and mark block; enter <CTRL><C>// - switch to DosBox and enter copy clpboard c:\test// - c:\test should contain copied block//#define PATCH_CLIPB//// Name: Change DOSBOX window title// Version: DosBox 0.70 - 0.1// Last Update: 2007/06/10// Created by: Florian Daeumling, Jaballa Software// Description: Changes DosBox window title to show edition name//#define XVERSION VERSION " - Jaballa Edition 1.7"#define PATCH_WINTITLE////########################################################################################################
Jam
Live long and prosper!
http://syncgw.com
