[fpc-pascal]VESA modes in fpc for win32

Victor V. Shuvalov shuvalov at mccme.ru
Mon Jan 28 19:22:06 CET 2002


[I'm not subscribed to this mailing list, so please send me a copy of your
answer.]

Hello!

Thanks for your answer.

>> How do I initialize VESA graphics modes (like 101h) with fpc for win32?
>> The
>> documentation says
>>
>>  If you need another mode, then set GraphDriver to a value different
>> from
>>  zero and graphmode to the mode you wish (VESA modes where 640x480x256
>> is
>>  101h etc.).
>
> Is this in the current documentation? This information is completely
> outdated, please check the new documentation.

Unfortunately it is. I downloaded dosw32104full (containing many things
including docs) some 1.5 month ago. Maybe the online documentation is more
fresh --- I didn't check yet.

>> but the program like
>>
>>  .........
>>  GraphDriver:=1;
>>  GraphMode:=$103;
>>  InitGraph(GraphDriver,GraphMode,'');
>>  .........
>>
>> which was working well with old version 0.99.12b (go32v2) is not working
>> with version 1.0.4 (neither win32 nor go32v2). Please help if you can.
>
> There are several reasons
>
> a) the win32 graph unit only supports 640x480x16 colors.

OK, how do I use at least this mode?

> See the docs for more info. You can use the go32v2 version of the
> compiler to create (Dos) programs that switch into VESA modes (using the
> graph unit and the method described above),

Surprisingly the method described above is NOT working, but GraphDriver=10
helps --- which looks like nonsence, isn't it?

The problem with win32 and graph is that I can't use Crt in graphics mode
(you have to switch to text window and press keys there :-). FAQ recommends
WinCrt instead, but WinCrt is not working in text mode (ch:=keypressed
causes the program to hang)! So there's no chance to use Crt procedures and
function both in text and graphics mode, which seems to be a big problem.
Is there any way to fix this problem?

TIA,

Victor V. Shuvalov






More information about the fpc-pascal mailing list