Commit Graph

4836 Commits

Author SHA1 Message Date
zeromus 90246dd4c1 fix raw screenshots, which previously were a mixed up mess of user filters and sysdrawing downscaling. fixes #1902.
This was broken by 95bc69b448 (or else it was benign at that time and broken later, but the fundamental change was here).

This caused the raw screenshots to go through the displaymanager instead of very simply converting the core's videoprovider at that point. The reason was because only the displaymanager had the power to render an opengl core's texture ID.

In this commit, I fixed it so that displaymanager had the power to render a videoprovider WITHOUT the user's scaling filters
2020-03-28 03:46:31 -04:00
adelikat 7aa0b08dd5 O2 virtualpad - add keyboard 2020-03-23 14:05:40 -05:00
adelikat 0717878fae Odyssey2 - Virtualpads - cleanup, add Power button 2020-03-23 09:27:11 -05:00
adelikat b52d674959 virtualpads - cleanup 2020-03-22 20:14:09 -05:00
adelikat b2c2b5c362 VirtualPads - Genesis activator - attempt to fix it up, it at least maps to correct buttons now 2020-03-22 20:10:30 -05:00
adelikat 49b57bbb22 Virtualpads - fix up vectrex - add console buttons, fix analog logic 2020-03-22 19:54:19 -05:00
adelikat 7f2e1438ba VirtualPads - style console pads differently 2020-03-22 19:34:04 -05:00
SuuperW 88904e6b44 support custom screen layouts in MelonDS core (no UI yet) 2020-03-22 18:40:52 -05:00
adelikat 59a7b24df9 a7800 virtualpads - cleanup, support unplugged and lightgun options, remove unimplemented paddle controller logic 2020-03-22 17:31:44 -05:00
adelikat f98003f98e virtualpad schema - cleanups 2020-03-22 16:47:33 -05:00
adelikat 1f8171fc9b PadSchema - remove MaxSize as it wasn't being used, rename DefaultSize to just Size 2020-03-22 16:23:01 -05:00
adelikat 808fa1a911 SmsSchema - simplify 2020-03-22 16:16:05 -05:00
adelikat b520211cf2 NesSchema - simplify some 2020-03-22 16:04:45 -05:00
adelikat 00ec0750d0 SnesSchema - remove unused method 2020-03-22 15:58:50 -05:00
adelikat 1b7698aa71 ButtonSchema - simplify UDLR helper methods more 2020-03-22 15:57:43 -05:00
adelikat ec353e163e ButtonSchema - simplify with another overload 2020-03-22 15:15:22 -05:00
adelikat 554e0dcf80 ButtonSchema - simplify more 2020-03-22 15:09:19 -05:00
adelikat d0908053c2 ButtonSchema - simplify 2020-03-22 14:39:12 -05:00
adelikat 7e9ef33d90 ButtonSchema - lock down setting of Name property 2020-03-22 14:36:57 -05:00
adelikat c0ffe0e0e3 ButtonSchema - use overloads more 2020-03-22 14:32:27 -05:00
adelikat 828bc2b9dc ButtonSchema - use overloads more 2020-03-22 14:27:12 -05:00
adelikat 7b6ff18775 ButtonSchema - use more constructor overloads to simplify 2020-03-22 14:13:01 -05:00
adelikat 90a03f3f6a ButtonSchema - lock down Location setting 2020-03-22 13:21:38 -05:00
adelikat 1c9260f7cf ButtonSchema - use name overload more 2020-03-22 13:16:30 -05:00
adelikat 5f24a07fc9 add ButtonSchema overload with name, and use it in places 2020-03-22 12:56:00 -05:00
adelikat 0344b0affb make PadSchema.IsConsole not settable, force the use of inheritance 2020-03-22 12:37:28 -05:00
adelikat ddaa6fab36 rename FloatSingle -> SingleFloat 2020-03-22 12:19:40 -05:00
adelikat ec36ed6206 ButtonSchema - make Type not directly settable and force the use of inheritance to set it 2020-03-22 12:18:47 -05:00
adelikat 1f63228061 C64 virtualpad schema - simplify 2020-03-22 11:41:48 -05:00
adelikat 2560def438 Virtual Pad - ButtonSchema - make location constructor the only option since location is always required, change param order on Directional helper methods for consistency 2020-03-21 22:24:06 -05:00
adelikat b70cfebd1d virtualpad schema - make a ButtonSchema constructor that takes in coordinates, reduces a lot of boilerplate, wire it up to a few schemas 2020-03-21 19:09:02 -05:00
adelikat a52c46339e VirtualPad Schema - add some helper methods for creating directional pad buttons, since those are so common 2020-03-21 18:12:26 -05:00
adelikat 4476cc53af VirtualPads - unnest ButtonScehma and PadInputType 2020-03-21 18:12:26 -05:00
adelikat 0ecc1e8023 VirtualPad Schema - default to type Button, and remove now redundant setting of this value 2020-03-21 16:10:01 -05:00
adelikat 6a25679ae3 remove trailing comma in various places in Emuhawk probject 2020-03-21 16:04:08 -05:00
adelikat c1e2f6afe5 VirtualPad Schema - don't show display name if icon is preset, default to Name if displayName is not present (and no icon). Delete a lot of now redundant DisplayName assignments 2020-03-21 15:22:30 -05:00
adelikat 6f84582aa5 virtualPad cleanups 2020-03-21 15:22:30 -05:00
adelikat 020db9bfe3 DS virtual pad 2020-03-21 14:29:45 -05:00
adelikat 50dc04980a NDS settings - move and anchor default button differently, to make it harder to click on accident instead of save 2020-03-21 13:44:13 -05:00
adelikat d5f0206df2 disable NDS setting menu item if movie is active 2020-03-21 13:42:14 -05:00
adelikat 7a558f1951 cleanup NDS settings code 2020-03-21 13:38:42 -05:00
adelikat 85fcb99717 cleanup NDS Settings dialog code 2020-03-21 13:25:39 -05:00
adelikat 8161066632 fix up NDS settings dialog 2020-03-21 13:08:03 -05:00
adelikat 12c6878be1 fix NDSSettings .csproj stuff 2020-03-21 12:59:05 -05:00
adelikat d9d5658a7b add melonDS icon 2020-03-21 12:54:59 -05:00
adelikat 7e48d11594 add DS controller image 2020-03-21 11:59:06 -05:00
adelikat a24d101f1c ControllerConfig - more gracefully handle not having a controller image 2020-03-21 11:48:37 -05:00
SuuperW c59d8130bb
DS Hawk (#1884)
* Add MelonDS.cs, support opening (but not really) .nds files.

* init MelonDS

* MelonDS: Load selected ROM.

* MelonDS: FrameAdvance and frame counter.

* MelonDS: IVideoProvider

* MelonDS: Add DLL files.

* MelonDS: IInputPollable

* MelonDS: IStatable (and add forgotten file MelonDS_InputPollable.cs)

* update libmelonDS.dll

* MelonDS: ISoundProvider

* Add NDS to Global.SystemInfo, and convert screen coords when running NDS.

* set up default NDS controller

* MelonDS: ISaveRam

* MelonDS: remove romlist.bin

* MelonDS: ISettable

* Create firmware folder if it doesn't exist on Windows; otherwise, an exception is thrown.

* Add database entries for NDS bios/firmware files.

* MelonDS: Use the bios/firmware files selected in BizHawk's "Firmwares" dialog.

* MelonDS: Re-work sync settings a bit.

* NDS's firmware file contains user settings; these are over-written by sync settings, so we shouldn't allow them to impact the hash

* MelonDS: Add (currently unused) bootToFirmware sync setting, and NDSSettings dialog.

* Update NDS firmware hash; it seems I had somehow corrupted mine.

* MelonDS: Use boot to firmware sync setting.

* MelonDS: Allow user to set some firmware user settings via the NDS settings dialog.

* MelonDS: Add singleInstance attribute to core.

* MelonDS: IMemoryDomains

* update libmelonDS.dll

* MelonDS: Set up default sync settings if none are provided.

* MelonDS: Allow user to reset settings to default.

* MelonDS: bios+firmware files are recommended

* libmelonDS.dll

* MelonDS: Don't use real time.

* MelonDS: Update to reflect new way of handling RTC in MelonDS.

* MelonDS: Notify if savestate load failed.

* update MelonDS.dll

* MelonDS: Allow user to set startup date/time in settings dialog.

* MelonDS: Create melon directory if it doesn't already exist.

* Don't include Designer's "fixes" in PR (partially reverts 56b474c00)

* Don't show a broken console window; alert user of need to restart instead.
This fixes an error related to MelonDS trying to use the broken stdout stream.

* update default NDS controls to match other updated controls

* Implement a system bus, using ARM9 read/writes.

* MelonDS: Allow BizHawk to change the contents of the frame buffer.

* update libmelonDS.dll

* fix stuff that was merged incorrectly, or was broken by merge

* update libmelonDS.dll
(includes memory leak fix)

* update libmelonDS.dll
(fixes memory leak and an occasional savestate crash)

* fix stuff that broke with the merge

* cleanups, remove stuff that is no longer needed by service interaces

* simplify DS MemoryDomains

* DS - fix order of controller buttons to be consistent with other consoles.  This probably breaks any existing movies made on this core, but those would have been experiments, right?

* NDSSettings - make min value for day and month 0, whiel those aren't "valid" values they are the default values in the core for whatever reason, better to not crash on load and not show a value that isn't actually the setting.  This can easily be reverted if the core changes to default to 1

Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
Co-authored-by: adelikat <adelikat@tasvideos.org>
2020-03-21 10:53:30 -05:00
YoshiRulz e1951b9fc5
Cleanup PathExtensions
Fixes f02295455/c731e1168/5c7135d67
2020-03-21 13:45:58 +10:00
alyosha-tas af2f87deac Gambatte: do not sort settings alphabetically, so that GBC in GBA mode is not at top 2020-03-20 17:05:25 -04:00
adelikat 7fb89aed18 NesHawk - move BootGodDb to its own file 2020-03-19 21:35:36 -05:00
YoshiRulz 74620559ea
Re-include AssemblyInfo.cs in EmuHawk compilation and fix casing 2020-03-20 09:03:21 +10:00
adelikat a40e37eda6 Qunatizer - delete more unused stuff, removes a warning 2020-03-19 10:23:36 -05:00
YoshiRulz 89abab7a52
Use env. var for nuget pkg dir on Linux, and don't set CscToolExe
Also removed comments and used SolutionDir in .csproj/.props, and enabled Roslyn
Analyzers on GitLab CI builds
2020-03-19 15:15:32 +10:00
adelikat f655a4587e simplify ToolManager.GenerateDefaultCheatFilename 2020-03-15 18:07:57 -05:00
adelikat a7b30dac6c Simplify TI83KeyPad.cs 2020-03-15 18:06:05 -05:00
adelikat ff7fb4e658 VirtualPadDiscManager - remove some unused code and other cleanups 2020-03-15 17:58:03 -05:00
adelikat 6d5c444252 Move Global controller adapters into InputManager, it's a step in the right direction 2020-03-15 17:50:48 -05:00
adelikat 1f617221fc Make InputManager not static, but make a static instance in globals, phase 1 of some refactoring 2020-03-15 17:19:11 -05:00
adelikat 5617950f50 InputManager - pass some dependencies into SyncControls 2020-03-15 17:13:56 -05:00
adelikat edd8349dde fix typo in Global property 2020-03-15 17:09:11 -05:00
adelikat 67926a2de4 Make Global fields into properties, a bit of cleanup 2020-03-15 17:08:34 -05:00
adelikat 80c36d8155 FirmwareManager - don't use Global, pass in actual dependencies 2020-03-15 16:31:37 -05:00
adelikat 81d6ca335e CoreFileProvider - pass dependencies in, instead of using Globals 2020-03-15 16:10:02 -05:00
adelikat b1cac9ba00 Move DefaultIniPath property to Config, and delete PathManager.cs 2020-03-15 16:02:23 -05:00
adelikat e16dc33722 move some PathManager methods to a PathUtils class in BizHawk.Common 2020-03-15 15:59:10 -05:00
adelikat 33a14327b7 move most logic from PathManager to extension methods in BizHawk.Common 2020-03-15 15:45:11 -05:00
adelikat 348cbd18df
Remove PathManager code that had dependencies on Globals (#1881)
* move one usage of Firwmare method into Firmware config where it is better suited

* PathManager - remove unused code

* move some PathEntry specific logic out of PathManger and into PathEntryCollection extension methods

* PathManager - detangle some exe pathing logic from Global.Config usage, clarify what a completely broken method should actuall do

* move more logic from PathManager to PathEntryCollection extension method

* move absolute path creation to PathEntryCollection, lots of refactoring and simplifying of PathEntries usage

* simplify PathEntryColleciton usage more

* simplify PathEntryCollection more

* break PathEntry classes into separate files, a bit of cleanup

* move Rom path logic out of PathManager into PathEntryCollectionExtensions

* move config UseRecentForRoms and LastRomPath into PathEntries, note that this is a breaking change for previous configs, those values will revert back to default values

* move SaveRamPath logic from PathManager to PathEntryCollections

* move cheats path logic from PathManager to PathEntryCollection

* move another method out of PathManager

* move some Retro hacks to PathEntryCollections, exposes more implicit dependencies

* move savestate logic out of PathManager to PathEntryCollection

* move more logic out of PathManager

* move some savestate logic out of PathManager, move most to MainForm where it is used, detangle some implicit dependencies from SaveSlotManager

* rename method

* move more logic from PathManager to PathCollectionEntry

* movie final Global.Config.PathEntries logic out of PathManager and into PathEnties
2020-03-15 15:12:36 -05:00
adelikat 3c519b0249 refactor CoreFileProvider instantiation, require ICoreFileProvider in CoreComm constructor and remove setter for CFP 2020-03-15 10:09:32 -05:00
adelikat 8c7b0c6ff1 delete some vestigial coreComm/CoreFileProvider code 2020-03-15 09:57:54 -05:00
adelikat 0a33940704 remove CoreComm from IEmulator, and remove it from NullEmulator 2020-03-15 08:54:56 -05:00
adelikat da95c1f56f remove RomAnnotation fields on CoreComm and use the service instead 2020-03-14 22:10:57 -05:00
adelikat 6360d9934c simplify MainForm UpdateDumpIcon() some 2020-03-14 21:05:22 -05:00
adelikat a884282fa4 remove CoreComm NominalX/Y, those values never different from buffer w/h for cores that set them which were only the gb/gba platforms and the original dualGb. The result defaulted to a very random 640x480. Instead just use the buffer w/h, which is a very reasonable video default 2020-03-14 17:06:42 -05:00
adelikat dd062b3ca7 replace CoreComm screenofsets with an emulator service 2020-03-14 16:35:54 -05:00
adelikat 870d7df6f2 cleanup some unneeded code 2020-03-14 16:09:25 -05:00
adelikat 190118d7c4 rip out libretro hack from CoreComm, making it a param on LoadRom isn't great but better 2020-03-14 15:43:17 -05:00
adelikat fc0e0840e0 delete more stuff that is no longer used in CoreComm 2020-03-14 15:29:43 -05:00
adelikat d8d12cac8b kill more psp, and remove some methods from coreComm that were only used by the former psp core 2020-03-14 15:14:31 -05:00
adelikat d72d8e79ff remove Global.Game from retro methods of CoreFileProvider, fix exposed bug that the retroarch core was getting path stuff based on Global.Game before it was being set to the new game 2020-03-14 14:22:23 -05:00
adelikat 16781fa212 FirmwareManager - don't depend on Global.Config 2020-03-14 12:20:28 -05:00
adelikat d1623c32b7 Firmwares manager - depend on Global.Config less 2020-03-14 12:10:53 -05:00
YoshiRulz e12b5d8137
Refactor FloatRange creation and usage
effectively resolves #1200
* Replaced floats in FloatRange with ints (would have used shorts but
SubGBHawk/SubNesHawk use an axis to hack in cycle count or something), added
both Range<int> and Range<float> auto-properties
* Added bool field IsReversed to FloatRange
* Added enum AxisPairOrientation and factory method using it
* Cleaned up usages of FloatRange fields and properties
* Added new properties to PadSchema.ButtonSchema for type
PadInputType.AnalogStick (to hold the two FloatRanges) and used
ControllerDefinitions from cores to dedup these ranges in the schemata
* Made VirtualPadAnalogStick work properly: both the direction and bounds are
correctly set from the controller schemata, the polar conversion measures angles
consistently (though I think it might not work outside -128..127 e.g. for PSX),
and I didn't break the sensitivity override, plus negative percentages might
work now but I didn't allow those
* Renamed FloatRange to AxisRange, but did not rename related symbols
2020-03-14 20:47:45 +10:00
YoshiRulz d02a8df549
Fix audio buffer looping on drag-and-drop 2020-03-13 08:49:05 +10:00
YoshiRulz 9e514dcebd
Unify Get/SetSoundOn across Lua and C# APIs (resolves #1817) 2020-03-13 08:46:45 +10:00
feos 9dd9b4cc0d
Bulkread (#1834)
* POC of a memory domain bulk read concept, wired up to hex editor, very sloppy currently

* do the todo

* delegates for bulkreads

* refactor bulk reads to take in a range and a pre-allocated array for the values

Co-authored-by: adelikat <adelikat@tasvideos.org>
2020-03-11 10:53:42 -05:00
adelikat 7456d81a9c cleanup FilterManager.cs 2020-03-06 17:35:01 -06:00
YoshiRulz 5196b97459
Fix resources for BizHawk.Emulation.Cores and cleanup 2020-03-07 07:45:19 +10:00
adelikat 9584ff1f53 use switch expressions in some various places in EmuHawk, and some other simplifications 2020-03-04 20:18:43 -06:00
adelikat 8430d145ab cleanup RamSearch with switch expressions and switch labels 2020-03-04 19:34:13 -06:00
adelikat a84fca5f8f make WatchList constants not all caps 2020-03-04 18:43:31 -06:00
adelikat 3d664d9270 simplify ram search engine settings usage a bit with some extension methods 2020-03-03 18:41:53 -06:00
adelikat 23c819de4a Move SearcMode enum out of SearchEngineSettings 2020-03-03 18:41:53 -06:00
adelikat a151bd7424 move settings class out of RamSearchEngine 2020-03-03 18:41:52 -06:00
adelikat 3a0df3f543 move enums out of RamSearchEngine class 2020-03-03 18:41:52 -06:00
adelikat 92221f38df separate namesapce for RamSearchEngine files 2020-03-03 18:41:52 -06:00
YoshiRulz f7ddab25c7 Redesign 4 config dialogs as a proof-of-concept 2020-03-03 22:51:51 +00:00
YoshiRulz 10818ba069 Create a new project for custom controls and add some more 2020-03-03 22:51:51 +00:00
adelikat 1337beed1b remove designer null check hacks in favor of the intended DesignMode flag 2020-03-01 16:49:37 -06:00
adelikat 0414e15a75 InputRoll - remove designer hacks, they don't crash the designer anymore 2020-03-01 16:41:47 -06:00