Commit Graph

22667 Commits

Author SHA1 Message Date
CasualPokePlayer 42a96fb996 Add iNES 2.0 support for NROM
NROM usually doesn't have WRAM, but iNES 1.0 doesn't specify WRAM size, so its detection just assumes 8KiB WRAM. iNES 2.0 can precisely identify WRAM size.
2025-05-08 19:48:18 -07:00
100thCoin ff8a2bdf22 Fix NesHawk APU Status open bus behavior
Reading from $4015 no longer updates the data bus.
2025-05-09 10:58:03 +10:00
YoshiRulz edac0266e5
Fix `InputRoll.RowCount`, caused crash on removing row in Lua Console
fixes d7b0af9f4
also I think there was an unnecessary copy because this ctor was missing
2025-05-07 15:56:26 +10:00
Morilli b5893c0a0b fix tastudio SaveTas implementation
somewhat fixes 21fbee01de I guess, in particular AskSaveChanges would not save if no file name had been chosen.
This doesn't behave correctly when trying to save a backup or bk2 but when no filename has been chosen that makes no sense anyway, so...
2025-05-07 04:37:06 +02:00
Morilli c8e82ba1e5 dispose discs in dosbox
see #4301
2025-05-05 20:31:06 +02:00
feos 8a70238e75 dsda: fix settings changes dying on loadstate
handle gamma changes on the hawk side
DoUpdate is no longer needed
2025-05-02 09:32:47 +03:00
feos 1ec5d2e81c dsda: we can now ignore turn input during strafe50
impossible for a human to send to the game via keyboard and mouse, but works fine in movies, so it's been used in tases for decades (?). but we control what happens between frontend and core so why not block this particular input if needed
2025-05-01 02:07:00 +03:00
feos 13c3a83988 dsda: allow full byte range in BOTH directions for frac turn
since they're split and we can't set hi byte to -0, there was no way to turn below -1. [-256, 256] is not an accurate range per se, but due to how things are added on the managed side before sending inputs to the core, it feels like the most useful one. for shorttics one would only have access to hi byte, and with longtics one can still simulate that behavior - by only controlling said hi byte! and only introduce "sub-angle" when it's actually needed for something specific
2025-04-30 16:13:33 +03:00
Sergio Martin e04fd79574
Add DOSBox Windows Support (#4294)
* Decoupling HDD from SRAM

* Modifying memory area

* Adding win-specific config

* Mods

* Adding option to save hdd contents

* Fixing period

* Passing hdd contents in chunks to prevent excess mem usage

* Reverting changes to gui

* Revert "Reverting changes to gui"

This reverts commit 004a6b3382.

* Updating configurations

* Created custom submenu for DOS

* Renaming function nam names

* Refactoring function names

* Adding failure check for memfile alloc

* Adding logging on hdd size

* Re-adding configuration menu

* Fixes

* Demoting cd recognition of yet unsupported cores

* Fixing timing

* Reducing diff

* Fixing style

* Reducing diff

* Reducing diff

* Reducing diff

* Reducing diff

* Reverting change in cast in ticks target

* Reverting change in cast in ticks target

* Adjusting hdd precision

* Removing compatibility flag (not needed)

* Fix line endings

* Remove reference to Speccy

* Revert changes to `Bk2MnemonicLookup`

* Move DOS submenu initialisation to `MainForm_Load`

* Minor code style fixes

* Update src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.ISettable.cs

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

* Strip line-end whitespace

* Update src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.ISettable.cs

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

* Fixing byte notation to B

* Fixing byte notation to B

* Update src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.ISettable.cs

---------

Co-authored-by: YoshiRulz <OSSYoshiRulz+git@gmail.com>
Co-authored-by: feos <vadosnaprimer@users.noreply.github.com>
2025-04-30 14:38:58 +03:00
feos 9347a95f98 dsda: split turning axis into 2
editing a short in tastudio would be a nightmare, so we split it:
- high byte represents shorttics mode and whole angle values
- low byte is fractional part only available with longtics
2025-04-30 14:38:42 +03:00
feos 164d2d425b dsda: fix analog turning 2025-04-29 19:36:24 +03:00
feos 6733cee5f3 dsda: less intense coord description 2025-04-28 21:32:09 +03:00
YoshiRulz 33be880bb0
Set StyleCop rule SA1028 to error-level so CI will catch regressions
"Code should not contain trailing whitespace"
2025-04-29 02:22:32 +10:00
YoshiRulz 605deb682d
Remove line-end whitespace across main solution
...except in Designer files. Done with
`find src -type f -name '*.cs' -exec sed 's/[ \t][ \t]*$//' -i {} \;`
(and again w/ `\r`) followed by
`git restore src/*.Designer.cs`
2025-04-29 02:21:04 +10:00
feos 4cfc20e3ff dsda: rename cinterface because this thing is not limited to it 2025-04-27 23:36:39 +03:00
feos e733d28600 dsda: extract render updates 2025-04-27 23:20:31 +03:00
feos 8f0cd0699e dsda: volumes 2025-04-27 23:10:52 +03:00
feos 3416af401f dsda: refer to vanilla options 2025-04-27 16:34:59 +03:00
feos 314b96f1ca dsda: coordinates, map details, and map overlay
fix messages status appearing when unchanged
drop scale factor from render info
2025-04-27 15:49:10 +03:00
feos 358515e07e revert "change res on the fly"
there's a major slowdown when doing several res changes in the same session, and its need is questionable anyway, because of potential inconsistency of screensize across states and stuff.
2025-04-26 19:26:38 +03:00
YoshiRulz 6da42f7559
Revert unrelated work from `MainFormMouseCaptureForcesTopmost` commit
partially reverts 6dccb759c
2025-04-27 01:20:35 +10:00
CasualPokePlayer faf3c3336e Prevent MainModule usage from Silk.NET code 2025-04-23 15:15:04 -07:00
YoshiRulz 33f4d134e7
Print to console when no matching entry found in `PlatformFrameRates` 2025-04-24 05:59:16 +10:00
YoshiRulz 685a5cd119
Fix some tiny float imprecisions in `PlatformFrameRates` 2025-04-24 05:50:35 +10:00
YoshiRulz 5516281381
Add citations for Amiga in `PlatformFrameRates` and fix values 2025-04-24 05:50:33 +10:00
YoshiRulz 9ae37ee239
Reformat citations for NES and PSX in `PlatformFrameRates` 2025-04-24 05:50:13 +10:00
YoshiRulz 5e2c1b9ddf
Revert alphabetisation of `PlatformFrameRates` source
partially reverts 93f33815e
why split up related systems? also I have a set of refactors pending
which can't be reconciled with the alphabetised list
2025-04-24 05:49:55 +10:00
YoshiRulz f656f07bfe
A couple refactors for `RoslynUtils` and `DefaultSetterGenerator` 2025-04-24 04:51:48 +10:00
YoshiRulz b4cb0b7612
Remove redundant `unsafe` from a couple classes 2025-04-24 04:51:48 +10:00
YoshiRulz 8931f05703
Remove redundant `IPipeline.SetUniformMatrix` overload 2025-04-24 04:51:47 +10:00
Morilli 1fd6e2e085 fix dosbox cycle timing code
- closes #4295
2025-04-23 03:43:48 +02:00
Morilli 0001707a42 make "Show Keys" item set all keys instead of toggling them
see also #2779 for a similar fix for the "Show Player X" item
2025-04-22 20:52:42 +02:00
Morilli d8062cf731 [CI] remove unnecessary install actions
Somehow this broke the windows workflow and as lua is shipped by bizhawk on windows and liblua5.3 is installed on ubuntu we don't need any explicit install action.
2025-04-22 20:21:48 +02:00
feos d446c6c46d dsda: resolution now changes on the fly
TODO: fix slowdown after a few changes
2025-04-22 21:15:27 +03:00
YoshiRulz 77b4507ad3
Let `LuaTests` run in CI 2025-04-23 03:40:07 +10:00
YoshiRulz 164a89aaf6
Fix code style warnings 2025-04-22 04:25:38 +10:00
Morilli 8a9f185f5d Fix HexEditor rom path handling
`Config.RecentRoms.MostRecent` is not a path apparently
2025-04-21 14:23:06 +02:00
Morilli 092accbba0 fix dosbox Bk2MnemonicLookup 2025-04-21 12:06:04 +02:00
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