Re: [fpc-pascal] Accessing ROM BIOS Font in Linux.

2008-01-19 Thread Anthony W.Henry

On Sat, 2008-01-19 at 13:19 +, Mark Morgan Lloyd wrote:
 Anthony W.Henry wrote:
 
   I really don't have to worry about the few Kilobytes 
  it will add to the program file :).   Anyone know any good
  GPL'd or Public Domain bit fonts ?
 
 Remember that you can easily preprocess it with RLL. I'd expect a bitmap 
 fount 
 to be very compressible.
 

[snip]

 One thing I'd add is that using Delphi it's possible (although not trivial) 
 to 
 embed a .fon as a resource in an executable. I don't know the extent to which 
 this can be done using (in particular) Lazarus on Windows or on Linux.
 

   I imagine the easiest way is bin2obj and just make it a constant
array in the program.   :)That is a useful trick and much easier
then resources.  (I most recently used it to make a bitmap CGI hit
counter. the Digit jpg's where all stored as Const arrays of byte 
and the CGI recursively called itself.  

Anthony 

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ncurses extra package

2008-01-18 Thread Anthony W.Henry
On Fri, 2008-01-18 at 12:02 +0100, Guillermo Martínez Jiménez wrote:
 Hello everybody.
 
 Recently I asked myself if Free Pascal has support for ncurses and
 I've found it as an extra package.

   There is also an ncrt unit.  If all your looking at is the ability
to run the program on different terminals this might be the ticket.
This unit implements all the crt functionality but uses ncurses as the
back end.

Anthony 


 
 I've take a peek at the ncurses.pp file and I've found it uses a lot
 of external functions. That means this package will not compile on
 platforms that haven't a previous ncurses implementation (NDS,
 GP32/2X, etc.). I think if the ncurses package uses the RTL (Crt,
 keyboard, gpm, etc.) it would be more portable, if the platform can't
 support Crt, keyboard, mouse, etc. they can be emulated.
 
 Then I decided to write my own ncurses.pp alternative using only the
 RTL. I will not claim official declaration or support, and may be it
 will not be so complete and successful as Michael Van Canneyt's
 implementation, but any comment or advice will be welcome.
 
 See you,
 
 Guillermo Ñuño Martínez
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Accessing ROM BIOS Font in Linux.

2008-01-18 Thread Anthony W.Henry
On Thu, 2008-01-17 at 11:47 +0100, Michael Van Canneyt wrote:
 
 On Thu, 17 Jan 2008, Vinzent Hoefler wrote:
 
  On Thursday 17 January 2008 01:27, [EMAIL PROTECTED] wrote:
  
   The question.   Is this font accessible from linux; do I have
   to be root ?
  
  Yes. Yes.
  
  /dev/mem should be the raw memory device (where even the BIOS image 
  can be read from), but this device which is only accessible to root.
 
 But you cannot use this font to write to the screen directly ?

   Actually, I read the font and drew to the screen. :)
I first used this to make Banners in Text Mode out of the 
Letters themselves. (A was made out of A, B or B's etc...).

At one time I almost completed a set of 256 color 2d
graphics primitives in Pascal and assembler.  I used the
BIOS font in my OutTextXY procedure.  I just
remembered where I had some of the code this morning.

http://home.comcast.net/~anthonyh63/mysoftware/vesa.zip

   These routines are not complete and are mostly useless
today.  (Real mode DOS.)  The routines in question are in
WRITETXT.SRC which was used as an include file rather then
a unit.  Include files were a habit I picked up from 
programming with Turbo 3.0 even though this work was done
under Turbo 6. :) 

  Upon rereading the source I had forgotten you also had
to make a BIOS call to get the address though it returned
an identical address for most BIOS's. (If memory serves). 

  Thanks to everyone who answered.  I'm checking the Linux
newsgroups now to see if there is a way to hack
a BIOS call under Linux but I don't have a lot of hope :)
(rightfully so, people shouldn't make direct BIOS calls
 in an application now.) 
I'll probably end up linking a binary font into the program.

Anthony. 

 
 Michael.
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Accessing ROM BIOS Font in Linux.

2008-01-18 Thread Anthony W.Henry

On Thu, 2008-01-17 at 15:32 +, Mark Morgan Lloyd wrote:
 Michael Van Canneyt wrote:
 
  The question.   Is this font accessible from linux; do I have
  to be root ?How do I make the 16 bit segment/offset address
  into a 32 bit pointer to access these fonts ?  
  
  This font is not accessible. Linux does not allow direct hardware 
  access unless you write a device driver.
 
 What exactly are you trying to do- read the pixels that make up the BIOS 
 fount 
 so that you can plot them as blocks in a text- or graphics-mode session?

Yes...  I've done this in the past... (late 80's early 90's :)

  I'd 
 have thought it would be better practice to store a fount file as constant 
 data (possibly a resource) inside the program- there's plenty of fount 
 editors 
 etc. available from DOS days.

Your completely right. I still think like a DOS programmer
sometimes. (Keeping program code small..).

  I was actually thinking of using it as fall back font. (Font
files missing).  It was going to be graphics mode programming.
 I think if I follow through with this project then
 converting a Bit Font to an Array Constant is really the way
 to go.  I really don't have to worry about the few Kilobytes 
it will add to the program file :).   Anyone know any good
GPL'd or Public Domain bit fonts ?

Anthony 



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal