Path: utzoo!attcan!uunet!mcvax!unido!tub!tmpmbx!netmbx!alderaan From: alderaan@netmbx.UUCP (Thomas Cervera) Newsgroups: comp.sys.atari.st Subject: Re: Questions about ST Video Ram Message-ID: <1135@netmbx.UUCP> Date: 5 Aug 88 11:00:15 GMT References: <535@skywest.UUCP> <529@laura.UUCP> Organization: netmbx Public Access Unix, Berlin, West Germany Lines: 32 In article <529@laura.UUCP>, jf@laura.UUCP (Jan Hinrich Fessel) writes: > In article <535@skywest.UUCP> brenes@skywest.UUCP (Erasmo Brenes) writes: > >Hello, this is a question to the ST graphic 'gurus': > >question is: 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? > > > Me no graphic-guru, but as far as I know the buffer has to be aligned on a > 512 byte boundary, so Malloc() is wasting only up to 511 bytes. > Hope thats correct, i haven't tried it yet:-) > Not quite right. As I know, (would be more logical) the video bitmap graphics array must start at a page (256b) boundary. So, substract #256 from all values given by Jan-Hinrich and it will be ok, I guess ... With my best wishes for your success -- alderaan. -- alderaan OP RKOpdp (RSTS/E) FB Mathematik/Informatik RKO Berlin Dieffenbachstrasze 60-61 1000 Berlin 61