forked from copy/v86
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync with main #8
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Revert "Add VGA graphical text mode" This reverts commit f92e6b4. * started 2nd iteration of graphical text mode * fixed eslint complaints * include changes to main.js and cpu.js from f92e6b4, fix eslint error * added new methods in ScreenAdapter to DummyScreenAdapter * include changes to starter.js from f92e6b4 * changed text attribute BLINKING to FLAGS, introduced flags for BLINKING and FONT_PAGE_A * added support for cursor and blinking, made ScreenAdapter.FLAGS_* visible for VGAScreen * Variuos improvements and fixes. - improved implementation of the three display modes in ScreenAdapter - improved animation frame control (replaced "ScreenAdapter.stopped" with "cancelAnimationFrame()") - added method ScreenAdapter.grab_text_content() with documentation - fixed double-width (16px) font - improved detecting font plane 2 write access in VGAScreen (still work in progress) * fixed issues detected by eslint * fixed classical text mode * optimization: do not copy buffer to canvas when it's unmodified * invalidate all text rows when entering graphical text mode * Made sure that complete_redraw() is called whenever the state that put_char() depends on is modified. Method VGAScreen.put_char() depends on: 1. screen-wide BLINK_ENABLE bit 2. screen-wide PAGE_AB_ENABLE bit 3. VGAScreen.vga256_palette[] 4. VGAScreen.dac_mask 5. VGAScreen.dac_map For 1, 3 and 5 this was already the case. Added call to VGAScreen.complete_redraw() when PAGE_AB_ENABLE is changed. Added call to VGAScreen.complete_redraw() when VGAScreen.dac_map is changed. Added logic to mask out most significant foreground color bit if screen-wide PAGE_AB_ENABLE is true. * removed leftover comment * added new VGAScreen state variable font_page_ab_enabled to state[] * render internal font less often but more aggressively * fixed bug in ScreenAdapter.set_font_bitmap() * refactored ScreenAdapter - moved declarations of constants, member variables and methods into separate groups - moved scattered initialization code into init() method - removed redundant members and initialization code - refactored timer() method to simplify and clarify code - made control flow depend on three-state variable "mode" only * fixed bug in restoring state of graphical text: font_page was missing * restored accidentally lost cleanup code from commit f92e6b4 * narrowed scope of some variables * removed obsolete compatibility attributes from graphic_context * removed redundant initialization call to ScreenAdapter.set_mode() * allow overriding private member charmap[] to support external codepage mappings Introduce support for externally defined codepage mappings wherever charmap[] is used. - added member charmap_default[] with former content of charmap[] - made charmap[] initially point to charmap_default[] - added method set_charmap() to override or fall back to charmap_default[] * merged grab_text_content() into get_text_row()/get_text_screen() * removed comment as suggested * replaced boolean options.disable_autoscale with number options.scale options.scale defines the initial value for ScreenAdapter.scale_x and ScreenAdapter.scale_y. If undefined, options.scale defaults to 1. If options.scale is set to 0, 2x-upscale, scale_x, scale_y and HiDPI-adaption (window.devicePixelRatio) are all disabled in all three modes, they are in the responsibilty of host applications that define options.scale to be 0. * changed render_font_bitmap() to return void, reduced reallocation of font_bitmap[] * added guard to ensure that set_font_bitmap() is only called in text mode * changed text rendering method to glyph-blitting using canvas.drawImage() - replaced pixel-drawing with glyph-blitting - removed graphical_text_buffer - added 3 OffscreenCanvas objects for font bitmap, screen canvas and row helper - left state of canvas context ScreenAdapter.graphic_context untouched * improved cursor rendering * improved foreground color handling * minor changes * improved rendering of invisible glyphs An invisible glyph could be an ASCII Space (0x20) or Null (0x0) character, or any other empty glyph loaded into the VGA's font memory. Invisible glyphs (which are not rare) are currently drawn to the canvas exactly like regular glyphs, this patch handles that more efficiently. - added array with per-glyph visibility attribute - added invisible glyph detection in render_font_bitmap() - instead of drawing invisible glyphs in render_changed_rows(), now erase whole row buffer once per row and just skip invisible glyphs - removed one nested loop from render_font_bitmap() Characters hidden on screem caused by their blink attribute (rare) are also treated as invisible. * improved vga bit handling readabilty
thanks to @SuperMaxusa for providing this image
thanks to @SuperMaxusa for providing the image
…o 0, causing all segment register loads in the ldt to trigger #gp)
…hen setting busy flag
thanks @SuperMaxusa
suggested by @SuperMaxusa
suggested by @SuperMaxusa
suggested by @SuperMaxusa
suggested by @SuperMaxusa
provided by @SuperMaxusa
- added member "dns_method" to both FetchNetworkAdapter (value "static") and WispNetworkAdapter (value "doh") - moved the DoH-code from WispNetworkAdapter.send() into new function handle_fake_dns_doh() in fake_network.js - renamed function handle_fake_dns() into handle_fake_dns_static() - recreated function handle_fake_dns() that now calls either of the two depending on the value of adapter.dns_method
Extends the syntax of relay_url for fetch to: fetch[:CORS-PROXY-URL] where CORS-PROXY-URL is a full URL pointing to the CORS proxy server, for example: fetch:https://example.com/?url= * pass options.net_device to NetworkAdapter constructors - aligned construction of WispNetworkAdapter and FetchNetworkAdapter classes - supported members in object options.net_device (all optional): id, router_mac, router_ip, vm_ip, masquerade, dns_method, doh_server, cors_proxy - completed support for free choice between fake network DNS methods "static" and "doh"
…dcast Channel API" (#1196)
…stances emulator.stop sometimes works (when the GC can figure out that .start() is unreachable and nothing can call into the instance). However, some resources, such as any WebSocket connection, need to be closed manually.
A rust update changed the iteration order of hashtables, which unfortunately affects these. This seems to happen rarely, so accept this for now.
(replaces "Windows XP/2000 guest setup")
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.