VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

I notice that with Windows 95, the I/O map base within the TSS is zeroed. Thus the TSS becomes one random(affected by processor state) bitmap due to all TSS fields(as well as any bytes following in the TSS) overlapping addresses with the I/O map base offset?

Or is the I/O map base offset also invalid(besides when higher or equal to the limit) when lower than 0x68?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 2 of 2, by superfury

User metadata
Rank l33t++
Rank
l33t++

Already found a bug there. It wasn't properly applying paging and CPL 0 to said accesses(using the user's CPL for paging and not checking for paging beforehand). The same issue was happening with inter privilege level stack switches.

Said problem of paging applied to both the I/O map base address fetching and the I/O map entry retrieval itself.

Now I see it properly loading a valid base of 0x68(thus not faulting anymore most of the I/O times, except when needed).

I also modified UniPCemu to ignore the map if it's below 0x68(where there can't be a pointer nor a value to lookup in the table). In that case it just assumes it's invalid, and does exactly the same as with the table offset being past the TSS limit(in other words: assume said bit is set, just like 80286 applications expect).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io