Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Here you can discuss the development of patches.

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby DosFreak » 2007-4-21 @ 00:45

umm, no. It's a patch for the DosBox code. You integrate the patch into the code, you compile the code, then you execute dosbox, then you run your program.
User avatar
DosFreak
l33t++
 
Posts: 9783
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby andre.afonso » 2007-4-21 @ 02:00

and how do i integrate the patch into the code? :s-face:
andre.afonso
Newbie
 
Posts: 3
Joined: 2007-4-20 @ 22:22
Location: Portugal

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby wd » 2007-4-21 @ 10:24

can you compile the sources?
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby andre.afonso » 2007-4-21 @ 10:54

well... my english is weak but my PC knowledge is weaker... :happyhappy:
if you can, i need an easily explanation... first thing to do is to apply the patch. ok. where and how i do it? and what i need to do that?
andre.afonso
Newbie
 
Posts: 3
Joined: 2007-4-20 @ 22:22
Location: Portugal

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby abyss » 2007-4-21 @ 11:31

I don't know how to compile and i don't know what that even means. Can i have a copy of dosbox 0.65 with this already in it.
User avatar
abyss
Member
 
Posts: 465
Joined: 2007-1-25 @ 22:47

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby wd » 2007-4-21 @ 13:45

first thing to do is to apply the patch

Nope, first thing is to compile the sources. See the dosbox wiki
or something for that.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby jean » 2007-6-07 @ 12:06

Hi
how can i donwload this patch? cookies???
Do this patch work fine in dosbox 0.70?
regard
jean
Newbie
 
Posts: 26
Joined: 2007-5-18 @ 08:48
Location: France

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox

Postby qv90 » 2007-6-12 @ 08:53

Hi,

I updated code to support DosBox 0.70. You'll find a full source at http://syncgw.com/forum-de/category/11.html.

Code: Select all
//########################################################################################################
//
// 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

//
//########################################################################################################
Last edited by qv90 on 2012-11-11 @ 09:17, edited 1 time in total.
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby jean » 2007-6-12 @ 09:04

hi
every time i try to download your source, i have this message:
"You need to enable cookies in your browser for 'qv90.hopto.org' before you can download files"
I use IE 6 and cookies are enable.
Is code source in your last answer able me to print in LPT?
regards
jean
Newbie
 
Posts: 26
Joined: 2007-5-18 @ 08:48
Location: France

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby qv90 » 2007-6-12 @ 14:15

Hi,

problem is based on your IE security settings (see attached screen shot how to circumvent).

As described, DOS print output is captured into a file (see PATCH_LPTX)
You do not have the required permissions to view the files attached to this post.
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby qv90 » 2007-6-12 @ 14:20

Hi,
for those who want an executable, a compiled version (with some restriction) can be downloaded at http://syncgw.com/forum-de/category/11.html
Last edited by qv90 on 2012-11-11 @ 09:17, edited 1 time in total.
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby jean » 2007-6-12 @ 14:33

hi
i try again tomorrow
what are restrictions in your compiled version?
regards
jean
Newbie
 
Posts: 26
Joined: 2007-5-18 @ 08:48
Location: France

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby qv90 » 2007-6-13 @ 10:46

Restrictions were document on download page (e.g. no IPX support, no screen shots).
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby jean » 2007-6-15 @ 09:16

hi
download ok
now, i use windows XP and i don't understand how to create an compiling environment .
i see:

"3. Compiling enviroment
When working on Windows, you'll most likely need a compiling enviroment. We suggest using the combination of MiniGW and MSYS, which can be found at

http://prdownloads.sf.net/mingw/
You'll need to download both the latest MiniGW and MSYS. (what package?? :confused: )
After downloading install MiniGW and MSYS (in this order). The MSYS-Installer should ask for the installation directory of MiniGW, so you should pick the path where you installed it. After the installation, run the MSYS.BAT and you should see a unix-like command prompt. "

i try to find a good tutorial
regards
jean
Newbie
 
Posts: 26
Joined: 2007-5-18 @ 08:48
Location: France

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby qv90 » 2007-6-15 @ 09:27

Far too complicate :blush: - if you're operating system is MicroSoft Windows try out http://syncgw.com/forum-de/category/11.html.
Last edited by qv90 on 2012-11-11 @ 09:18, edited 1 time in total.
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby jean » 2007-6-15 @ 09:38

i download "windows executable 1.4" or "Dosbox edition jaballa"?
can i use french keyboard with each
regards
jean
Newbie
 
Posts: 26
Joined: 2007-5-18 @ 08:48
Location: France

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby qv90 » 2007-6-15 @ 09:52

You should not use Jaballa Edition 1.4. It's based on DosBox 0.65 - I would recommend to use the new DosBox 0.70 based Edition 1.71.

- If you wanna only try out, then the EXE file is that what you need.
- If you wanna modify source code yourself, then you need to download source code and compile it (I suggest to use Visual-C on Windows systems).

French can be specified as far as I know in the dosbox.conf (download executable from dosbox.org and read through attached documentation file) for keyboard setting.

French "special characters" in file names is not supported by this version, but if you use the source code provided, take a look at the PATCH_GERFILECHAR sections - they point exactly to the source code section you have to modify. If you send me your modifications, I'll attach them to the Jaballa Edition source code I'm maintaining.
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby jean » 2007-6-15 @ 10:23

hi
under dosbox command "echo aaaa >LPT1" works fine in a file. When i run my dos application, it doesn't work : i print in screen like no-jaballa-dosbox not in file.
For french i only use keyb fr
regards
jean
Newbie
 
Posts: 26
Joined: 2007-5-18 @ 08:48
Location: France

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby jean » 2007-6-19 @ 14:28

Hi
1)what command allows me how to know defined devices under dos?
Because my software tell me that i have too much defined devices or my device LPT1 is not define?? :shocked:
2)With your patch, can i use PRN?
regards
jean
Newbie
 
Posts: 26
Joined: 2007-5-18 @ 08:48
Location: France

Re: Access to device names LPT1, LPT2, LPT3, LPT4 in DosBox 0.65

Postby qv90 » 2007-6-23 @ 15:42

- Number of DOS Devices is originally limited to 10. The PATCH_LPTX increases that to 14.
- I don't know any command to print available devices...
- PRN Device is currently not setup/usable
Jam
Live long and prosper!
http://syncgw.com
User avatar
qv90
Newbie
 
Posts: 65
Joined: 2006-7-01 @ 10:22

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: knowledge [bot] and 1 guest