<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'page flipping 13h' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'page flipping 13h' posted on the 'Pascal' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sun, 26 May 2013 00:11:04 -0700</pubDate>
    <lastBuildDate>Sun, 26 May 2013 00:11:04 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>page flipping 13h</title>
      <link>http://www.programmersheaven.com/mb/pasprog/95503/95503/page-flipping-13h/</link>
      <description>Is there a way to do page flipping in 13h mode? With ASM or something? Also, where are the "pages" located (address), so I can draw on them.&lt;br /&gt;
And, if that's not possible, is there a "fast" way to swap a 64000 byte array from RAM to the position of videoram?&lt;br /&gt;
So far all I know is copying it byte for byte and that's awfully slow.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/95503/95503/page-flipping-13h/</guid>
      <pubDate>Fri, 11 Jan 2002 10:31:11 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: page flipping 13h</title>
      <link>http://www.programmersheaven.com/mb/pasprog/95503/95663/re-page-flipping-13h/#95663</link>
      <description>: Is there a way to do page flipping in 13h mode? With ASM or something? Also, where are the "pages" located (address), so I can draw on them.&lt;br /&gt;
: And, if that's not possible, is there a "fast" way to swap a 64000 byte array from RAM to the position of videoram?&lt;br /&gt;
: So far all I know is copying it byte for byte and that's awfully slow.&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hmmm...&lt;br /&gt;
There is practicly no graphic card out there with less&lt;br /&gt;
than 256kb ram on it. Actually standard is pretty much&lt;br /&gt;
32 or 64MB. So if you like to do some research on&lt;br /&gt;
graphic controller(s) you will find that you can create&lt;br /&gt;
different modes (even your own) by altering VGA registers.&lt;br /&gt;
You could have up to 4 pages without major effort (Xmode, etc.).&lt;br /&gt;
If all you want is fast copy routine to dump something&lt;br /&gt;
from RAM to video memory, try this:&lt;br /&gt;
&lt;br /&gt;
http://www.programmersheaven.com/msgboard/read.asp?Board=16&amp;amp;MsgID=50882&amp;amp;
Setting=A9999F0001&lt;br /&gt;
&lt;br /&gt;
(Note: Check the &lt;strong&gt;dump2screen&lt;/strong&gt; )&lt;br /&gt;
&lt;br /&gt;
It uses 32-bit to transfer 4 bytes (pixels) at a time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Iby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/95503/95663/re-page-flipping-13h/#95663</guid>
      <pubDate>Sat, 12 Jan 2002 17:31:09 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: page flipping 13h</title>
      <link>http://www.programmersheaven.com/mb/pasprog/95503/133088/re-page-flipping-13h/#133088</link>
      <description>: Is there a way to do page flipping in 13h mode? With ASM or something? Also, where are the "pages" located (address), so I can draw on them.&lt;br /&gt;
: And, if that's not possible, is there a "fast" way to swap a 64000 byte array from RAM to the position of videoram?&lt;br /&gt;
: So far all I know is copying it byte for byte and that's awfully slow.&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
what i usually do is make a 64k heap variable and treat it as a virtual screen&lt;br /&gt;
&lt;br /&gt;
and here's a 16 bit proc that moves bytes from source to dest quite fast:(actually it moves words and not bytes so make sure your virtual screen's size or whatever is a multiply of 2 - 64000 is just fine)&lt;br /&gt;
&lt;br /&gt;
procedure MoveW(var source,dest;count:word);assembler;&lt;br /&gt;
asm&lt;br /&gt;
   MOV AX,DS&lt;br /&gt;
   LES DI,dest&lt;br /&gt;
   LDS SI,source&lt;br /&gt;
   MOV CX,count&lt;br /&gt;
   CLD&lt;br /&gt;
   REP MOVSW&lt;br /&gt;
   MOV DS,AX&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
here's how you copy thhe virtual screen to the active page:&lt;br /&gt;
&lt;br /&gt;
MoveW(VScreen,mem[$a000:$0000],64000);&lt;br /&gt;
&lt;br /&gt;
if you had hardware page flipping in mind i cant help you&lt;br /&gt;
hm&lt;br /&gt;
hope i helped you :)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/95503/133088/re-page-flipping-13h/#133088</guid>
      <pubDate>Wed, 14 Aug 2002 18:31:51 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: page flipping 13h</title>
      <link>http://www.programmersheaven.com/mb/pasprog/95503/133126/re-page-flipping-13h/#133126</link>
      <description>: : Is there a way to do page flipping in 13h mode? With ASM or something? Also, where are the "pages" located (address), so I can draw on them.&lt;br /&gt;
: : And, if that's not possible, is there a "fast" way to swap a 64000 byte array from RAM to the position of videoram?&lt;br /&gt;
: : So far all I know is copying it byte for byte and that's awfully slow.&lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: what i usually do is make a 64k heap variable and treat it as a virtual screen&lt;br /&gt;
: &lt;br /&gt;
: and here's a 16 bit proc that moves bytes from source to dest quite fast:(actually it moves words and not bytes so make sure your virtual screen's size or whatever is a multiply of 2 - 64000 is just fine)&lt;br /&gt;
: &lt;br /&gt;
: procedure MoveW(var source,dest;count:word);assembler;&lt;br /&gt;
: asm&lt;br /&gt;
:    MOV AX,DS&lt;br /&gt;
:    LES DI,dest&lt;br /&gt;
:    LDS SI,source&lt;br /&gt;
:    MOV CX,count&lt;br /&gt;
:    CLD&lt;br /&gt;
:    REP MOVSW&lt;br /&gt;
:    MOV DS,AX&lt;br /&gt;
: end;&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: here's how you copy thhe virtual screen to the active page:&lt;br /&gt;
: &lt;br /&gt;
: MoveW(VScreen,mem[$a000:$0000],64000);&lt;br /&gt;
: &lt;br /&gt;
: if you had hardware page flipping in mind i cant help you&lt;br /&gt;
: hm&lt;br /&gt;
: hope i helped you :)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
Two more issues:&lt;br /&gt;
&lt;br /&gt;
VGA memory always starts at $A000. What I did most of the time when I was using Mode13, is to define a global array which is set to that address:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
var VIDEO : array[0..63999] of Byte absolute $A000:$0;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
even easier:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
var VIDEO : array[0..199,0..319] of Byte absolute $A000:$0;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Note that it's [y,x], not the other way around!&lt;br /&gt;
&lt;br /&gt;
Hardware flipping is possible by changing the graphics adapters "start address" register, you can also easily make vertical scrolling with that. Sorry - don't know the code, can not remember it because it's so long ago since I used this the last time and unfortunately I don't have it handy ... it's about 10,000 miles away from where I am right now &lt;img src="http://www.programmersheaven.com/images/Community/frown.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
Check the standard VGA registers, you will find it. I remember that it's very easy (just 2 or 3 port[...] statements). &lt;br /&gt;
&lt;br /&gt;
Hope that helped somehow.&lt;br /&gt;
&lt;br /&gt;
tron.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/95503/133126/re-page-flipping-13h/#133126</guid>
      <pubDate>Wed, 14 Aug 2002 23:26:05 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: page flipping 13h</title>
      <link>http://www.programmersheaven.com/mb/pasprog/95503/133151/re-page-flipping-13h/#133151</link>
      <description>correction:&lt;br /&gt;
&lt;br /&gt;
in my previous reply i wrote:&lt;br /&gt;
MoveW(source,dest,64000);&lt;br /&gt;
&lt;br /&gt;
make it:&lt;br /&gt;
MoveW(source,dest,32000);&lt;br /&gt;
because it copies words and not bytes&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/95503/133151/re-page-flipping-13h/#133151</guid>
      <pubDate>Thu, 15 Aug 2002 02:37:34 -0700</pubDate>
      <category>Pascal</category>
    </item>
  </channel>
</rss>