Commit Graph

22529 Commits

Author SHA1 Message Date
Sergio Martin 236ff74b2b
Adding DOSBox as core for DOS TASing (#4217)
* Adding dosbox

* Adding placeholder

* Adding initial placeholder for DOSBox

* update

* Update

* Update

* progress

* Progress

* Increasing mem capacity

* Progress

* Now running timer correctly

* Progress

* Stable

* Parsin inputs

* Keyboard working

* stable before using memfiles

* Now accepting rw hdds

* Hard disk rw working

* Fixing conflict

* Getting samples

* Reading samples but sounds too low

* Reading samples but sounds too low

* Now accepting multiple cdrom/floppy images

* Allowing swapping

* Enabling cdrom and disk swapping

* Simplifying

* Simplifying

* Simplifications

* Simplfiications

* Capturing sdl delay

* Adding configuration presets

* Enabling joystick

* Enabling joysticks

* Added mouse support

* Adding mouse support

* Progress with hard disk

* Adding default hard disk images and making them selectable

* Adding mnemonics, more configs, and some refactoring on the standard confs

* Processing file extensions

* Adding sram

* Adding saveram

* Adding drive lights

* Adding drive lights

* Adding memory domains

* Removing warnings

* Fixing warning

* Revert unrelated changes to Multi-Disk Bundler

* Re-alphabetise lists and clean up diff

* Missed a bit

* Make `DOSBox`' `ISaveRam` implementations `override`

* Fix `DOSBox`' `[PortedCore]`

* Clean up string comparisons in `DOSBox` ctor

* Set values for `WriteableHardDiskOptions` instead of translating

* Clean up reading of DOSBox config presets from embedded resources

* Fix code style warning

* Removing duped line

* Fixing extension parsing

* Small adjustments

* Aligning fps to that of normal DOS

* Aligning fps to that of normal DOS

* Simplified extension getting and adding base config file resource

* Remove unused import

* Properly measuring extended mem size

* Adding more settings and simplifying machine presets

* Adding check for SRAM size to prevent wrong-sized HD being loaded

* Removing unnecessary directive

* Update correct DOS framerate

* Adding sensible configuration presets

* Adding to the config preset description text

* Update src/BizHawk.Emulation.Common/Base Implementations/Bk2MnemonicLookup.cs

Co-authored-by: feos <vadosnaprimer@users.noreply.github.com>

* Removing stale config files

* Fixed mouse emulation

* Fixed mouse emulation

* Removing unused keyboard flag

* Addressing feos' comment about virtual height/width

* Fixed bug with saveram

* fix VirtualWidth

scanlines remain constant so they aren't stretched, and width is adjusted to be 4/3 of height, because video modes in DOS were designed for a 4:3 monitor. exact pixel shapes may slightly differ depending on exact pixel clock but setting 4:3 for DOS is standard.

* DependentUpon

* Making FPS configurable

* Making FPS configurable

* Adding fps num/denom

* Implementing proper fps numerator / denominator defaults for DOS

* Passing mouse deltas from bk

* Passing mouse deltas from bk to the core

* expose and use deltas directly

to make it work in hawk, one needs to bind RMouse X/Y for Mouse X/Y Delta in config.ini, by manually editing the file (for now)

* Implementing support for .cue+.bin and other cdrom types

* Fixing sensitivity

* Adjusting mouse sensitivity

* Fixing integration for windows

* [WIP] loading cds from bk

* [WIP] loading cds from bk

* Using .cdrom extension for cdroms, and passing disk name to the read callback

* Using .cdrom extension for cdroms, and passing disk name to the read callback

* Cleanup and fixing .iso loading and swapping

* Fixing .iso loading and cdrom swapping

* Adding default controllers

* Added callback for video updates to prevent tearing

* Removing unnecessary message

* Fix line endings in `Bk2MnemonicLookup.cs`

* Fix indentation

* Fix misc. whitespace crimes

* Drop redundant `<None Remove/>`

* More whitespace fixes

* More code style fixes

* Small fixes

* Fixing misc comments

* Adjusting naming

* Fixing values

* Removing dead code

* Clarifying the source of DOS framerate chosen

* Removing unused variable

* Removing duped assignments

* Fixing typo

* Removing no-longer required SRAM management

* Removing no longer required sram management functions

* Removing no-longer needed SRAM logic

* Fixing framerates as per feos's comment

* Passing init struct for a more tidy initialization. Also fixing identation for good

* Fixing hard landing on failure to load SRAM. This is needed to prevent crashes in dosbox when preserving hard disk contents

* Added missing submodule and artifact

* Reverting unnecessary change

* Removing no longer needd dosbox-iso extensions

* Removing no-longer necessary virtuals

* fix

* Adding lines into readme

* fixing indentation

* Reducing job concurrency for dosbox -- otherwise the server gets overloaded

* adding recursive submodule for dosbox-x

* Simplifying

* Simplifying

* Simplifying

* Simplifying

* Only offer drive switching if more than one drive is present

* Adding proper Disc identification for ISO9660 / Joliet (default target DOS)

* Adding CDROM case

* Moving comments to proper place

* Moving comments to proper place

* Code style fixes

* Clean up handling of Next Disc buttons

* Clean up `DOSBoxKeyboard` definition

* Remove redundant button mnemonic overrides

* remove leftover hack from my initial 2-byte range

it's hard to tell from upstream code what the range should be...

* Fixing mouse buttons getting stuck and aligning mouse speed minmaxes to what dosbox expects

* Removing default framerate for DOS

* set mouse speed range to match raw deltas range
(see 93bc50288f)

since this makes minimal mouse delta 1 now instead of 2 or 3 (they were different for x and y because ranges were different), I readjusted default sensitivity to match default turning in doom in upsteam

* fix casing on public fields
we use PublicField, _privateField, and localVariable casing

this commit also includes WIP to expose attoseconds like mame does, so that 1 value could be used to determine framerate, and movie parsers won't need too many changes to support DOS framerates

* fix num/denom values to match dosbox-x for when it launches into dos
video dump info was not super clear so I relied on values that are actually assigned to `fps` in `VGA_SetupDrawing()`

TODO: check other machines, update sync settings descriptions when we expose render fps info to user

* use an existing thing instead of GetFullName
it was copied from uae where I made it because I didn't know about `Path.GetFileName(rom.RomPath)`, it's now fixed in master too

increased message duration so user could read potentially long filenames (copied from uae too)

* Move init of new `MouseState` to top and eliminate locals

* fix naming for mouse states

* update submodules

* Adding function to get video refresh rate

* Adding report on video refresh rate update

* Revert "Merge branch 'dosbox' of github.com:SergioMartin86/BizHawk into dosbox"

This reverts commit e5b16a6307, reversing
changes made to ced12c51b4.

* Merge branch 'dosbox' of github.com:SergioMartin86/BizHawk into dosbox

* Removing unnecessary directive

* Fixing reboot

* fps notice formatting

* Zero init fps vals

* Using variable framerates

* Now accepting variable framerates as given by the core

* Moving ISO9660 detection lower

* Storing refresh rate in savestate -- update it on load if different

* fix GetFullName()

* Adding function to get number of ran cycles

* Adding ICycleTiming

* attoseconds are obsolete now

* fix loading CDs with spaces in their name

* Message duration needs to be left to the user to configure. Just passing a null

* Setting notify times back to 4 seconds cause these require a bit more time to read/understand

* Updating CycleCount from within wbx

* Simplifying cycle timing

* Removing FPS change notification, using default waiting times

* Updating submodule

* Fixing bug in disc swapping

* Adding drive selection functionality

* fixing period input

* Adding logic to present disc swapping operations from repeating when holding the button

* added defines for drive id

* point submodule to specific branch

---------

Co-authored-by: YoshiRulz <OSSYoshiRulz+git@gmail.com>
Co-authored-by: feos <vadosnaprimer@users.noreply.github.com>
Co-authored-by: feos <feykomylce@gmail.com>
2025-04-20 16:19:38 +03:00
feos 770c2954b1 dsda: we don't need reboot for settings yet 2025-04-19 23:07:01 +03:00
feos 45e16c0ec2 dsda: pass all non-sync settings to the core once they change 2025-04-19 21:44:15 +03:00
Morilli 9d80ea12b3 fix O2 mnemonic lookup
fixes a41817b703
2025-04-19 17:49:41 +02:00
YoshiRulz a41817b703
Prevent devs from setting '.' as a button's mnemonic
see c2ba2d7d4, #4217
2025-04-19 20:49:05 +10:00
feos c2ba2d7d4a mnemonics: comma means no input
TODO: unit test
2025-04-19 09:28:15 +03:00
Morilli 508aaa4400 add additional #if-directives 2025-04-18 19:45:12 +02:00
Morilli 7adc5619d7 remove redundant control overloads
no longer necessary since c# language version 10
2025-04-18 18:34:47 +02:00
YoshiRulz 3eb77a7567
Stop passing `--test-adapter-path` to `dotnet test` in scripts
this was causing a warning to appear, see microsoft/vstest#3475
don't entirely remember why it was necessary to pass
this, originally `-a`, at all; it's in the first commit d91c477e5
2025-04-17 04:08:44 +10:00
YoshiRulz 45f6bcb465
Nix expr: Regen NuGet lockfile
fixes 85dd9c816
2025-04-17 04:05:39 +10:00
YoshiRulz 0ab22359e1
Make `CustomCollectionTests.TestSortedListRemoveAfter` generic 2025-04-16 23:47:01 +10:00
YoshiRulz 3017459a3a
Mute remaining MSTest usage warnings 2025-04-16 23:35:16 +10:00
YoshiRulz 1fb2daaac0
Adopt new assert methods for exceptions 2025-04-16 23:35:16 +10:00
YoshiRulz ac95bf49bc
Fix swapped actual and expected values in `ZwinderStateManagerTests` 2025-04-16 23:35:16 +10:00
YoshiRulz 85dd9c816a
Bump MSTest to 3.8.3 and enable its new Analyzers 2025-04-16 23:12:56 +10:00
YoshiRulz aea450542a
Don't need this partial config migration anymore 2025-04-15 20:56:44 +10:00
YoshiRulz a88ba40bb5
Simplify some save slot UI event handlers 2025-04-15 20:50:43 +10:00
feos 1b301229ce Revert "uae: use existing thing instead of GetFullName()"
This reverts commit 13f49a1e3f.

fixed GetFullName() instead
2025-04-13 23:42:19 +03:00
feos 6dccb759cb Config.MainFormMouseCaptureForcesTopmost (config -> display -> window)
useful when some obscure window can overlay bizhawk while in mouse capture mode if the hidden mouse pointer is too close to it (pop-up panel on the edge of the screen in my case). topmost+fullscreen makes those unreachable, but automatic topmost is set to false since normally it's potentially bad
2025-04-13 23:31:17 +03:00
feos f3847c881d `Toggle Stay on Top` hotkey 2025-04-13 22:47:28 +03:00
CasualPokePlayer ca8bf2fb49 fix bsnescore and snes9x rompath usage (matches behavior before, maybe this should be changed but should be slightly more sensible now); remove unused imports 2025-04-13 11:12:45 -07:00
CasualPokePlayer cb50a24c0c Make RomPath consistent between xml and not xml
Previous implementation was broken and differed between the two in practice in the case of archives. Standard single file just passed archive loaded, without archive binding info. Xml case was even more nonsense, giving a completely nonexistent path using the internal archived file name. RomPath now will properly report the binding info in the case of archives. Cores should be very careful with using RomPath with file apis, as the | used for binding info is not a valid file char and will throw most file apis (some cores were already doing this, I've fixed most of the cores not doing so save for UAE and DSDA).

TODO: Need to fix the edge case of the file being in the same archive as the xml (represented specially in xml and that code path seems to already been broken)
2025-04-13 01:19:44 -07:00
feos 75fc58041e bind mouse capture to middle mouse button
pretty standard across emus that do this upon hotkey
2025-04-13 10:44:59 +03:00
feos 13f49a1e3f uae: use existing thing instead of GetFullName() 2025-04-13 08:48:21 +03:00
Morilli bf1930c3ff evict savestates on branch update 2025-04-12 23:55:12 +02:00
Morilli f20d09c8c1 fix marker state eviction logic
yeah this never worked
2025-04-12 22:55:08 +02:00
Morilli 52f08a9a6c cleanup TasView_CellDropped 2025-04-12 22:53:21 +02:00
YoshiRulz 1983c9ce08
Reflow single-line enum definitions 2025-04-12 20:26:57 +10:00
Morilli cd699d7c52 fix separator conflict in mame dipswitch option code
"@" was used as part of a description string, breaking the parsing. Surely no description includes a newline... (is there a better way to do this?)

- closes #4288
2025-04-12 06:48:18 +02:00
YoshiRulz d94fb910c7
Fix sysID in error dialog from `.xml` load failure
I think this predates the multi-disk bundler lmao
2025-04-12 01:33:05 +10:00
YoshiRulz 6c0f2a0ebf
Restore import in `TasMovie.cs`
reverts e672cc4cd
fixes 48c545a06
2025-04-12 01:13:27 +10:00
CasualPokePlayer 48c545a063 Revert "don't reserve branch frame savestates"
This reverts commit 8d066ff295.
2025-04-11 06:45:06 -07:00
Morilli e672cc4cd8 remove unused using 2025-04-11 14:32:47 +02:00
Morilli e32ec48c8a optimize tas history SetRedoLog allocation 2025-04-11 14:18:32 +02:00
Morilli 8d066ff295 don't reserve branch frame savestates
There was no eviction logic so the reserved frames would accumulate and never be cleaned, leading to continuously increasing memory usage.

Additionally I don't know why they would need to be reserved in the first place
2025-04-11 14:14:32 +02:00
YoshiRulz a09803e793 Copy metadata to linked and subframe cores from base core 2025-04-11 13:09:43 +10:00
YoshiRulz 5571d2e2a6 Update author/source metadata for several cores where it's missing
see #4168
2025-04-11 13:09:43 +10:00
YoshiRulz 6e63322f3f
Fix rewind indicator not being updated on core close
fixes eb7296dcd
2025-04-10 21:35:53 +10:00
CasualPokePlayer f1dce8964d Fix clang Linux building 2025-04-09 12:24:19 -07:00
CasualPokePlayer 2100168ed7 rebuild waterboxhost .so 2025-04-09 12:14:19 -07:00
feos 590d6bdc01 dsda: split out common buttons from players and only send them once 2025-04-09 21:45:40 +03:00
CasualPokePlayer 5409d0964e QuickerNES rebuild 2025-04-09 11:28:39 -07:00
CasualPokePlayer d9f2ce45fb Add CD WORD RAM (2M) to exposed Sega CD memory in RetroAchievements 2025-04-09 10:57:24 -07:00
feos efaa313d01 dsda: carry fractional x mouse movement for shorttics 2025-04-09 20:32:46 +03:00
feos 93bc50288f dsda: fix horizontal mouse range
the core uses 2 bytes, but if we use that range then raw mouse input is automatically recalibrated somehow and sends values multiplied by 272. that way maximum actual value is 120 (after dividing the range cap by 272), which is even more limiting than shorttics. and min value is 272 itself, which is not very useful if we have to divide it, because we need it to be 1!

the range of [-180, 180] is somehow the highest range that still gives minimal movement of 1, while providing maximum room for bigger movement.
2025-04-09 19:37:31 +03:00
feos 0f0d84489f Revert "mouse capture: restrict to center"
This reverts commit b0b32bea6a.

see commit discussion
2025-04-09 19:08:02 +03:00
feos d88f70aba5 dsda: x-mouse strafing 2025-04-09 19:04:47 +03:00
YoshiRulz da62f29d70
Add host mute indicator to status bar (see #2308) 2025-04-09 21:21:11 +10:00
YoshiRulz eb7296dcd5
Add rewind indicator to status bar (resolves #2308) 2025-04-09 21:19:05 +10:00
YoshiRulz 1d6583e42d
Un-mark DSDA-Doom as released 2025-04-09 14:32:38 +10:00