VOGONS


First post, by emodel

User metadata
Rank Member
Rank
Member

when depressing the "5" key at menu (to select vga mode), freeze
Works ok in 0.63

Reply 1 of 6, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

On my system, it doesn't freeze, but there is a bug there. The program shows the title screen and then switches to a corrupted display. Closer investigation shows that this is due to a bug in the handling of INT 0x10/AH=0x10/AL=0x1A.

The implementation for this (INT10_GetDACPage in vga_pal.cpp) does the following:

	IO_Write(VGAREG_ACTL_ADDRESS,0x10);
Bit8u reg10=IO_Read(VGAREG_ACTL_READ_DATA);
...
IO_Write(VGAREG_ACTL_ADDRESS,0x14);
*page=IO_Read(VGAREG_ACTL_READ_DATA);

The IO_Reads however, do not clear the register index (a change made in version 1.17 of vga_attr.cpp on june 22nd: "disable flipflop to index reset on reading port 0x3c1. Patch 1214516"). A proper fix would probably be to write the value that was read back to the port. Patch is attached and submitted to SourceForge.

This might not be the problem you're seeing, but it enables me to run HD just fine.

Attachments

  • Filename
    int10_pal.diff
    File size
    679 Bytes
    Downloads
    165 downloads
    File license
    Fair use/fair dealing exception

Reply 3 of 6, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

Yes, there are. A simple search for all reads from the data port shows:
INT10_GetSinglePaletteRegister
INT10_GetOverscanBorderColor
INT10_SelectDACPage (writes a new address, which is interpreted as data)

INT10_ToggleBlinkingBit is not affected, since it reads VGAREG_ACTL_RESET immediately afterward.

There are three ways of combatting it:
1) write back the read value (which is what I did, since it is what my systems programming manual tells me to do) -- see the attached patch
2) read the reset port (which seems cleaner and is more efficient in the DOSBox code but may have the effect of toggling the vertical retrace).
3) rewrite those functions not to use the internal ports

Attachments

  • Filename
    int10_pal2.diff
    File size
    1.47 KiB
    Downloads
    172 downloads
    File license
    Fair use/fair dealing exception

Reply 4 of 6, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

the internal ports must be used. (think of acces(port) violations)
hmm could you check all int10 things for it ?
if that is allready in your patch I will send to the cvs

Water flows down the stream
How to ask questions the smart way!

Reply 5 of 6, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

The only reads done from the VGAREG_ACTL_READ_DATA port are in int10_pal.cpp. All occurrences have been patched in the patch I posted above (the same was submitted to SF)

[offtopic]
w00t, this was my 101st post. Just noticed I'm no longer a "newbie", but a "member".
[/offtopic]