🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #208

Re: Split VGA Tweaked Screens

#208
From: Court Demas
Date: Mon, 27 Jul 1992 02:10
76 lines
3108 bytes
Just looked in Sutty and Blair and found a really simple routine to do it.  I
chopped out the EGA stuff and some other things, so I'm not sure if it's going
to work perfectly for you (I'm using it for 320x240 and 360x480 ModeX).

It works, but I can't seem to get the screen to split more than halfway down.
I haven't spent much time on it, but if I fix it I'll let you know.

Oh, and in case you want to know what this is actually doing:  The static lower
potion of the screen is the first 'Split' lines of the display memory.  The
upper portion of the screen is what pans/scrolls around and can display any
portion of display memory (or so it seems).

-court

;----------------------------------------------------------------------------
; void SplitScreen(int Split)
;
                public  _SplitScreen
_SplitScreen proc SPLIT:WORD
                push    bp
                mov             bp,sp
                push    ds
                mov             ax,@data
                mov             ds,ax

;       call    _WaitForRetrace

                push    es
                xor             ax,ax
                mov             es,ax
                mov             dx,3d4h

                mov             al,18h
                out             dx,al
                inc             dx
                mov             ax,[SPLIT]
                out             dx,al
                dec             dx


@@VGA_Split:
                mov             al,7
                out             dx,al
                inc             dx
                in              al,dx
                mov             bl,byte ptr SPLIT+1 ;100d               ;Split+1
                and             bl,1
                mov             cl,4
                shl             bl,cl
                and             al, not 10h
                or              bl,al
                out             dx,al
                dec             dx
                mov             al,9
                out             dx,al
                inc             dx
                in              al,dx
                and             al,not 40h
                out             dx,al


                pop             es
                pop             ds
                pop             bp
                ret
_SplitScreen    ENDP


-------------------------------------------------------------
oh, one more thing.  The parameter Split has a strange relationship with the
number of lines which are actually displayed.  I haven't really figured out
why, but it probrably has something to do with ModeX..


-court
Technical Details
Message-ID: <UeQpgZW00WB8M78Ug6@andrew.cmu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!cd2a+

Show Full Headers
Complete Article Headers
Organization: Sophomore, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!cd2a+
Newsgroups: rec.games.programmer
Message-ID: <UeQpgZW00WB8M78Ug6@andrew.cmu.edu>
Date: Sun, 26 Jul 1992 22:10:45 -0400 
From: Court Demas <cd2a+@andrew.cmu.edu>
Subject: Re: Split VGA Tweaked Screens
Lines: 76