flat assembler
Message board for the users of flat assembler.

Index > DOS > Smooth scrolling panning in text mode

Author
Thread Post new topic Reply to topic
CandyMan



Joined: 04 Sep 2009
Posts: 301
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan
Anybody have example in Pascal or assembly how to implement smooth scrolling panning in text mode?
Thanks

_________________
smaller is better
Post 30 Jun 2014, 21:10
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386
> how to implement smooth scrolling panning in text mode?

1. Set up VESA mode 640 x 480 x 8bpp (preferably LFB)
2. Put your text to the screen as pixel data (read out the font from BIOS or use your own font)
3. Scroll the screen by moving the data in memory

If there is another method, I'm not aware of it ...

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 01 Jul 2014, 01:21
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16891
Location: In your JS exploiting you and your system
revolution
I remember the VGA controller supporting pixel based vertical scrolling by setting the start line for the font buffer reader. Some programs would use that to make a smooth text scroll but unless it was well synchronised with the vertical retrace it could look a but jumpy.
Post 01 Jul 2014, 08:09
View user's profile Send private message Visit poster's website Reply with quote
freecrac



Joined: 19 Oct 2011
Posts: 117
Location: Germany Hamburg
freecrac
Hello mates. For the textmode(3) it is possible to use Port 3D4h for a smooth scrolling.

Snippit for 80x50 with 8x8 ASCII chars:
Code:
OUTPUT:   xor     ah, ah
          inc     bp                ; incease line number
          cmp     bp, [ZANZ]        ; last line?
          ja  BACK
;-----------------------------------
PANNING:  mov     al, 8
          mov     dx, 3D4h
          out     dx, ax            ; Smooth-Scrolling
;----------------------------
          inc     ah                ; ah * 2 for 16x8 ASCII chars
          mov     dx, 3DAh
RASTER0:  in      al, dx
          test    al, 8
          jnz RASTER0
RASTER1:  in      al, dx
          test    al, 8
          jz  RASTER1
          cmp     ah, 8
          jnz PANNING
;-----------------------------------
          mov     ax, 8      
          mov     dx, 3D4h
          xor     di, di
          mov     cx, 7A8h
          lds     si, [DSEG]
          out     dx, ax
          rep movsd                 ; copy screen content one line above
          ....

DSEG    DD 0B80000A0h               ; [Offset/Segment] for scroll down

    

This routine for downscrolling works fine for me, but in the other direction for upscrolling with using 8x8 chars i do not find the way for a flickerfree smooth scrolling, but with using 16x8 ASCII chars with 80x25 rows/columns it is also possible.

Dirk
Post 01 Jul 2014, 13:58
View user's profile Send private message Send e-mail Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 301
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan
Thanks boys!
Post 01 Jul 2014, 16:25
View user's profile Send private message Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 301
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan
something like that http://speedy.sh/NkaRB/HM.7Z are searching for the source code as it.

_________________
smaller is better
Post 10 Jul 2014, 20:40
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.