Mail Archives: djgpp/1999/09/30/18:31:50
|From: ||"Damian Yerrick" <web DOT poison AT pineight DOT 8m DOT com>
|Subject: ||Re: Creating Allegro Bitmap from Binary Data
|Date: ||Thu, 30 Sep 1999 13:14:25 -0500
|Organization: ||Rose-Hulman Institute of Technology
|References: ||<37f39fd3 DOT 0 AT energise DOT enta DOT net>
|X-Trace: ||solomon.cs.rose-hulman.edu 938715380 18677 188.8.131.52 (30 Sep 1999 18:16:20 GMT)
|X-Complaints-To: ||news AT cs DOT rose-hulman DOT edu
|NNTP-Posting-Date: ||30 Sep 1999 18:16:20 GMT
|X-Newsreader: ||Microsoft Outlook Express 5.00.2314.1300
|X-MimeOLE: ||Produced By Microsoft MimeOLE V5.00.2314.1300
|To: ||djgpp AT delorie DOT com
|DJ-Gateway: ||from newsgroup comp.os.msdos.djgpp
|Reply-To: ||djgpp AT delorie DOT com
Tony Friery <tony AT basoft DOT enta DOT net> wrote in message
news:37f39fd3 DOT 0 AT energise DOT enta DOT net...
> Hi there,
> I am currently writing an Emulator for the (now near-vintage) Sharp MZ-80B
> and have a question regarding the Screen-Generator Code.
> The Graphical Resolution is 2 simultaneous mono-planes of 320x200, and
> normally 40x25 using 8x8 font (Conveniently :) ) There is also an
> mode which means an effective resolution of 640x400 which is what I have
> chosen as the graphics mode.
Sounds like it uses a CGA-ish system.
> At the moment, I use 5 bitmaps (eg FONTRAM, TEXTRAM, VID1RAM, VID2RAM,
> TEMPRAM) in various resolutions and use a combination of stretch_blit,
> and masked_blit to get them onto the screen.
> With the text, this is normally OK (I pre-stretch into a temporary bitmap
> beforehand as it will always be y*2 stretched anyway in order to save
> overhead) but I need an efficient way of writing an 8-bit value
I don't know about video RAM, but I know that normal memory bitmaps
created with create_bitmap() can be accessed thus:
int x, y;
for(y = 0; y < height; y++)
pixelLine = foo->line[y];
for(x = 0; x < width; x++)
pixelLine[x] = 69;
Once you have your pixels in a bitmap, you can blit() it to the screen.
- Raw text -