Skip to content

Commit

Permalink
V86Starter -> v86
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammerIn-wonderland committed Sep 16, 2024
1 parent 0b3412b commit 00eb8a4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 40 deletions.
71 changes: 34 additions & 37 deletions src/coreapps/SettingsApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -464,46 +464,43 @@ class SettingsApp extends App {
).value,
) * 1000000,
);
const emulator =
new V86Starter({
wasm_path:
"/lib/v86.wasm",
memory_size:
512 *
1024 *
1024,
vga_memory_size:
8 * 1024 * 1024,
screen_container:
anura.x86!
.screen_container,

initrd: {
url: "/x86images/resizefs.img",
},
const emulator = new V86({
wasm_path:
"/lib/v86.wasm",
memory_size:
512 * 1024 * 1024,
vga_memory_size:
8 * 1024 * 1024,
screen_container:
anura.x86!
.screen_container,

initrd: {
url: "/x86images/resizefs.img",
},

bzimage: {
url: "/x86images/bzResize",
async: false,
},
hda: {
buffer: anura.x86hdd,
async: true,
},
bzimage: {
url: "/x86images/bzResize",
async: false,
},
hda: {
buffer: anura.x86hdd,
async: true,
},

cmdline:
"random.trust_cpu=on 8250.nr_uarts=10 spectre_v2=off pti=off",
cmdline:
"random.trust_cpu=on 8250.nr_uarts=10 spectre_v2=off pti=off",

bios: {
url: "/bios/seabios.bin",
},
vga_bios: {
url: "/bios/vgabios.bin",
},
autostart: true,
uart1: true,
uart2: true,
});
bios: {
url: "/bios/seabios.bin",
},
vga_bios: {
url: "/bios/vgabios.bin",
},
autostart: true,
uart1: true,
uart2: true,
});
let s0data = "";
emulator.add_listener(
"serial0-output-byte",
Expand Down
2 changes: 1 addition & 1 deletion src/types/V86Starter.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
declare let V86Starter: V86StarterType;
declare let V86: V86StarterType;
// [todo]
type V86StarterType = any;
4 changes: 2 additions & 2 deletions src/v86.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const decoder = new TextDecoder();
const encoder = new TextEncoder();

V86Starter.prototype.serial1_send = function (a: string) {
V86.prototype.serial1_send = function (a: string) {
for (let b = 0; b < a.length; b++)
this.bus.send("serial1-input", a.charCodeAt(b));
};
Expand Down Expand Up @@ -273,7 +273,7 @@ class V86Backend {
const Buffer = Filer.Buffer;
const sh = new fs.Shell();

this.emulator = new V86Starter({
this.emulator = new V86({
wasm_path: "/lib/v86.wasm",
memory_size: anura.settings.get("x86-memory") * 1024 * 1024,
vga_memory_size: 8 * 1024 * 1024,
Expand Down

0 comments on commit 00eb8a4

Please sign in to comment.