Err, restore a reasonnable value for the emulators. ;-)
Arrangements for the SIGSEGV perf tester.
Happy New Year!
Sync with the new SIGSEGV API.
Improve heuristic for VOSF profitability: we should not spend more than the half of a video interrupt quantum for updating the screen. Also improve the wording of the result.
Fix NQD bounds checking -- don't overwrite the CLEAR Page Guard.
Fix page alignment
Use NQD dirty boxes, VOSF backend + make video_vosf_profitable() NQD accel aware + call vm_protect() only if PFLAG_CLEAR(page)
streamline for standalone VOSF performance testing
Remove obsolete Cygwin/X11 addressing hack. Fix DirectX fullscreen mode with hardware surface. On the other hand, DIB (SDL_VIDEODRIVER=windib) always seems the fastest on my system for both windowed and fullscreen modes.
Use fast spinlocks only for small enough atomic operations. Otherwise, you run into some performance problems in e.g. video graphics experience because of busywaits in the current spin_lock() implementation.
Improve SDL/fullscreen mode when not used in DGA mode, i.e. cases when screen needs to be updated too. This needs better boxes characterisation.
Fix SDL/DGA build. Drop useless "inline" for updates. Overlapping scanlines optimization.
Fix DGA when visible screen is smaller than virtual display, aka fix fullscreen mode when VidMode extension is enabled. Also fix SDL fullscreen to really update the screen as this is necessary by default on Linux since simple windowed is used (and not DGA for fullscreen). Always prefer the 64 pixel chunks update code. Rearrange B2 video_x.cpp to match video_vosf.h updates
Rewrite update_display_dga_vosf() for much improved performance and cope with palette changes. Also slightly improve the generic code when we need to further update the screen (e.g. SDL without hardware surface)
Enable multiple depths in fullscreen DGA modes, i.e. add 1-bit to 16/32-bit blitters, rewrite update_display_dga_vosf() to actually work with sub byte pixels. Factor out update_display_window_vosf() since it's long time that it is no longer checking for first column and last column that have changed.
Happy New Year!
s/vm_page_size/vm_get_page_size/ to avoid name clash on MacOS X
remove obsolete headers inclusion, implement vosf lock with native windows mutexes, use new vm_page_size() accessor
lock X11 display better around update_display_window_vosf()
Backport copy-paste of 'TEXT' from SheepShaver
Don't try to make a cast value an lvalue (Brian Johnson). Add some explicit casts to (int) in order to avaoid this warning: warning: comparison between `const enum video_depth' and `enum <anonymous>'
Fix video_vosf_init() for BasiliskII/SDL
Try a better VOSF run-time performance check heuristic.
Add heuristic to deitermine run-time effect of VOSF acceleration, and disable it if it turns out to not be profitable
Move VideoMode wrappers to video_blit.h.
Initial SDL/video support. Fix VOSF code could lead to a crash on run-time resolution/depth switching. Rearrange blitter lookup code, aka make it cleaner.
Happy New Year! :)
Always prefer our (inlined) spinlocks.
use spinlocks on SheepShaver/Linux/PPC, and possibly others where spinlocks are available. TODO: check the fastest & safest means to lock VOSF stuff.
New SIGSEGV API so that skip-instruction requests are more explicit. Yes, that's api change, but that's cooler now for SheepShaver. ;-)
Rearrange video_vosf.h to accomodate both SheepShaver and BasiliskII video infrastructure. Make video_blit.cpp a little more emulator independent.
- video_vosh.h (Screen_fault_handler): Move unrecoverable fault case to... - main_unix.cpp (sigsegv_dump_state): ... Here. - sigsegv.h (sigsegv_fault_handler_t): Rename from sigsegv_handler_t. - sigsegv.h (sigsegv_state_dumper_t): New.
- added infrastructure for multi-monitor support; only video_x.cpp is converted for the new scheme; not actually tested with a mult-monitor setup yet but at least single-monitor display doesn't seem to be broken (UAE banked addressing would definitely require some extensions to handle multiple frame buffers) - struct video_mode has an extra field that is free for use by platform- specific code
- documentation updates - 2001 -> 2002 - version 0.9 -> 1.0
- video_x.cpp: the_buffer shall always be mapped through vm_alloc() so that it can be vm_protect()'ed at will afterwards - video_x.cpp: let driver_base free() the_buffer_copy and the_host_buffer, if necessary - video_vosf.h: reverted to use malloc() for mainBuffer.dirtyPages and mainBuffer.pageInfo - vm_alloc.cpp: small cleanups - fixed typos
fixed a couple of compiler warnings
- added video_vosf_init()/video_vosf_exit() for initialization and destruction of the internal structures used for the VOSF system - use vm_acquire()/vm_release() for VOSF buffers and hope the_buffer is allocated above RAM address space (temporary workaround for 64-bit addressing systems) - don't free() screen buffers in driver_base dtor - don't free() memory mapped buffers in driver_base dtor
- an appropriate visual is selected for the requested Mac color depth - the list of supported Mac color depths is constructed from the list of depth and visuals supported by the X server
- added support for platform-independant mutexes, currently only properly implemented under Unix - adb.cpp uses mutexes for thread-safe mouse handling - video_x.cpp: pressing Ctrl-F5 in windowed mode switches to a "grabbed" relative mouse mode, useful for some games - video_x.cpp: fixed some bugs relating to the hotkeys (key releases are no longer treated as hotkeys)
- video_set_palette() gets passed the number of used palette entries - video_x.cpp supports 2- and 4-bit modes on truecolor screens
added support for 8-bit windowed modes on 16 and 32-bit screens (for the games, man, the games! :-)
- sony.cpp/disk.cpp/cdrom.cpp use vector<> of drive_info objects instead of linked list - color depth switching updates slot ROM - video_x.cpp always supports 1-bit window modes - timer_create()/clock_gettime() are pulled from librt if present
- experimental gamma table support - restructured video_x.cpp: uses classes for display types
zero_fd is not longer used since vm_alloc.cpp should handle that correctly. However, vm_init() and vm_exit() are called in main_unix.cpp to ensure proper initialization of the internal zero_fd descriptor, if needed. i.e. no anonymous mapping for mmap()-based memory allocation.
video_x.cpp supports resolution switching in windowed mode: the available resolutions are 512x384, 640x480, 800x600, 1024x768 and 1280x1024 (the prefs editor has to be updated to reflect this). The resolution selected in the prefs editor is used as the default, but it can be changed in the Monitors control panel. So far only tested with direct addressing.
added infrastructure for resolution/depth switching (currently, all video drivers only support one mode, the one selected by the user)
- added SIGSEGV support for Linux/Alpha (to be checked), Darwin/PPC - added uniform virtual memory allocation (supports mmap(), vm_allocate(), or fallbacks to malloc()/free()) - cleaned up memory allocation in main_unix.cpp
- new and updated SIGSEGV support functions: + configure script cleanups + possible support for Direct Addressing / VOSF on other platforms
added patches from Brian J. Johnson (better VOSF performance and responsiveness)
implemented VOSF on Linux/ppc
Mainly changes to the VOSF code: - improved blitters selection - improved blitters performance if UNALIGNED_PROFITABLE is set - cleaned up 8 bpp blitters
- Cleaned up some comments again - The dirtyPages[] array overrun conditions should be really safe now
Changes made to the update routines - Cleaned up the process for determining the ranges of pages touched that have to be blitted onto the screen (find_next_page_set() and find_next_page_clear() functions) Changes made to do_handle_screen_fault() - An unhandled address is now dealt by the default SIGSEGV handler - Print out the address of the instruction that caused the exception
- removed USE_MAPPED_MEMORY (unused) - fixed Delay_usec() on Solaris
fixed fbcopy_16_obo on big-endian systems
- clicking on the "close" widget of the MacOS display window rings the bell but doesn't actually close the window to prevent Basilisk II from being accidentally killed without a proper shutdown of MacOS - replaced many #ifdef HAVE_PTHREADS constructs with LOCK/UNLOCK macros - minor cleanups
- replaced floating-point page shift calculation by integer routine, fixing the VOSF problems under NetBSD/m68k - fixed off-by-7 error in 1-bit window update routines
- added a few more emulated privileged instructions to NetBSD/m68k - tried to make VOSF run under NetBSD/m68k, little success (shows stripes and sometimes crashes)
added SA_SIGINFO to sa_flags when sa_sigaction is used
- fixed a bug in 24 bpp mode, at least when there are four bytes per pixel - a little loop optimization when clearing the dirty pages - changed unsigned longs with the uintptr type - also used uintpr for the page alignment function
- fbcopy_raw now works if memcpy() is not used (but it seems better to use memcpy since GCC has inline equivalent)
- fixed blitters for big endian systems, will probably work now
- video on SEGV signals
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.