[comp.sys.amiga.tech] Fonts in MEMF_PUBLIC

wayneck@tekig5.PEN.TEK.COM (Wayne Knapp) (04/18/89)

I'm looking for two pieces of code that may all ready exist.

  1.  Routines that run fonts out of MEMF_PUBLIC instead of
      MEMF_CHIP.  I would be delighted with just the code
      to load a font.

  2.  A working example of a user copper list.

  
These may be of interest to other people also, so are there
any hero's out there?

                              Wayne Knapp

ugkamins@sunybcs.uucp (John Kaminski) (04/19/89)

In article <4039@tekig5.PEN.TEK.COM> wayneck@tekig5.PEN.TEK.COM (Wayne Knapp) writes:
>I'm looking for two pieces of code that may all ready exist.
>  1.  Routines that run fonts out of MEMF_PUBLIC instead of
>      MEMF_CHIP.  I would be delighted with just the code
>      to load a font.
I thought the idea of public memory was the idea that the memory was accessible
by everything in the system.  Therefore, wouldn't public memory be chip memory?
>  2.  A working example of a user copper list.
Sorry, I'm not that much of a techie.
>These may be of interest to other people also, so are there
>any hero's out there?
>                              Wayne Knapp
hero's what?

         _ _
        ////    The Amiga 1000 refuses to die.
       ////     Old McDonald had the right idea in his song: EIEIO
_ _   ////         E-xcellence I-n E-ducation I-s O-bsolete
\\\\ ////       Being correct is being replaced by "close enough."  Soon
 \\\X///        "close enough," due to erosion of standards, will not
  \XXX/         be intelligible to me.  The next generation will be more
                leniant in acceptable standards, and the next generation
                will add its leniancy, and so on.

cmcmanis%pepper@Sun.COM (Chuck McManis) (04/21/89)

In article <4053@tekig5.PEN.TEK.COM> (Wayne Knapp) writes:
> Most of the fonts I use are 50 points or larger, so not many
> other programs have need of them so multitasking isn't a 
> issue since most other programs use small fonts. 

Those are pretty good sized fonts, doing a video titler?

> Can anyone give me some real help?

Sure, but you may not like it. Basically, fonts sit in chip memory because
the Text() routine uses the blitter to blit them onto the screen. Plain and
simple. OpenDiskFont() "knows" that the blitter will be used, so convientiently
puts them in chip ram where the blitter can get to them. 

You have exactly two options :
	#1) Get an "Obese" Agnus (assuming you have a 500 or a 2000) and
	    boost your Chip ram to 1Meg. Now currently the only way to do
	    this is to buy an Amiga 2500 with an orange sticker on the
	    box (very expensive) however as the 2500 requirements are met 
	    these chips will be available as a replacement part. 
	    [Est $100 - $150]

	#2) Use the SetFunction() call to change _both_ the Text() entry
	    point and the OpenDiskFont() entry point to point to your routines.
	    Using the description of the operation of Text() as a guide, 
	    rewrite it to use only the CPU to render fonts. Then rewrite
	    OpenDiskFont() to load the font into whatever memory is available
	    fast or chip.



--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.
"A most excellent barbarian ... Genghis Kahn!"

jesup@cbmvax.UUCP (Randell Jesup) (04/21/89)

In article <4053@tekig5.PEN.TEK.COM> wayneck@tekig5.PEN.TEK.COM (Wayne Knapp) writes:
>> In article <4039@tekig5.PEN.TEK.COM> wayneck@tekig5.PEN.TEK.COM (Wayne Knapp) writes:
>; >I'm looking for two pieces of code that may all ready exist.
>; >  1.  Routines that run fonts out of MEMF_PUBLIC instead of
>; >      MEMF_CHIP.  I would be delighted with just the code
>; >      to load a font.
...
>Anyway I don't need the blitter support for the text in my
>program, but I do need all the chip RAM I can get.  The 
>fonts are stinging me two ways.  One they hog up globs of
>chip RAM, and two since they hang around after closing until
>forced out, they tend to fragment my chip memory since I do
>a lot of allocation/deallocation.

	Easy: Fonts are LoadSeg()ed into memory.  Therefor, they have bits
in the hunk types specifying memory type (normally set to CHIP).  Make copies
of the font files, and run through the file clearing the CHIP bit, which means
it will go into fast memory by default, and chip if no fast is available.
Note that you DON'T want to use these fonts from other programs, so you may 
want to move them to some directory other than fonts:, and use LoadSeg on them
directly (LoadSeg returns a BPTR to the first hunk, hunks are a BPTR to next
hunk followed by data (and length of data at hunk-4)).

-- 
Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup

kallaus@leadsv.UUCP (Jerry Kallaus) (04/22/89)

In article <100196@sun.Eng.Sun.COM> cmcmanis@sun.UUCP (Chuck McManis) writes:
>	#1) Get an "Obese" Agnus (assuming you have a 500 or a 2000) and

>	    [Est $100 - $150]


WHAT?  HEY!, what gives here?  I thought this was going to be an UPGRADE,
but this sounds like it is obviously being priced as a NEW PRODUCT!

(sorry, couldn't resist :-)

-- 
Jerry Kallaus         {pyramid.arpa,ucbvax!sun!suncal}leadsv!kallaus
(408)742-4569
     "Funny, how just when you think life can't possibly get
      any worse, it suddenly does." - Douglas Adams

kodiak@amiga.UUCP (Robert R. Burns) (05/02/89)

In article <100196@sun.Eng.Sun.COM> cmcmanis@sun.UUCP (Chuck McManis) writes:
)Sure, but you may not like it. Basically, fonts sit in chip memory because
)the Text() routine uses the blitter to blit them onto the screen. Plain and
)simple. OpenDiskFont() "knows" that the blitter will be used, so convientiently
)puts them in chip ram where the blitter can get to them. 

Oops.  I didn't catch the predecessors to this posting, but let me clarify
that the Text() routine does NOT currently use the blitter to copy the
character images from the font.  Thus, fonts do NOT need to be in chip
memory.  Thus, the amiga load files for fonts to not need to be run thru
"atom" to specify chip memory [remember: fonts are loaded into memory with
LoadSeg()].

I, for one, will continue to trust Chuck's postings despite this minor slipup.
It must be spring.

- Kodiak
-- 
Bob Burns, amiga!kodiak                    _
| /_  _|. _ |      Commodore __           |_) _ |_  _ )'
|<(_)(_)|(_\|<      /\ |  ||| _` /\       |_)(_\| )(_\ |
| \ Software    ___/..\|\/|||__|/..\___            Faith