1. #A0000

Say, I'm new to this whole thing.  Perhaps someone can send me something
along the lines of "etiquette for the ignerent" or sumthin.  Anyways.  I
was trying to implement a virtual memory scheme using mem_copy and
mem_set, but when I write to addresses above #A0000 + 199680, it does
not display to the screen (mode 261).  If I push it, it crashes.  Could
someone please explain this to me.

Snortboy

new topic     » topic index » view message » categorize

2. Re: #A0000

>Say, I'm new to this whole thing.  Perhaps someone can send me something
>along the lines of "etiquette for the ignerent" or sumthin.  Anyways.  I
>was trying to implement a virtual memory scheme using mem_copy and
>mem_set, but when I write to addresses above #A0000 + 199680, it does
>not display to the screen (mode 261).  If I push it, it crashes.  Could
>someone please explain this to me.


You can only do that in mode 19. Or you need to bank.
Euphoria offers you flat memory, except, video cards, cant have flat memory.
To acces the memory accros that border, you need to bank.
By 'banking' you call an interrupt, which changes the offset of the video
page. For example, you bank to 64000, from that point #A0000 contains the
pixel value of what you expected to be saved at #A0000 + 199680

So, yes this does complicate stuff a bit. However, you're in luck. Ememcopy
does handle banking. So if you would use ememcopy, you have no worries.
Other than that there is a simple svga acces library by Pete Eberlein. It
offers acces to the SVGA a bit faster than EUphoria does. Euphoria requires
the banking to be restored after every pixel () call, so displaying an image
accros the (199680) border, will make it bank for every line, instead of
just once.

So, remember, if you want to do the graphics of SVGA yourself, restore the
banking to zero, before you use the standard Euphoria routines. Also check
out Mighty.e (Pete Eberlein) which offeres SVGA mouse routines.

I hope this helps..

Ralf N.
nieuwen at xs4all.nl

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

3. Re: #A0000

>Date:         Fri, 11 Sep 1998 00:30:21 -0500
>Reply-To:     Euphoria Programming for MS-DOS
<EUPHORIA at LISTSERV.MUOHIO.EDU>
>From:         Noah Smith <nhs6080 at UNIX.TAMU.EDU>
>Subject:      #A0000
>To:           EUPHORIA at LISTSERV.MUOHIO.EDU
>
>Say, I'm new to this whole thing.  Perhaps someone can send me
something
>along the lines of "etiquette for the ignerent" or sumthin.  Anyways.
I
>was trying to implement a virtual memory scheme using mem_copy and
>mem_set, but when I write to addresses above #A0000 + 199680, it does
>not display to the screen (mode 261).  If I push it, it crashes.  Could
>someone please explain this to me.
>
>Snortboy
>

The display memory is only 65536 bytes long, so if you put more than
65536 bytes in it, it overwrites another memory area. To solve this
problem, yoe need "bank switching", it means: first put area one in the
memory, send a message to your video card, put area two...
To see how it works, look at the lastest version of ememcopy.e() (in the
archive), to procedure set_bank(). I hope this will help you.

BeeBee

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu