Skip to content

Commit

Permalink
sync with upstream
Browse files Browse the repository at this point in the history
Percslol committed Jan 11, 2025
2 parents e2a45d9 + 821a061 commit 3e7b94d
Showing 56 changed files with 3,058 additions and 2,364 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ Welcome to v86's issue tracker!
We use this tracker for bug reports or feature requests. For user support, questions or general comments, use the chat at https://gitter.im/copy/v86 or the forum at https://github.com/copy/v86/discussions
Please don't ask for support for any version of Windows. There are many existing issues at https://github.com/copy/v86/issues?q=is%253Aissue+windows. See also docs/windows-xp.md.
Please don't ask for support for any version of Windows. There are many existing issues at https://github.com/copy/v86/issues?q=is%253Aissue+windows. See also docs/windows-nt.md and docs/windows-9x.md.
Before reporting OS incompatibilities, check existing issues and the compatibility section of the readme.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ jobs:
run: make rustfmt

- name: Fetch kvm-unit-test cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-kvm-unit-test
with:
path: tests/kvm-unit-tests/
@@ -67,7 +67,7 @@ jobs:
run: tests/kvm-unit-tests/run.js tests/kvm-unit-tests/x86/realmode.flat

- name: Fetch namsmtests cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-nasmtests
with:
path: tests/nasm/build/
@@ -83,7 +83,7 @@ jobs:
run: make rust-test

- name: Fetch image cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-images
with:
path: images/
@@ -115,7 +115,7 @@ jobs:
run: make expect-tests

- name: Upload the artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: v86
path: |
@@ -138,7 +138,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Get artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: v86
path: build
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ CARGO_FLAGS_SAFE=\
CARGO_FLAGS=$(CARGO_FLAGS_SAFE) -C target-feature=+bulk-memory -C target-feature=+multivalue -C target-feature=+simd128

CORE_FILES=const.js config.js io.js main.js lib.js buffer.js ide.js pci.js floppy.js \
memory.js dma.js pit.js vga.js vga_text.js ps2.js rtc.js uart.js \
memory.js dma.js pit.js vga.js ps2.js rtc.js uart.js \
acpi.js apic.js ioapic.js \
state.js ne2k.js sb16.js virtio.js virtio_console.js virtio_net.js \
bus.js log.js cpu.js debug.js \
@@ -318,10 +318,12 @@ rust-test-intensive:
QUICKCHECK_TESTS=100000000 make rust-test

api-tests: all-debug
# ./tests/api/clean-shutdown.js \
./tests/api/reset.js \
./tests/api/floppy-insert-eject.js \
./tests/api/serial.js \
./tests/api/clean-shutdown.js
./tests/api/state.js
./tests/api/reset.js
#./tests/api/floppy-insert-eject.js # disabled for now, sometimes hangs
./tests/api/serial.js
./tests/api/reboot.js

all-tests: eslint kvm-unit-test qemutests qemutests-release jitpagingtests api-tests nasmtests nasmtests-force-jit tests expect-tests
# Skipping:
7 changes: 5 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -62,7 +62,8 @@ list of emulated hardware:
[Networking](docs/networking.md)
[Alpine Linux guest setup](tools/docker/alpine/)
[Arch Linux guest setup](docs/archlinux.md)
[Windows 2000/XP guest setup](docs/windows-xp.md)
[Windows NT guest setup](docs/windows-nt.md)
[Windows 9x guest setup](docs/windows-9x.md)
[9p filesystem](docs/filesystem.md)
[Linux rootfs on 9p](docs/linux-9p-image.md)
[Profiling](docs/profiling.md)
@@ -94,8 +95,9 @@ Here's an overview of the operating systems supported in v86:
- Windows 1, 3.x, 95, 98, ME, NT and 2000 work reasonably well.
- In Windows 2000 and higher the PC type has to be changed from ACPI PC to Standard PC
- There are some known boot issues ([#250](https://github.com/copy/v86/issues/250), [#433](https://github.com/copy/v86/issues/433), [#507](https://github.com/copy/v86/issues/507), [#555](https://github.com/copy/v86/issues/555), [#620](https://github.com/copy/v86/issues/620), [#645](https://github.com/copy/v86/issues/645))
- See [Windows 9x guest setup](docs/windows-9x.md)
- Windows XP, Vista and 8 work under certain conditions (see [#86](https://github.com/copy/v86/issues/86), [#208](https://github.com/copy/v86/issues/208))
- See [Windows 2000/XP guest setup](docs/windows-xp.md)
- See [Windows NT guest setup](docs/windows-nt.md)
- Many hobby operating systems work.
- 9front works.
- Plan 9 doesn't work.
@@ -166,6 +168,7 @@ See [tests/Readme.md](tests/Readme.md) for more information.
- [Programatically using the serial terminal](examples/serial.html)
- [A Lua interpreter](examples/lua.html)
- [Two instances in one window](examples/two_instances.html)
- [Networking between browser windows/tabs using the Broadcast Channel API](examples/broadcast-network.html)
- [Saving and restoring emulator state](examples/save_restore.html)

Using v86 for your own purposes is as easy as:
3 changes: 1 addition & 2 deletions debug.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Virtual x86 (debug)</title>
<title>v86 (debug)</title>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">

<script src="src/const.js"></script>
@@ -20,7 +20,6 @@
<script src="src/dma.js"></script>
<script src="src/pit.js"></script>
<script src="src/vga.js"></script>
<script src="src/vga_text.js"></script>
<script src="src/ps2.js"></script>
<script src="src/rtc.js"></script>
<script src="src/uart.js"></script>
106 changes: 106 additions & 0 deletions docs/windows-9x.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
## Installing using QEMU

Recommended versions:
- Windows 95 OSR2(.5)
- Windows 98 Second Edition (SE)

-------------

1. Create a disk image (up to 2 GB):
```sh
qemu-img create -f raw hdd.img <size in megabytes>M
```
2. Run QEMU with the following settings:
```sh
qemu-system-i386 -m 128 -M pc,acpi=off -hda hdd.img
```
- add `-cdrom /path/to/installCD.iso`, if you use a CD version.
- add `-fda /path/to/boot_floppy.img -boot a`, if you use a floppy version or your install CD is non-bootable.
- (optionally) add `-device sb16` to enable sound
- (optionally) add `-nic user,model=ne2k_pci` or `-device ne2k_pci,netdev=<...>` to enable networking

3. For Windows 98: select "Start Windows 98 Setup from CD-ROM". For Windows 95: select "Load NEC IDE CDROM driver" and run `fdisk` to create partition, restart emulator, run `format c:` and `D:\WIN95\SETUP`.

4. To change floppy disk, press *Ctrl+Alt+2* to switch to the QEMU Monitor, run `change floppy0 /path/to/new_floppy_image` and press *Ctrl+Alt+1* to switch to VGA.
5. Follow the installation guide on the screen.
6. (optionally) If "Windows protection" errors appears on startup, apply [FIX95CPU](http://lonecrusader.x10host.com/fix95cpu.html) or [patcher9x](https://github.com/JHRobotics/patcher9x#installation).

> [!TIP]
> For transfer files from host to guest, use [genisoimage](https://wiki.debian.org/genisoimage) ([UltraISO](https://www.ultraiso.com/) and [PowerISO](https://www.poweriso.com/) for Windows and Mac) for creating CD-ISO image or [dosfstools](https://github.com/dosfstools/dosfstools) ([WinImage](https://www.winimage.com/download.htm) for Windows) for creating floppy disk images, then mount the created image to QEMU.
## Floppy disk support

Currently, the floppy drive in v86 works only with MS-DOS compatibility mode.

To check this: open the Start menu, click on "Control Panel" and "System", select "Performance" tab.
If it says *"Drive A is using MS-DOS compatibility mode file system"*, the floppy drive should work properly in v86. If not, try this solution:

1. Click on "Device Manager" in "System Properties".
2. Open "Floppy disk controllers", select "Standard Floppy Disk Controller" and press "Remove" at the bottom.
3. Restart Windows.

## Enabling True Color (32 bpp)

The default VGA display driver only supports 640x480x8 video mode, to fix this, install **Universal VBE9x Video Display Driver**.

> [!WARNING]
> After installing, DOS Mode (and other programs and games that require it) may not work properly.
> This is a problem in VBE9x, not v86, see [#110](https://github.com/copy/v86/issues/110).
> Also, this driver doesn't support DirectX, DirectDraw and OpenGL.
1. Download driver from https://bearwindows.zcm.com.au/vbe9x.htm and unpack into Windows.
2. Right-click on the Desktop, click on "Properties".
3. Click "Advanced" > "Adapter" > "Change".
4. Press "Next", select "Display a of all the drivers in a specific location..." and press again "Next".
5. Press "Have Disk...", click "Browse" and go to folder with unpacked driver. Inside the folder with driver, should be folders like `032mb`, `064mb`, `128mb`. Choose a version based on needed video memory size (for example, `032mb`), then select `vbemp.inf` inside.
6. Select "VBE Miniport" adapter, press "OK" and "Next".
7. After installing, restart Windows.

## CPU idling on Windows 95
See about [installing AmnHLT](cpu-idling.md#windows-9x-using-amnhlt).

## Enabling networking on Windows 95 (requires install CD)

1. Open the Start menu, click on "Control Panel" and "Add New Hardware".
2. Press "Next", select "No" and select next options:

```
Hardware type: Network adapters
Manufacturers: Novell
Models: NE2000 Compatible
```

3. Press "Next" and restart Windows.
4. After restarting, right-click on "My computer", select "Propeties".
5. Open "Device Manager" tab, select "NE2000 Compatible" (in "Network adapters") and press "Properties"
6. Open "Resources", change values by selecting the properties and click on "Change Setting":

```
Interrupt Request: 10
Input/Output Range: 0300 - 031F
```

7. In "Control Panel", open "Network", click on "Add", choose "Protocol" and select the following options:

```
Manufacturers: Microsoft
Network Protocols: TCP/IP
```

8. (optionally) Set "Primary Network Logon" to `Windows Logon`.

## Enabling sound manually

> [!NOTE]
> If you don't have an install CD, use the Sound Blaster 16 driver from https://www.claunia.com/qemu/drivers/index.html.
1. Open "Start" menu, click on "Control Panel" and "Add New Hardware".
2. Press "Next", select "No" and select the following options:

```
Hardware type: Sound, video and game cotrollers
Manufacturers: Creative Labs
Models: Creative Labs Sound Blaster 16 or AWE-32
```

3. Restart Windows.
Loading

0 comments on commit 3e7b94d

Please sign in to comment.