also fix dinput not filtering out unknown key events (TODO: shouldn't this be handled higher up the input chain? surely we wouldn't want to respond at all to unknown key events)
Turn these OS specific key input impls into instantiable classes instead of a ton of static classes, a lot nicer to work with as don't need to constantly check CurrentOS to know which class to use, only the factory needs to check that!
* Make RamWatch double click action configurable
* Make RamWatch Enter press share double-click behavior
* Make RamWatch double-click action default to poke
* Fix code style
* Reduce total diff size from extracting method
* Make sub-menu text more specific
Doing this fixes tasproj prompting for save on bk2->tasproj conversion (which makes no sense) and generally seems senseful to do; there is no point ever having a changelog or changes bool set just after loading a tasproj
This should motivate widening the scope of profiles, and may also inspire additional features for onboarding such as paths/firmware, screen layout, or keybinds.
Fix GDI+ used for display method (got broken in some cleanup commits ago)
Remove some things meant to be removed in the last commit (fixes debug build)
fixes CA2211, CA2215, CA2241, CA2251
silence CA1816 because it's unnecessary
reduce severity of CA2201 because I like the concept but don't wanna fix them all
* Allow migrating non-SHA1 hashes on movie import
* Show more descriptive message on missing hash
* actually return null here
* Simplify LsmvImport
* add more hash HeaderKeys
* remove unnecessary IEmulator argument
this could potentially fix bugs even
* explicitly cast to ReadOnlySpan
in practice this means nothing for any Windows user (since D3D9 would support whatever garbage GPUs that had OGL 2.0 support but not OGL 3.0 support), so it only affects Linux users with GPUs from 2004-2010 (~2011 GPUs supported at least OGL 3.0), and those users probably have options to still use BizHawk if they really wanted to anyways
With this, switch the GuiRenderer (main) pipeline to use VAOs/VBOs instead of the old legacy fixed pipeline crap (other shaders still need that crap for now, so there is still a fallback path there). Also add in way to "free" the vertex layout (since it now can hold a VAO/VBO which needs to be freed once the vertex layout is finished)
* Swap System.Data.SQLite with Microsoft.Data.Sqlite
Apparently this is supposed to be a kind of successor? https://learn.microsoft.com/en-us/dotnet/standard/data/sqlite/compare
* Add e_sqlite3 libs to Assets, prevent runtimes folder creation with OS tailored libs plopped in, delete System.Data.SQLite references
winforms net6 doesn't support it, and "replacement" ContextMenuStrip doesn't work for this use case, so just create a slim wrapper using CreatePopupMenu/DestroyMenu directly
Probably can add in some first time message box warning the user that wine/proton isnt supported, although we probably shouldn't block wine/proton (considering it's the only option for some distros with read-only filesystems, like the Steam Deck)
Normally SDL doesn't do this as we don't ever call SDL_PumpEvents (or anything that calls that). However, OpenGL context creation code ends up calling WIN_PumpEvents regardless. This usually doesn't matter, however, in some cases, this can cause crashes, mainly with loading a state with Citra, as that ends up re-constructing its frame dumping OpenGL context (yeah that's dumb and useless but it's mostly harmless, outside of this message pumping). The WIN_PumpEvents calls appear to be unneeded anyways, so we can safely disable message pumping here.
Add in logic to not create the main rewinder if this flag is true, and add in logic to tastudio to avoid the main greenzone captures (instead only capture on branch save/load)
make it so CIAs past index 0 will be "installed" (mostly only relevant for movies, as the temp user folder is wiped each session in deterministic mode)
ensure XMLs won't load 3DS roms into memory (same reasoning as other hack, might be >=2GiB)
do some cleanup with this code
The main objective in this PR is to get rid of the main .NET Framework dependencies in Bizware packages. This PR doesn't do that completely per se, still having .NET Framework used for WinForms Controls, but that can easily be swapped over for whatever UI framework we use next as long as it exposes native window handles in some way.
For this PR, it does some reorganizing of Bizware, splitting Bizware.OpenTK3 and Bizware.DirectX into 3 packages based on usage; Bizware.Audio, Bizware.Graphics, and Bizware.Input. These packages in the future probably could have more functionality moved into them, but for now they are largely just a reshuffling of the Bizware.OpenTK3 and Bizware.DirectX packages.
As both SlimDX and OpenTK3 are .NET Framework, they have been removed in this PR. Their replacements are as follows:
SharpDX: DirectSound, Direct3D9
Vortice: XAudio2, DirectInput/XInput
Silk.NET: OpenAL, OpenGL
SDL2-CS / native SDL2: OpenGL context management, new gamepad backend (replacing OpenTK's role for gamepads)
native X11: New key input backend (replacing one of OpenTK's roles for keyboards)
GLControl has been replaced by custom made control which just uses SDL2 for context management.
The OpenTK input backend has been replaced with a combination of SDL2 and an OS tailored key input backend (DirectInput on Windows, X11 on Linux, and planned to be Quartz on macOS). This is just represented on the user side as "SDL2" without mentioning the key input backend. This does mean for a while DirectX will be mandatory on Windows again, until a RAWINPUT backend is written for handling key input on Windows for the SDL2 input backend.
Also make it so initial loading uses the zstdstream or filestream directly instead of a memorystream with it all loaded
something of note, not really happy with how these read/write callbacks get used in practice, it seems they get spammed in small chunks
for initial loading, it's 8192 byte chunks each, which can be a LOT of callbacks, depending on core size (gpgx is ~500, MAME is ~22K)
similarly, savestates suffer a similar issue, although instead it's a ton of 4096 byte chunks (page size eh?)
The unmanaged <-> managed transitions obviously are not exactly performant, and I imagine are taking a significant portion of the time here
Perhaps some buffering strategy should come in on the native waterboxhost side to alleviate callback spam?
have it generate "leadin" and "leadout" tracks for multisession discs... this is almost certainly wrong for leadin (doesn't matter so far), leadout is probably right...
Move the various synths using the CUE SS_Base to a file, mostly just a nicer organizational change as MDS and CDI use one of these but not CUE
Misc improvements elsewhere
I'm pretty sure all the existing instances were intended to use `default(T)` if
the key isn't present, except maybe the cheatcode converters but I don't care to
rewrite those at the moment
Instead of creating a new Task and destroying it every frame, just create a new thread and call the delegate when needed.
Also allow for rendering a frame twice, this is actually possible anyways (albeit rarely done).
This should also help against a potential deadlock due to the Task.Wait call on the UI thread (which has special semantics in WinForms)
Also minor nitpicks in RCheevos code
so simply sticking to newest rom sets is the safest, otherwise there's little user control, because there's no global list of all known dumps with indications which of them are bad and what to use instead.
* fix noise audio channel on SMS VDP
* Update SN76489sms.cs
also, white noise is generated by XORing bits 0 and 3, not 0 and 1, on an SMS/GG VDP
* Update SN76489sms.cs
reverting commit #7b857e7
TAStudio previously called `PlayerNumber(...)` for each visible cell with the column's name, only to determine whether its player number is odd or even.
Because that function uses regex and is potentially called extremely often, this had a noticable impact on fps.
I've decided to just cache the odd/even playernumber result in a dictionary for faster access, which while not being my preferred way of handling this at least results in a decent speedup.
* Workaround crashes in MAME's zlib decompression code (see https://github.com/TASEmulators/BizHawk/issues/3615)
* Use using block, only catch InvalidDataException (what will be thrown if the zip entry has an unsupported (likely lzma) compression method)
apparently some game had 2002 leaderboards which caused a crash when making a form for every one of them in the leaderboard list, I guess windows has a limit on the amount of forms that can be active at once?
this is a quick hack to prevent such a crash, design needs to be rethought
* Implement IBasicMovieInfo interface for IMovie
this allows parsing basic movie fields into an own class that is independent from Bk2Movie/TasMovie
This is mainly useful for the PlayMovie dialog which can now load movie information from files on disk without having to go through the entire Bk2Movie/TasMovie loading process
* don't potentially iterate input log twice
* Optimize LoadFramecount
Waterbox cores can't create files anyways, and trying to send in ? might make MAME try to make the directory anyways (which crashes due to the syscall for that being unimplemented), while "" will not do that
Cleanup this code so it plays nicer with BizHawk's "run everything on the main thread" (+ WinForms not playing nice with async methods)
Resend any game session start / achievement unlocks / leaderboard triggers if they failed. Wait for all achievement unlocks and leaderboard triggers to finish on Dispose() (mostly for catching them when user closes BizHawk)
Update rcheevos to 10.7.0
This becomes mostly apparent in the PlayMovie dialog where one zstd instance is created for every single movie, churning significant amounts of memory even though zstd isn't even used
* Nes.Core now updates the DataBus in WriteMemory()
This will fix open bus execution following write instructions.
* Properly formatted changes in previous commit
I have addressed the requested changes.
This call in `ToolManager.Restart` was to set `[{Optional.Required}Service]`
props to `null`, but the tool form would get `Close`d immediately afterwards, so
it never gets the chance to hit the `null` path if one exists. However, some
tools are written as though they keep the stale value, for example attempting to
call a cleanup function on it in their `Closed` event handler. These will now
work as intended.
`[OptionalService]`s that can't be satisfied are set to `null` by
`ServiceInjector.UpdateServices`, so clearing those isn't necessary, and
`ClearServices` has no other usages.
* Use source generator for VersionInfo
* Remove leftover hacks
* Use same fallbacks as NixHawk when Git not available
---------
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
mame won't care too much about how good the dump is, but it will warn you in orange that emulation is imperfect, and in red if it's broken. we happen to use rom status icon to inform the user about multidisk bundle, so using it for mame info feels natural, because it directly affects what users can safely submit to tasvideos. we warn them about bad dumps because it's banned for pub, so it's similar here.
This had two issues. One, relative pathing with dlls is a no-go. Our hackery with changing cwd seems to confuse lua, and while it can find the dll, it fails to load as Windows (at least) does not consider cwd for loading up dlls it appears. Secondly, people using luasockets never actually loaded up the luasockets dll, rather we were bundling it ourselves. From history it seems this was due to our lua being compiled with CLR/.NET and that didn't play nice with exceptions? Doesn't seem to be an issue anymore, but we should probably still bundle luasockets for the time being given it used in many different projects which use the same script with multiple different emulators (thus our own sockets are simply not usable).
This reverts commit 007442773a.
fixes#3268 but unfixes #3053, which should instead be fixed by something that doesn't lead to breaking other things and the author of the "fix" giving up on the project
Add in better docs for `DeltaSerializer`.
Fix C64 not remembering disk changes when swapping disks (swapping disks essentially just reset the disk previously)
denominator is determined by taking refresh attoseconts `as_ticks(numerator)` which reduces the initial 64bit value to what can be used for video
mame needs flat 60fps for screenless machines, so we use a numerator that is a multiple, while also being a tiny bit more accurate than with 1,000,000,000
The main ram previously seemed to just be a slice of the system bus between 0 - 0xbfff. this posed two problems: that area is banked, and that area could represent main ram or aux ram. main ram now represents all of the ram main ram can possible represent, ordered like how the core orders it (which the way it does it happens to be very natural in any case), and a new aux ram domain does the same thing but with aux ram
Also some other changes put in so Rider wouldn't error on building Virtu
Main changes here would be with cartridges, as it appears cartridge stating was just broken since 4ffcc9654a (that's all the way back in 1.13!!!) due to SyncStateInternal not actually getting used
a few other components also had some variables missing from states
disks are not properly savestated yet, it appears it was commented out due to an assumption that disks were write only, but this isn't the case
some other cleanups here, none of them actually affecting state quality here
* Waterbox setup has been revamped to use the latest llvm parts (llvm 16 for compiler_rt/libunwind/libcxx/libcxxabi).
* Clang is now possible to use, and is the preferred compiler (due to superior performance).
* Supported compilers are now clang 14/15/16, and gcc 12.
* Other core updates are mixed in.
---------
Co-authored-by: Morilli <35152647+Morilli@users.noreply.github.com>
currently unused, like `.ips` patch applier; will return to hook up to loading
(currently flagged as good dump if base was), write unit tests, and add a way to
save patched rom to disk
Multisession support! (resolves#3400)
The support is a bit lackluster given some constraints of our environment (e.g. the lack of a readable leadin entirely), but they don't matter for now
Update rcheevos, and with that add in the new DSi console ID
Experimentally revamp the build system, I'm looking into cmake here and it seems to do a great job. The builds committed here were built with clang-cl 15.0.1 and clang 15.0.7 (for Windows and Linux respectively). gcc/clang with msys2 still works fine. gcc on Linux should still work fine. MSVC (cl) itself even works (although as a note, it doesn't work with lto (/GL) due to the force everything exported flag I set). The old Makefile is still kept for future reference.
I asked others and nobody minds. it's not like we're releasing a raw core that has accuracy or integration problems. it mostly works, and it's just modern mame with its current level of accuracy. if integration needs further tweaks to support more games, they will duly arrive while people use it for games that already work.
tasvideos used to only accept hawk submissions for cores marked as released in the code, which usually means the core author (or porter) considers it ready for business. I'm the original porter, and tasvideos staff, and I consider it generally ready. again, the other porter (CPP) didn't seem to mind.
old commits seem to suggest the IsPlayingOrFinished special logic was only intended for HandleFrameLoopForRecordMode. doing it otherwise causes issues with other end movie actions (e.g. if at pause at end of movie, it will just spam pause every time you unpause the movie). when in tastudio `Settings.MovieEndAction == MovieEndAction.Record` is always true, so this only affects playing tasprojs outside of tastudio
hotkeys don't go through messages so unlike other methods of loading a state this caused a deadlock (load state implies memory peeking to restore state)
- s/BizHawk/EmuHawk/
- s/multi-platform/multi-system/ because, while the former is technically true,
it's very much a Windows app, and the latter is what was intended anyway
- replaced logo w/ a nice upscale courtesy of @DrD2k9
- added VCS branch to commit link
- changed window title from VCS info to "About EmuHawk"
- added build config after release version
TODO: This is just MemoryDomainDelegate but with a SendCheatToCore delegate allowed to be added, surely we could just add this to the existing MemoryDomainDelegate? Or better yet MemoryDomainDelegateSysBusNES could just inherit MemoryDomainDelegate if this wants to be separated (and reduce all this code duplication)
combine NLua with KeraLua (KeraLua is "gone" now I guess)
make it use the BizInvoker (so now it can properly handle the liblua5.4.so and lua54.dll names differing), also delete the liblua54.so.
minor speedup when creating a new empty table
make lua default to UTF8 internally, so we don't need to manually change the state's encoding
combine NLua with KeraLua (KeraLua is "gone" now I guess)
make it use the BizInvoker (so now it can properly handle the liblua5.4.so and lua54.dll names differing), also delete the liblua54.so.
minor speedup when creating a new empty table
make lua default to UTF8 internally, so we don't need to manually change the state's encoding
this fixes a bug in 1df6ce4e38, where an incorrect modifier state could be set, causing the release event to not actually release the key. I also don't see a reason to not just not set modifiers.
For example: "Hold Tab", "Hold Shift", "Release Tab" would send a "Release:Shift+Tab" event which failed to release Tab, even though that key was initially pressed without Shift.
So, instead of trying to match the right modifiers and keys just send the released key without modifier state and let the Receive() function do the work.
The 2.9 rcs apparently have the "overlay" folder missing, so the sound files aren't present. I'm assuming there's some issue with build scripts there for releases...
funsie found in this cleanup: can't use `in` params with the BizInvoker as it doesn't like the read only semantics (results in some exception in CreateType)
Method is mostly a duplicate of `EnableLuaFile`, only called when loading a session or an already loaded script.
In either case it didn't actually start the scripts due to an inverted condition, and would stop running scripts without doing the required cleanup.
Resolve inconsistent use of duplicate property on `Config` and `LuaConsoleSettings`, finishes partial refactoring from 324a50a
This will effectively reset this setting to default in existing configs.
TODO: see if we can skip this cast nonsense. the lua tests indicate IntPtr should pass through fine, being considered "userdata", probably better so the user can't just pass raw numbers for the handle.
fix .net exceptions not halting the running script
fix inconsistency with stdout and lua console printing errors, both should end in a newline now
print the inner exception of a lua exception (i.e. the .net extension) if possible
- previously, every second frame was empty (lol), since 2016 i believe
- now imports as (sub)bsnes115 movie instead of bsnes, allowing to import subframe inputs and delayed resets
- imports controller types correct(er)ly
Slight revert of 2efae13af4 (still want to set running scripts as it's used later)
Fix detaching registered functions (old logic was broken, Stop would null out the LuaRef used for creating the new dummy thread for the detached function. best solution i've come up with is to simply pass a callback over for creating the thread, nicely encapsulating that functionality)
Various cleanups, don't need VS complaining about old pattern matching code here anymore...
they were already being cleared when closing the Lua Console
note the "Erase Stale/Stuck Lua Drawing Layers" button does not clear OSD,
leaving that as it is for now
* Fix#3417 and improve handling of default.tasproj
* expose SetMovieController in the MovieSession interface (please don't rely on it anywhere else)
* don't use this explicit public in the interface
(is this mentioned anywhere? i assume this is proper style)
* use this helper function
this is mostly to workaround OOM issues with VERY large movies (>134217728 frames).
so large just the list of string references is "too big" and exceeds the .net 2GB limit.
even the on disk method fails here, as the offsets list (note, long and reference are the same size) becomes too big
this probably gives a bit of speedup for "normal" movies, as the generous 16MB growth amount would likely be plenty for the movie, although i haven't test this much
make a small dll for handling the msabi<->sysv adapter, using only assembly (taken from generated optimized rustc output) and handcrafted unwind information (c# exceptions in a callback seem to work fine in testing)
additionally, allow floating point arguments. this really only needs to occur on the c# side. msabi and sysv agree on the first 4 floating point args and for returns, so no work actually has to be done adapting these
with assembly being used, we can guarantee rax will not be stomped by compiler whims (and avoid potential floating point args from being trashed)
Fixes issues when mame sends over < 1 bounds which round down to 0 with a long cast (resulting in div by 0 exceptions)
Also fix some oopsies with incorrect function signatures.
Remove MAME string docs as they aren't really relevant anymore, as only MameGetString handles lua string handling now
reverts 8dcea2470
`PathEntryCollection.RetroSystemAbsolutePath` extension didn't like this, there
may be others, and I don't want to look through them all
The periodic callback is now used as a way to service "commands" sent from the main thread
Upon servicing a command, the mame thread will set the current command to NO_CMD then wait for the main thread allow the mame thread to continue
During this wait, the main thread may optionally set the next command (done here for STEP -> VIDEO), ensuring the next callback will service that command
A dummy "WAIT" command can be sent to trigger this waiting behavior, allowing the main thread to safely touch mame while the mame thread is frozen (important for mem accesses and probably savestates?)
A/V sync is also reworked. We can assume that 1/50 of a second worth of samples will be sent each sound callback. We can also assume 1/FPS of a second worth of time will be advanced each frame advance
So, we can just give hawk 1/FPS worth of samples every GetSamplesSync, if they are available. If we have less (probable on first few frames), we'll just give all the samples, and hope it balances out later.
* Use SameBoy submodule symlink for BSNES
* SGB memory domains
* Fix SGB saveram issues (extra data like rtc will be saved correctly now here)
* Various cleanups, avoid unneeded unsafe use, a little better EnterExit use
Co-authored-by: Morilli <35152647+Morilli@users.noreply.github.com>
Jaguar VPad
Proper Jaguar default controls
Remove a lot of unneeded `ReSharper disable once UnusedMember.Global` in vpads (Global has been gone for a while now...)
Set VirtualJaguar to released
All the disable expansion pak setting actually does is tell the game the expansion pak is not available.
However, not all games actually abide by this, some will use the expansion pak area anyways.
Video plugins also end up just using a "segfault test" to determine if the expansion pak is present or not
So video plugins may use the expansion pak area too
This ends up causing savestates sometimes just crashing the game if the expansion pak ends up used
Resolves#3092, other state issues might be solved with this (I suspect #3328 is caused by this)
- if DirectSound fails (i.e. dummy is in config for a reason), then skip the
error dialog as the user has probably seen it already, and set it back to dummy
- if DirectSound succeeds, leave it, it will be written to config (there's a
mute setting for people who really don't want sound)
- copied the init config code so s/DirectSound/OpenAL/ on Linux
- could probably try OpenAL on Windows when DirectSound fails but whatever
* Partial port of graphics debugger to new BSNES
* minimal "working" copy-paste
* small fix for the previous commit
* Implement more stuff
* no idea whose responsibility "EnterExit" is but this should work
* add support for backdropcolor
i have 0% trust in this code
* implement mode7, apply backcolor on load
* 🙈
un-"implement" the nonfunctional scanlinehookmanager as well as the non-functional palette setting logic
- this may actually break config lol
* don't break libsnes config
* Provide IBSNESForGfxDebugger in the subbsnes core
* Remove redundant semicolon
* Clean up diff of `comboPalette_SelectedIndexChanged`
* Fix crash
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
* Added 'Edit marker frame' feature
* Changed Edit Marker Frame icon to clock
* Hotkey tooltip + Prevent changing to a frame that already has marker
* Forgot to delete this icon, was replaced by Clock.png
* De-rookie here and there
* Clean up diff
resolves#1861
* Add configuration for auto-saving state on exit
* Update MainForm to auto save on close game if configured
* Fix config serialization test.
* Revert unnecessary changes to Designer file
* Move autosave configuration into Save States menu off of File
* Undo previous test changes
* Remove explicit size on menu item.
* Fix logic
* BSNESv115+: Replace the 'snes_audio_sample' callback with a dynamic audio sample vector to reduce callbacks
* fix integration for subbsnes core
* reduce buffer allocations
- also make frame setter private now that it's possible
fixes b8d5dd899
also addressed code style warnings and fixed a typo in GambatteSuite.BeforeAll
note the last acid suite fail is gone after a recent SameBoy update,
unfortunately the same update added a bunch of fails in the mealybug suite,
though the suite itself needs updating too
* BSNESv115: allow subframe inputs
* BSNESv115: Implement ICycleTiming
may be correct, not sure
* BSNESv115: add dedicated subframe core
I have probably overlooked something...
* Don't implement ICycleTiming in the non-subframe core
requires re-implementing the "FrameAdvance" function in the subframe core
* Register previously missing services in the subframe core as well
* Wire up SubBsnes everywhere in the frontend
* Change reset cycle to reset instruction
* Deduplicate some code
* Slightly rework frame advance logic. The main intent here is to prevent a case where two frames are ran within a single "frame." The current code probably wouldn't crash due to that, but best not to do that.
Also make SGB work here. A bit of a joke since you really can only abuse it for subframe resets, but might as well especially with the settings implying it's possible (and someone is bound to complain).
Co-authored-by: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Deflate compression in rewinder is now zstd compression
Binary blobs in zip files are zstd compressed (text is uncompresed for user ease).
All wbx cores and resources are re-compressed with zstd, wbx build scripts are changed to account for this. Shaves off a bit with download size and it's faster to decompress to.
* Implement hardware accelerated CRC32 and SHA1, use them if possible.
CRC32's generic function is also replaced with zlib's as it is much more performant than our implementation
Full hash of a ~731MB disc took only ~369 ms with this, and the generic CRC32 isn't so far behind at ~659 ms
SHA1 should perform 4x faster if the user's CPU supports the SHA instructions.
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
Co-authored-by: Morilli <35152647+Morilli@users.noreply.github.com>
`Game == null` conditions in `MainForm` ctor looked unreachable, so I changed
them to `Game.IsNullInstance()` which is what I assume was intended, and added
an assert to `RomLoader` in case a bug is introduced later
If the Copy button is enabled, but there is no best attempt recorded, it will crash BasicBot / EmuHawk if it attempts to copy a null Log of the best attempt.
broken since introduction in 017743133 (pre-1.0 according to GitHub)
also enabled MA0052 "Replace constant Enum.ToString with nameof", which is what
tipped me off to this
This never really worked. Besides being unusuably slow and not very accurate, there was a miscompliation problem that caused release builds to not function.
This should be safe because we never filter caught exceptions by this type. I
assume these were all typos, this exception has something to do with Streams.
* Added "Clear Output" button to Lua Console tool.
* Swapped out indentation from tabs to space from Line 248 through 249 for consistency.
* Swapped out indentation from tabs to spaces for consistency.
* Added a custom "Clear Console" icon to Bizhawk.
1b8b4b4926 removed an important bit of logic that set `_triggerAutoRestore` to false in certain cases. but simply putting the same line back there doesn't fix the problem, probably due to major refactorings over the years. so I'm adding it right into `GoToLastEmulatedFrameIfNecessary()` which is still called properly when it's needed. `JumpToGreenzone()` is kinda redundant now since it contains the same check, but it's used from the outside, and I didn't feel like refactoring this part.
* Added the ability to select all addresses / deselect all addresses in the RAM Search window.
* Fixed logic error. This now makes more intuitive sense, in that, if a portion of the rows were selected, and you do Select All, it should select the unselected rows along with the selected rows.
* Simplify condition
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
The payload controller now acts like a multitap with 4 extra buttons per controller (it is already implemented that way in the core), which also eases actual use of it
- also fixes broken VirtualPad behavior
- rename some variables for clarity
* support editting nyma settings without the core loaded
the details are icky here. info on the settings is stored in the core. so no matter what a core instance is needed
now settings info here should be constant for a given core, so we can cache settings info after the core has been loaded and use that
if in the case the user wants to edit the settings but the core has never been loaded, a minimal load will be done to obtain the settings (and cache them) and quickly dispose thereafter
await users complaining about a "lag spike" first time opening nyma settings menu
* consolidate WaterboxOptions creation for Nyma
* depend on versioned ffmpeg release instead of nightly
* Use 4.4.1, fix download/extract on Linux
* update windows build link
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
our MDFN_GetSettingUI/MDFN_GetSettingI is set to assume base 10 instead of figuring out the format of the string, so the built in defaults dont work and always return 0
later MDFN_GetSettingUI/MDFN_GetSettingI should be made to be able to handle hex strings but this should suffice for now
* redo all the libretro stuff in pure C#
also yes i imported snprintf lol
* also remove these
* remove clib hack, it doesn't work when there's more than 1 param (apparently ... is really just a variable num of args passed on the stack and not some pointer to some struct, and c# doesn't have any way of representing this. fallback log isn't bad to deal with anyways)
* also probably want this to return false
* /s/UnmanagedString/PinnedString/
* misc tweaks
* oops
* Libretro "Bridge", with entirely different design. The bridge here simply handles all the callbacks retro cores use, so there is never a c++ -> .NET callback, and probably avoids any libco issues
also a lot of cleanup in various areas, and some bug fixes too (Blit555 now outputs the correct colors)
* use blipbuffer instead of speex
speex seems to perform much worse often (and outright buggy for some libretro cores like sameboy which reports a sample rate of 384000), and blip works well enough even for "newer" systems
* cleanup and linux build
* cleanup and bugfixes (thanks uninitalized variables)
* oops
* misc and cleanup
* fix load no game, also handle load game failures correctly
The position of this restart is dangerous as it may pass in a Dispose()'d core. This is pointless too as later on the Tool Manager handles restarting all tools.
Similarly, remove the explicit restart of the Debugger, no point in doing this as the Tool Manager will restart the debugger just fine anyways (the restart removes breakpoints from the debugger's internal list but doesn't remove them core side, which they should have been removed anyways from being Dispose()'d)
* structurize NumericStringExtensions better, allow negative fixedpoint numbers
* Tune MaxLength values to make more sense
* Use Invariant culture to prevent ","<->"." issue in decimal recognition for some locales
* Cleanup more watch stuff
- simplify Poke functions by removing redundant text checking
- make fixed-point constants const
- remove OnKeyPress overload; let the user type whatever and check it later, similarly in OnTextChanged
- more invariant NumberFormatInfo use for ","<->"." issues, also do a basic fixup on OnKeyDown
- cleanup ToRawInt and SetFromRawInt, there are likely still issues remaining but I have no idea whether they realistically affect anything with the way those functions are used
- remove now unused functions in NumericStringExtensions
Squashed commit of the following:
commit 1f6cdb99a8486b3f89395b2bd3f13f730e21f743
Merge: bcef146d7 ecd428898
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Mon Mar 21 03:05:12 2022 -0700
Merge branch 'transfer_pak_ares' of https://github.com/CasualPokePlayer/BizHawk into transfer_pak_ares
commit bcef146d7d62e5ce435ae3fc4d585d71d98bec52
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Mon Mar 21 03:05:05 2022 -0700
a
commit ecd4288980f7311eba3bdd0a9d1a3fca02e42e43
Merge: 86a7e3e85 ccb24cc79
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Mon Mar 21 02:57:00 2022 -0700
Merge branch 'transfer_pak_ares' of https://github.com/CasualPokePlayer/BizHawk into transfer_pak_ares
commit 86a7e3e85bc1b3cb979671edcbfca66e69d5212b
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Mon Mar 21 02:56:50 2022 -0700
a
commit ccb24cc79fd922b1e3e3b80d660c7b7696f0cf84
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Mon Mar 21 02:51:36 2022 -0700
a
commit 285fd66f9240dfa502a269adb19cc1f3d11236c5
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Mon Mar 21 02:02:31 2022 -0700
misc
commit 9fb76345e4507cbd53ab5e4c2c61a5cb992b7241
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Mon Mar 21 01:50:46 2022 -0700
frontend hookup
commit dabee3a4d63c5801e3147dd758e3c187be0ab8bd
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Mon Mar 21 01:26:48 2022 -0700
actually hook other shit up also delete some shit
commit df632d6ddf6eaeb61ad3ad640851709c2614bfbd
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 21:37:18 2022 -0700
a
commit 143c4039453290ef1e8a4cf53ddea534efa0cea3
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 21:28:07 2022 -0700
a
commit fd75dcc5150860171e3d96fd0bcb4749eeb99378
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 21:03:51 2022 -0700
a
commit ea039643e9a093f63f8dc8c7446e9e70f7f965f0
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 19:56:46 2022 -0700
a
commit 8b373d2ba547cd1ab61360e8129f31452014c728
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 19:33:47 2022 -0700
a
commit dc18a90bebcae013aca4494c1e0a83603dbdbea6
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 19:18:34 2022 -0700
a
commit 3d0eba5f57d95f7cfd74b662f70a40cac5638539
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 19:16:56 2022 -0700
a
commit d97ea34753c007663ea0e629df8830e6aae98e91
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 18:28:01 2022 -0700
a
commit 7a1fe0442c7dd6425048207a19b1b18f9dc3e344
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 17:22:10 2022 -0700
a
commit 421de8ebb8c02736e65f28a88a17cabf297c6e10
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 16:57:47 2022 -0700
is this right?
commit 9fcaa1905b6e3b6bc73c8e8c15c55cab06ddb7f4
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 15:57:32 2022 -0700
rework audio
commit 602577ded89f2fd7d4514792e4f9f485235ce2f1
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 14:54:29 2022 -0700
doh
commit 5521dab709551d9f02bd0cf0d979d8a3860541c6
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 14:42:50 2022 -0700
a
commit bc10461eb9d47bea5acc7cc22963b8e7025b9a31
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 14:41:17 2022 -0700
a
commit d088719299bc0946962bba9404469fe9628633c6
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 14:25:07 2022 -0700
a
commit d425c49bc2ea7925f485379dad33326fa8566754
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 14:18:33 2022 -0700
a
commit ea7c69a512ce84977ad92be0c3f97f396dcf13a7
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 14:13:41 2022 -0700
a
commit b350580b5c8ce455d6ffa41237c2564e8fa76a58
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 14:05:46 2022 -0700
a
commit 5983b23e760e5ca8a3c8141075f383275da570b4
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 13:57:25 2022 -0700
a
commit 12de82e8841284cb70ec02765d86e3729661dcb4
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 13:46:58 2022 -0700
a
commit 992bdf114c24a8a3d37c110629f9a66bfaf21cf8
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 13:05:28 2022 -0700
a
commit 3637649dde95ff4fb24474ee0d1dde795cbc5fe3
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 12:49:52 2022 -0700
o
commit 7d7264b92822ce34ba5412f4cf869c6a4e6fb9b9
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 12:41:55 2022 -0700
testing time
commit bb3a2f89861cdf429091d8253a656e782b68e33b
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 12:14:30 2022 -0700
bleh
commit df46cc34d6edc312b519c98b6c7be3ac6ab89bd2
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 06:18:28 2022 -0700
bleh
commit 21c28a81726ab9a9f206a58424e5434cd0bac1a8
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 05:43:39 2022 -0700
hack test time
commit 3d9e462addc20d6b6d8ffc41595c4751d6fc2975
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 05:36:51 2022 -0700
oh right need to build it
commit a970194f64ac0652f97236debd39e142b01d4dcf
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 05:32:07 2022 -0700
guessing not endianess, maybe need more reset state work?
commit 5d4c11dbf2f767e63d505da22d6bbdef76a4e28b
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 05:23:52 2022 -0700
is this a endianess issue?
commit c5fcd687f5e2c62b1f0f065a3b9c9ffa30867eeb
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 05:11:43 2022 -0700
debug time
commit 437071710ea040a466dd25d7fe691fcdbdb95030
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 05:03:58 2022 -0700
better emulate reset thingie
commit e02503c3f74aa89784b5cc43d1fe5daa6fedf5d3
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date: Sun Mar 20 04:31:42 2022 -0700
initial mouse and transfer pak support
* prep for handling multi-threaded renderer in melon, along with some other cleanups
* initial core side support for mt rendering, probably crashes?
* oops
* ok use ref not in
* testing
* poor man's semaphore
* clean this up, hopefully fix a deadlock?
* update submodule
* reduce submodule diff
* cleanup
* hook up thread wait cb
* maybe make shutdown not hardlock?
* oops
* oops
* testing
* testing
* a
* lol
* fuck
* a
* oops
* a
* a
* a
* a
* a
* a
* a
* a
* a
* if false this
* a
* a
* a
* bleh
* a
* update to upstream
* oh right lua
* region override for bsnes
* hook up SnesInitData right. still needs region override sync setting
* settings stuff, also need to make sure sameboy is using the right region for sgb
* and build
* clearer struct definition; move struct to header file
Co-authored-by: Morilli <35152647+Morilli@users.noreply.github.com>
* prep for performance ares64 core, needs work unmanaged side
* get this going
* rebuild this
* apparently build didnt get cp'd? need to investigate
* fix build, other shit
* suppress these warnings
* tweaks and builds
* apparently bizinvoker doesnt like having LibAres64 class shared between non-waterbox and waterboxed, so split it.
also states for performance core
* builds
* fix this option, describe supersampling properly
* penguin64
resolves#2425. commits:
- build handy-linux with fvisibility=internal, make export have default visiblity
- use bizinvoker for handy
- move this to the right spot
- correct name here
* ares64
* build, currently cherry picking c9af34027b to build this
* some work
* commit the frontend work. crashes on some NR_SCHED_GETAFFINITY syscall
* delete this
* fix oopsie, add debugging shit
* getting closer...
* what the fuck is this mame shit doing???
* fuck
* it's one of these isn't it
* fucking hell
* at least it's not crashing on init now
* bleh
* let's see if this works?
* audio i think?
* oh right, need to disable threading here since that's not wbx supported
* testing
* testing
* testing...
* testing
* wtf?
* lol
* it's doing something now i guess?
* let's try this
* maybe this will catch this bullshit?
* lol
* the fuck?
* what
* meh
* bleh
* let's have some fun
* bleh
* bleh
* bleh
* maybe this works better
* let's try this?
* meh
* this probably will break
* lol
* meh
* a
* a
* a
* a
* a
* meh
* a
* a
* b
* alloc invisible these video buffers
* a
* actually build
* bleh
* well uhhhhhhhh let's see if this blows up for fun i guess?
* bleh
* yeah that when as well as expected
* push this
* bleh
* bleh
* bleh
* a
* dirty hackery
* fuck space/tabs
* hook up input
* hook up input frontend side
* reset/power
* going to have to commit to dumb workaround here i guess?
* fuck this bullshit crash
* cic stuff
* oops
* testing
* hook up save detection
* memory domains and saveram shit
* oops
* someday i'll get macros right
* let's get this kinda reproducable
* build
* bleh
* frontend shit
* bleh
* testing
* a
* fucking
* a
* a
* a
* workaround C# bullshit marshalling maybe?
* revert that, let's hack it on c# side instead
* disgusting hack
* fuck c#
* fix oopsies for eeprom/flash and fuck c#
* apparently explicit layout just dont work, thanks c#!
* correct orientation
* actually fix orientation
* testing
* bleh
* b
* a
* fix crash here
* rumble getter
* hook up rumble with frontend, cache readonly controller settings on core init
* remove old experiment
* make clean make install
-The UI was not updated.
-TasSession.UpdateValues was not called. So saving the movie and then re-loading it would result in the previous frame being loaded/seeked to.
This commit addresses the regression mentioned in commit 319455c.
* update melon
* frontend work
* make this work (i think?)
* fucking merge conflicts
* bleh
* hack up DSi support, very hardcoded atm, but at least states are reasonable
* add IS_DSI load flag
* frontend work bleh
* oops forgot to push
* ok fine apparently that doesnt display right
* oops
* prevent zealous release screen calls, DSi firmware seems to not like it?
* support for loading DSiWare title
* dsiware
* oh right this bullshit
* oops
* will this work
* why the fuck was this signed
* 0 out these hashes, these are also unique per console, no hope verifying these
* testing...
* more testing...
* this is probably a bad idea
* well this probably fixes state size issues
* time to debug this
* oh derp it's just not enough memory in invis heap
* let's see if this works?
* apparently this breaks slow ppu?
* testing...
* testing...
* testing...
* sanity checking
* let's try again
* i do not know what the fuck is up with this emulator nor do i care enough, state size is still under a mb anyways with slow ppu
* oops forgot to commit this
* resolve some issues
* tweak memory allocation sizes
* dont save more cache stuff
* wtf was i even thinking here
* move comment back to original pos, comment on double loading
* nymashock wbx
* shit
* lagflag stuff
* saveram stuff
* debugging how this works
* lets see if this works better
* fuck strings
* ok let's do this right i think
* probably have this all working
* get repo in
* add nymashock to build scripts
* also update this readme
* get rid of this default, seems to break internally anyways?
* ""fix"" dualshock (wtf to do with rumble???), make override defaults actually default, add hack to allow for overriding default controllers
* hide useless rtc settings
* hack fix override defaults for controllers, get something going for nyma psx schema
* oops dont forget this
* make fucking default controllers hack work (what the fuck is this code???) also complete schema and mnemonics
* FUCKING FIX THIS BULLSHIT DEFAULT
* let's make this a little nicer
* add mnemonics for □/△/○, fixes weirdness with input display
* fix weird overscan issues when multiwidth + no-interlacing happens at the same time
* do this "properly"
* analog mnemonics
* default controls for dualshock/gamepad filled
* set nymashock as preferred core
* apparently this didnt get committed?
* update README too
* control name fix
* Revert "control name fix"
This reverts commit a3cae89b18.
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
* emu83
* builds and get rid of wtf this thing is
* multidisk bundler for ti83
* release
* link src
* also put in the commit hash why not
* Nitpicks
* update ""rom"" extensions for ti83
* don't forget to set a preferred core
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
* basics for sameboy
* lol
* bleh
* lol
* push this in
* push this in
* settings, and also update sameboy bootroms
* bleh
* build linux
* remove some debugging shiz
* fix the order of this
* debug stuff also do gpu palettes right
* use new key mask API
* push shit in
* bleh
* add in replacement impl for joypad, use until opposing directions are allowed upstream
* update
* finally get this working without needing GB_INTERNAL
* hook up acc controls
* oops
* oops x2
* oh right this doesn't use this
* finish this up
* also mark this as released
* cleanups
* Nitpicks
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
* BSNESv115+: get rid of input_state + input_poll; just poll
* call `snes_controller_latch` on latches done in the core,
- this now also actually calls the InputCallbackSystem
- needed some edits in the core to support executing the callback even when no controller is connected in port 1
* Fix and somewhat normalize the SnesCallbacks order
-The UI was not updated.
-TasSession.UpdateValues was not called. So saving the movie and then re-loading it would result in the previous frame being loaded/seeked to.
Previously, TAStudio's ZwinderStateManager had to handle this, which made the code somewhat confusing. (Especially when I was looking at ZwinderBuffer and forgetting about the default rewinder.)
Disabled `Emulation` > `Pause` menu item when this feature is enabled. It would
be possible, though annoying, to have it affect `_wasPaused` instead of the main
`EmulatorPaused` while this feature is enabled.
- saveram was not working at all on certain roms, as the "CARTRIDGE_RAM" memory domain was returning a null pointer (similar thing for "CARTRIDGE_ROM"; changed it to correctly return the current rom)
- add sa1_bwram domain for clarity and an SGB_ROM domain
TODOs excepted, this brings the Nix build to feature-parity with "portable"/AUR
builds... if it runs at all (i.e. for the distros in `wrapper-scripts.nix`)
* Actually working callbacks
now actually work after natt's changes
* Set whether memory hooks exist every frame to prevent unnecessary function calls if not
* Maze/Hangman mappers working (SRAM2102)
* Fixed console buttons ones-compliment bug
* LagFrame detection
* NTSC/PAL SyncSetting
* Started adding mappers for all games
Should allow for any key to be used as a modifier (see #2981), simply by
populating `Config.ModifierKeys`. Flip the assignment on `Input.cs:45` to try
out this change specifically.