VOGONS


First post, by hali

User metadata
Rank Newbie
Rank
Newbie

Running DOSBox the F-keys works just fine. But when I'm running an old home written program the F1 and F5 keys that I need will no longer work, nothing happens! I'm running under WinXP with a USB-keyboard. ANY help is appreciated!

Reply 1 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Running DOSBox the F-keys works just fine.

How do you determine that? Does f3 under dosbox recall the last typed command?

Reply 2 of 13, by hali

User metadata
Rank Newbie
Rank
Newbie

Yes, F3 recalls my last command and so on. I've tried to start the mapper by typing -startmapper but get back 'Illegal command: -startmapper' . Any idea?

Reply 3 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

startmapper is a parameter for dosbox ("dosbox -startmapper" or so).
Also ctrl-f1 (inside the dosbox window) starts up the mapper.

If f3 works in the shell but does NOT work in the app, something is really
wrong, but hard to tell. Does it (e.g. f3) work for example in the XP shell?

Reply 4 of 13, by hali

User metadata
Rank Newbie
Rank
Newbie

Thanks wd for your reply. I also want to make a printer running so I was using the DOSBox Megabuild. From inside a DOSBox window I couldn't start the mapper not with -startmapper nor ctrl-F1. I uninstalled and reinstalled the 0.72 DOSBox original version and now the mapper works fine... I assign the F1 key to e.g. the z-key using the mapper. Although inside my small DOS program nothing happens when I strike the z key...

Reply 5 of 13, by hali

User metadata
Rank Newbie
Rank
Newbie

I forgot to say that all my F-keys on the keyboard works fine in XP shell.

Reply 6 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I meant "do they work in YOUR program running inside the xp shell".

Do you have the sources of your program somewhere?

Reply 7 of 13, by hali

User metadata
Rank Newbie
Rank
Newbie

Aha, my program won't run at all inside XP. I have to use DOSBox and in there all F-keys are dead running my program.

Unfortunately I'm not allowed to put out the code of this program. The guy who wrote it want to have a lot of money to modify it to run under a modern PC and use modern printers. The original computer from 1983 is starting to fail and we have to do something..

Do you know anything about old printer settings?
In my program the printer settings are set to:
P1 : 0 <
P2 : 018027073003 <
P3 : 015 <
P4 : 018027037071 <
P5 : <
P6 : <

Description for printer settings:
P1 : M193 12 CPI CQ <
P2 : M193 10 CPI CQ <
P3 : M193 17 CPI <
P4 : m193 ITALIC <
P5 : <
P6 : <

Any idea of what this means?

Reply 8 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Sorry, no idea about those settings, should be printer models though where
you specify the characters per inch.

The guy who wrote it want to have a lot of money to modify it to run under a modern PC and use modern printers

Tell him i'll do it for 10 bucks and see if you can get him to lower his price 😉

Reply 9 of 13, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author
P1 : 0 < P2 : 018027073003 < P3 : 015 < P4 : 018027037071 < P5 : < P6 : < […]
Show full quote

P1 : 0 <
P2 : 018027073003 <
P3 : 015 <
P4 : 018027037071 <
P5 : <
P6 : <

These are the printer control codes that switch the printer to certain font modes/sizes.

1+1=10

Reply 10 of 13, by hali

User metadata
Rank Newbie
Rank
Newbie

Do you know if these codes are general/the same for most printers or is it depending on the printer brand or type?

Reply 11 of 13, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

In my build you can try Alt-Pause, then Settings -> keyboard for the keymapper. On my computer the GUI crashes though after exit, so save your updated layout.

Is M193 a printer model?
There seem to be some ESC-codes (027) in there but if the printer is as old as the computer I doubt that standard was there yet 😉
The printer patch follows this standard:
http://www.epson.co.uk/support/manuals/pdf/ESCP/Part_1.pdf
So for italic you can try 027052 etc.

1+1=10

Reply 12 of 13, by hali

User metadata
Rank Newbie
Rank
Newbie

Thanks h-a-l-9000, now I can reach the mapper also in your build (I guess I should have read the manual more carefully!). Although, the function keys still won't work...

If I press a F-key in my program (e.g. F2 for coming back to the main menu), nothing happens in the program but writing a character on the screen.
F1 -> ;
F2 -> <
F3 -> =
F4 -> >
F5 -> ?
F6 -> @
F7 -> A
F8 -> B
F9 -> C
F10 -> D
F11 -> à
F12 -> å

Familiar to anyone?

Reply 13 of 13, by TeaRex

User metadata
Rank Member
Rank
Member

Your program is obviously, for some strange reason, interpreting keyboard scancodes as ASCII character codes. I have no idea why any sane DOS program would do this, as the two sets were always quite different.

Edit: I seem to remember, very deep in the back of my head, that there was some BIOS (or DOS?) function that returned ASCII codes for normal keys and some marker byte (was it 0x00?) followed by the raw scancode for special keys. Maybe that's what happening and for some reason the marker byte isn't reaching your prog or isn't being interpreted correctly. But don't quote me on this, and don't ask me for the function number.

Edit again: I now think it was not a BIOS or DOS function but rather some function from either QuickBasic or Turbo Pascal. Is your program written in any of these languages? Though I'm still not sure. I did Turbo in High School and I earned a bit of money doing QuickBasic stuff during university, but that was really long ago.

tearex