🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #33473

Re: Questions about ST Video Ram

#33473
From: Smee
Date: Thu, 04 Aug 1988 09:26
13 lines
1234 bytes
In article <535@skywest.UUCP> brenes@skywest.UUCP (Erasmo Brenes) writes:
>... If the Shifter expects the video ram to start at 32K boundaries,
>then how do I get MWC, or any C program to allocate a 32Kb buffer starting in
>a 32Kb boundary in an efficient manner?  An initial thought was to use Malloc()
>to allocate 64Kb and then only use the 32Kb which start in a 32Kb boundary,
>but this method is too wasteful. There's got to be a better way, isn't there?

You've got the concept right, but not the detail.  The video buffer must
start at a location which is 0 mod 256 (or is it 512, and I'm wrong again?
anyway, doesn't matter, fits into 32K regardless).  The video buffer is
32000 (exactly, decimal) bytes long.  So, allocate 32K (32768 decimal) and
then start your buffer at the first location therein which is 0 mod 256.
Tiny bit of waste, but...
Technical Details
Message-ID: <2884@bath63.ux63.bath.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!mcvax!ukc!dcl-cs!bath63!pes
References: <535@skywest.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!mcvax!ukc!dcl-cs!bath63!pes
From: pes@ux63.bath.ac.uk (Smee)
Newsgroups: comp.sys.atari.st
Subject: Re: Questions about ST Video Ram
Message-ID: <2884@bath63.ux63.bath.ac.uk>
Date: 4 Aug 88 09:26:12 GMT
References: <535@skywest.UUCP>
Reply-To: pes@ux63.bath.ac.uk (Smee)
Organization: AUCC c/o University of Bath
Lines: 13