Mail Archives: djgpp/1998/04/29/21:17:37
>Lennart Marien writes:
>>I try to change the pallette in VESA Mode 101h(640x480x256), using the
>>Interrupt number 0x10:
>
>>int *sel;
>>int seg;
>>
>>seg=__dpmi_allocate_dos_memory((768+15)>>4,sel);
>
>You aren't initialising your sel pointer, so the return value from
>__dpmi_allocate_dos_memory() will be stored at some random address. You
>should declare it as a normal int, and then pass &sel to the DPMI
>function.
>
>Better suggestion: instead of allocating your own conventional memory
>region, use the transfer buffer that is already being maintained by the
>djgpp libc. See the djgpp FAQ section 18.2 for details.
>
>Even better suggestion: don't bother to call the BIOS at all. Instead,
>write the index of the color you want to change to port 0x3C8, and then
>three color values (r, g, and b, range 0-63), to port 0x3C9. See the
>DJGPP User's Guide on www.delorie.com for more information and example
>code.
>
>
>--
>Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
>"Pigs use it for a tambourine" - Frank Zappa
There's a USER'S GUIDE NOW???
Holy Crap - I'm on my way!
Thanks for Allegro - you speedster....
Jim the loiterer
aloiterer AT juno DOT com
http://members.xoom.com/JimMcCue/index.htm
(Jim the loiterer's PC games, programming, & stuff...)
- Raw text -