Mail Archives: djgpp/2000/02/26/06:45:34
Trancelucid wrote:
>
> Hi there,
> I'm porting some source of mine (from Watcom and TC) to DJGPP, and the
> main problem I'm having right now is accessing 0xA0000. I read the libc
> reference, and a few tutorials on the net, and the most popular
> buffer-to-video functions seem to be memcpy() and _farpokeb().. I have
> some unanswered questions, and I'd like your opinion on the matter.
>
> It may be off-topic, but just for curiosity... Why can you access
> 0xA0000 in Watcom and not in DJGPP? Both are 32bit compilers, so why
> would you need to disable protection to access video memory in DJGPP?
>
> How (un)safe is it to disable protection to access video memory with
> memcpy()?
>
> As for _farpokeb(), is there a way to make it faster? Right now I use it
> in a for loop:
>
> for(i=0;i<64000;i++)
> _farpokeb(_dos_ds,0xA0000,+i,buffer[i]);
>
> Also, when I use optimization parameters (-O3), both seem the same
> speed.. Are they the same code when optimized? And how can I look if
> they use the same asm instructions?
>
> Is there any faster way than those 2?
How about writing a little assembly to do the blit using rep movsd?
Then you can set ES to the video segment and away you go.
>
> TIA,
> .(Trancelucid).
> . Jaune .
--
JP Morris - aka DOUG the Eagle (Dragon) -=UDIC=- DOUG-15 AT bigfoot DOT com
Fun things to do with the Ultima games (http://ithe.cjb.net)
Developing a U6/U7 clone (http://fly.to/ire)
d+++ e+ N+ T++ Om U1234!56!7'!8!KA u++ uC+++ uF+++ uG---- uLB----
uA--- nC+ nR---- nH+++ nP++ nI nPT nS nT wM- wC- y a(YEAR - 1976)
- Raw text -