* Remote control of Dosemu
@ 2008-07-18 4:19 John Coppens
[not found] ` <48801E06.9080700@pobox.com>
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: John Coppens @ 2008-07-18 4:19 UTC (permalink / raw)
To: linux-msdos
Hello people.
I need to 'remote control' an old program. I found in the FAQ that it is
possible to feed keyboard commands into an application.
The problem is that I would need feedback from the program's screen,
while it is running. Is there any way to get to the screen output? As
usual, this apps write immediately to the scree (bypasses the BIOS).
Any suggestions where to look?
John
^ permalink raw reply [flat|nested] 12+ messages in thread[parent not found: <48801E06.9080700@pobox.com>]
[parent not found: <20080718135339.75dfae5c.john@jcoppens.com>]
* Re: Remote control of Dosemu [not found] ` <20080718135339.75dfae5c.john@jcoppens.com> @ 2008-07-18 17:21 ` Alain M. 2008-07-18 21:35 ` John Coppens 0 siblings, 1 reply; 12+ messages in thread From: Alain M. @ 2008-07-18 17:21 UTC (permalink / raw) To: dosEmu-list Hi, Dosemu has a "dumb" mode which uses Linux's stdin and stdout. It will probably work with scrict command line DOS programs, most probably not with TUI. This can probably be used with screen and easely with ssh and also with scripts. I use dosemu remotely trough ssh. You just need to run dosemu in char mode and install the fonts you need in the client machine. BUT, you did not say if your application is command line, TUI or graphic... Alain PS: I am redirecting this to the dosemu list John Coppens escreveu: > On Fri, 18 Jul 2008 01:37:26 -0300 > "Alain M." <alainm@pobox.com> wrote: > >> is it ok for you to run remotely using ssh? works for me (non graphic) >> >> I believe that it is possible to use "screen" and access a program that >> is already running, I someone knows how to do it.... > > Hello Alain. > > Thanks for your message. I've been using Linux for about 10 years now, > and never read about the Screen command :-< > > So, I now found a lot of information, but I can't see how to access the > screen of one program from another. As far as I can see, all the commands > of 'screen' are keyboard commands. > > Maybe the term 'remote control' is not quite correct. I need to run a DOS > program (from the same machine) but somehow access the information which > is on the screen. There are two reasons: > > 1) I cannot send commands until some event was reported on the screen, > 2) I need the result from measurements, which only appear on the DOS > screen. > > This has to be done automatically. > > John > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Remote control of Dosemu 2008-07-18 17:21 ` Alain M. @ 2008-07-18 21:35 ` John Coppens 2008-07-18 22:24 ` Richard 2008-07-19 0:24 ` Alain M. 0 siblings, 2 replies; 12+ messages in thread From: John Coppens @ 2008-07-18 21:35 UTC (permalink / raw) To: Alain M.; +Cc: dosEmu-list On Fri, 18 Jul 2008 14:21:55 -0300 "Alain M." <alainm@pobox.com> wrote: > BUT, you did not say if your application is command line, TUI or > graphic... Hella Alain. The program is TUI - direct video access, so, I don't know if any dumb mode would be possible. From a few disassembly intents, I suspect it was written in Turbo Pascal o C. I have no need to do ssh. The program must be run every hour, a number of commands typed in, and a value, shown on the screen, must be captured. I've also tried to write a TSR at some point, and with some success, and maybe I should continue on that path, as I can then probably look directly at the memory where the result appears. But, if possible, I'd rather find a more elegant way... Thanks, John ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Remote control of Dosemu 2008-07-18 21:35 ` John Coppens @ 2008-07-18 22:24 ` Richard 2008-07-19 0:18 ` John Coppens 2008-07-19 0:24 ` Alain M. 1 sibling, 1 reply; 12+ messages in thread From: Richard @ 2008-07-18 22:24 UTC (permalink / raw) To: John Coppens; +Cc: Alain M., dosEmu-list Hi John, I had this problem when running Norton Ghost, it asked a question at startup that needed the sequence <Tab><Tab><Enter> before proceeding with the command line options. The available DosEmu options didn't work, so I wrote a kernel module that simulated key presses. This was for a 2.4 kernel and a hack, I'm no kernel hacker. In my case Ghost was running in a console on the front display. To get an idea of Ghosts progress, I found the memory at 0xA0000 showed a cross-section of the 4 colour screen. It looked like it was interlaced, though I couldn't figure out how. For my purposes it was enough to save the screen. It is possible the text version is also available in a constant memory location. The details of the kernel module and screen grab are here, in section 5: http://www.csc.liv.ac.uk/~greg/ghost4linux/index.html Richard John Coppens wrote: > On Fri, 18 Jul 2008 14:21:55 -0300 > "Alain M." <alainm@pobox.com> wrote: > >> BUT, you did not say if your application is command line, TUI or >> graphic... > > Hella Alain. > > The program is TUI - direct video access, so, I don't know if any dumb > mode would be possible. From a few disassembly intents, I suspect it was > written in Turbo Pascal o C. > > I have no need to do ssh. The program must be run every hour, a number > of commands typed in, and a value, shown on the screen, must be captured. > > I've also tried to write a TSR at some point, and with some success, and > maybe I should continue on that path, as I can then probably look > directly at the memory where the result appears. > > But, if possible, I'd rather find a more elegant way... > > Thanks, > John > -- > To unsubscribe from this list: send the line "unsubscribe linux-msdos" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Remote control of Dosemu 2008-07-18 22:24 ` Richard @ 2008-07-19 0:18 ` John Coppens 0 siblings, 0 replies; 12+ messages in thread From: John Coppens @ 2008-07-19 0:18 UTC (permalink / raw) To: Richard; +Cc: dosEmu-list On Fri, 18 Jul 2008 23:24:24 +0100 Richard <R.Gregory@liverpool.ac.uk> wrote: > I had this problem when running Norton Ghost, it asked a question at > startup that needed the sequence <Tab><Tab><Enter> before proceeding > with the command line options. The available DosEmu options didn't > work, so I wrote a kernel module that simulated key presses. This was > for a 2.4 kernel and a hack, I'm no kernel hacker. That looks quite similar to the problem I'm having. > In my case Ghost was running in a console on the front display. To get > an idea of Ghosts progress, I found the memory at 0xA0000 showed a > cross-section of the 4 colour screen. It looked like it was interlaced, > though I couldn't figure out how. For my purposes it was enough to save > the screen. It is possible the text version is also available in a > constant memory location. I haven't really followed screen mapping with 32 bit mapping, so I have no idea where the screen would be. But as this program must run at hour-intervals, and shouldn't even interfere with the normal ops, I guess there is no other way to run it except with DOSemu on stdin/out. I'm starting to think that it will be easier to capture the entire serial stream, and reverse engr it, protocol and all. I did some preliminary captures but it seems quite complicated. It's really complicated because the machine is 35 km from here, so I can't really test easily. Thanks John ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Remote control of Dosemu 2008-07-18 21:35 ` John Coppens 2008-07-18 22:24 ` Richard @ 2008-07-19 0:24 ` Alain M. 2008-07-19 3:54 ` Frank Cox 1 sibling, 1 reply; 12+ messages in thread From: Alain M. @ 2008-07-19 0:24 UTC (permalink / raw) To: dosEmu-list > I have no need to do ssh. You don't need to, but have you something against it? Ok, it is TUI, but is it to run unatended? I have 2 programs that can help: 1) a program to insert up to 15 keys in the keyboar buffer, is this enough? There was a program that could do more, but never found it again. 2) a program that reads from the screen at any position, but it runs after another program has exited. Could this help? Alain John Coppens escreveu: > On Fri, 18 Jul 2008 14:21:55 -0300 > "Alain M." <alainm@pobox.com> wrote: > >> BUT, you did not say if your application is command line, TUI or >> graphic... > > Hella Alain. > > The program is TUI - direct video access, so, I don't know if any dumb > mode would be possible. From a few disassembly intents, I suspect it was > written in Turbo Pascal o C. > > I have no need to do ssh. The program must be run every hour, a number > of commands typed in, and a value, shown on the screen, must be captured. > > I've also tried to write a TSR at some point, and with some success, and > maybe I should continue on that path, as I can then probably look > directly at the memory where the result appears. > > But, if possible, I'd rather find a more elegant way... > > Thanks, > John > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Remote control of Dosemu 2008-07-19 0:24 ` Alain M. @ 2008-07-19 3:54 ` Frank Cox 2008-07-21 14:51 ` Alain M. 0 siblings, 1 reply; 12+ messages in thread From: Frank Cox @ 2008-07-19 3:54 UTC (permalink / raw) To: Alain M.; +Cc: dosEmu-list On Fri, 18 Jul 2008 21:24:01 -0300 "Alain M." <alainm@pobox.com> wrote: > 2) a program that reads from the screen at any position, but it runs > after another program has exited. I don't know about the original poster, but I could use that one here. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Remote control of Dosemu 2008-07-19 3:54 ` Frank Cox @ 2008-07-21 14:51 ` Alain M. 0 siblings, 0 replies; 12+ messages in thread From: Alain M. @ 2008-07-21 14:51 UTC (permalink / raw) To: dosEmu-list [-- Attachment #1: Type: text/plain, Size: 454 bytes --] AS this is the seccond request, I am posting to the list... The only thing is that the version I found *checks* for a certain message. Sources are there... Alain Frank Cox escreveu: > On Fri, 18 Jul 2008 21:24:01 -0300 > "Alain M." <alainm@pobox.com> wrote: > >> 2) a program that reads from the screen at any position, but it runs >> after another program has exited. > > I don't know about the original poster, but I could use that one here. > [-- Attachment #2: letela.zip --] [-- Type: application/zip, Size: 5825 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Remote control of Dosemu 2008-07-18 4:19 Remote control of Dosemu John Coppens [not found] ` <48801E06.9080700@pobox.com> @ 2008-07-19 17:14 ` Bart Oldeman 2008-07-21 18:38 ` Mike McCarty 2 siblings, 0 replies; 12+ messages in thread From: Bart Oldeman @ 2008-07-19 17:14 UTC (permalink / raw) To: John Coppens; +Cc: linux-msdos 2008/7/18 John Coppens <john@jcoppens.com>: > I need to 'remote control' an old program. I found in the FAQ that it is > possible to feed keyboard commands into an application. > > The problem is that I would need feedback from the program's screen, > while it is running. Is there any way to get to the screen output? As > usual, this apps write immediately to the scree (bypasses the BIOS). You can try running in terminal mode ("dosemu -t") and redirecting both input and output. The output will contain lots of escape characters but you might be able to fish out the output you need (even with direct video writes, as long as they are characters, not graphics). Dumb mode is most convenient but does not work with direct video writes. E.g., this gives you such a file: echo -e "exitemu\r" | dosemu -t > log You'll probably have to play a bit with pipes to get the whole thing working. Bart ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Remote control of Dosemu 2008-07-18 4:19 Remote control of Dosemu John Coppens [not found] ` <48801E06.9080700@pobox.com> 2008-07-19 17:14 ` Bart Oldeman @ 2008-07-21 18:38 ` Mike McCarty 2008-07-21 22:07 ` John Coppens [not found] ` <20080721161839.43f36b4c.john@jcoppens.com> 2 siblings, 2 replies; 12+ messages in thread From: Mike McCarty @ 2008-07-21 18:38 UTC (permalink / raw) To: FreeDOS John Coppens wrote: > Hello people. > > I need to 'remote control' an old program. I found in the FAQ that it is > possible to feed keyboard commands into an application. > > The problem is that I would need feedback from the program's screen, > while it is running. Is there any way to get to the screen output? As > usual, this apps write immediately to the scree (bypasses the BIOS). Is there a way to configure the program to use the BIOS rather than direct screen writes? Some of those old programs had various modes V.SLOW use MSDOS stdout writes SLOW use MSDOS direct console writes FAST use BIOS screen writes V.FAST use direct memory writes If it can be configured to use another mode, you might be able to do the capture easily. Another possibility is that it might have a mode to display output to the printer. Then you can likely capture INT5 (IIRC) and intercept the BIOS interrupts to control the printer, or redirect the printer output from DOSEMU. If that's not possible, you could try simulating the keypress to force a screen capture to the printer PrintScrn key. I recall a program KEYFAKE which I may have lying around which might be able to do something like that. > Any suggestions where to look? > > John Mike -- p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} Oppose globalization and One World Governments like the UN. This message made from 100% recycled bits. You have found the bank of Larn. I speak only for myself, and I am unanimous in that! ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Remote control of Dosemu 2008-07-21 18:38 ` Mike McCarty @ 2008-07-21 22:07 ` John Coppens [not found] ` <20080721161839.43f36b4c.john@jcoppens.com> 1 sibling, 0 replies; 12+ messages in thread From: John Coppens @ 2008-07-21 22:07 UTC (permalink / raw) To: linux-msdos On Mon, 21 Jul 2008 13:38:51 -0500 Mike McCarty <Mike.McCarty@sbcglobal.net> wrote: > Another possibility is that it might have a mode to display output > to the printer. Then you can likely capture INT5 (IIRC) and intercept > the BIOS interrupts to control the printer, or redirect the printer > output from DOSEMU. If that's not possible, you could try simulating > the keypress to force a screen capture to the printer PrintScrn key. > I recall a program KEYFAKE which I may have lying around which might > be able to do something like that. No possibility to change, as far as I can see. A little surprised though, because the program works on Hercules and CGA screens, so there should be some kind of selection mechanism. I suspect it is automatic. I remember 'keyfake'. In fact, I wrote a TSR program that fakes keypresses. I hadn't thought about PrtScr though. I believe there was an interrupt called when PrtScr was pressed. But, I seem to remember it prints directly, so I suspect it'll be easier to modify the TSR to make it read the screen memory directly. Thanks for the suggestions! John ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <20080721161839.43f36b4c.john@jcoppens.com>]
* Re: Remote control of Dosemu [not found] ` <20080721161839.43f36b4c.john@jcoppens.com> @ 2008-07-22 2:23 ` Mike McCarty 0 siblings, 0 replies; 12+ messages in thread From: Mike McCarty @ 2008-07-22 2:23 UTC (permalink / raw) To: FreeDOS John Coppens wrote: > On Mon, 21 Jul 2008 13:38:51 -0500 > Mike McCarty <Mike.McCarty@sbcglobal.net> wrote: > >> Another possibility is that it might have a mode to display output >> to the printer. Then you can likely capture INT5 (IIRC) and intercept >> the BIOS interrupts to control the printer, or redirect the printer >> output from DOSEMU. If that's not possible, you could try simulating >> the keypress to force a screen capture to the printer PrintScrn key. >> I recall a program KEYFAKE which I may have lying around which might >> be able to do something like that. > > No possibility to change, as far as I can see. A little surprised though, > because the program works on Hercules and CGA screens, so there should be > some kind of selection mechanism. I suspect it is automatic. > > I remember 'keyfake'. In fact, I wrote a TSR program that fakes > keypresses. I hadn't thought about PrtScr though. I believe there was an > interrupt called when PrtScr was pressed. But, I seem to remember What I had in mind is that DOSEMU probably emulates "PrintScreen" by sending the output to a Linux printer. You might be able to tell DOSEMU to send it to a regular Linux file and postprocess that. There is a BIOS call to send a single character to the printer, which is INT5, I think. Anyway, trying to get just a file visible to Linux is more likely to succeed than any number of TSRs doing junk under the emulated MSDOS, having done a few old popup TSRs myself. Mike -- p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} Oppose globalization and One World Governments like the UN. This message made from 100% recycled bits. You have found the bank of Larn. I speak only for myself, and I am unanimous in that! ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-07-22 2:23 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 4:19 Remote control of Dosemu John Coppens
[not found] ` <48801E06.9080700@pobox.com>
[not found] ` <20080718135339.75dfae5c.john@jcoppens.com>
2008-07-18 17:21 ` Alain M.
2008-07-18 21:35 ` John Coppens
2008-07-18 22:24 ` Richard
2008-07-19 0:18 ` John Coppens
2008-07-19 0:24 ` Alain M.
2008-07-19 3:54 ` Frank Cox
2008-07-21 14:51 ` Alain M.
2008-07-19 17:14 ` Bart Oldeman
2008-07-21 18:38 ` Mike McCarty
2008-07-21 22:07 ` John Coppens
[not found] ` <20080721161839.43f36b4c.john@jcoppens.com>
2008-07-22 2:23 ` Mike McCarty
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox