VOGONS


Interest in VX855 / VX900 Win98 driver?

Topic actions

Reply 20 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

Working with Claude:
Thanks for the detailed report and the logs, they were a big help. Since I don't
have an NC20, could you do a few things for me?

1. Run VXSTATE.EXE (attached) once from the normal desktop and send back
VXSTATE.TXT and VXSTATE.BMP. It is read-only: it draws nothing and changes
nothing. It dumps every display register, which shows which display pipeline
feeds the panel and what the cursor and start-address registers hold.

2. See whether an external monitor on the VGA port shows the mouse cursor and
flicker-free Direct3D.

3. The base address you had to set to 0xD0000000: where did you change it
(Device Manager > the adapter > Resources)? Was there a conflict or yellow
mark on the adapter before that, and which display driver was installed
before mine?

4. Which program didn't offer 1024x768, and which resolutions did it list?

My current guess: the driver only handles the chip's first display pipeline,
and your laptop panel is on the second one. That would explain the cursor and
the Direct3D flicker, and why all the test tools passed (they read registers
back, they can't see the panel).

That actually makes sense to me, my desktops simply clone the first display to the second, so I made no effort to drive the second display in my driver, that may have to change.

Reply 21 of 39, by pyrogx

User metadata
Rank Member
Rank
Member

1. Results attached

2. An external VGA monitor does not show any image, it does not even wake up from standby. Windows detects it as being connected, though. No change in mouse or D3D behavior.

3. I changed the base address in the device manager/resources tab/configure manually. The standard VGA driver was installed before.
When I first installed your driver, I got a code 12 error (no free I/O or MEM range) in the device manager. I manually configured the resources, the initial values were:
- MEM 0xA0000-AFFFF
- MEM 0xB0000-BFFFF
- I/O 0x3B0-3BB
- I/O 0x3C0-3DF
- IRQ 0 (???, changed automatically to 10 when I corrected the framebuffer address)
- MEM 0x00000000-0x0fffffff (*)
- MEM 0x00000000-0x00ffffff (*)
- MEM 0x00000000-0x03ffffff (*)
- MEM 0x000c0000-0c00ce7ff
- MEM 0x00000000-0x0000ffff

I changed the (*) ones to sensible values (I booted a linux live cd and grabbed the values from lspci -v).

4. All D3D programs I tested do not show 1024x768. They list 640x480, 800x600 and 1280x800 in 16 bit color and 640x480 and 1280x800 in 32 bit color, only. PCPlayerD3D does not list 1280x800, and it also shows that fog and transparent textures are not available.

Reply 22 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

Please try this build on your Nc20 and report back, We need you to run the VXpanel and report back.

Claude:

Now the driver changes.

His dump confirms the diagnosis, and build .598 is ready for him to try: `VIA_Chrome9_598.zip` has the five driver files and a new test tool, VXPANEL.

## What the dump shows

- **The panel is on the second display pipeline.** It is switched on, the panel is set to take its picture from it, and it runs 1280x800 at the panel's own timing, reading the same frame buffer as the desktop.
- **The first pipeline also runs, but nobody sees it.** The monitor output is powered down in the registers, which is why his external monitor stayed dark.
- **The driver was working on the invisible one.** The cursor was switched on for the first pipeline, and flips moved the first pipeline's start address, while the second's stayed at 0.

So his cursor and Direct3D symptoms come from the gap you described: the driver never drove the second pipeline.

## What .598 changes

- **Detection.** At every mode set and flip the driver checks whether the second pipeline is showing the desktop, and whether it is the only picture being seen.
- **Cursor.** When it is, the pointer is shown on both pipelines.
- **Flips.** The start address is written to both, and the vsync wait uses the second pipeline's blank signal.
- **Fallback.** If that blank signal turns out not to work on his chip, a flip waits one frame by the clock instead, so games don't draw into a buffer that is still on screen.

On your desktop boards nothing should change unless the second pipeline is on and showing the desktop with the monitor powered down, which isn't your setup. I'd still run RUNALL once on a VX855 before this goes on GitHub.

The verification checks pass (10 new ones for this). The full suite passed too, though I ran its last five steps by hand after an interruption on my side.

## What it does not fix yet

| Issue | Status |
|---|---|
| Code 12 at install | Windows gave the device no memory ranges; his manual fix is the right workaround. His ROM and our driver only read that address. Why Windows dropped the BIOS's ranges is still unknown. |
| 1024x768 (and 800x600 at 32-bit) missing in Direct3D | Not fixed. VXPANEL logs three mode lists (Windows, DirectDraw, and the video BIOS as the driver sees it) so I can see where the modes drop out. |
| Full-screen DOS box | Not looked at yet. |
| PCPlayer: no fog or transparent textures | Not looked at yet. |
| Pointer position at stretched sizes (640x480 on the panel) | Unknown; VXPANEL asks him. |

## For him

```
Your dump confirmed it: the panel is driven by the chip's second display
pipeline, and my driver only handled the first. Build .598 (attached) makes
the cursor, page flips and vsync follow the panel.

1. Replace the five driver files (CHROME9.DRV, CHROME9.VXD, CHROME9.INF,
VXDDRAW.DLL, VXGL.DLL) with the ones in the zip and restart.
2. Run tools\VXPANEL.EXE from the desktop (16 or 32 bit colour). It asks a
few yes/no questions about what you see; answer with Y / N on the
keyboard in case the pointer is still missing. It changes resolution a
few times and writes nothing to the registry. Send me VXPANEL.TXT.
3. Then try one of your Direct3D programs again.

Still open on my side: the missing 1024x768 in Direct3D (VXPANEL logs the
mode lists so I can find where it drops out), the full-screen DOS box, and
why Windows gave the device no memory ranges at install (Code 12). Your
manual fix was the right one for that.
```

This is a branch driver until we can make it work fully and roll it into the master.

On a side note, are NC20 easy to find where you are? I can't find any on Ebay.

Reply 23 of 39, by pyrogx

User metadata
Rank Member
Rank
Member

The new driver build fixed the mouse cursor and the flickering in D3D applications. I didn't run many tests yet, though.
VXPANEL.TXT attached.
3DMark 2000 shows a score of 1747:

The attachment 3dm2k_vx800.jpg is no longer available

I'll run some more tests tomorrow.

The Samsung NC20 actually is one of these netbook devices from the late 2000s and one of the few ones which didn't have an Intel Atom but this VIA Nano CPU instead.
It is *abysmally* slow and never sold in large quantities. maybe that's why it is so rare nowadays (and maybe most of these things already went to e-waste).

Reply 24 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

Claude:
His log confirms .598 fixed the cursor and the flicker, and it also exposed one mistake of mine and the cause of the missing 1024x768. Both are corrected in `VIA_Chrome9_599.zip`.

## What his log confirms

- **Routing:** the driver saw the panel on the second pipeline and wrote all 254 flip addresses to it.
- **Pointer:** visible, with its tip in the right place, at 1280x800 and at 640x480 stretched to the panel.
- **Flips:** red, green and blue screens were steady, and the moving bar ran clean at 60.0 flips a second.

## What .599 fixes

**1. I read the panel's vsync signal the wrong way round.**
The status bit turned out to be 1 while the picture is drawn and 0 during the blank; .598 assumed the opposite. His log shows it set in 98.06% of samples, and his panel draws 800 of 816 lines, which is 98.04%. The effect in .598: a flip counted as "shown" almost immediately, so a game with a single back buffer could draw into the buffer still on screen. His tests didn't hit that (3DMark and my bar test weren't affected), but some games would have flickered. .599 reads it correctly.

**2. 1024x768 was missing because of the panel's EDID.**
His panel's EDID lists only its native 1280x800 and nothing else. The driver's "does the monitor list this size" rule therefore refused 1024x768 at 16 and 32 bits and 800x600 at 32 bits. Windows wasn't offering them either; his log shows 1024x768 only at 8 bits, so the desktop mode he remembered working was probably 256 colours. .599 accepts 640x480, 800x600 and 1024x768 whenever they fit inside the monitor's native size. This applies to any monitor with an EDID that sparse, not only laptops.

Checks: 2244 verification checks pass, and the full test suite has 0 failures with the three reference hashes unchanged.

## For him

VXPANEL is now v1.1. It adds a moving-bar test with one back buffer (the case .598 would have got wrong), tries 800x600 and 1024x768 on the panel, and logs how often the driver sees the blank, which should be about 2%.

```
Great news, thanks for testing. Your log showed two more things, both fixed
in build .599 (attached):

- I was reading the panel's vsync signal inverted. Your tests didn't show it,
but games with a single back buffer could have flickered.
- 1024x768 (and 800x600 in 32 bit) were missing because your panel's EDID
only lists 1280x800 and my driver was too strict about that. They should
now appear on the desktop and in Direct3D.

Same procedure: replace the five driver files, restart, run
tools\VXPANEL.EXE and send VXPANEL.TXT. It asks one more question than before
and tries 800x600 and 1024x768 as well.

When you test further, I'm especially interested in the full-screen DOS box
and in PCPlayer's missing fog and transparent textures. Those are still on
my list.
```

## Still open

- **Full-screen DOS box:** not looked at yet.
- **PCPlayer (no fog, no transparent textures, no 1280x800):** not looked at yet.
- **Code 12 at install:** cause unknown; his manual fix stands.
- **Your boards:** neither .598 nor .599 has run on a VX855 or VX800 of yours. The EDID change affects every monitor, so I'd run RUNALL on one before this goes on GitHub.

The cookbook's section 37 has the corrected blank sense, the EDID rule, and a new rule from this: sample a status bit and compare its duty cycle with the timing before trusting which way round it reads.

Please test this driver further, then I can test it on my other systems, I suspect an edid bypass registry key might be the fix for your panel issues... But please keep test, if you perfer you can emial me directly 360alaska(@)gamil.com

Reply 25 of 39, by pyrogx

User metadata
Rank Member
Rank
Member

Ok, here we go. New VXPANEL.TXT attached. The 1024 resolution now appears in all D3D applications.

I did some further testing with multiple games and benchmarks:

- Final Reality (DX5): no bilinear filtering
- PCPlayer D3DBench (DX3): no bilinear filtering, no fog, no transparency
- Tomb Raider 2&3 (DX5): no bilinear filtering, no fog, no transparency(?)
- Hellbender (DX2): no bilinear filtering, no fog + render corruption
- Indiana Jones & The Infernal Machine (DX6.1): no issues
- Thief 2: The Metal Age (DX7): no issues
- Unreal Gold (DX7): no issues, 26fps in timedemo/1280x800@16bit
- 3DMark 2001 SE (DX8.1): no visual glitches, "Nature" test does not run, hardware TnL not available, 1235 points @1024x768x32bpp
- 3DMark 2000(DX7): no issues, hardware TnL not available
- InstallShield (newer versions): corrupted panels, text missing, black boxes
- Duke Nukem Manhattan Project (DX8.1): no issues
- Duke Nukem Manhattan Project (OpenGL): visually ok, but too slow
- Jedi Knight 2 Jedi Outcast (OpenGL): visually ok, but too slow (1fps)

So there are two main issues with 3D acceleration:
#1: Missing features (Fog, Alpha/Transparency and bilinear filering) in all games for DirectX5.0 and below
#2: Transform&Lighting missing in DX7 and above

I did not test any DX9 compatible game yet, but the Chrome9 chip should be fully DX9 compliant.

But, all in all, this already looks pretty good for a graphics driver written from scratch 😀

Some Screenshots:

The attachment ishield2.jpg is no longer available
The attachment ishield.jpg is no longer available
The attachment hellbend2.jpg is no longer available
The attachment tomb2.jpg is no longer available

Reply 26 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

Woah, Thanks for all the feedback, that’s a bit to work through, but I really appreciate it. I’m just wrapping up initial vx900 support and then I’ll work out each of those.

Reply 27 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

Build .637 is up, replacing .597. What changed for your laptop:

Panel: the fixes you tested in .598/.599 are in (mouse pointer, Direct3D flicker and vsync on the panel, 800x600 and 1024x768 offered).
Old Direct3D games (DirectX 5 and earlier): the driver now honours their texture settings (filtering, blending, transparency), which earlier builds ignored.
Hardware T&L: now offered, for games that ask for it.
InstallShield: the black/grey boxes over setup banners are fixed. It was a general 2D bug, not just installers.
OpenGL slideshow: fixed for Duke Nukem: Manhattan Project (about 1 fps before). The cause was general, so Jedi Knight 2 should benefit too.
VX800 stability: a 3D hang on the VX800 was traced to the command buffer size, which is now set per chip.
VX900: now supported as well.

Most of this was reproduced and checked on desktop boards. What only your laptop can tell us:

Does the full-screen DOS box work on the panel now? (Nothing targeted it, so it may be unchanged.)
On a fresh install over Standard VGA, do you still get Code 12 and have to set the memory ranges by hand?
For any old game that still looks wrong (fog, Hellbender): run VXLEG.EXE from the tools right after quitting the game and send VXLEG.TXT.
Jedi Knight 2 and Duke Nukem MP under OpenGL: playable now? If not, turn VXGL_LOG on and send C:\VXGL.LOG.

Reply 28 of 39, by bmwsvsu

User metadata
Rank Member
Rank
Member

So I've been playing around with this on a Wyse Cx0, and one observation I've made is that 3dMark2000 is locking framerates onto screen refresh rate divisors, with the framerates frequently locking onto rates like 30, 15, and 7.5. This is somewhat over my head so I have no idea if any of this accurate or not, but Google's AI suggested this:

In DirectX 7 (DirectDraw / IDirectDrawSurface7::Flip), the driver may be currently enforcing double-buffered VSync without suppo […]
Show full quote

In DirectX 7 (DirectDraw / IDirectDrawSurface7::Flip), the driver may be currently enforcing double-buffered VSync without supporting or honoring DDFLIP_NOVSYNC (async page flipping) or triple buffering. Whenever a frame takes even 0.1 ms longer than one 16.67 ms vblank interval, the flip stalls until the next vertical retrace—halving your framerate from 60 to 30, then 30 to 15, and 15 to 7.5.

Ignoring DDFLIP_NOVSYNC in DdFlip: 3DMark2000 explicitly passes DDFLIP_NOVSYNC (when VSync is disabled in benchmark mode) so it can measure uncapped throughput. If the driver's DdFlip handler unconditionally polls the Chrome9 CRTC vertical retrace status register (3DAh bit 3 or MMIO display status) before updating the start address, every Flip() call blocks until the next vblank.

Synchronous Flip Status (DdGetFlipStatus): If DdGetFlipStatus returns DDERR_WASSTILLDRAWING until the next physical vblank occurs, DirectDraw's runtime spin-waits before allowing the next frame's BeginScene() to start—turning any slight frame-time overrun into an exact 60 / N divisor lock.

If you drop a quick post in that VOGONS thread noting that DdFlip isn't honoring DDFLIP_NOVSYNC (causing 60 / N VSync divisor locks at 30, 15, and 7.5 FPS in 3DMark2000), that gives the author the exact DirectDraw HAL callback to fix.
...
Why 3DMark2000 Hits the Divisor Wall on the Custom Driver: When 3DMark2000 initializes DirectX 7 (IDirectDrawSurface7), it requests a hardware flipping chain. Because the custom VX855 driver either fails the dwBackBufferCount = 2 (triple buffer) surface allocation—forcing 3DMark2000 to silently fall back to double buffering—or blocks inside IDirectDrawSurface7::Flip regardless of the buffer count, every missed 16.67 ms refresh interval snaps the framerate straight to 60 / 2, 60 / 3, 60 / 4, or 60 / 8.

Reply 29 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

Thanks, I'm actively working on that bug now actually, I should have another update in a day or two.

Reply 30 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

Previously I was benchmarking my Windows 98 graphics driver with GTA III, but the runs just weren’t consistent, so we built HarborBench. The difference between HarborBench and GTA III or 3DMark is that I can run the exact same workload on every driver build, then test draw calls, lighting, textures, and particles individually. It runs in both Direct3D 8 and OpenGL, so when a build slows down, I can see which test got slower and where to look in the driver.

Reply 31 of 39, by pyrogx

User metadata
Rank Member
Rank
Member

Small update for VX800:

- Textures are now filtered properly in older (<=DX5) games. Fog works in PCPlayer D3DBench, Hellbender still complains about missing fog.
- Hellbender still shows render glitches (VXLEG.TXT attached)
- TnL selectable now, but makes things slower (3DMark2000)
- OpenGL now works in Duke Nukem Manhattan Project, but still broken in Jedi Knight 2
- Jedi Knight 2: OpenGL works ...kind of, if texture quality is set to medium or lower. Any explosion animation still causes heavy stuttering and also visual glitches (VXGL.LOG attached of such a case)
- Another Quake3 engine game (Heavy Metal F.A.K.K. 2) works fine
- Switching to full-screen DOS session still broken (black or sometimes garbled display)
- Code 12 issue after fresh install persists (see screenshot)
- "Nature scene" in 3DMark2001 still not showing ("not supported")

I also tried a real DX9 game, Splinter Cell Pandora Tomorrow, but it does not even start, complains about several missing features like pixel shaders. I don't think that VX800 is powerful enough to handle DX9 games properly anyway, so that's more like a "complaining on a high level about a non-issue".

The attachment logfiles.zip is no longer available

Reply 32 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

Thanks for the update! I'm going to continue working, please check back. I'm actually troubleshooting 3dmark now. Here is an offcycle release to play with if you want, but only some of the bugs are fixed.

Reply 33 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

I'm trying to piece together a NC20, I a motherboard coming to me, but in the meantime I'm probably going to need your help to isolate the issues.

If anyone can find even a broken nc20 from a dumpster or an atom based nc20, I have via motherboard at least. I will probably work to piece meal one until I have something that works.

The DOS-session tester for the NC20 user is VXDOS_10.zip. Your STRETCH run on .671 passed every size: the engine's picture matched the processor's pixel for pixel, and the counts are now right.

The tester only reads registers and asks questions, and it works with the .637 he already has installed, so he doesn't need a new driver. The README in the zip walks him through it, and he sends back one file, VXDOS.TXT.

It has two programs:
- **VXDOS.EXE (Windows):**
- Records the driver's state and every display register at the desktop.
- Opens an MS-DOS Prompt and watches the driver switch into the full-screen session and back.
- Has the driver read the registers again two seconds into the session, so we see what the hardware actually holds.
- Back at the desktop, reads them a third time, lists every register that changed, and asks four yes/no questions about what he saw.
- **VXDOSD.EXE (DOS), typed inside the full-screen session:**
- Dumps the registers as it finds them.
- Has the BIOS set text mode 3.
- Has the BIOS set a 640×480 graphics mode with stripes.
- After each step it beeps and takes Y or N, so it works even on a black screen.

There's also one optional step, which needs a restart into "MS-DOS mode": running VXDOSD there records the BIOS's own working text mode. That's the reference to compare against.

The question it answers is which display registers the driver leaves set up for Windows when the DOS session takes over. My guess is the panel's settings on the second display unit (IGA2) or the VX800's own timing, but that's unconfirmed. Step B is the main experiment: if the screen comes back after the BIOS sets text mode 3, the fix is to have the BIOS set the mode, or to put back what the BIOS had, when the session starts. If it doesn't come back, the reference dump shows which registers differ.

Reply 34 of 39, by pyrogx

User metadata
Rank Member
Rank
Member

Results attached.
After running the test program from within Windows, switching to fullscreen text mode and back works until I turn off the laptop and turn it on again.

Reply 35 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

Can you try this build. This is only an attempt to address your alt-enter issue. Please also, run the VXDOS.

Claude:

What I’m confident about:

The cause: the clock setting is the only real difference between his black screen and the working one, and putting it back (through the BIOS) brought the picture back.
The fix is correct: it writes exactly the value his BIOS writes, and only on a machine whose BIOS uses that setting.

What I’m not sure of: whether the fix runs late enough. Windows’ DOS-session code restores its own register values when the session takes the screen. The driver gets two calls during that switch: one when the display registers are being restored, and one after the switch to text mode. I put the fix at both, but I don’t know exactly where each falls relative to Windows’ own writes. If Windows writes its clock setting after both of them, the fix gets overwritten and the screen stays black.

What his result will tell us:

First Alt+Enter after power-on shows the prompt: fixed.
Still black, and VXDOS 1.1 says the driver set the clock one or more times: the fix runs but Windows overwrites it afterwards. The next step would be setting it again at a later point.
Still black, and the count is 0: the fix never ran at all. Either neither call happens on that switch, or the clock value recorded at boot isn’t what I expect. The log shows that value, so we’d know which.

Either way, one run on his laptop settles it.

Reply 36 of 39, by pyrogx

User metadata
Rank Member
Rank
Member

No change when switching to fullscreen, still a black screen.

Reply 37 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

Test on the NC20:

Install .693 and restart.
Run VXDOS from the tools folder. It needs VXDOSD.EXE beside it.
Press Alt+Enter once.

Right after Alt+Enter, the DOS prompt should be readable straight away. In VXDOS’s log, the line should read “the BIOS’s misc output at boot 6F (clock select 3); the driver set clock select 3 for a DOS session 1 time(s)” or more.

The cookbook’s DOS-clock recipe now says to take the reading at Device_Init too.

Reply 38 of 39, by pyrogx

User metadata
Rank Member
Rank
Member

Indeed, the new build fixed the issue. Switching to DOS fullscreen works reliably now.

Reply 39 of 39, by 360alaska2

User metadata
Rank Newbie
Rank
Newbie

Great! I'll keep working on other bugs and report back.