Commit graph

240 commits

Author SHA1 Message Date
Joe Osborn 66dab8f39a
Make screenshot function return an Image (#820)
* Make screenshot facility return an Image

Returning an image rather than always opennig a new window slightly
expands the utility of embedding v86---we may want to take a
screenshot and use just its data without asking the user to download it.
2023-04-14 09:26:04 +02:00
Adrian Siekierka 7f5fb11faf
Add support for fixed_chunk_size to async Range downloads (#755) 2022-11-01 20:30:38 +01:00
Fabian e0d4e1808b Move buffer code around 2022-09-19 22:24:09 +08:00
Fabian b227b2e45b Replace winnt_fix by cpuid_level, make configurable 2022-09-08 16:45:28 +09:00
Joey Mezzacappa 62d967bce0
Wait for emulation to stop when destroying (#721)
In some environments, the "emulator-stopped" event did not always fire
when calling the `destroy()` method. This waits for emulation to finish
stopping before continuing with the rest of the destructor.

When stopping the emulator with `.stop()`, the `v86` instance's state
would follow these transitions:

1. Before calling `.stop()`:
   ```js
   {
     running: true,
     stopped: false
   }
   ```
2. Immediately after calling `.stop()`:
   ```js
   {
     running: true,
     stopped: true
   }
   ```
3. After the emulator has finished stopping:
   ```js
   {
     running: false,
     stopped: false
   }
   ```

It was not immediately obvious how properties named `running` and
`stopped` could ever have the same values. This commit renames `stopped`
to `stopping` so it is slightly easier to understand while debugging.
2022-08-15 22:09:45 +02:00
Fabian 6c04f68396 GC SpeakerAdapter 2022-08-02 21:40:57 +09:00
Fabian d4831d3b10 Remove some unncessary quoting 2022-08-02 21:40:57 +09:00
Fabian ee70cd950e wasm trace: log to cpu level 2022-08-02 21:40:57 +09:00
Fabian f33c7ca70b Crude mac address translation, fixes networking in Windows 2000 and SerenityOS 2022-08-02 21:40:57 +09:00
Nitin Tejuja 0615be5d60
Fixed issue #632 async/await (#633)
Co-authored-by: Fabian <copy@copy.sh>
2022-07-25 14:55:07 +02:00
hello-smile6 d9c9277011
Add keyboard lock support (#665)
Allows system keybindings to be intercepted by the guest.
2022-05-28 10:53:56 +02:00
Fabian d685053541 Minor fix 2022-03-11 10:54:37 +01:00
Giulio Zausa f42e204ed3
Allow receiving wasm as a function via wasm_fn (#629)
Allow receiving wasm as a function via wasm_fn (for bundlers)
2022-03-10 21:39:49 +01:00
proxy-m e7f574f4d8
fix v86_bin_fallback full path: getDirname (2) (#624)
Fix v86_bin_fallback when wasm_path is given
2022-02-17 14:15:58 +01:00
Fabian 53a7904834 Improve mute button 2021-12-16 16:24:33 -05:00
ShuoZheLi 46af8ccee1 added is_muted variable 2021-12-10 22:51:38 +01:00
Fabian 7814f96e1c Dead debug code 2021-11-04 18:51:36 -05:00
Fabian 30fa3dbaf9 Clean up 2021-11-04 18:51:36 -05:00
Fabian 6def710a62 Clean up code, add missing handle_read, replace imgsplit with gnu split 2021-10-20 19:06:58 +02:00
pixelsuft 271c8a9c53 Add splitting without server side 2021-10-20 19:06:58 +02:00
Simon Kadisch 690354e69e Provide access to CPU memory via V86Starter 2021-04-23 01:07:50 +02:00
Fabian adb17b7ce4 Port cpuid to rust 2021-04-03 21:10:49 -05:00
Fabian 7e903f09dd Port do_task_switch to rust 2021-03-30 15:03:19 -05:00
Fabian 4344954da3 Port load_tr to rust 2021-03-30 05:24:08 -05:00
Fabian 8ce9c4a988 Allow passing a network adapter directly (#382) 2021-01-10 18:15:50 -06:00
Fabian 497f618cab Merge branch 'wasm' into master 2021-01-03 02:07:20 -06:00
Fabian 8107f26f10 xxx: Add fallback for safari 2021-01-01 21:51:17 -06:00
Fabian 1b4b12d371 Minor 2020-12-31 19:14:34 -06:00
Fabian 1d2be8a04f Provide option to preserve mac address from state image (for Windows 98) 2020-12-31 19:14:34 -06:00
Fabian 0812b61d30 Simplify wasm module loading and instantiating code 2020-12-31 19:14:34 -06:00
Fabian 8440f5af11 Async access to image files using file parts instead of range header (allows compression) 2020-12-31 19:14:34 -06:00
Fabian a238684de6 Store instruction counter in local, use it for loop limits 2020-12-31 19:14:33 -06:00
Fabian fd3077cc1b Make acpi setting work in release build 2020-12-31 19:14:33 -06:00
Fabian d34817d45b Port lsl/lar/verr/verw to rust 2020-12-31 19:14:33 -06:00
Fabian 7a0d213429 Proper xtermjs integration (#172) 2020-12-31 19:14:33 -06:00
Fabian 0988d030fa Make apci+apic configurable at runtime (#247, #332) 2020-12-31 19:14:32 -06:00
Fabian c05ea1465f Remove unused wasm imports 2020-12-31 19:14:32 -06:00
Fabian 906c934945 Remove Rust import panic_bounds_check bug workaround 2020-12-31 19:14:32 -06:00
Fabian 7826474fed Don't create pending jit entries 2020-12-31 19:14:32 -06:00
Fabian 9ccef87b88 Port arpl to rust 2020-12-31 19:14:31 -06:00
Fabian 596ac268b8 Remove calls to dbg_trace from release builds 2020-12-31 19:14:31 -06:00
Fabian 3b5aff7d43 Port far_ret to Rust 2020-12-31 19:14:31 -06:00
Fabian d735d5d34e Port far_jump to Rust 2020-12-31 19:14:31 -06:00
Fabian cd65ecca9e Optimise safe_write* by using tlb info to skip dirty page check 2020-12-31 19:14:31 -06:00
Fabian 745abd3e2a Add emulator.automatically 2020-12-31 19:14:30 -06:00
Fabian 5e48b2da83 Workaround for Rust compiler bug 2020-12-31 19:14:30 -06:00
Fabian 5bfd56571c Delete more JS (port lss and enter) 2020-12-31 19:14:30 -06:00
Fabian df46ffb598 Less JS, more happiness 2020-12-31 19:14:30 -06:00
Fabian e1f8a563ad Simplify (remove c_api) 2020-12-31 19:14:30 -06:00
Fabian 81a43f8a88 Don't call is_osize_32 from far_return and far_jump 2020-12-31 19:14:30 -06:00