v86 0.5.330 → 0.5.333
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/libv86-debug.js +6 -3
- package/build/libv86-debug.mjs +6 -3
- package/build/libv86.js +2 -2
- package/build/libv86.mjs +4 -4
- package/build/v86-debug.wasm +0 -0
- package/build/v86-fallback.wasm +0 -0
- package/build/v86.wasm +0 -0
- package/package.json +1 -1
package/build/libv86-debug.js
CHANGED
|
@@ -8452,9 +8452,12 @@ function $IDEChannel$$module$src$ide$$($controller_cpu$jscomp$22$$, $bus_master_
|
|
|
8452
8452
|
if ($select_slave$$ && this.current_interface === this.master || !$select_slave$$ && this.current_interface === this.slave) {
|
|
8453
8453
|
$select_slave$$ ? ($dbg_log$$module$src$log$$(`${this.current_interface.name}: select slave device (${this.channel_nr ? "secondary" : "primary"})`, 32768), this.current_interface = this.slave) : ($dbg_log$$module$src$log$$(`${this.current_interface.name}: select master device (${this.channel_nr ? "secondary" : "primary"})`, 32768), this.current_interface = this.master);
|
|
8454
8454
|
}
|
|
8455
|
-
this.
|
|
8456
|
-
this.
|
|
8457
|
-
this.
|
|
8455
|
+
this.master.device_reg = $data$jscomp$192$$;
|
|
8456
|
+
this.slave.device_reg = $data$jscomp$192$$;
|
|
8457
|
+
this.master.is_lba = $data$jscomp$192$$ >> 6 & 1;
|
|
8458
|
+
this.slave.is_lba = $data$jscomp$192$$ >> 6 & 1;
|
|
8459
|
+
this.master.head = $data$jscomp$192$$ & 15;
|
|
8460
|
+
this.slave.head = $data$jscomp$192$$ & 15;
|
|
8458
8461
|
});
|
|
8459
8462
|
$controller_cpu$jscomp$22$$.io.register_write(this.command_base | 7, this, function($data$jscomp$193$$) {
|
|
8460
8463
|
this.current_interface.status_reg &= -34;
|
package/build/libv86-debug.mjs
CHANGED
|
@@ -8451,9 +8451,12 @@ function $IDEChannel$$module$src$ide$$($controller_cpu$jscomp$22$$, $bus_master_
|
|
|
8451
8451
|
if ($select_slave$$ && this.current_interface === this.master || !$select_slave$$ && this.current_interface === this.slave) {
|
|
8452
8452
|
$select_slave$$ ? ($dbg_log$$module$src$log$$(`${this.current_interface.name}: select slave device (${this.channel_nr ? "secondary" : "primary"})`, 32768), this.current_interface = this.slave) : ($dbg_log$$module$src$log$$(`${this.current_interface.name}: select master device (${this.channel_nr ? "secondary" : "primary"})`, 32768), this.current_interface = this.master);
|
|
8453
8453
|
}
|
|
8454
|
-
this.
|
|
8455
|
-
this.
|
|
8456
|
-
this.
|
|
8454
|
+
this.master.device_reg = $data$jscomp$192$$;
|
|
8455
|
+
this.slave.device_reg = $data$jscomp$192$$;
|
|
8456
|
+
this.master.is_lba = $data$jscomp$192$$ >> 6 & 1;
|
|
8457
|
+
this.slave.is_lba = $data$jscomp$192$$ >> 6 & 1;
|
|
8458
|
+
this.master.head = $data$jscomp$192$$ & 15;
|
|
8459
|
+
this.slave.head = $data$jscomp$192$$ & 15;
|
|
8457
8460
|
});
|
|
8458
8461
|
$controller_cpu$jscomp$22$$.io.register_write(this.command_base | 7, this, function($data$jscomp$193$$) {
|
|
8459
8462
|
this.current_interface.status_reg &= -34;
|
package/build/libv86.js
CHANGED
|
@@ -478,8 +478,8 @@ function(){return this.current_interface.read_data(2)},function(){return this.cu
|
|
|
478
478
|
255});a.io.register_read(this.command_base|5,this,function(){return this.current_interface.lba_high_reg&255});a.io.register_read(this.command_base|6,this,function(){return this.current_interface.device_reg&255});a.io.register_read(this.command_base|7,this,function(){const g=this.read_status();this.cpu.device_lower_irq(this.irq);return g});a.io.register_write(this.command_base|0,this,function(g){this.current_interface.write_data_port8(g)},function(g){this.current_interface.write_data_port16(g)},function(g){this.current_interface.write_data_port32(g)});
|
|
479
479
|
a.io.register_write(this.command_base|1,this,function(g){this.master.features_reg=(this.master.features_reg<<8|g)&65535;this.slave.features_reg=(this.slave.features_reg<<8|g)&65535});a.io.register_write(this.command_base|2,this,function(g){this.master.sector_count_reg=(this.master.sector_count_reg<<8|g)&65535;this.slave.sector_count_reg=(this.slave.sector_count_reg<<8|g)&65535});a.io.register_write(this.command_base|3,this,function(g){this.master.lba_low_reg=(this.master.lba_low_reg<<8|g)&65535;this.slave.lba_low_reg=
|
|
480
480
|
(this.slave.lba_low_reg<<8|g)&65535});a.io.register_write(this.command_base|4,this,function(g){this.master.lba_mid_reg=(this.master.lba_mid_reg<<8|g)&65535;this.slave.lba_mid_reg=(this.slave.lba_mid_reg<<8|g)&65535});a.io.register_write(this.command_base|5,this,function(g){this.master.lba_high_reg=(this.master.lba_high_reg<<8|g)&65535;this.slave.lba_high_reg=(this.slave.lba_high_reg<<8|g)&65535});a.io.register_write(this.command_base|6,this,function(g){const h=g&16;if(h&&this.current_interface===
|
|
481
|
-
this.master||!h&&this.current_interface===this.slave)this.current_interface=h?this.slave:this.master;this.
|
|
482
|
-
b=46080+8*b;a.io.register_read(b|0,this,this.dma_read_command8,void 0,this.dma_read_command);a.io.register_write(b|0,this,this.dma_write_command8,void 0,this.dma_write_command);a.io.register_read(b|2,this,this.dma_read_status);a.io.register_write(b|2,this,this.dma_write_status);a.io.register_read(b|4,this,void 0,void 0,this.dma_read_addr);a.io.register_write(b|4,this,void 0,void 0,this.dma_set_addr)}
|
|
481
|
+
this.master||!h&&this.current_interface===this.slave)this.current_interface=h?this.slave:this.master;this.master.device_reg=g;this.slave.device_reg=g;this.master.is_lba=g>>6&1;this.slave.is_lba=g>>6&1;this.master.head=g&15;this.slave.head=g&15});a.io.register_write(this.command_base|7,this,function(g){this.current_interface.status_reg&=-34;this.current_interface.ata_command(g);this.cpu.device_lower_irq(this.irq)});a.io.register_read(this.control_base|0,this,this.read_status);a.io.register_write(this.control_base|
|
|
482
|
+
0,this,this.write_control);b=46080+8*b;a.io.register_read(b|0,this,this.dma_read_command8,void 0,this.dma_read_command);a.io.register_write(b|0,this,this.dma_write_command8,void 0,this.dma_write_command);a.io.register_read(b|2,this,this.dma_read_status);a.io.register_write(b|2,this,this.dma_write_status);a.io.register_read(b|4,this,void 0,void 0,this.dma_read_addr);a.io.register_write(b|4,this,void 0,void 0,this.dma_set_addr)}
|
|
483
483
|
Vc.prototype.read_status=function(){return this.current_interface.drive_connected?this.current_interface.status_reg:0};Vc.prototype.write_control=function(a){a&4&&(this.cpu.device_lower_irq(this.irq),this.master.device_reset(),this.slave.device_reset());this.device_control_reg=a};Vc.prototype.dma_read_addr=function(){return this.prdt_addr};Vc.prototype.dma_set_addr=function(a){this.prdt_addr=a};Vc.prototype.dma_read_status=function(){return this.dma_status};
|
|
484
484
|
Vc.prototype.dma_write_status=function(a){this.dma_status&=~(a&6)};Vc.prototype.dma_read_command=function(){return this.dma_read_command8()|this.dma_read_status()<<16};Vc.prototype.dma_read_command8=function(){return this.dma_command};Vc.prototype.dma_write_command=function(a){this.dma_write_command8(a&255);this.dma_write_status(a>>16&255)};
|
|
485
485
|
Vc.prototype.dma_write_command8=function(a){const b=this.dma_command;this.dma_command=a&9;if((b&1)!==(a&1))if(0===(a&1))this.dma_status&=-2;else switch(this.dma_status|=1,this.current_interface.current_command){case 200:case 37:this.current_interface.do_ata_read_sectors_dma();break;case 202:case 53:this.current_interface.do_ata_write_sectors_dma();break;case 160:this.current_interface.do_atapi_dma();break;default:y(this.current_interface.current_command),this.dma_status&=-2,this.dma_status|=2,this.push_irq()}};
|
package/build/libv86.mjs
CHANGED
|
@@ -426,10 +426,10 @@ function(){return this.current_interface.read_data(2)},function(){return this.cu
|
|
|
426
426
|
255});a.io.register_read(this.command_base|5,this,function(){return this.current_interface.lba_high_reg&255});a.io.register_read(this.command_base|6,this,function(){return this.current_interface.device_reg&255});a.io.register_read(this.command_base|7,this,function(){const g=this.read_status();this.cpu.device_lower_irq(this.irq);return g});a.io.register_write(this.command_base|0,this,function(g){this.current_interface.write_data_port8(g)},function(g){this.current_interface.write_data_port16(g)},function(g){this.current_interface.write_data_port32(g)});
|
|
427
427
|
a.io.register_write(this.command_base|1,this,function(g){this.master.features_reg=(this.master.features_reg<<8|g)&65535;this.slave.features_reg=(this.slave.features_reg<<8|g)&65535});a.io.register_write(this.command_base|2,this,function(g){this.master.sector_count_reg=(this.master.sector_count_reg<<8|g)&65535;this.slave.sector_count_reg=(this.slave.sector_count_reg<<8|g)&65535});a.io.register_write(this.command_base|3,this,function(g){this.master.lba_low_reg=(this.master.lba_low_reg<<8|g)&65535;this.slave.lba_low_reg=
|
|
428
428
|
(this.slave.lba_low_reg<<8|g)&65535});a.io.register_write(this.command_base|4,this,function(g){this.master.lba_mid_reg=(this.master.lba_mid_reg<<8|g)&65535;this.slave.lba_mid_reg=(this.slave.lba_mid_reg<<8|g)&65535});a.io.register_write(this.command_base|5,this,function(g){this.master.lba_high_reg=(this.master.lba_high_reg<<8|g)&65535;this.slave.lba_high_reg=(this.slave.lba_high_reg<<8|g)&65535});a.io.register_write(this.command_base|6,this,function(g){const h=g&16;if(h&&this.current_interface===
|
|
429
|
-
this.master||!h&&this.current_interface===this.slave)this.current_interface=h?this.slave:this.master;this.
|
|
430
|
-
b=46080+8*b;a.io.register_read(b|0,this,this.dma_read_command8,void 0,this.dma_read_command);a.io.register_write(b|0,this,this.dma_write_command8,void 0,this.dma_write_command);a.io.register_read(b|2,this,this.dma_read_status);a.io.register_write(b|2,this,this.dma_write_status);a.io.register_read(b|4,this,void 0,void 0,this.dma_read_addr);a.io.register_write(b|4,this,void 0,void 0,this.dma_set_addr)}Vc.prototype.read_status=function(){return this.current_interface.drive_connected?
|
|
431
|
-
0};Vc.prototype.write_control=function(a){a&4&&(this.cpu.device_lower_irq(this.irq),this.master.device_reset(),this.slave.device_reset());this.device_control_reg=a};Vc.prototype.dma_read_addr=function(){return this.prdt_addr};Vc.prototype.dma_set_addr=function(a){this.prdt_addr=a};Vc.prototype.dma_read_status=function(){return this.dma_status};Vc.prototype.dma_write_status=function(a){this.dma_status&=~(a&6)};Vc.prototype.dma_read_command=function(){return this.dma_read_command8()|
|
|
432
|
-
16};Vc.prototype.dma_read_command8=function(){return this.dma_command};Vc.prototype.dma_write_command=function(a){this.dma_write_command8(a&255);this.dma_write_status(a>>16&255)};Vc.prototype.dma_write_command8=function(a){const b=this.dma_command;this.dma_command=a&9;if((b&1)!==(a&1))if(0===(a&1))this.dma_status&=-2;else switch(this.dma_status|=1,this.current_interface.current_command){case 200:case 37:this.current_interface.do_ata_read_sectors_dma();break;case 202:case 53:this.current_interface.do_ata_write_sectors_dma();
|
|
429
|
+
this.master||!h&&this.current_interface===this.slave)this.current_interface=h?this.slave:this.master;this.master.device_reg=g;this.slave.device_reg=g;this.master.is_lba=g>>6&1;this.slave.is_lba=g>>6&1;this.master.head=g&15;this.slave.head=g&15});a.io.register_write(this.command_base|7,this,function(g){this.current_interface.status_reg&=-34;this.current_interface.ata_command(g);this.cpu.device_lower_irq(this.irq)});a.io.register_read(this.control_base|0,this,this.read_status);a.io.register_write(this.control_base|
|
|
430
|
+
0,this,this.write_control);b=46080+8*b;a.io.register_read(b|0,this,this.dma_read_command8,void 0,this.dma_read_command);a.io.register_write(b|0,this,this.dma_write_command8,void 0,this.dma_write_command);a.io.register_read(b|2,this,this.dma_read_status);a.io.register_write(b|2,this,this.dma_write_status);a.io.register_read(b|4,this,void 0,void 0,this.dma_read_addr);a.io.register_write(b|4,this,void 0,void 0,this.dma_set_addr)}Vc.prototype.read_status=function(){return this.current_interface.drive_connected?
|
|
431
|
+
this.current_interface.status_reg:0};Vc.prototype.write_control=function(a){a&4&&(this.cpu.device_lower_irq(this.irq),this.master.device_reset(),this.slave.device_reset());this.device_control_reg=a};Vc.prototype.dma_read_addr=function(){return this.prdt_addr};Vc.prototype.dma_set_addr=function(a){this.prdt_addr=a};Vc.prototype.dma_read_status=function(){return this.dma_status};Vc.prototype.dma_write_status=function(a){this.dma_status&=~(a&6)};Vc.prototype.dma_read_command=function(){return this.dma_read_command8()|
|
|
432
|
+
this.dma_read_status()<<16};Vc.prototype.dma_read_command8=function(){return this.dma_command};Vc.prototype.dma_write_command=function(a){this.dma_write_command8(a&255);this.dma_write_status(a>>16&255)};Vc.prototype.dma_write_command8=function(a){const b=this.dma_command;this.dma_command=a&9;if((b&1)!==(a&1))if(0===(a&1))this.dma_status&=-2;else switch(this.dma_status|=1,this.current_interface.current_command){case 200:case 37:this.current_interface.do_ata_read_sectors_dma();break;case 202:case 53:this.current_interface.do_ata_write_sectors_dma();
|
|
433
433
|
break;case 160:this.current_interface.do_atapi_dma();break;default:y(this.current_interface.current_command),this.dma_status&=-2,this.dma_status|=2,this.push_irq()}};Vc.prototype.push_irq=function(){0===(this.device_control_reg&2)&&(this.dma_status|=4,this.cpu.device_raise_irq(this.irq))};Vc.prototype.get_state=function(){var a=[];a[0]=this.master;a[1]=this.slave;a[2]=this.command_base;a[3]=this.irq;a[5]=this.control_base;a[7]=this.name;a[8]=this.device_control_reg;a[9]=this.prdt_addr;a[10]=this.dma_status;
|
|
434
434
|
a[11]=this.current_interface===this.master;a[12]=this.dma_command;return a};Vc.prototype.set_state=function(a){this.master.set_state(a[0]);this.slave.set_state(a[1]);this.command_base=a[2];this.irq=a[3];this.control_base=a[5];this.name=a[7];this.device_control_reg=a[8];this.prdt_addr=a[9];this.dma_status=a[10];this.current_interface=a[11]?this.master:this.slave;this.dma_command=a[12]};function W(a,b,c,d){this.channel=a;this.name=a.name+"."+b;this.bus=a.bus;this.channel_nr=a.channel_nr;this.interface_nr=
|
|
435
435
|
b;this.cpu=a.cpu;this.buffer=null;this.drive_connected=d||!!c;this.sector_size=d?2048:512;this.is_atapi=d;this.sector_count=0;this.head_count=this.is_atapi?1:0;this.device_reg=this.head=this.lba_high_reg=this.lba_mid_reg=this.features_reg=this.lba_low_reg=this.sector_count_reg=this.is_lba=this.cylinder_count=this.sectors_per_track=0;this.status_reg=80;this.sectors_per_drq=128;this.data_pointer=this.error_reg=0;this.data=new Uint8Array(65536);this.data16=new Uint16Array(this.data.buffer);this.data32=
|
package/build/v86-debug.wasm
CHANGED
|
Binary file
|
package/build/v86-fallback.wasm
CHANGED
|
Binary file
|
package/build/v86.wasm
CHANGED
|
Binary file
|