[Coco] NitrOS-9 GET/PUT buffer questions

Willard Goosey goosey at virgo.sdc.org
Sat Mar 17 15:10:54 EDT 2012


On Sat, Mar 17, 2012 at 12:13:59PM -0300, James Dessart wrote:
> I've got a couple of questions about the Get/Put buffer behaviours on
> NitrOS-9. So here we go:
> 
> Where does NitrOS-9 allocate space for the buffers? Is it in the
> process's address space, or in some system buffer?

Get/Put buffers are global, so they must come out of unallocated main
memory.  Presumably they're ultimately owned by grfdrv.

There's a system setstat call to map a gpbuffer into your process's
space.  According to the docs there's even a synchronization system to
keep the same buffer from getting mapped into more than one process at
a time.  (There's a Rainbow article about using the gpbufs for IPC.)
But I've never actually messed with it.
> 
> What's PutBlk's behaviour when using a logic operation for copying a
> 2-bit buffer to a 4-bit screen?

I really don't know, sorry.
> 
> Is there a way to access the screen buffer directly through OS calls?

I don't believe there is a direct way to do that under
windint/grfint.  That's vdgint's job.  It can be done -- the umuse guy
does it and he was going to package up the needed code in a
programming library, but then he slacked. 

I'd ask why you want to break windint like that, but you'd just say
"Speed."  Just remember you could end up with a 32K screen in your
process space and that's half your total code+data... And if you start
doing too much with MMU tricks you'll probably loose your speed
advantage.

Willard
-- 
Willard Goosey  goosey at sdc.org
Socorro, New Mexico, USA
I search my heart and find Cimmeria, land of Darkness and the Night.
  -- R.E. Howard



More information about the Coco mailing list