1. Adresses

Please, I am a very beginner in programming with memory adresses of
graphic mode 19, can anyone tell me where are the fre memory spaces that
can be used to place , for example, a virtual screen? Please, if it isn't
too much, send me the starting and ending adresses, it will be very useful!

Eduardo Uemura Okada
e-mail: cool at art.com.br

new topic     » topic index » view message » categorize

2. Re: Adresses

>  Please, I am a very beginner in programming with memory adresses of
> graphic mode 19, can anyone tell me where are the fre memory spaces that
> can be used to place , for example, a virtual screen? Please, if it isn't
> too much, send me the starting and ending adresses, it will be very
useful!

Why worry about memory locations when a much simpler solution would be to
maintain virtual pages inside sequence variables? All you have to do is
preformat the virtual page using the following structure required by
display_image():

{{0,0,0,0,0,....},
 {0,0,0,0,0,....},
 {0,0,0,0,0,....}}

where 0 represents a pixel colour at a position on the screen, and each
first-level element in this sequence is a row of pixels ({0,0,0,0,0,....}
for example)

When you need to display a screen, just pass the sequence containing screen
data to display_image() and voila! If you are only changing certain areas
of the screens often, you can keep smaller pages of virtual screen data in
the sequences.

David Gay
http://www.geocities.com/SiliconValley/Vista/4346
A Beginner's Guide To Euphoria

new topic     » goto parent     » topic index » view message » categorize

3. Re: Adresses

Eduardo Uemura Okada wrote:
>  Please, I am a very beginner in programming with memory adresses of
> graphic mode 19, can anyone tell me where are the fre memory spaces that
> can be used to place , for example, a virtual screen? Please, if it isn't
> too much, send me the starting and ending adresses, it will be very useful!

mode 19 uses up #A0000 through #AF9FF for graphics and text will use up
most of #Bxxxx, so from #C0000 to the end of video memory will be
free...  however i don't know how to find out how much video memory the
user has (maybe someone else can help you with that)...  it's pretty
safe to say, though, that everyone has at least 256kB so using #C0000 to
#CFFFF should be safe

--


Mike Burrell
http://www.geocities.com/SoHo/9036
mikpos at hempseed.com

new topic     » goto parent     » topic index » view message » categorize

4. Re: Adresses

Eduardo Uemura Okada asks:
> Please, I am a very beginner in programming with memory adresses of
> graphic mode 19, can anyone tell me where are the fre memory spaces that
> can be used to place , for example, a virtual screen? Please, if it isn't
> too much, send me the starting and ending adresses, it will be very useful!

Memory for graphics mode 19 starts at #A0000 and there are 200*320 bytes.
Each byte contains an 8-bit color number from 0 to 255.

I think what you are really asking though is: where are the free areas
of memory that you can use for a "virtual" screen. The answer is that
these free areas are not always the same. You must call Euphoria's
allocate() routine (contained in machine.e):

       start = allocate(size)

this will return the starting address of an unused area
of memory containing size bytes. You can store anything
that you like into this memory area. If you say:

   atom virtual_screen

   virtual_screen = allocate(200 * 320)

You will get an address of a block of memory that is
200*320 = 64000 bytes long. You could use this for
storing your virtual screen. You can copy your
entire virtual screen to the "real" screen with:

   mem_copy(#A0000, virtual_screen, 64000)

Regards,
  Rob Craig
  Rapid Deployment Software

P.S. to Jacques: I too have been getting a bounced
mail message from an address on CompuServe lately.
I'm just ignoring it for now.

P.S. to CompuServe members: You can reduce the number of
those silly "=" signs added to your messages by removing
any blanks at the end of each line of your message.
Also, do not send long lines (greater than about
60 characters).

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu