Commit graph

28 commits

Author SHA1 Message Date
Fabian 1a27b72311 Crude implementation for cmos A update-in-progress bit 2022-09-07 20:18:25 +09:00
Fabian 654abe97e3 Fix rtc detection in Linux v5.11+ (see 211e5db1 in the kernel repo) 2022-02-17 17:38:01 +01:00
Fabian 74dca95e23 idle on hlt instruction 2022-01-30 19:02:39 -06:00
Fabian 32606a26ac rtc: Implement alarm interrupt 2020-08-30 19:37:15 -05:00
copy a7a8c271cb Correct handling of lowering irqs 2016-11-21 20:09:03 +01:00
copy 1e8a355572 Minor changes 2016-03-26 15:21:16 +01:00
copy ba5ac54c04 Switch to microtick 2016-02-14 13:15:09 +01:00
copy 70725bae2f CMOS memory is only 128 bytes 2016-01-22 23:06:05 +01:00
copy 2dea137869 cmos_read 2016-01-03 19:20:45 +01:00
copy 7fba276f86 Fix warnings 2015-09-15 21:58:40 +02:00
copy f557156256 trailing whitespace 2015-09-12 01:10:38 +02:00
copy f82373d6b2 Build state of emulator explicitly. Fixes #40 2015-05-18 22:18:59 +02:00
copy b3db408e61 Clear bits on cmos C read 2015-05-17 01:57:52 +02:00
copy 3a824eda12 Change handling of interrupts to involve APIC 2015-05-17 01:56:50 +02:00
copy 5b2a89c95e Mark const 2015-03-09 01:20:56 +01:00
copy ba71b4b43a Rewrite CMOS 2015-02-25 18:23:10 +01:00
copy 03fc3b821c Add disk translation cmos entry 2015-01-31 17:35:56 +01:00
copy 21747acc44 Lazier hlt_loop, fixes #15 2015-01-14 02:43:09 +01:00
copy a0da169168 Make _state_skip work by value (instead of key). Fixes certain Closure Compiler builds 2015-01-12 18:05:10 +01:00
copy 5fd2a1bd35 Improved handling of IO port operations 2014-10-21 21:51:42 +02:00
Fabian 9b031d4e40 Initial version of save/restore state feature, #18
Everything that is valid json plus arraybuffers and arraybuffer-views
can be restored automatically (without making changes to other code).
Properties that should not be part of the state buffer needed to be
annotated using a magic `_state_skip` property. Shared arraybuffer views
are broken during restoration and also need to be annotated. Adapters
are not (and should never be) saved.

Current limitations:
- Before restoring, the cpu needs to be initialised with the original
  settings. This is not a hard requirement and can be fixed later.
- Pending asynchronous operations are lost. It's a good idea to pause
  the cpu before saving the state.
2014-09-28 22:10:47 -07:00
Fabian d0faed1e10 Rewrite to prototypical notation 2014-09-24 21:13:54 -07:00
copy 7a731ca061 Change CPU from closure to prototypical notation.
This change was necessary for several reasons:

- Code is much clearer and more modular
- The CPU object is now serializeable and therefore can be safed and
  restored
- A dynamic translator from instructions to (optimized) JavaScript is
  planned. It would use `new Function` to create functions at runtime.
  Functions created this way don't have access to any scope (except for
  the global scope) and therefore were not have been able to modify
  registers, etc. This is now possible through the cpu object
- Possibly, but not necessarily a speedgain can be achieved.
  See http://mrale.ph/blog/2012/09/23/grokking-v8-closures-for-fun.html

Additionally, some code was moved around.
2014-06-15 22:25:17 +02:00
copy 57551c6a5a Remove unused code 2014-03-11 16:58:35 +01:00
copy 621671bf21 RTC irq flag 2014-02-23 23:32:41 +01:00
copy 94c81977c2 Bootorder configurable 2014-01-08 03:16:28 +01:00
copy bde9c7d491 Disable floppy signature check via CMOS for old floppies 2013-11-07 19:57:43 +01:00
copy 8180d49f24 first public release 2013-11-06 01:12:55 +01:00