Commit Graph

4878 Commits

Author SHA1 Message Date
feos f6538289dc dsda: fix lmp import
only tested on doom, no idea if movies for other 2 even exist lol
2025-02-25 23:21:23 +03:00
feos 09fcf37d79 meaningless tweaks 2025-02-25 19:19:58 +03:00
feos 5539557b27 dsda: "always run" option
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
2025-02-25 19:05:33 +03:00
CasualPokePlayer 0311bb5d39 Make mouse capture handle window moving/resizing/focus change, cleanup presentation panel resize handling 2025-02-24 16:09:01 -08:00
feos a2daa48cf4 dsda: actually fix turning for demos 2025-02-24 23:25:51 +03:00
feos 4cf20df155 dsda: pass turning resolution to controller ctor
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)
2025-02-24 22:02:04 +03:00
CasualPokePlayer 559093460e Fix some Xlib import definitions 2025-02-24 03:15:47 -08:00
CasualPokePlayer c3b0f46ae3 Make Linux mouse capture work more or less properly
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)
2025-02-24 02:23:27 -08:00
CasualPokePlayer 2f2c3e4f68 Try fixing pointer barriers harder (still doesn't work :( ), also fix XI2 raw motion polling (IsNormal was always returning false for whatever reason, seems to work fine with just simple Inf/NaN checks). XI2 raw motion polling however seems to use a far larger scale compared to Windows (seemingly in the hundred thousands??? although this is in a VM so this might just be a quirk of such) 2025-02-23 21:42:30 -08:00
CasualPokePlayer 778c880d54 Try fixing pointer barrier code, also make X errors more verbose 2025-02-23 20:14:59 -08:00
CasualPokePlayer ec66447c20 Restore startup asm version check (accidentally commented out in previous commit) 2025-02-23 19:29:43 -08:00
CasualPokePlayer 2009b24adb Try using pointer barriers for locking the mouse to the window on Linux instead of grabbing the mouse 2025-02-23 19:28:16 -08:00
YoshiRulz 5220ed4179
Fix code style warnings in test project when targeting .NET 8
see 69b923ad5
2025-02-24 10:30:00 +10:00
YoshiRulz 48f4a98a61
Remove unused import
not sure why this wasn't being flagged earlier, probably to do w/ recent
$(RunAnalyzersDuringBuild) change
2025-02-24 05:42:55 +10:00
YoshiRulz d4adc8282c
Discard return value from `XCloseDisplay`
fixes c5029cb2b
2025-02-24 05:42:08 +10:00
YoshiRulz 69b923ad55
Make all Analyzers except StyleCop run all the time
see #1813, 4a2627337
2025-02-24 05:39:16 +10:00
feos b0c2ef831c dsda: automap command 2025-02-23 20:31:49 +03:00
YoshiRulz ac529ee191
Add this title (+loc. patch) to quickerNES' blocklist (resolves #4240) 2025-02-24 01:55:45 +10:00
feos 3e0ed9dd7e analyzers gonna analyze 2025-02-23 16:24:43 +03:00
feos 5c662effdf hotkey for mouse capture
hide it when captured on widnows
2025-02-23 16:03:43 +03:00
feos 82523d9e1c dsda: lower speed for tapping turn buttons (match upstream) 2025-02-23 15:34:52 +03:00
feos 3d6241f53a dsda: handle movement speeds in IEmulator
allows to factor in syncsettings and savestates (for turnheld)
2025-02-23 14:59:55 +03:00
feos 9ad6eb8971 dsda: turnheld wip
dsda halves turn speed for turn button if it's held for 5 or less frames. currently I use that reduced value for all button turning.
2025-02-23 14:02:00 +03:00
CasualPokePlayer c5029cb2bb Add function to lock the mouse
Unused currently. Cursor.Clip code copied from feos. Hopefully works on Linux too
2025-02-23 02:54:54 -08:00
feos 49297ca9b7 dsda: use actual relative mouse movement
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
2025-02-23 13:01:12 +03:00
feos d804496cc2 dsda: cache syncsettings until reboot
works around crash described in #4104
2025-02-23 11:41:27 +03:00
feos 918783126e dsda: match button names to dsda
(except for weapon keys since they may mean different thing for non-doom)

tweak doom mnemonics too
and push core submodule
2025-02-23 11:00:01 +03:00
feos 72070a63de dsda: reduce copypaste 2025-02-23 09:34:54 +03:00
CasualPokePlayer f444d6b0a5 More relative input handling
Needs UI for adjusting mouse sensitivity (think it should be 1-400) and a button in bindings for swapping an WMouse axis to the RMouse axis
2025-02-22 15:55:45 -08:00
feos fe29eb12dd dsda: process longtics and fix turning speed
rename some enum values
contains hack to work around export problems with dsda_Flag()
2025-02-23 02:30:40 +03:00
YoshiRulz 804717c71a
Fix code style warnings in DSDA ctor
fixes f47136be4
2025-02-23 05:36:23 +10:00
YoshiRulz 8f9d47a706
Add this romhack to quickerNES' blocklist (resolves #4239) 2025-02-23 05:29:19 +10:00
feos f47136be46 dsda: pass commandline args to core from hawk
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
2025-02-22 22:22:54 +03:00
CasualPokePlayer 8c351433d5 Make MEN018 analyzer happy 2025-02-22 09:40:15 -08:00
CasualPokePlayer e1ea8a3371 Fix build 2025-02-22 09:38:33 -08:00
CasualPokePlayer 2f39991b44 Begin to add raw mouse input to input system
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
2025-02-22 09:22:31 -08:00
Morilli efcbe54f36 fix encore touch and tilt ranges 2025-02-22 14:44:05 +01:00
YoshiRulz 8d71c8a505
Add Analyzer for suggesting adding `checked` operators 2025-02-22 17:07:35 +10:00
YoshiRulz e72548b68b
Fix parenting of TAStudio child dialogs (should fix #4103) 2025-02-22 02:21:12 +10:00
Morilli af4089380a make TAStudio not rely on the global MovieEndAction setting
- closes #3989
2025-02-19 19:32:08 +01:00
Sergio Martin 3c5f699af9
Adding DSDA as Doom/Hexen/Heretic core (#4196)
Co-authored-by: feos <feykomylce@gmail.com>
Co-authored-by: YoshiRulz <OSSYoshiRulz+git@gmail.com>
2025-02-19 00:21:47 +03:00
Morilli d386a4fdcb attempt to make rewind perform well while paused
attempts to resolve #3053 by shuffling some bools around.

Specifically, `_runloopFrameProgress` is now set when either (continuously) frame advancing or rewinding.
2025-02-18 14:26:40 +01:00
Morilli b6a175bddf fix SMS controller definition (in Bkm) 2025-02-18 10:38:10 +01:00
Morilli 85e2d18780 fix .bkm import
- closes #3909

Effectively best-effort for now, may or may not work for some movies.
2025-02-18 01:07:11 +01:00
YoshiRulz d3362f5e0c
Add novel throttle experiment (locked behind build flag for now)
:)
2025-02-18 05:12:06 +10:00
Morilli 46c1273dbd don't restart ram search when changing watch size
- closes #2974
2025-02-17 10:25:16 +01:00
YoshiRulz 9df29c036e
Replace non-mutated `List<byte>`s w/ arrays/`Span`s/nothing
see #2927 re: `IMemoryApi`
2025-02-16 08:27:05 +10:00
YoshiRulz 59b2dba901
When GPGX is in SMS mode, don't advertise `IDisassemblable`
see #4226/33571d4cd
2025-02-15 09:51:29 +10:00
Morilli 6184afddc9 don't call disengage when tastudio load failed 2025-02-14 22:10:10 +01:00
YoshiRulz d7b0af9f4e
Resolve a TODO in `InputRoll.RowCount` 2025-02-15 05:54:49 +10:00
YoshiRulz 5a236fdbee
Implement remaining `IList<T>` methods on `SortedList<T>` 2025-02-15 05:53:14 +10:00
YoshiRulz 33571d4cd3
Set `GPGX.PCRegisterName` correctly in SMS/etc. mode (resolves #4226) 2025-02-15 04:37:47 +10:00
Morilli 084497a28a fix UserDataApi key getter 2025-02-14 19:14:43 +01:00
Morilli 283ed40f33 fix ToDictionary extension
fixes a9bfd96027
2025-02-14 19:14:35 +01:00
Morilli 5d6b35e2c9 fix single usage of GetValueOrDefault(IDictionary) 2025-02-14 18:50:34 +01:00
Morilli f12f90366b Revert "Add more `GetValueOrDefault` overloads"
This reverts commit 34d71e90bc.

This was hardly used and caused trouble in .net 8 with the way it was defined.
2025-02-14 18:50:10 +01:00
Morilli 426c743da9 fix SpanSplit for .net8
removed the NETCOREAPP3_0 code because it didn't even compile; lots of internals missing and we probably wouldn't need the 1% speedup anyway (the function using it is unused currently too)
2025-02-14 18:28:42 +01:00
Morilli 24641433e4 improve estimated time display in RewindConfig
now takes the estimated rewind interval into account to display the actual estimated rewind range, which is what people care about
2025-02-14 15:13:32 +01:00
Morilli 84c79b9053 fix some edge case display values in RewindConfig
specifically when rewind is disabled or if it's enabled and no state exists.
2025-02-14 14:41:20 +01:00
Morilli 8bc446bfa3 rename target frame length option for more clarity
- closes #3309
2025-02-14 14:32:15 +01:00
Morilli 89ea856ba4 implement command field in DsmImport
see #3555
2025-02-14 13:18:17 +01:00
Morilli 582a25b851 handle missing return gracefully in tastudio.onqueryitem* functions
- closes #4219
2025-02-14 08:22:40 +01:00
Morilli 95cbbecb97 harden TasView_QueryItemText exception handling
by immediately throwing out the current movie. This should prevent this message box from coming up repeatedly, not providing any additional useful information and just blocking all other windows.

should resolve #2332
2025-02-13 16:49:16 +01:00
YoshiRulz 7568a29912
Fix implementation of `NumberExtensions.Log10` and add docs
fixes fbd45915c
2025-02-13 22:19:49 +10:00
YoshiRulz cf70cc9ef4
Add unit tests for `NumberExtensions.Log10` 2025-02-13 22:15:38 +10:00
Morilli d9d1bfd1e8 remove unused using 2025-02-13 04:18:27 +01:00
Morilli 26115624e4 make circular analog range setting work in ares 2025-02-13 04:07:35 +01:00
YoshiRulz 69a938f29b
Pad frame indices in TAStudio to 5 digits from the start 2025-02-13 08:41:01 +10:00
YoshiRulz fbd45915cb
Add `Log10(int)` helper 2025-02-13 08:39:16 +10:00
YoshiRulz 6049d5e4f5
Show placeholder for VSystem menu when no rom loaded 2025-02-13 00:41:02 +10:00
YoshiRulz f92565549c
When the only option for a FW record has a dummy hash, mark it unknown
fixes c4ff97111, 296145ba2
2025-02-12 08:55:34 +10:00
YoshiRulz b66672f97f
Add missing import
fixes 724a7393e
obviously didn't mean to add and then immediately remove this, it got
lost in a rebase
2025-02-11 21:17:37 +10:00
YoshiRulz 724a7393e2
Alphabetise lists of core names in source
fixes 18078c876
and some others, maybe as far back as the commits introducing the lists,
I haven't checked
also I left a marker so it's easier to find these later
2025-02-11 21:12:09 +10:00
YoshiRulz f5dc73086a
Allow Stella's settings to be edited without the core loaded 2025-02-11 21:11:00 +10:00
YoshiRulz 59d875aecc
Clean up `LibUAE.ControllerType`
see #4110
2025-02-11 20:37:54 +10:00
YoshiRulz 6a115e4e65
Add `Edit` > `Go to Frame...` to TAStudio (resolves #2373) 2025-02-11 01:24:30 +10:00
YoshiRulz 59be77248a
Remove pointless indirection from `BookmarksBranchesBox` events 2025-02-10 09:21:04 +10:00
Morilli b33d7f5ce4 simplify RemoveFrames 2025-02-09 08:17:45 +01:00
Morilli 30c67cd297 fix incorrect logic in RemoveFrames 2025-02-09 07:45:38 +01:00
Morilli b0c1be30c9 make OSD text scaling configurable 2025-02-09 07:12:20 +01:00
Moritz Bender ef3b92dab4
Add more courier font sizes instead of upscaling the 16px one (#4210)
* add more courier font sizes instead of upscaling the 16px one

* use 25px font instead of 26px

* remove now-unused property
2025-02-09 07:03:43 +01:00
feos c5807662b6 uae: a game requiring empty input port found
see #4213
2025-02-08 14:46:21 +03:00
feos 74fcbc28eb uae: include more scanlines into image
fixes #4204

RANT TIME

visible area is largely nonsense when it comes to CRT TVs, because they may cover different amounts of the screen based on model, and you can adjust some of them also based on model to show more or less of it.

4:3 aspect ratio is also somewhat nonsense because TVs don't automatically rescale your video input to the entire screen like modern computers do. they just stretch or shrink it based on pixel frequency of the input and how it relates to whatever the given TV is configured to.

Rec601 was created in order to somewhat standardize this but it only contained RECOMMENDATIONS (hence the name) on how to digitize analog video, not how analog devices should be configured. so a lot of TVs looked different from what it would be digitized to based on this spec.

in gaming it's a common misconception that console output is meant to be resized to 4:3 DAR of the TV. in reality it's stretched according to PAR - pixel shape which comes from differences between color frequency of the input and standard NTSC or PAL color frequency.

if the console updates color more often than the standard, analog signal with higher pixel density will be put on the screen as is, and pixel will look "squished", sometimes up to 2x for 512px resolution modes (PS1). if the console updates color rarer, pixels will look stretched (A2600).

Amiga PAL mode has 1:1 PAR, no stretching is needed, so whatever aspect we're outputting will just go to encodes as is. NTSC Amiga PAR is 6:7, so we're shrinking a bit in encodes and when hawk is configured to device aspect.

this all means that it doesn't matter how many pixels we take of the rendered image, all we care about is stretching it to proper PAR. whether it contains overscan only affects fullscreen because extra blank area means less of useful data. and since some exceptional games decide to render AT THE VERY BOTTOM there's little to no harm in showing all 574 rendered scanlines. who hates it and wants 568 can crop it, but I don't expect anyone to care (or even notice).

so while nominal internal res for Amiga is 576 and canonical UAE default is 568 (tho it lets you adjust visible area and we don't), I think we can safely output our heretical number at all times.
2025-02-06 19:43:32 +03:00
CasualPokePlayer 08266f9450 update comment
fixes previous commit
2025-02-05 23:08:24 -08:00
CasualPokePlayer 1f276242ec Fix usage of BizHawk within a folder with a semicolon in it
Semicolons are perfectly valid for path names, but windows disallows dll paths to contain such (presumingly internally using them as path separators like with PATH env var)
A workaround for this is to simply use the "short name path" instead, which does not have a semicolon (but these names aren't guaranteed to exist, and in certain cases if they don't,GetShortPathNameW will just return the long name back, so semicolon still needs to be rechecked)
2025-02-05 22:53:16 -08:00
YoshiRulz f382ec7590
Update testroms project docs to reflect TFM change
fixes 9fb98ef5e
see 66e6aa7eb
2025-02-04 20:54:01 +10:00
YoshiRulz 924b5c7fae
Update `DummyFrontend` for `CoreComm` signature change
fixes ddd14d527
2025-02-04 17:31:01 +10:00
YoshiRulz ae97d1f49d
Remove unused class `CoreInventory.Core.RomGameFake` 2025-01-31 14:51:50 +10:00
YoshiRulz cc0f1417f1
Enable a bunch of Analyzer rules re: `.Count()`/`.Any()` and fix cases 2025-01-31 14:49:41 +10:00
YoshiRulz adcbc8a030
Fix some redundant length checks around `foreach` 2025-01-31 14:49:41 +10:00
YoshiRulz 2874ce14c8
Reduce intendation in a couple methods on `BreakpointControl` 2025-01-31 14:49:41 +10:00
YoshiRulz d56413bfb1
Extract a couple helper props in `HexEditor` and clean up 2025-01-31 14:49:41 +10:00
YoshiRulz 6ec2f0c49f
Enable RCS1156 and fix noncompliance
"Use string.Length instead of comparison with empty string"
inb4 this introduces an NRE somewhere
2025-01-31 14:49:40 +10:00
YoshiRulz af32948756
Add Analyzer to warn about LINQ calls on string receivers 2025-01-31 14:49:40 +10:00
SaxxonPike 0bb940ea7a [C64] Disk: 1541 drive saveram now works properly when rewind is disabled
[C64] Disk: Use raw track capacity values per the G64 file format specification, should fix some disk loaders that are expecting data not to be so sparse (Spindle demos in D64 format particularly)
[C64] Disk: fix 1541 drive address decodes
[C64] VIA: 6522 core facelift, shift register and use of low-order timer latches implemented, should fix some disk loaders ("Sprite B*****e 2" demo plays, yes they called it that, and it's not what it sounds like)
[C64] CIA: fix PB6/PB7 outputs when enabled on CRA/CRB
2025-01-30 12:43:58 +10:00
Tony Konzel 4a48d945c7
[6502] Pass Lorenz C64 tests (squashed PR #4177)
* [6502] Pass Lorenz C64 tests

* [C64] make sure the 1541 drive uses the same 6502 undocumented behavior as the main CPU

* [6502] Use field instead of delegate for ANE/LXA system constants
2025-01-30 12:43:48 +10:00
YoshiRulz 87ffdb5cd2
Fix typo
fixes 12cd7885e
good catch by Morilli
2025-01-30 12:42:43 +10:00
Morilli 504b2d57f2 fix lua autocompletions missing
fixes ea810cb89b
2025-01-29 16:27:06 +01:00
Morilli 0681dd2590 set proper libretro game data
- closes #4202
2025-01-29 16:15:19 +01:00
YoshiRulz c934e6b5d1
Memoise reflection in `HeaderKeys.Contains`
only used for `.bkm` anyway
2025-01-29 23:11:09 +10:00
YoshiRulz fe7ecceb64
Enable RCS1043 and fix noncompliance
"Remove 'partial' modifier from type with a single part"
2025-01-29 22:29:59 +10:00
YoshiRulz 8332a6bd5e
Add `Roslynator.Analyzers` 2025-01-29 22:16:49 +10:00
YoshiRulz 12cd7885ec
Enable CA1862 and fix noncompliance
"Use the 'StringComparison' method overloads to perform case-insensitive
string comparisons"
2025-01-29 22:11:54 +10:00
YoshiRulz 96207e80ea
Extract some extensions for string `OrdinalIgnoreCase` comparisons
`Contains`/`Equals`/`StartsWith`
refactored a few call-sites while I was at it
2025-01-29 21:51:21 +10:00
YoshiRulz a9fd86689e
Replace `InvariantCultureIgnoreCase` str. cmps. w/ `OrdinalIgnoreCase`
doesn't matter for ASCII-only strings, and `InvariantCultureIgnoreCase`
is arguably correct in some circumstances, but IMO it's more foolproof
to simply ban it
2025-01-29 21:48:33 +10:00
YoshiRulz 5f29b50940
Fix indentation in `SpectrumBase.Media.cs` 2025-01-29 21:47:28 +10:00
YoshiRulz 45581b2370
Fix loading discs for systems we don't emulate when it's for Libretro
fixes d9da3cfa6
(...since the Libretro core may emulate any system, and the intent here
was always to just pass the file through)
2025-01-29 12:12:56 +10:00
Morilli 1f53cec80b fix AdjustDescriptionHeightToFit calculation
- closes #3962
2025-01-28 21:41:23 +01:00
Morilli 26ef1ac2af improve SDLResampler
this distorts audio less when muting the stream for a while + general cleanup
2025-01-27 17:47:57 +01:00
Morilli cc45a6ec2d improve GetProcAddrOrThrow/LoadOrThrow error messages 2025-01-24 10:57:15 +01:00
feos 146e297a94 tastudio: position restore logic was missing when drawing analog 2025-01-19 21:35:43 +03:00
feos fe13b85d17 tastudio: nuke NewTASMenuItem accelerator
fixes #3376
2025-01-19 20:49:35 +03:00
YoshiRulz 4c3ea14efc
Allow empty string (for "recent") in `MainForm.SanitiseForFileDialog`
fixes 1cee9dff6
2025-01-20 02:09:14 +10:00
feos 8310e5420c Revert "fix wrong pause in AutoAdjustInput()"
This reverts commit b2f3bb3cba.

Revert "fix removing everything"
This reverts commit a0da874431.

YEP. this "feature" is COMPLETELY, ABSOLUTELY, UNIVERSALLY fucked. sure #4184 can be "fixed" by flipping some bools, like setting MainForm.HoldFrameAdvance back to false in TasView_MouseWheel. but then there's still the problem of removing actual input if farther lag picture changed after initial removal, and I'm not going to debug that. taseditor's ONLY bug was related to erroneous detection of lag change that we were never able to consistently reproduce or figure out, and it's completely impossible to replicate identical behavior in tastudio due to crazy overhead. but even SIMULATING that behavior would involve touching that minefield of bools that control everything in insane ways. given zero requests for this feature during tastudio's decade of existence, I'm considering it too useless for all the chaos it introduces.

so instead I'm closing #4184 by disabling the "feature" that caused it
2025-01-19 16:02:56 +03:00
YoshiRulz d8508acb69
Fixups to signature of `HttpCommunication.ContentObjectFor` method
fixes 41547824a
2025-01-17 08:25:12 +10:00
YoshiRulz 1437bc3a98
Include unreleased cores in About dialog (resolves #4168) 2025-01-17 06:54:44 +10:00
YoshiRulz 58213f3534
Undo unrelated changes from previous commit
partially reverts 6c4cea23e
2025-01-17 04:53:52 +10:00
CasualPokePlayer 6c4cea23e6 Don't do checked decimal -> float/double conversions
fixes exception on viewing movie info with Arcade movies
2025-01-16 09:59:08 -08:00
Morilli 7f3bf70229 bump various packages 2025-01-16 17:31:54 +01:00
YoshiRulz 41547824aa
Minor refactor to `HttpCommunication` 2025-01-17 01:30:12 +10:00
YoshiRulz 08dd34f42b
Rename `HttpCommunication.ExecPost` and add docs 2025-01-17 01:30:12 +10:00
YoshiRulz 88c54d11b6
Don't persist `ExpectContinue` setting through multiple requests
fixes 544b8007d
2025-01-17 01:25:30 +10:00
papercrane 544b8007dc
Only send `Expect` header for `comm.httpPost` when payload is large (squashed PR #4188)
* BizHawk#4187 Add a method to the comm LUA library to allow setting ExpectContinue

* Instead of exposing ExpectContinue set it automatically based on a threshold
2025-01-17 00:32:28 +10:00
YoshiRulz 0d05c1d263
Prevent CDL's "Disassemble..." when not implemented crashing EmuHawk
(by disabling the button)
see #1274
2025-01-16 05:34:04 +10:00
feos 93f33815ed alphabetize PlatformFrameRates and add amiga 2025-01-15 19:07:17 +03:00
feos 1e839b8802 uae: implement IRegionable 2025-01-15 19:06:48 +03:00
CasualPokePlayer f3629a9e86 [Encore] Fix System Bus endianness 2025-01-14 08:01:12 -08:00
CasualPokePlayer 1a1de0fa67 [Encore]
Remove GetVideoVirtualDimensions (no longer used)
Add System Bus domain
Fix deterministic time functionality using timezones when they should not
2025-01-14 07:08:23 -08:00
CasualPokePlayer 20d7355227 Do not create File On Disk domain for 3DS 2025-01-12 12:49:03 -08:00
YoshiRulz c5a4ec9b81
Make `HawkFile.ReadAllBytes` seek to start
fixes 633681804
2025-01-11 22:28:16 +10:00
YoshiRulz 09f8e8c544
Document semantics of `Stream.ReadAllBytes` extension 2025-01-11 22:24:10 +10:00
CasualPokePlayer 633681804d Actually don't dispose hawkfile stream after ReadAllBytes()
fixes a30c0efb78
2025-01-10 15:52:35 -08:00
CasualPokePlayer a30c0efb78 Don't dispose hawkfile stream after ReadAllBytes(), fix ReadAllBytes callsites to do disposal properly 2025-01-10 15:00:49 -08:00
YoshiRulz 4aa334244e
Fix `ObjectDisposedException` when loading non-disc rom into Libretro
fixes d9da3cfa6
2025-01-11 07:36:29 +10:00
CasualPokePlayer 6adab25fac Make EncryptString/DecryptString arguments be nullable and properly check for null/empty 2025-01-10 08:31:16 -08:00
YoshiRulz 89e94be8c1
Memoise a value during Lua lib function enumeration 2025-01-10 23:14:21 +10:00
YoshiRulz ea810cb89b
Hide unavailable Lua libs from REPL autocomplete
see #4167
2025-01-10 23:12:20 +10:00
YoshiRulz 7149609229
Gen docs for methods in Lua lib classes even w/o `[RequiredService]`s
resolves #4167
2025-01-10 23:06:27 +10:00
CasualPokePlayer 52848a3d27 Add Haswell to GL interop blacklist 2025-01-10 02:40:22 -08:00
YoshiRulz 1cee9dff60
Ensure file pickers (via `IDialogParent`) don't choke on bad paths
see also #4077 but that's still open while this is clear-cut
2025-01-10 07:20:58 +10:00
YoshiRulz fe871ba5c7
Prompt to switch cores before recording with A2600Hawk or TI83Hawk 2025-01-09 22:35:08 +10:00
YoshiRulz da993c77fd
Fix typo in ChannelFHawk settings UI 2025-01-08 04:24:05 +10:00
YoshiRulz ebd9cde063
Bump `VersionInfo.MainVersion` for dev builds 2025-01-08 03:11:21 +10:00
feos dd23282049 release uae 2025-01-07 19:29:10 +03:00
feos 2aa331213e 2.10 2025-01-07 18:54:34 +03:00
YoshiRulz 0666c21748
Cleaner fix for locale files
reverts 6db32e997
2025-01-08 00:44:26 +10:00
YoshiRulz 6db32e9979
Fix System.CommandLine leaking locale files into output
see #3888
2025-01-08 00:00:26 +10:00
YoshiRulz 6ba50f5eb2
Remove duplicate button names from SMSHawk's SK-1100 ControllerDef
fixes #4134
2025-01-07 22:54:04 +10:00
saxxonpike 0adf2f97d7 [C64] Fix up implementation of SaveRam 2025-01-07 22:06:17 +10:00
saxxonpike 6f7097ee07 [C64] DiskTrack implementation to simplify delta tracking 2025-01-07 22:06:17 +10:00
saxxonpike 6a8a5aa41e [C64] Move SaveRam implementation to its own partial 2025-01-07 22:06:17 +10:00
CasualPokePlayer ce44d7e4f8 Disable GC Adapter support by default (due to it interfering with other controllers)
Resolves #4165, resolves #4083
2025-01-07 04:01:10 -08:00
CasualPokePlayer 24a4b47adf don't try to "fix" y axis in touchpad (it should just match the mouse convention), add touchpad button to default controls for nds/3ds touch
note that touchpad axes aren't put in default controls, can't actually have multiple axes bound at the same time
2025-01-07 02:11:10 -08:00
CasualPokePlayer cf1c2a9d7e Whitespace fix from last commit 2025-01-07 01:43:12 -08:00
CasualPokePlayer 2bc4a7ee56 Add support for game controller touchpads (i.e. on PS4/PS5 controllers) 2025-01-07 01:41:58 -08:00
CasualPokePlayer e4a4493843 Make IsCGBDMGMode actually work for movies 2025-01-06 13:49:20 -08:00
CasualPokePlayer 08e3246ec9 Use config SoundVolume for retroachievement sound effects
Probably want this to be a separate setting later on, but this is probably better than forced 100% volume
2025-01-06 13:35:14 -08:00
CasualPokePlayer fafb1ab3e3 [RetroAchievements] Separate leaderboard complete sound effect.
Default file is just a duplicate of unlock.wav, a user can put in their own wav file if they choose to.

Resolves #4166
2025-01-06 13:27:40 -08:00
YoshiRulz d9da3cfa60 Set game name for Libretro when available
resolves #4144
2025-01-05 23:03:38 +10:00
YoshiRulz 407c26e9d5 Encapsulate `LibretroHost` constructor 2025-01-05 23:03:38 +10:00
YoshiRulz ddd14d5274
Attempt to locate `.cue` for PSX `.bin` before synthesising one
see #4146
2025-01-05 22:12:46 +10:00
YoshiRulz 04955ea228
Use deterministic filenames for synthesised PSX `.cue`s
resolves #4146
2025-01-05 22:12:18 +10:00
YoshiRulz 7514ea73c7
Revert "Remove "direct" bin file handling"
This reverts commit a2d97dfb5f.
2025-01-05 22:12:17 +10:00
YoshiRulz e2fb1c7f08
Improve documentation of some `gui`, `forms`, and canvas Lua functions
see #3851
2025-01-05 21:10:48 +10:00
YoshiRulz 82b22266b0
Improve error messsages for `forms.draw{Icon,Image,ImageRegion}` 2025-01-05 20:30:11 +10:00
YoshiRulz 6ffc71b183
Minor improvement to `LuaPictureBox.DrawPolygon` 2025-01-05 20:30:08 +10:00
Tony Konzel ed59b5e874
[C64] Fix Domark/HES/MagicDesk cartridge mapper bank loading (squashed PR #4162)
* [C64] Fix loading Domark cartridges that don't have a bank count that is a power of 2, and add a memory domain for the ROM image

* [C64] Fix bracket styling
2025-01-05 20:14:30 +10:00
saxxonpike 99ca3be22a [C64] EasyFlash overhaul
- Implement the AM29F040B flash device as its own component
- Fix save data for games that use the standard EasyAPI driver
- Fix "Briley Witch Chronicles 2": the flash driver checks AutoSelect register 02 to see if the cartridge is write-protected
- Rom is stored as bytes instead of ints, saves a lot of memory
- EasyFlash now has proper hard reset and clock operations
- SaveRam deltas fixed
2025-01-04 18:19:23 +10:00
saxxonpike 83ea4bfb1c [C64] Fix a situation where the SID filter stage would pass through voices selected to be filtered while no filters are actually enabled 2025-01-04 18:19:01 +10:00
Morilli 9dc3e0cf84 Respect queued movie's logkey in RunQueuedMovie
should (resolve) #4159
2025-01-03 14:12:02 +01:00
YoshiRulz 05fd64a5e6
Remove now-unused prop `IMainFormForTools.OnPauseChanged`
fixes 7b904b171
2025-01-03 02:23:31 +10:00
Morilli 5f36cacfd2 cleanup some debugger calls
this also fixes double-load on start, which is especially noticeable in debug with waterbox cores
2025-01-02 15:18:45 +01:00
Morilli 238e7bca1e don't disassemble unnecessarily many instructions in the debugger
fixes fc92d3c63e
2025-01-02 14:51:50 +01:00
Morilli 7b904b1715 don't rely on PauseChanged in debugger
this doesn't work anymore with 7c38810e9e and was questionable to begin with
2025-01-02 14:50:54 +01:00
Morilli b93a995083 unsubscribe from events in core Dispose methods
- closes #4157

Not sure this is the best way to fix the linked issue, but considering this is a hard crash I'd rather fix it somehow than not at all for now.
2025-01-02 14:26:24 +01:00
Morilli b8baf21788 fix selection color in TAStudio
- closes #4158

fixes bd3f919129
2025-01-02 05:00:25 +01:00
Morilli 7c38810e9e short-circuit EmulatorPaused setter when value isn't changing 2025-01-02 04:36:53 +01:00
YoshiRulz 2cb6d2c0fc
Use lazy initialisation for `IOExtensions.ShiftJISEncoding`
see #4150
2024-12-30 22:09:30 +10:00
CasualPokePlayer 0ec54fe9d6 Make touch input interpolation configurable 2024-12-29 22:08:54 -08:00
CasualPokePlayer 3a8024b235 Only stop/start sound on resize on Windows
Windows will "freeze" the main thread in message pumping while resizing is occurring, while this does not occur on Linux.

Resolves #4145
2024-12-28 23:16:08 -08:00
CasualPokePlayer 24d549ddb8 Apply volume setting to BizBox not hawk sfx 2024-12-27 07:06:11 -08:00
YoshiRulz 694aa867ec
Fix artifacting on firmware status icons under Mono 2024-12-26 00:57:15 +10:00
YoshiRulz 31dd2dbd2f
Use `SortedDictionary` for `FirmwareConfig.Status{Descs,Icons}` 2024-12-26 00:55:51 +10:00
YoshiRulz 7350e0f7ce
Remove unused imports
fixes b09134489
2024-12-23 02:48:45 +10:00
YoshiRulz b091344896
Actually fix `GenOrderedControls` invariant, dropping Libretro hack
fixes a8368849a and 3384ce862
2024-12-23 02:37:56 +10:00
YoshiRulz 1eb8433b4a
Sort rom file picker filters 2024-12-23 02:20:00 +10:00
YoshiRulz 44dae6428d
Add bundles to rom file picker 2024-12-23 02:20:00 +10:00
YoshiRulz 319bfd3d3a
Show `.exe`s in rom file picker for PSX
see fa0c69344
2024-12-23 02:20:00 +10:00
feos 3384ce8629 input OSD: fix potentially absent P0
I don't know if there's any core that lacks non-player controls but this feels like the right thing to do anyway (for the future too)
2024-12-22 19:07:22 +03:00
feos fcff79e794 uae: fix double eject 2024-12-22 17:51:59 +03:00
feos 0e300fc094 fix #4142
store slot index for each drive instead of filename, and add it to savestates
2024-12-22 16:25:21 +03:00
feos a8368849a9 fix #4132
controls that don't belong to any indexed player are put at index 0, which makes them appear in front of everything that's used all the time. when there's only a few of those, it's fine. but for systems with keyboards, you have to fullscreen the emulator window to even see regular inputs

I moved index 0 to the end for input display, but didn't touch the original generator, since it may affect other things I'm not sure about (and I'm not smart enough to properly change it)
2024-12-22 14:53:12 +03:00
Morilli 1526de58ad Remove outdated SystemLookup
- closes #4143 by using EmulatorExtensions.SystemIDDisplayNames instead
2024-12-22 10:20:22 +01:00
YoshiRulz cf90a96af0
Fix an error message from Cheats displaying an address in decimal 2024-12-19 06:20:33 +10:00
YoshiRulz 4bf29a6b00
Optimise all PNGs in main solution
fixes libpng errors from images added in 9e9687f02
2024-12-19 03:08:27 +10:00
YoshiRulz 3095aca86a
Use `StringPool` from CommunityToolkit in `ToUpperASCIIFast` extension
from be0736be4 (+ cherry-picked ccba93440) to this commit:
- `Database` reported runtime 0.64 s --> 0.68 s
- profiled `ParseCGIRecord` mean runtime 0.190 ms --> 0.179 ms
- `GameDBHelper` 1M lookups reported runtime 1.03 s --> 0.69 s
- managed allocations (w/o the 1M lookups) 131 MiB --> 123 MiB (fewer
strings but more char[]s?)

since `CompactGameInfo` obviously can't store `Span`s, I tried with
`StringSegment`, but it made both lookups *and init* slower, thanks MS
2024-12-17 01:03:41 +10:00
YoshiRulz c2200cb234
Use allocless `ReadOnlySpan.Split` in `Database.InitializeWork`
reverts 4c69ce4e2
2024-12-17 01:03:41 +10:00
YoshiRulz d72332e97d
Backport `ReadOnlySpan.Split` and co.
Includes: `Range`/`Index` and other polyfilled types are now `public` in
BizHawk.Common rather than `internal` in each assembly. Not for dedup
reasons--though that's probably good too--just because it was necessary
for exposing these new `public` methods with `Range` in their params.
2024-12-17 01:03:41 +10:00
YoshiRulz 48f5125c84
Improve `BIZHAWKBUILD_RUN_ONLY_GAMEDB_INIT` 2024-12-17 01:03:41 +10:00
feos 9e9687f026 rework firmware icons
better tooltip for deal bind
2024-12-15 20:11:12 +03:00
YoshiRulz ab5d92f319
Add note to `--help` re: rom argument
thanks MS
2024-12-15 22:50:14 +10:00
YoshiRulz 6cb19d8b8e
Fix typos
fixes 8645ed3bb
so the speedup isn't as big as with the broken code, but it's close
I think I'll be changing this again to use Span and I'll reprofile then
2024-12-15 15:09:55 +10:00
YoshiRulz 8645ed3bb9
Optimise `Database.FormatHash`
runtime (as reported by `Database`) reduced by -14%, allocations reduced
by -5%, and number of calls reduced by -32%
this is all under Mono so YMMV
2024-12-15 14:37:31 +10:00
feos fc2b37cab7 uae: fix DevilsTemple 2024-12-14 23:14:59 +03:00
feos 18078c8764 rename puae to uae
while libretro initially ported original puae (which is long dead), they switched to just pulling updates from winuae every once in a while (and renamed to libretro-uae), because it's still active and is kinda considered golden standard these days
2024-12-14 19:01:31 +03:00
feos 4274b75379 puae: fix drives population with slots 2024-12-14 18:39:29 +03:00
CasualPokePlayer c5c8b6bdd9 Don't open choose file from archive dialog when trying to fallback to a different core for a MAME ROM
The fallback is intended in cases where there is a misdetection for MAME ROMs, since it just goes off the archive's filename against a db. MAME ROMs will not have any sensical ROM extensions in them, and will most likely just have multiple files in it. As such, if this is actually a MAME ROM, they're pretty much guaranteed to show the choose file in archive dialog, which would confuse users. If it's not a MAME ROM, it most likely will not show this dialog and will just be loaded by the appropriate core (of course in practice this likely doesn't occur anyways, since most users likely just have their ROMs named with dat names like No-Intro etc which never match MAME's names).
2024-12-11 19:39:07 -08:00
feos b8ec340c90 puae: fix crash on switching to initially empty drive 2024-12-11 18:47:31 +03:00
YoshiRulz 56e5105d0d
Fix `Order{,Descending}` preventing GitLab CI from building tests 2024-12-11 10:22:54 +10:00
Morilli 2b71ff9a79 rename duplicate suggested firmware file names
- closes #4136
2024-12-10 22:53:38 +01:00
feos eed7b601ed space 2024-12-10 19:32:40 +03:00
feos aca5ccae50 puae: fix region change 2024-12-10 19:31:46 +03:00
feos dad929fd9f that's very helpful, thanks 2024-12-09 20:55:01 +03:00
feos 656618f310 analyzer makes sure to only ever report one problem at a time? 2024-12-09 20:48:43 +03:00
feos e02d22a044 k 2024-12-09 20:44:21 +03:00
feos b1c43a6379 file 2024-12-09 20:39:54 +03:00
feos 48913b4653 puae: led light 2024-12-09 20:35:24 +03:00
feos 6f7a1de25c puae: use winuae icon since it's more canonical 2024-12-08 16:52:11 +03:00
feos 2cd22490e9 uae: print slot/drive contents (#4138)
fix wrong const in the core
2024-12-08 14:54:27 +03:00
YoshiRulz 384b6f17a7
Add unit test for duplicate firmware filenames 2024-12-07 08:25:45 +10:00
Morilli 69b61b574d fix RecalculateScrollBars
- closes #4133.

This has a 50% chance of breaking something else (it either happens or doesn't), but should be more correct. Mainly, RecalculateScrollbars was called based on visible rows which depend on whether scrollbars are visible or not, but the NeedsVScrollbar calculation did not take the existence of the HScrollbar into account, leading to an off-by-one. I think.
2024-12-05 22:50:27 +01:00
Morilli 49458ab182 fix TAStudio input roll display issues
Resolves the remaining bug mentioned in https://tasvideos.org/Forum/Topics/12519?CurrentPage=85&Highlight=532467#532467
2024-12-05 19:28:04 +01:00
feos 29b848d336 remove harder
see d89035c400
2024-12-05 12:40:40 +03:00
YoshiRulz fac788a455
Revert unrelated changes to `TAStudio.Designer.cs`
fixes 1da3e4d77
see 0189b5110
2024-12-05 14:40:45 +10:00
YoshiRulz 0189b5110d
Revert whitespace changes to `TAStudio.Designer.cs`
fixes 1da3e4d77
2024-12-05 11:14:45 +10:00
feos a0da874431 fix removing everything
closes #734
2024-12-05 01:26:58 +03:00
feos b2f3bb3cba fix wrong pause in AutoAdjustInput()
it has to rewind to remove a frame, which makes it pause on first removed frame when we hit restore, instead of going all the way to LastPositionFrame. I tried a ton of things to fix it, and they break one of the 3 scenarios of going from the edited frame, emulating through removed was-lag frames until LastPositionFrame, and pausing there:
- autorestore
- restore manually via middle-click or the || button
- step frame by frame using wheel+RMB
wheel+RMB steps used to unpause in wrong places because paused state was disabled when it fires, so we couldn't decide whether to unpause or not based on it at the end of AutoAdjustInput(). so I'm enabling """paused""" state inside TasView_MouseWheel(), much like < and > buttons do, except they can be held to force unpause, but here you can't let go of mouse wheel since it already only fires once anyway. I'm disabling this state once tastudio has reached its INTERIM seek frame, and based on it I now can decide to unpause after AutoAdjustInput().

AutoAdjustInput() still has a tiny problem of not advancing the first removed was-lag frame when you go step by step, because it can only go one direction at a time, and it goes up as explained above, but we need it to also go down. this can be forced if we allow tastudio to seek to the CURRENT frame by loading its state and reemulating it, but I don't know if this will cause issues, and nobody is stepping through autoadjusted frames anyway, since it's meant to happen quickly and on autorestore

TODO: removing consecutive was-lag frames seems to remove them ALL!!!

inb4 all this causes other wild bugs...
2024-12-05 00:53:55 +03:00
feos 1da3e4d773 tastudio: AutoadjustInput
remove all consecutive was-lag frames in batch like taseditor does. current frame has no lag so they will all have to go anyway

still need to fix wrong pausing
2024-12-04 22:56:59 +03:00
Morilli cd7605d237 fix code 2024-12-02 00:07:19 +01:00
feos adf74495dc fix #2369
move tasview context menu to the other side of the cursor if it's not fitting into the screen fully. of course if there's not enough space there EITHER, the user must do something about it, meanwhile best we can do is clamp location to 0. not using MouseEventArgs because we need absolute on-screen coords

other tastudio menus are small so probably fine?
2024-12-01 23:10:18 +03:00
feos 05f06aeb5b tastudio: don't let branch screenshot appear below screen edge 2024-12-01 21:59:39 +03:00
feos 28757bd8be control extension to center the new dialog on mouse pointer 2024-12-01 21:59:39 +03:00
feos 2211a4186f control extension to ensure onscreen dialog spawn
applied to tastudio dialogs (branch/marker text will use it later)
2024-12-01 21:59:39 +03:00
feos d89035c400 unify tastudio dialogs:
- the only dialog that's meant to be used during emulation is undo history, so let it spawn at its old location in the middle of the screen. user will move it regardless of where we spawn it
- positioning of input prompts will happen later
- all config/metadata dialogs now block tastudio and spawn at the top just like open/save. user is clicking tastudio menu so it's distracting if those dialogs spawn too far away from where they're already looking. and the middle of tastudio can be indefinitely far away because it can easily occupy the entire screen (we have cores with tons of buttons, and some users like to make it as tall as the screen). so while in the middle is """consistent""", it's very annoying if you have to do a lot of consecutive edits (for example to greenzone caps, or colors). overall, top priority of smooth tas workflow, so """consistency""" with unrelated tools made for unrelated tasks is not helpful if it makes the workflow more annoying
- ensuring the dialogs spawn fully on-screen will happen later

removed unused tastudio menus and config params
- branch hover interval was added before I replicated taseditor logic, which makes branch screenshots only appear if you keep the pointer over branch number, and not if you're just moving it around. making it configurable doesn't look useful
- seek cutoff interval (how far target frame has to be to spawn seek progress bar) feels redundant because any onscreen edits won't spawn the thing anyway, and for farther seek points it's not annoying enough to change
- EmptyNewMarkerNotes is not relevant to tastudio because it never copied previous marker notes like taseditor does. currently it does nothing and nobody ever requested it even tho it's in the menu, so there's no evidence anyone ever needed it
- fun fact: I was sure autoadjust input to lag never worked but it mostly does! so it wasn't removed, instead I plan to fix it (it pauses on every added frame). it's also not saved.
- other dialogs use InputRoll so I had to remove those options from them too (tastudio is the only one that they were meant for anyway)

bump undo history to 1k. it may not be needed often but when it is, some actions are not combined (for example it adds every newly emulated frame) so you may end up unable to undo some dumb mistake than was only a few actions ago

use normal control BG color for tastudio color editor. I tried it with dark theme on linux and got no difference. if this causes issues we'll see how to fix it without randomly giving one dialog unique BG color. also removed todo since labels are good now
2024-12-01 21:59:38 +03:00
CasualPokePlayer 6f0ae7128a Add GetRawInputBuffer handling for RawKeyInput
Slightly speeds up windows keyboard handling as it reduces syscalls
2024-11-30 22:30:19 -08:00
YoshiRulz 9d3fc9ce9e
Fix casting event senders to wrong base class
fixes b2184e46d
2024-12-01 12:13:14 +10:00
Morilli 6c49fa7472 add test to check for missing core preferences choices 2024-12-01 00:19:04 +01:00
Morilli d245271649 rename test method 2024-12-01 00:06:19 +01:00
Morilli 320de38c5c consolidate CorePickerStabilityTests 2024-11-30 23:30:08 +01:00
YoshiRulz 04c70c3ead
Only when double-clicking TAStudio frame# cell, open dialog at cursor
fixes 128c8e621
see #3714
2024-11-29 00:41:42 +10:00
YoshiRulz c3bd723c36
Add helper for centering dialog relative to a `Control` 2024-11-29 00:40:33 +10:00
YoshiRulz a39689d62d
Fix duplicate `Form.Dispose` implementation
fixes 6d2d07428
2024-11-28 07:52:14 +10:00
YoshiRulz 6d2d07428e
Make the Basic Bot fail more gracefully 2024-11-28 07:41:06 +10:00
CasualPokePlayer bd90dc6aa6 Fix NRE when spamming right click in TAStudio 2024-11-27 12:47:38 -08:00
YoshiRulz 128c8e6218
Don't open branch/marker edit dialogs at cursor pos
resolves #3714 and #2369
2024-11-28 04:53:47 +10:00
YoshiRulz 75e5088eed
Indicate unsaved changes to movie in window title
see #4064
2024-11-28 04:36:28 +10:00
CasualPokePlayer a7dd37d884 Add Skylake GPUs to GL interop blacklist 2024-11-26 16:42:16 -08:00
Morilli 24d4e89d38 fix TAStudio autohold/fire right-click logic
- closes #4125
2024-11-26 19:49:27 +01:00
CasualPokePlayer 39a896b289 mGBA windows build + C# side changes 2024-11-24 13:39:18 -08:00
feos f7b6703ad2 puae mnemonics 2024-11-24 11:40:36 +03:00