* fix on_bus_read issue for genplus-gx core
- related to issue #3813
- update signatures, create new value variable in each of the memory read core functions, pass it to the callback and return it instead of the inline calculations. Also, pass val to write and exec callbacks in IDebuggable since they all use the same mem_cb signature and it would break otherwise. I want to update write and exec callbacks in next commit though to ensure nothing unexpected happens.
* update write callbacks for genplus-gx
- related to issue #3813
* update exec callbacks for genplus-gx
- closes#3813
* twice memory peek for deep freeze via on_bus_read bizhawk
Read a first time to pass the read value to the callback, read a second time to read the updated value in case it was updated by the callback and effectively deep freeze the value, no matter if 8, 16 or 32 width
* remove lines from unknown source
I have no idea where those lines came from. But I never meant to add them. This should look like it currently looks in master
* reinsert const, use implicit delegate constructors
* update submodule commit to before override memory values
* rename a to addr, unsigned int to just unsigned
funny story, the `--gdi` handler didn't remove it from the `args` array,
so it's always been parsed as a rom filename and obviously failing, but
before bd58bde07 it was failing silently
- closes#2622
not sure if this should always apply or only in playback mode but probably doesn't matter too much.
Also changed the default to false because that's what it's effectively been for many years
this now also prevents _runloopFrameProgress from potentially getting stuck after rewinding and fixes some other obscure interactions with frame advance and rewind.
- added 2 bugs
* getmarkers
Lua method to get a table with all markers for the current TasMovie, with Frame and Text as fields
* getmarkerabove
Returns a table of the marker at or above the given frame
* getbranchmarkerabove
same as getbranchmarker, but for getting the marker from a branch
* getbranchmarkers
returns a list of all markers for the given branchId, with fields Frame and Text
internally, wipe is rendered within a single "frame" so no input is processed. but we can't know from the movie which frame is wipe, so we can't insert empty frames to make imported movies work with our wipe - which has to happen across frames so we could capture every interim state of it. when exporting movies, wipe frames can be dropped based on lag info which we're currently setting for wipe only.
the way the initial lists are populated is kinda hacky because we need some separators and split the results using them. it's impossible to make sure they won't use that separator in a name in the future. maybe there's a better way than listing every available name in entire mame and finding which symbols never appear there and using them as separators (tho I admit for views I didn't even do that and relied on users running the thing).
only doom1 uses episode number in -warp, all the rest ignore it and use the first digit to set map (episode is forced to 1 for them). to detect this we now ask the core which gamemode it is (which determines it internally too).
rename complevel setting
see also #2090. This can reasonably catch and handle simple load failures like all waterbox loads and some others.
Not calling the issue fixed because there is more that can be done to prevent cores from trying to load invalid savestates.
various toolbars may exist near screen edges, we don't want them to be triggered when hawk has "captured" the mouse, especially in fullscreen. I considered taking into account when hawk window is partly offscreen but it's hard to expect anyone would play that way - normal scenario is fullscreen, so screen edges are automatically pushed away from. dialogs covering hawk are even less likely to remain during mouse capture, so we don't care about mouse appearing on them.
The core as it is is a very poor choice for Genesis. Much worse compatibility, very noticeably worse audio, and it's not like GPGX is hurting badly in the performance department. It's also very outdated compared to upstream (making these problems much worse than if it was updated). It was only in BizHawk to handle 32X games to begin with (as there aren't many options for 32X to begin with), with Genesis fallback support (without user selectability!) just tacked on "because we can."
Perhaps with a core update it could be more reasonable to allow users to select this, but for now, nope.
Closes#4251, #4250, #4235
demos still sync btw
horizontal mouse was calibrated for my machine, dunno about others. for me 1-pixel relative movement results in 272-pixel deltas, so I divide it inside the core for now
when the global sensitivity option is there, I'll drop sensitivity syncsettings and rely on client ones that I'll configure to match default dsda sensitivity.
upstream uses a hotkey toggle instead but vanilla didn't have it. even "always run" itself was just a vanilla bug. I don't want to have a special on-the-fly input for autorun toggle, hopefully user either wants to always run + occasional mouse movement, or only run using the proper button
this allows to properly set available range which makes demos sync again (aside from weapon switching that I broke)
when importing demos we now force shorttics (even tho some source ports can record demos with longtics depending on compatibility level but importing those is for the later time)
There's 3 approaches here, of which only 1 appears to work more or less correctly
1. Use XFixes "pointer barriers." Introduced in XFixes version 5.0 (end of 2010), these effectively allow 1:1 mapping with Windows ClipCursor, giving behavior BizHawk wants.
2. Use XGrabPointer, with the confine_to argument set to the presentation panel. This mostly works, however, it changes how some events operate and for whatever reason prevents Mono from responding to mouse buttons. This approach can be used with 1. too for a simple warp of the mouse cursor over to wherever the window is.
3. Use Mono's internal CaptureWithConfine function. This is just internally using XGrabPointer with the confine_to argument. Somehow it makes mouse buttons work, but it ends up working too well as it can respond to the menu bar somehow, and interacting with such or the right click menu cancels the grab (seems to be internal Mono code doing such in this case here?).
Note a lot of weirdness with previous code came down to testing being in a VM and mouse integration being enabled. That apparently just prevents any kind of mouse warping from happening so nothing appeared to work correctly. Disabling such allows these approaches to work as above, also makes relative mouse values sane (previous values with mouse integration were completely bonkers).
TODO: Need to check if this works on XWayland (maybe it does?). Also need to refresh mouse capture on window resize and move (needed in general for both Windows and Linux)
currently requires manually binding RMouse X/Y in config.ini (and zero deadzone I guess)
empirically match dsda default settings with sensitivity syncsettings (defctrl.json wasn't touched yet)
TODO: look at mouse calc inside the core
that way we don't have to rebuild the core for every commandline option that it already supports and we decide to use, also more meaningful presentation of those options on the managed side
native api side done. trying to map it probably interferes with absolute inputs, needs some global relative mouse sensitivity setting for input translation purposes. hopefully everything else doesnt break
attempts to resolve#3053 by shuffling some bools around.
Specifically, `_runloopFrameProgress` is now set when either (continuously) frame advancing or rewinding.