VOGONS


Chrome9 (VX800/820/855/875/900) Windows 98 Driver

Topic actions

Reply 80 of 86, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

He’ll certainly be welcome to integrate my source, but I’m focusing on this platform until it is really fast and really stable, the next thing I might work on would be geode gx/nx drivers.

I want to see if I can make olpc run w98.

Reply 81 of 86, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

I just spent about five hours on an edge case in the OpenGL driver. Any OpenGL program that read the picture back (glReadPixels) and then called SwapBuffers froze solid about 20 seconds after it started, every time. Meanwhile Quake 2 and the GL screensavers ran all night, so it looked like a hardware problem. It turned out to be a deadlock. DirectX 9's DDRAW leaves a driver-certification thread behind (WINTRUST/CRYPT32), and with an unsigned driver on the VX855's slow storage it exits about 20 s later holding the program's loader lock. Windows 98's GDI32 SwapBuffers calls GetProcAddress("wglSwapBuffers") on every frame, which needs that same lock. My OpenGL driver was still holding its DirectDraw surface locks from the readback, kept between calls for speed, so neither side could finish. Releasing the locks after a readback, or calling wglSwapBuffers directly as Quake 2 does, never locked. The fix is to stop holding DirectDraw locks between OpenGL calls.

Reply 82 of 86, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

R8111E98 is a new Windows 98 SE driver for Realtek RTL8111E gigabit Ethernet, written from scratch. Realtek's last Windows 98 driver (5.708) never supported the 8111E, and the newer XP-era drivers hang Windows 98 at boot and shutdown, so cards and onboard LAN built around this chip were stuck without a network on 98. This is a native NDIS 5 miniport that only uses NDIS functions Realtek's own 98 driver uses, and its chip setup follows Realtek's reference sequences for the 8111E, including the PHY microcode. It negotiates 10/100/1000 full and half duplex with flow control, tells Windows when the cable is plugged in or pulled, and has a timer that keeps the card working if the board's interrupt routing is broken. It also fixes interrupt routing on VIA VX900 boards, where Windows 98 can't route interrupts from the PCIe slots and onboard devices; without that fix the card crawls at under 1 KB/s. A small diagnostic tool, RTLDIAG, is included. It shows the card's state and whether interrupts are getting through, which helps if something doesn't work. On a VX900 test board it does about 4.5 MB/s with Windows 98's default TCP settings.

Supported: the Realtek RTL8111E / RTL8168E (PCI ID 10EC:8168, revision 06) on PCIe add-in cards or as onboard LAN. It's the gigabit chip found on many motherboards from around 2010 to 2012 and on cheap PCIe x1 network cards. Not supported: the RTL8111E-VL, which also reports revision 06 but is a different chip inside, and the other members of the family (8111B/C/D/F/G/H, 8168B and so on). On an unsupported chip the driver refuses to start rather than guessing. Older 8111B/C/D chips are covered by Realtek's own 5.708 driver.

Before posting, check that RTLDIAG names your chip "RTL8111E (CFG_METHOD_14)" or "(CFG_METHOD_15)". That tells someone their card is the right one before they install.

The attachment Untitled.png is no longer available

Reply 83 of 86, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

My new bug-hunting method: the Continuous Improvement Program

My old way of getting more out of ChatGPT was to invent some urgency. I'd tell it I was tied to a set of train tracks, or covered in honey with a swarm of bees on the way, and that only more bug findings could save me. That's stopped working. ChatGPT seems to have started believing me, and now it worries about me instead of reading my code.

So I've switched to something I call the Continuous Improvement Program:

Grok runs the reviews. I give Grok my source and have it keep sending it to Gemini and ChatGPT for review, pass after pass. Grok writes the prompts itself, which saves me a lot of effort. Driver code is full of ring-0 calls and raw memory access, so ChatGPT sometimes mistakes it for something sketchy and refuses on security grounds. When that happens, Grok rewords the request to make it clear it's a display driver.
The results go straight into a text file. Grok doesn't filter or summarize them. Everything is passed along as is.
A Claude reviewer checks every finding against the actual source. Anything it can't confirm in the code gets dropped.
The confirmed findings go to the builder, which makes the fixes.

The attachment CEP.jpg is no longer available

For those that want something to play with, I'm going to go ahead and give you this build. I provide no warranties. If you do find any bugs, feel free to comment or open a GitHub request. But suffice it to say, we are still building out the pixel shader, and the vertex shader is probably 10% complete. On the other hand, DirectX 8 support seems to work well.

The attachment VIA_Chrome9_850_full.zip is no longer available

Reply 84 of 86, by bmwsvsu

User metadata
Rank Member
Rank
Member

Tested version 0.850. Cool to see the nature test run in 3dMark01. And while the dx8 scores using hardware T&L saw marked improvement, dx6 and 7 scores went down across the board as did software T&L dx8.

Also added a few tests to my setup. Final Reality 97 ran fine, but I wanted to test OpenGL, and 3dExercizer crashed and burned right before "Loading Texture #1"

cx0-benchmarks2.png
opengl-error.png

Reply 85 of 86, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

3D ExerciZer for OpenGL crash: found the cause, patched EXE attached

I've looked into it, and the problem is actually the program, not the driver.

When 3D ExerciZer starts, it asks the graphics driver for its list of OpenGL extensions, the names of the features the card supports. Then it copies that list into a small space it set aside in memory, about 256 characters. This program is from early 1999, when graphics cards reported short lists, so it never checks how long the list is.

Our driver reports about 2,700 characters, so the copy runs past that space and overwrites the program's own data. First it wipes out the names of its settings folder and data folder. Past about 1,360 characters, it also wipes out the program's handle to its log file. The next time the program writes to its log, it crashes. That's the stack dump you saw.

This isn't specific to our driver. Any card with a long enough list will do it:

Intel GMA 900: its list is shorter. The program still damages its own data but happens to survive.
VIA's own CN896 driver: the machine locked up completely.
Newer NVIDIA cards: their lists run 10,000+ characters. NVIDIA added a driver setting years ago to shorten the list for old programs like this, because it's a known problem with games from that era.

The patch. I've attached a patched 3D ExerciZer.exe. It changes 4 bytes: the program no longer prints the extension list into that buffer. That's the only change. Everything it draws and tests is the same. With the patch it runs and draws correctly on our driver. And believe it or not, it also works on an RTX 3060 under Windows 11 after the patch.

Reply 86 of 86, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

VIA Chrome9 Win98 driver - test build .887

The next official release will be .900. Until then, here is .887 to play with.
It is a test build: it has passed everything on my VX855 and VX900 boards, but
it has not had the full release run on all three chips yet.

3DMark 2001 SE, hardware T&L:
- VX855: 1037 (was 750 on 0.800 and 896 on .850)
- VX900: 2219

What's new since 0.800 (high level):
- DirectX 8 driver interface, on by default
- Pixel shaders ps.1.0 to 1.3 in hardware, including the bump-mapping,
texkill and texm3x2/texm3x3 forms and 3DMark 2001's water.
Every ps.1.0-1.3 form is run through the compiler before each build.
- Vertex shaders (vs.1.1), run by the driver
- Four texture units, in DirectX 8 and now DirectX 7 too
- Rewritten GDI DIB layer (faster bitmap drawing on the desktop)
- OpenGL on Mesa 7.0.4 (reports GL 2.0), plus a GLCOMPAT registry key
for old games that choke on a long extension list
- Adaptive vsync for OpenGL: vsync on, but a late frame is shown right
away instead of waiting a whole extra refresh
- Hundreds of fixes from repeated code reviews: crashes, hangs, Alt+Tab,
lost surfaces, mode changes, overlay and cursor issues
- Many speed improvements in the T&L and draw path, each one A/B
tested live on the boards, with only the winners kept

What's new since .850 (high level):
- 3DMark 2001 game tests up 17-20% across the board
(Car Chase, Dragothic, Lobby and Nature)
- Multitexture fill rate up from 329 to 383 MTexels/s (c7/vx855)
- More pixel shader forms (texreg2ar/gb, texm3x2, spec/vspec,
the three-texture water) and four texture units
- Four texture stages under DirectX 7 as well
- Adaptive vsync for OpenGL
- A big round of outside code reviews, all confirmed bugs fixed
- Around 70 speed items tested one by one, with less CPU work per draw
(the draw setup is reused between calls and state is re-checked
only when needed)

As always, reports are welcome, especially from VX800 owners, since that
chip gets tested least often.