2

I am porting DOS app to Linux, and I need to do it in pure text mode, not graphics pretending to be text. Linux when booting for some time is running in VGA mode 03, then it is switching to graphics mode, or at least is changing font. When I use NCourses, I cannot get the same text attributes as in VGA text mode, even colors are not accessible in the same pallete. The perfect solution for me would be direct access to text mode display memory (b800:0000) Any ideas ?

Pablo
  • 29
  • 2
  • Run with [DOSbox](https://www.dosbox.com/)? – Chris Dodd Sep 24 '19 at 20:07
  • DOSbox is not an option. It has to be Linux native application running in text mode (real text mode, not windowed) – Pablo Sep 25 '19 at 09:30
  • Linux doesn't have any concept of 'text mode' -- applications can be connected to a terminal, but have no way of distinguishing between a windowed terminal and the console (or a remote terminal). – Chris Dodd Sep 25 '19 at 18:32

1 Answers1

0

It's a workaround, but start your application from a bash shell script with these lines in it:

setfont Lat15-Terminus32x16
sleep 0.1
stty columns 80 rows 25
sleep 0.1
...your program comes here
setupcon -current-tty
sleep 0.1

The exact font you use is up to you, of course. I use this to run apps in DOSEMU and it works well. The sleep statements seem to be necessary.