Recent

Author Topic: Why is VideoBuf not updated with the Screen?  (Read 4137 times)

alfware17

  • New Member
  • *
  • Posts: 40
Why is VideoBuf not updated with the Screen?
« on: December 30, 2010, 10:07:22 am »
Could anybody tell me how to access the Video RAM in Free Pascal
(read, write)?
In Turbo Pascal it was easy with such a nice MEM[] array saying
MEMW[screenseg:offset] where offset was row and column.
I was sorry to find out this (like some other) was a only Borland
standard and doesn't fit in Free Pascal. Attached my program in both
the original 16bit version and a try to convert to 32bit - the pity is
the latter runs with error, because CloseWindow doesn't work propper  
finding garbage in the VideoBuf array.
Originally in the Unit Fenster there were the nice MEMW[] instructions.
I have replaced them where it was only dealt with the window-stack,
but have no idea and luck how to manage with the Video RAM.
I just tried the Unit Video. But there is a lack of some important
functions like WINDOW. Cannot do without this, of course (define a
rectangle, attributes, ClrScr or Write) - just to try to translate them
would change the complete logic and seems to me like trouble and backward
directed. Sure to replace the complete CRT needs to manage the keyboard
with Unit Keyboard (not my own Monitor) but it's possible. But a world
without WINDOW?!
So I combined CRT and Video - yes I read the warnings. The compile was
fine but the run not so. I could not find any of the "normal" outputs
with Write, Window, ClrScr to be manifest in the VideoBuf array (only
direct moves). So there is a difference between the shown screen and
the VideoBuf (in extreme the array has only spaces while the screen
is pretty colored and typed). My little program Analyse shows in the
debug mode, the Fenster is more complicate to debug.
I asked myself the shown monitor screen should have even in 32bit a
RAM area to be based on. But how to access? My try with pointers were
no successful (through I have the IN_MEMW and OUT_MEMW). Anybody knows
where is my problem or how to manage
a) with only CRT (simply needed the access Video RAM I guess by now :-)
b) with only Unit Video? But what about the WINDWO and friends - is there
   another packages needed?
c) with both Video and CRT (but may be there is a trick how to synchronize
   real screen and VideoBuf array?)
d) anybody has a similar Window/Menue managing Unit?
Would be happy for any help...

By the way: Running the Free Pascal version of Tollzeit program
on a 8 years old XP computer the same like my actual and fast computer
(Vista 64bit), even the initial screen needs a while (seems you can
count every single of the 1840 write($178) :-( I just had the idea of
32bit becomming better and faster?!
« Last Edit: December 30, 2010, 01:57:12 pm by alfware17 »

 

TinyPortal © 2005-2018