Board index » delphi » Page flipping in TurboVision (to/from graphics)

Page flipping in TurboVision (to/from graphics)

I'm currently writing a TV program that has the same sort of thing as TD does:
ie. you can press Alt-F5 to get the text screen, and press any key to
return.

The alternate screen I need has to be 320x200, so there's no clashes between it
at $a0000 and the text screen at $b8000. The problems are:

1) How to flip from mode 3 (80x25 colour text) to mode 13h (320x200) without
erasing the contents of the screen. Is it possible? Or will I have to keep an
off-screen buffer

2) Disable mouse events during display, and route all keypresses to my handler
   (which will basically wait till another key is pressed and then return
   control of everything to TV.

Any help appreciated.

--
Paul Gilbert           | p...@yallara.cs.rmit.edu.au
Bach App Sci, Bach Eng | The opinions expressed are my own, all my own, and
Year 3, RMIT Melbourne | as such will contain no references to small {*word*141}
Australia              | creatures from Alpha Centauri.

 

Re:Page flipping in TurboVision (to/from graphics)


Quote
Paul Francis Gilbert wrote:
> [...]

> The alternate screen I need has to be 320x200, so there's no clashes between it
> at $a0000 and the text screen at $b8000.

Wrong.  Video memory has one remappable segment which is mapped to $b800 in text
mode, and $a000 in graphics mode.  This is the same memory in both cases!

Quote
> 1) How to flip from mode 3 (80x25 colour text) to mode 13h (320x200) without
> erasing the contents of the screen. Is it possible? Or will I have to keep an
> off-screen buffer

> 2) Disable mouse events during display, and route all keypresses to my handler
>    (which will basically wait till another key is pressed and then return
>    control of everything to TV.

I haven't tried anything along these lines, but I would expect the proper thing to do
is shut down TV the same way you would before a DOS shell, enter graphics and do what
you need there, then start TV back up again.  That should give TV the ability to
redraw the screen itself on return.  You shouldn't need to worry about what's on the
text screen -- that's TV's job.

Quote
> Any help appreciated.

> --
> Paul Gilbert           | p...@yallara.cs.rmit.edu.au
> Bach App Sci, Bach Eng | The opinions expressed are my own, all my own, and
> Year 3, RMIT Melbourne | as such will contain no references to small {*word*141}
> Australia              | creatures from Alpha Centauri.

--
Scott Earnest                      | _,-""-_,-""-_,-""-_,-""-_,-""-_,-" |
set...@ix.netcom.com (primary)     | We now return you to our regularly |
siny...@{*word*104}space.org (alternate) | scheduled chaos and mayhem. . . .  |

Re:Page flipping in TurboVision (to/from graphics)


----------------------------------------------------------------------------
---------------------------------------------------- Hamburg, Di 01.10.96 --
----------------------------------------------------------------------------

pfg tippte am 30.09.96 zu "Page flipping in TurboVision (to/from graphics)"
folgendes auf der Tastatur:

PFG> 1) How to flip from mode 3 (80x25 colour text) to mode 13h (320x200)
PFG> without erasing the contents of the screen. Is it possible? Or will I
PFG> have to keep an off-screen buffer

You mean you the TV screen displayed in 320x200 ?

PFG> 2) Disable mouse events during display, and route all keypresses to my
PFG> handler    (which will basically wait till another key is pressed and
PFG> then return    control of everything to TV.

That's very easy. You only have to do something like

    repeat
      ...
    until keypressed

in your Alt-F5 procedure. Since TV is not REAL multitasking it will
totally sleep during this loop.

 cu, Tom.
----------------------------------------------------------------------------
-- Tom Wellige ----------------------------- EMail: PIC...@distel.RoBIN.de -
-- Groten Heesen 35 ------------------------------ TWELL...@compuserve.com -
-- 21033 Hamburg, GERMANY --------------------------------------------------
-- Dipl.Ing.(FH) NT ------ URL: ourworld.compuserve.com/homepages/twellige -
-- PGP key on request ---- HPShell Info: HPSH...@distel.robin.de Sub: HELP -
----------------------------------------------------------------------------

Re:Page flipping in TurboVision (to/from graphics)


To go to a graphics mode from within TurboVision, take
a look at the example in the TP/BP manual for how to
switch between graphics mode and CRT mode.

Next take a look at the example of how to shell out to DOS
from within TV.  Replace the line in that example that
calls Exec() with code from the first example I mentioned.
You're done - its that simple.

Other Threads