Release Name: 0.4.0
Notes:
New release. The raw changelog is long enough that I almost
decided not to release since it´s too damn tiring to go
through it all. Well, if you notice anything new, it´s
probably covered somewhere in the changelog. Despite my
master-level selective laziness, a less intimidating list
of some of the highlights follows. (Hopefully no one will
notice that the following is the product of a random line
selector run on the changelog.)
- WX register affecting PPU sprite timing.
- Lots of OAMDMA timing stuff, including bus conflicts with the CPU, PPU and H/GDMA.
- Cycle-accurate PPU sprite mapping reads.
- Fixed a bug where the unhalt event timer wasn´t corrected on cycle counter reset which
could cause games to freeze in an almost endless halt (cycle counter reset happens every
few minutes).
- More accurate PPU tile loading / rendering pipelining behavior.
- Save states with OSD thumbnails, text etc.
- Real-time, sophisticated resampling framework with several performance/quality profiles
for dynamically generated windowed sinc and CIC chains based on analysis of fourier
transforms and optimal cost equations. Fast 2-tap linear as a low quality alternative.
- Lots of Mac OS X improvements, Core Audio, video mode switching.
- Multi-monitor support.
- Play menu with Pause, Frame Step, Dec/Inc/Reset Frame Rate.
- New and improved input dialog with many key mapping choices, alternate keys, etc.
- Direct3D9 video engine, with page flipping, triple buffering, vsync, device selection, etc.
- Seperate Qt
GUI/media framework code from Gambatte specific code.
- New audio/video timing model based on rate estimations in terms of OS timers.
- Custom sample rate and approximate buffer latency choice.
- Hq3x.
- Force DMG.
Changes:
-- 0.4.0 -- 2008-10-27
libgambatte:
- less fixed-width type dependencies. don´t assume unsigned int > 16 bits
- slightly faster sprite mapping
- Skip potential high frequency events when they don´t matter.
- do sprite sorting and cycle calculations pr line as needed instead of all
at once
- fix broken volume on/off event notification
- less int > 16-bits assumptions
- more type width dependency fixes
- int width deps. Gambatte namespace
- wx affects sprite m3 cycles
- cache m3 cycles, related refactoring
- readjust cgb dma cycles to previously changed m3 timing
- clean up goofy lyc calculation.
- cgb dma from various areas results in 0xFF being written.
- 0xFEA0-0xFEFF not writable when OAM isn´t
- unusable ioram bits fixes
- dmg ioram startup state fixes.
- various oamdma accuracy
- oamdma bus conflicts with cpu, ppu, cgbdma.
- rewritten memory read/write methods.
- accurate timing of ppu sprite mapping reads.
- fix recent cgb sprite cycles sorting slip up.
- preoffset mem pointers.
- get rid of unused memory.
- save state infrastructure,
- clean up video timing code,
- use save state for initialization and reset,
- do color conversion outside filters
- fast rgb32ToUyvy,
- add overlooked oamdma event,
- adjust subcycle
irq timing (shouldn´t affect anything),
- various refactoring
- save savedata before loading state
- fix silly initstate ifreg regression
- save state selection
- save state osd preview snapshots
- fix a few potential security holes when loading invalid state
- get rid of some undefined behaviour in statesaver
- always draw in rgb32, color convert afterwards, too bad for maemo/16-bit
depth users
- get rid of silly c string stuff
- add bitmap font rendering with font based on Bitstream Vera Sans
- osd state n saved/loaded text
- empty state osd thumbs marked with "Empty" text
- adjust thumbnail interpolation weighing slightly
- utilize templates for more flexible osd text printing
- use grey osd text with black outline for save/load state messages
- move state 0 OSD pos to rightmost to match kbd layout
- state 1 default on ROM load
- support external save state files
- missing includes
- missing virtual destructor
- std::ifstream construction missing binary flag
- fix gcc-4.3 compilation
- avoid signed overflow in constant (which is both undefined and likely
to cause problems on architectures where sizeof(long) != sizeof(int)) in
rgb2yuv code.
- Fix wrong pitch passed to filter if color conversion is needed.
- Fix potential problem with rgb32ToUyvy cache init values on 16-bit systems
- Correct unhalttime when resetting counters. Fixes perodic infinite halt
issue in Kirby´s Star Stacker and probably other games.
- Fix LY display disable regression
- Use deltas and a running sum to decrease buffer writes in sound emulation
sample generation.
- Rearrange sound emulation event loop to optimize for high-frequency event
units.
- Initialize palette arrays to avoid valgrind noise.
- Don´t do resampling in libgambatte. Update API to reflect this.
- No rambanks for ROMs that don´t request any.
- Route invalid rombank addresses in non-power-of-2 number of rombanks
cases to disabled area assuming ceiled power of 2 address bus.
- no sprites or sprite mapping busy cycles on first line after display
enable. slight cleanup.
- small oam accessibility correction.
- Tile loading and tile rendering can seemingly get out of sync when
modifying scx at a critical time. Another pessimation with little gain in
the name of accuracy.
- Use a look-up table to do tile byte merging.
- Append "_dmg" to save base name when forcing DMG mode, to avoid
corrupting CGB save files and
vice versa.
- saner ly write behaviour
- Add adapted and optimized hq3x.
- Revert to big f´ing switch
hq2x code, as there´s less duplication now.
Also optimized interpolation functions further. No idea how I missed that
initially.
- Lower opacity OSD text.
gambatte_sdl:
- less retarded indenting
- saner placement of fill_buffer function
- int width deps. Gambatte namespace
- Scalebuffer dstpitch aware.
- save state selection
- add number key slot selection shortcuts
- Estimate actual output sample rate in terms of OS timers
and derive frame rate from it.
- Move AudioData and RingBuffer classes to separate files.
- Make underruns slightly less painful, by resetting buffer
positions.
- Skip resampling when fast-forwarding
- Fill available buffer space before waiting for more.
- Audio buffer command line options.
- Use half video frame sleep time if audio buffer is close to underrun.
- Adjust estimated frame time each frame.
gambatte_qt:
- more likely to build on mac os x
- Fix fixed window size issues with various window managers (metacity,
xfwm4...)
- macx build fixes
- hopefully fix
opengl clearing issues
- Gambatte namespace
- Decouple Qt
GUI from gambatte.
- Lots of cleanups, flexibility added
- setting of various properties, frame time, aspect ratio, button events,
video sources, sample rates, pauseOnDialogExec, custom menus etc.
- Document some interfaces.
- Support for setting approximate sound buffer latency.
- Use rational math for 100% exact timers (even though the actual system
timers are unlikely to be accurate).
- Add fast-forward to input settings.
- timeGetTime() fallback for win32
- Store full screen mode values/text rather than less reliable indexes.
- Repaint on xvblitter port changes to avoid color key not getting
repainted.
- improved ALSA buffer reporting
- add sampleRate info to MediaSource::setSampleBuffer.
- clarify that "samples" refers to stereo samples
- fix 24-bit depth non-shm ximage creation
- fix blittercontainer incorrectly using minimumSize for integer scaling
- add unrestricted fast bilinear and nearest neighbor sw scaling to
x11/qpainter blitter
- swscale: remove forgotten static qualifiers
- swscale: center linear weighing bias
- swscale: exclude iostream
- swscale: less bloated
- macx fixed/variable window size change issue fixed
- macx
opengl drawbuffer change issues worked around
- add openal engine, default on macx
- add macx quartz video mode toggler
- multi-head infrastructure
- support multiple monitors in macx quartz toggler
- more work-arounds for Qt failing to set correct geometry on video mode
changes.
- more explicit fast-forward button handling, to avoid missed key
press/release events on macx
-
opengl doublebuffer preblitting, try to make actual screen updates as
close to right after sync wait is over as possible
- add xf86vidmode toggler (xrandrtoggler is default)
- x11blitter: check for other supported visuals if the default is
unsupported.
- temporarily return to original video mode and minimize on full screen
alt-tab (except on macx or if there are multiple screens), switch back on
focus-in
- hide mouse cursor after move timeout, or key/joystick pressed (more sane
on macx)
- exit fullscreen rather than toggle menubar on macx (note that the menubar
will automatically pop-up on macx full screen if the mouse is moved to
the top of the primary screen)
- add (independent) pause counter for non-client pauses.
- reset X11 screen saver on joystick activity
- change "turbo"-mode to temporarily set frametime as a way of avoiding
vsync issues (for a laugh, check out the video dialog while in
fast-forward mode and see "Sync to vertical blank in 65535 and 131070 Hz
modes").
- fix win32 compilation
- refix win32 fullscreen geometry correction
- neater win32 BlitterWidget::sync
- avoid misleading minimize on fullscreen close
- refactor Blitterwidget::sync
- directdrawblitter: remove unecessary turbo conditions
- gditoggler: add multi-monitor support (win32)
- videodialog: save actual hz values for real this time
- quartztoggler: avoid potentially reverting to the wrong mode on double
setFullMode(false) in multi-head configs
- make sure window is within screen after mode change, so Qt doesn´t reset
it to the primary screen
- revert to previous win32 fullscreen geometry correction behaviour so that
the geometry gets properly reset after fullscreen
- Add directdraw device selection.
- directsoundengine: add device selection.
- directdrawblitter: only list devices if there are more than 2 devices
(including primary)
- directdrawblitter: use private static member rather than global friend
enumeration callback
- capitalization changes
- add direct3d9 blitter with support for vsync, bf, page flipping, triple
buffering, device selection, multi-head etc. d3d9.dll loaded at runtime
- more strict and thorough exclusive mode handling to support d3d fullscreen
- work around file open dialog not returning focus properly
- gditoggler: use current registry settings for return modes
- directsoundengine: set DSBCAPS_GETCURRENTPOSITION2 flag
- revert bad macx return from fullscreen on menu-toggle
- don´t build xf86vidmodetoggler by default
- add save state actions to
GUI menu
- clean up
GUI menu creation code
- move
GUI recent files to submenu
- support external save state files
- add number key slot selection shortcuts
- missing includes
- missing virtual destructor
- make sure windows path arguments don´t use backslashes by using QFileInfo
- add Play menu with Pause, Frame Step, Dec/Inc/Reset Frame Rate
- Add tab support to input settings dialog.
- Add alternate key support to input settings dialog.
- Auto-focus to next likely input box after settings key in input dialog.
- Add "Play" and "State" input settings dialog tabs.
- Avoid using the most convenient keys as forced menu short-cuts, set them
as default keys in input settings dialog instead. This unfortunately
makes the more useful shortcuts less visible, but it allows remapping
the most convenient keyboard keys.
- Avoid duplicate joystick axis "press" events by keeping a map of axis
states.
- Make sure to discard irrelevant/old joystick events.
- Don´t give MediaSource button events when stopped.
- Allow joystick-based button events while paused by using a very
low-frequency poll timer.
- Make some of the joystick event wrapping stuff less messy.
- missing string include
- use QString for videoSourceLabel passed to MainWindow constructor
- store currently selected scheme as string, since it appears ModelIndex
is neither tied to the data it points to nor invalidated by changes.
enforce valid state on reject since the list of schemes may have
changed.
- Direct3DCreate function pointer typedef needs WINAPI macro
- disable page flipping dependent checkboxes in constructor to ensure
correct start state
- add custom sample rate support
- change default buffer latency to 67 ms
- don´t auto-repeat buttons bound to keyboard
- use enums for somewhat more robust gambattesource button setup
- fix silly "alsa not using default device by default" bug
- Only ask for xrandr config once to avoid potential server roundtrips in
some xrandr versions.
- Make sure xrandr version is >= 1.1 and < 2
- Prevent all text editing of input boxes.
- Add custom context menu to input boxes.
- Update AudioEngine to support sample rate estimation in terms of OS
timers.
- Implement sample rate estimation in ALSA and OSS audio engines.
- AlsaEngine: Revert to using snd_pcm_avail_update for buffer status since
snd_pcm_delay may consider external latencies.
- AlsaEngine: Use snd_pcm_hw_params_set_buffer_time_near. Don´t request a
particular number of periods per buffer.
- AlsaEngine: Use hw as default custom device string, rather than hw:0,0.
- OssEngine: Don´t trust GETOSPACE fragment info.
- Estimate optimal frame rate based on sample rate estimations.
- Extend BlitterWidget to support estimation of vsynced frame rate in terms
of OS timers.
- Implement vsync frame rate estimation in QGlBlitter, Direct3DBlitter and
DirectDrawBlitter.
- Use a combination of OS timer sample rate estimation and vsync frame rate
estimation to derive resampling ratio for no-frame-duplication vsync.
- Change API to reflect MediaSources not being responsible for resampling.
- Make sure to parent PaletteDialog list model, so it gets deleted properly.
- Various refactoring, small changes and stuff I forgot.
- limit vsync frame rate estimation deviation
- More averaging in estimation code.
- Stricter estimate deviation limit
- Adjust estimated frame time each frame.
- Use half frame time if audio buffer is close to underrun.
- Provide combined audioengine write and status get, to avoid doing
potentially expensive operations twice. Utilized in OSS and ALSA engines.
- Saner vsync estimate variance protection.
- allow dynamically setting samples per frame
- Don´t bother allowing sources the choice of which output sample rates are
selecrable, as it´s not really a per source thing at this point. If
resampling avoidance is desired, then that should rather be a user option
(to depend on the OS for resampling, which is mostly nonsensical for the
Game Boy/NES/PSG-system case btw).
- Move Qt media framework to a separate subdir
- postpone buffered x11 blits to after sync.
- Add support for XRandR 1.2 + multi-head
- use crtc mode dimensions rather than crtc dimensions when discarding
modes since crtc dimensions may be rotated
- Fractional bits for intermediate rate estimation averages.
- Add RateEst reset method. Initialize RateEst count to 1.
- Less refresh rate estimation averaging.
- Allow more refresh rate estimation deviation.
- Return NULL paintEngine in windows blitters that use the PaintToScreen
attribute.
- Add checks for things not being initialized in DirectDraw-blitter and
QPainterBlitter paintEvents.
- Don´t reparent blitters (mainly to make a bug in Qt 4.4.3 win less
annoying, widgets that do internal reparenting are still affected).
- Check for window position less than screen top-left after mode change,
before full screen, to avoid Qt moving it to the primary screen.
- Add rate estimation to DirectSound engine.
- Better underrun detection in DirectSound engine.
- Don´t duplicate blitter pointer in mainwindow.
- Use RateEst.reset rather than re-initing on pause.
- Add CoreAudio engine with rate estimation and buffer status support.
Default engine on Mac OS X.
- 44100 Hz default sample rate on OS X, since OS X tends to resample
everything to 44100 Hz.
- Get rid of buffer status averaging in OpenAlEngine, since it makes
assumptions on usage pattern that shouldn´t be made.
- Fix CoreAudio engine reporting buffer status in samples rather than
frames.
- Update SDL_Joystick to SDL-1.2 SVN.
- #undef UNICODE in win32/SDL_mmjoystick.c to avoid joystick name mangling.
- work around annoying random non-updating OpenGL on Mac OS X after full
screen.
common/other:
- Fix GCC 4.3 warnings about people getting confused by operator precedence
by adding parentheses.
- Real-time, sophisticated resampling framework with several
performance/quality profiles for dynamically generated windowed sinc and
CIC chains based on analysis of fourier transforms and optimal cost
equations. Fast 2-tap linear as a low quality alternative.
- Move non-emulation common code to a common directory to avoid duplication.
- Update front-ends to new libgambatte API.
- Utilize resampling framework in front-ends. Selectable resamplers.
- Improved adaptive sleep class that estimates oversleep.
- Various refactoring, small changes and stuff I forgot.
- Do per phase normalization to avoid dc fluctuations.
- More averaging in estimation code.
- Stricter estimate deviation limit
- Fractional bits for intermediate rate estimation averages.
- Add RateEst reset method. Initialize RateEst count to 1.
- Extend ringbuffer.h to support resetting size, and move it to common dir
since gambatte_qt/coreaudioengine uses it too now.
- Add "force DMG mode" option.
- Allow more rate estimation deviation.
hwtests:
- wx affects sprite m3 cycles.
- cgb dma from various areas results in 0xFF being written.
- add hwtests for oam dma
- m3 cycles wo bg
- more oamdma tests
- various oamdma accuracy. oamdma bus conflicts with cpu, ppu, cgbdma.
- accurate timing of ppu sprite mapping reads.