[Coco] OS9 / Nitros9 - Getting direct access to graphics memory.

Walter Zambotti zambotti at iinet.net.au
Mon Apr 8 02:30:50 EDT 2019


Bill

I found

The following calls Set Status functions.

SS.AScrn  -  allocates and maps a high res screen in the app address space.
SS.Dscrn  ]-  display and allocated sceen.

So I tried :

int w = open("/w", 2);

if (w == -1)
{
  printf ("Can't open /w\n");
  return -1)
}

struct registers regs;

regs.rg_a = w;
regs.rg_b = SS_ASCRN; /* 0x8B */
regs.rg_x = 4; /*320x192x16*/

if(_os9(SS_SETSTT, &regs) == -1)
{
  printf("fail %d\n", regs.rg_b);
}

close(w);

But I'm getting error 208. Invalid path.

I had this error on a BASIC09 app when using SET/GET_STAT but that was due to BASIC09 reserving to much memory.  

I don't think that is the case here with C!

Walter

-----Original Message-----
From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Walter Zambotti
Sent: Monday, 8 April 2019 12:30 PM
To: 'CoCoList for Color Computer Enthusiasts' <coco at maltedmedia.com>
Subject: Re: [Coco] OS9 / Nitros9 - Getting direct access to graphics memory.

Bill

I'm reading through the Nitros9 Windowing system guide but did see anything specific to do this.

I'll have a look through the Nitros9 Tech Manual.

F$MapBlk will map the blocks into user memory space.

Just need to work out what memory blocks the graphics memory for the current process are?

Walter

-----Original Message-----
From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Bill Pierce via Coco
Sent: Friday, 5 April 2019 8:05 PM
To: coco at maltedmedia.com
Cc: Bill Pierce <ooogalapasooo at aol.com>
Subject: Re: [Coco] OS9 / Nitros9 - Getting direct access to graphics memory.

Walter, yes, you can map the graphics memory into the workspace. It's a little tedious, but doable. You can map it in with 8k blocks (using less memory) or the complete graphics memory.
I do this very thing in MShell to do direct drawing for speed.
PM me and I'll give you the steps to do it.

B. Pierce
 
 
 
-----Original Message-----
From: Walter Zambotti <zambotti at iinet.net.au>
To: 'CoCoList for Color Computer Enthusiasts' <coco at maltedmedia.com>
Sent: Fri, Apr 5, 2019 12:19 am
Subject: [Coco] OS9 / Nitros9 - Getting direct access to graphics memory.

Is there an OS9 call to map the graphics memory into the process space?

 

Walter


-- 
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco

-- 
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco


-- 
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list