Stas Sergeev wrote:
> 05.05.2014 11:55, Frantisek Hanzlik пишет:
>> Stas Sergeev wrote:
>>> 04.05.2014 02:33, Frantisek Hanzlik пишет:
>>>> Hi DOSEMU and FreDOS developers,
>>>>
>>>> FreeDOS 'more' command (tried both 4.2 and 4.3 versions) isn't working
>>>> correctly under DOSEMU when used in screen resolutions other than 80
>>>> columns x 25 rows. From its code (function GetScreenSize() in more.c)
>>>> it seems as more compute no. of screen rows from BIOS data area, from
>>>> 40h:4Ah (Columns on screen) and 40h:4Ch (Video page size) values,
>>>> using formula:
>>>> ROWS=Video page size / Columns on screen / 2
>>>>
>>>> which in this case give bad results, as Video page sizes are multiples
>>>> of 4k (number of columns is OK). Here is what Video page size values
>>>> are returned in certain text modes:
>>>>
>>>> 80x25    - 40:4C=0x1000=4096, more has 25 rows. 80x25x2=4000=0xFA0
>>>> 80x43    - 40:4C=0x2000=8192, more has 51 rows. 80x43x2=6880=0x1AE0
>>>> 80x50    - 40:4C=0x2000=8192, more has 51 rows. 80x50x2=8000=0x1F40
>>>> 80x60    - 40:4C=0x3000=12288, more has 76 rows. 80x60x2=9600=0x2580
>>>> 132x25    - 40:4C=0x2000=8192, more has 31 rows. 132x25x2=6600=0x19C8
>>>> 132x43    - 40:4C=0x3000=12288, more has 46 rows. 132x43x2=11352=0x2C58
>>>> 132x60    - 40:4C=0x4000=16384, more has 62 rows. 132x60x2=15840=0x3DE0
>>>>
>>>> >From some informations on net (e.g. here:
>>>> http://marc.info/?l=freedos-dev&m=106291977718089&w=2
>>>> ) it seems as video page size isn't reliable/suitable for no. of rows
>>>> on screen computing - but I'm not sure, as this may be DOSEMU bug
>>>> as well. I want to report a bug, but what? DOSEMU, or 'more' command?
>>> I think it is a bug in dosemu (or both).
>>> I am currently experimenting with bochs vgabios, and
>>> it has different page alignment than the one of dosemu.
>>> Namely:
>>>
>>> -#define TEXT_SIZE(co,li) (((co*li*2)+4095)&(~4095)) /* 4000(4096?)
>>> text page size */
>>> +#define TEXT_SIZE(co,li) (((co*li*2)|0xff)+1)
>>>
>>>
>>> So please try 'vbios_tweaks' branch and see if maybe mode
>>> is now fine?
>> Just trying dosemu-1.4.0.8-git647.gf966688.fc19.i686. But when now
>> is video page size calculated as You mentioned above (i.e. rounded up
>> to the 256 byte boundary), then still isn't possible take video page
>> size for no. of screen rows calculating - there may be deviation from
>> the correct value up to (128 / cols). E.g. when running 'dosemu -t'
>> in xterm window 40 cols x 48 lines, then Your video page size/
>> TEXT_SIZE=4096, from which 'more' calculate 4096 / 40 / 2 = 51.2;
>> thus it will consider that screen has 51 lines - three more than
>> in reality.
>> For 'usual' VBE defined modes is situation better:
>>
>>   80x25, VidPgSz= 4096, more has: 25.60== 25 rows, delta=0.
>>   80x43, VidPgSz= 6912, more has: 43.20== 43 rows, delta=0.
>>   80x50, VidPgSz= 8192, more has: 51.20== 51 rows, delta=1.
>>   80x60, VidPgSz= 9728, more has: 60.80== 60 rows, delta=0.
>> 132x25, VidPgSz= 6656, more has: 25.21== 25 rows, delta=0.
>> 132x43, VidPgSz=11520, more has: 43.64== 43 rows, delta=0.
>> 132x50, VidPgSz=13312, more has: 50.42== 50 rows, delta=0.
>> 132x60, VidPgSz=15872, more has: 60.12== 60 rows, delta=0.
>>
>> thus only 80 cols x 50 rows is affected (with 1 line difference)
>>
>> Anyhow, FreeDOS 'mode con' in any resolution works fine and display
>> correct cols and rows numbers (I not know how did it).
> OK, thanks for testing.
> So have they looked into your patch?

I only sent mail to Imre Leber, which is listed as "more" maintainer,
but it was before not even thirty hours. Now I just fill bug about:

https://sourceforge.net/p/freedos/bugs/119/

which contains roughly that what I wrote to Imre.


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Dosemu-devel mailing list
Dosemu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dosemu-devel

Reply via email to