Skip to content

Commit 9b31a6d

Browse files
committed
mesa downgrade, README: Win95 installation
1 parent e73f15c commit 9b31a6d

10 files changed

Lines changed: 68 additions & 13 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,25 @@ General instruction for most machines:
9393

9494
Windows 95 haven't [Setup API](https://learn.microsoft.com/en-us/windows/win32/api/setupapi/), or if has, it isn't fully operable. This is reason why SoftGPU cannot install driver automatically.
9595

96+
Before installation you have to enable TCP/IP because Winsock 2 depends on that and LLVM in Mesa depends on Winsock. You can do it on *Control panel*, *Network*, add *Protocol* and choose *Microsoft* and *TCP/IP*.
97+
98+
![Windows 95 TCP/IP](resource/docs/win95ip.png)
99+
100+
After it you can run SoftGPU, when press **Start!**, program will install all dependencies and configure and copy files but not install driver itself.
101+
102+
After SoftGPU installer is done. Open Device Manager (right click on *My Computer*, *Device Manager*). Find VGA adapter and click on *Properties...*, tab *Driver*, *Change driver...*, *Have disk...*, navigate to SoftGPU installation folder and click on *OK*.
103+
104+
Now you have to choose correct driver:
105+
106+
![Windows 95 driver choice](resource/docs/win95driver3.png)
107+
108+
- QEMU STD VGA PCI Adapter = for QEMU with **std vga** adapter
109+
- VBox SVGA PCI Adapter = for VirtualBox when selected `VBoxSVGA` as Graphics Controller.
110+
- VBox VGA PCI Adapter = for VirtualBox when selected `VBoxVGA` as Graphics Controller or VirtualBox 5.x
111+
- VMWare SVGA-II PCI Adapter = for VirtualBox when selected `VMSVGA` as Graphics Controller or VMware Workstation.
112+
113+
Press *OK*, *OK* and after reboot, VM should start with the new driver.
114+
96115

97116
## Update
98117
If you have an older version of SoftGPU installed, you can update without any problem: insert the CD with the latest version into the VM and click install. The installer will take care of all the necessary modifications, only to increase compatibility it is necessary to do some steps manually:

actions.c

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,20 +1018,39 @@ BOOL setLine3DFX(char *buf, size_t bufs)
10181018
return TRUE;
10191019
}
10201020

1021+
BOOL setMesaDowngrade(char *buf, size_t bufs)
1022+
{
1023+
(void)bufs;
1024+
1025+
if(isSettingSet(CHBX_MESA_DOWNGRADE))
1026+
{
1027+
const char *mesadir = iniValue("[softgpu]", "mesa_alt");
1028+
if(mesadir)
1029+
{
1030+
strcat(buf, ",");
1031+
strcat(buf, mesadir);
1032+
}
1033+
}
1034+
1035+
return TRUE;
1036+
}
1037+
10211038
linerRule_t infFixRules[] = {
10221039
{"CopyFiles=VBox.Copy,Dx.Copy,DX.CopyBackup,Voodoo.Copy", TRUE, TRUE, setLineVbox},
10231040
{"CopyFiles=VMSvga.Copy,Dx.Copy,DX.CopyBackup,Voodoo.Copy", TRUE, TRUE, setLineSvga},
10241041
{"CopyFiles=Qemu.Copy,Dx.Copy,DX.CopyBackup,Voodoo.Copy", TRUE, TRUE, setLineQemu},
1025-
{"AddReg=VBox.AddReg,VM.AddReg,DX.addReg,VM.regextra", TRUE, TRUE, setLineVboxReg},
1026-
{"AddReg=VMSvga.AddReg,VM.AddReg,DX.addReg,VM.regextra", TRUE, TRUE, setLineSvgaReg},
1027-
{"AddReg=Qemu.AddReg,VM.AddReg,DX.addReg,VM.regextra", TRUE, TRUE, setLineQemuReg},
1042+
{"AddReg=VBox.AddReg,VM.AddReg,DX.addReg,VM.regextra", TRUE, TRUE, setLineVboxReg},
1043+
{"AddReg=VMSvga.AddReg,VM.AddReg,DX.addReg,VM.regextra", TRUE, TRUE, setLineSvgaReg},
1044+
{"AddReg=Qemu.AddReg,VM.AddReg,DX.addReg,VM.regextra", TRUE, TRUE, setLineQemuReg},
10281045
{"HKLM,Software\\VMWSVGA,RGB565bug,,0", TRUE, TRUE, setBug565},
10291046
{"HKLM,Software\\VMWSVGA,PreferFIFO,,0", TRUE, TRUE, setBugPreferFifo},
10301047
{"HKLM,Software\\Mesa3D\\global,SVGA_CLEAR_DX_FLAGS,,1", TRUE, TRUE, setBugDxFlags},
10311048
{"HKLM,Software\\VMWSVGA,VRAMLimit,,", FALSE, TRUE, setLimitVRAM},
10321049
{";mefix:", FALSE, TRUE, setLineMeFix},
10331050
{";syscopy:", FALSE, TRUE, setLineSyscopy},
10341051
{";3dfx:", FALSE, TRUE, setLine3DFX},
1052+
{"mesa3d.dll=1", TRUE, TRUE, setMesaDowngrade},
1053+
{"vmwsgl32.dll=1", TRUE, TRUE, setMesaDowngrade},
10351054
{NULL, FALSE, FALSE, NULL}
10361055
};
10371056

resource/docs/win95driver1.png

13.7 KB
Loading

resource/docs/win95driver2.png

16.2 KB
Loading

resource/docs/win95driver3.png

14.2 KB
Loading

settings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static const settings_item_t settings_def[] =
9393
{CHBX_WS2, T_CHECKBOX, 32, "ws2", 0, NULL, NULL, 0, 0},
9494
{CHBX_BLIT_SURF, T_CHECKBOX, 33, "blit_surf", 0, NULL, NULL, 0, 0},
9595
{CHBX_DMA_NEED_REREAD, T_CHECKBOX, 34, "dma_need_reread", 1, NULL, NULL, 0, 0},
96-
96+
{CHBX_MESA_DOWNGRADE, T_CHECKBOX, 35, "mesa_downgrade", 1, NULL, NULL, 0, 0},
9797
{0, 0, 0, NULL, 0, NULL, NULL, 0, 0}
9898
};
9999

softgpu.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,10 @@ LRESULT CALLBACK softgpuWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
729729
{
730730
switch(detection_status())
731731
{
732+
case DETECT_OK:
733+
SetTextColor((HDC)wParam, RGB(0x00,0x80,0x00));
734+
SetBkMode((HDC)wParam, TRANSPARENT);
735+
return GetClassLong(hwnd, GCL_HBRBACKGROUND);
732736
case DETECT_WARN:
733737
SetTextColor((HDC)wParam, RGB(255,128,64));
734738
SetBkMode((HDC)wParam, TRANSPARENT);
@@ -903,7 +907,7 @@ int main(int argc, const char *argv[])
903907
font = CreateFontA(DPIX(16), 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, NULL);
904908

905909
win_main = CreateWindowA(WND_SOFTGPU_CLASS_NAME, WINDOW_TITLE, SOFTGPU_WIN_STYLE|WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, DPIX(600), DPIY(420), 0, 0, NULL, 0);
906-
win_cust = CreateWindowA(WND_SOFTGPU_CUR_CLASS_NAME, WINDOW_TITLE, SOFTGPU_WIN_STYLE|WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, DPIX(300), DPIY(300), 0, 0, NULL, 0);
910+
win_cust = CreateWindowA(WND_SOFTGPU_CUR_CLASS_NAME, WINDOW_TITLE, SOFTGPU_WIN_STYLE|WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, DPIX(300), DPIY(400), 0, 0, NULL, 0);
907911

908912
if(font)
909913
{

softgpu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@
103103
#define CHBX_BLIT_SURF 47
104104
#define CHBX_DMA_NEED_REREAD 48
105105

106+
#define CHBX_MESA_DOWNGRADE 49
107+
106108
BOOL isSettingSet(DWORD menu);
107109
void writeSettings();
108110
int intSettings(int type);

softgpu.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ ws2path=redist\ws2setup.exe
3535
;ie98.ver=Internet Explorer 6.0
3636
default_profile=6
3737
default_path=C:\drivers\SG24.35
38+
mesa_alt=mesa23
3839

3940
[defaults]
4041
dxflags=0
@@ -48,6 +49,7 @@ screentarget_16bpp=0
4849
screentarget_mouse=0
4950
blit_surf=0
5051
dma_need_reread=1
52+
mesa_downgrade=0
5153

5254
[profile]
5355
name=QEMU (software 3D only)
@@ -59,12 +61,12 @@ glide=0
5961

6062
[profile]
6163
name=VirtualBox 5.x, 6.0 (software 3D only)
62-
rgb565=1
6364

6465
[profile]
6566
name=VirtualBox 6.1.0 - 6.1.46
6667
rgb565=1
6768
blit_surf=1
69+
dxflags=1
6870

6971
[profile]
7072
name=VirtualBox 6.1.48 - 6.1.50
@@ -85,6 +87,7 @@ blit_surf=1
8587
name=VMware Workstation 16, 17
8688
blit_surf=0
8789
dma_need_reread=0
90+
mesa_downgrade=1
8891

8992
[pci]
9093
name=VirtualBox VGA

window.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,19 @@ void softgpu_cur_window_create(HWND hwnd, LPARAM lParam)
321321
int draw_y = 0;
322322
int draw_direction = 0;
323323

324-
DRAW_DIRECTION_DOWN;
325-
324+
DRAW_DIRECTION_RIGHT;
326325
draw_x = DRAW_START_X;
327326
draw_y = DRAW_START_Y;
328327

329-
LABEL(0, 160, LINE_HEIGHT, "Extra settings", 0);
328+
LABEL(0, 200, LINE_HEIGHT, "VRAM limit (MB): ", 0);
329+
INPUT(INP_VRAM_LIMIT, 50, LINE_HEIGHT, "", 0);
330+
331+
draw_x = DRAW_START_X;
332+
draw_y += 2*LINE_HEIGHT;
333+
334+
DRAW_DIRECTION_DOWN;
335+
336+
LABEL(0, CUST_WIDTH, LINE_HEIGHT, "SVGA settings", 0);
330337

331338
CHECKBOX(CHBX_BLIT_SURF, CUST_WIDTH, LINE_HEIGHT, "Blit surface to screen (VBox)");
332339
CHECKBOX(CHBX_DMA_NEED_REREAD, CUST_WIDTH, LINE_HEIGHT, "DMA need reread (VBox)");
@@ -335,13 +342,14 @@ void softgpu_cur_window_create(HWND hwnd, LPARAM lParam)
335342
CHECKBOX(CHBX_BUG_PREFER_FIFO, CUST_WIDTH, LINE_HEIGHT, "Prefer FIFO (VMware)");
336343
CHECKBOX(CHBX_BUG_RGB565, CUST_WIDTH, LINE_HEIGHT, "RGB565 (VBox < 7.0.10, < 6.1.46)");
337344

338-
DRAW_DIRECTION_RIGHT;
339-
LABEL(0, 200, LINE_HEIGHT, "VRAM limit (MB): ", 0);
340-
INPUT(INP_VRAM_LIMIT, 50, LINE_HEIGHT, "", 0);
345+
CHECKBOX(CHBX_MESA_DOWNGRADE, CUST_WIDTH, LINE_HEIGHT, "Downgrade Mesa3D (VMware)");
341346

342-
draw_x = DRAW_START_X;
343347
draw_y += LINE_HEIGHT;
344348

349+
LABEL(0, CUST_WIDTH, LINE_HEIGHT, "SVGA screen target (experimental)", 0);
350+
351+
DRAW_DIRECTION_RIGHT;
352+
345353
LABEL(0, 200, LINE_HEIGHT, "Screen target surface (MB): ", 0);
346354
INPUT(INP_SCREENTARGET, 50, LINE_HEIGHT, "", 0);
347355

0 commit comments

Comments
 (0)