Commit Graph

2798 Commits

Author SHA1 Message Date
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
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
YoshiRulz e1951b9fc5
Cleanup PathExtensions
Fixes f02295455/c731e1168/5c7135d67
2020-03-21 13:45:58 +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 edd8349dde fix typo in Global property 2020-03-15 17:09:11 -05:00
adelikat 81d6ca335e CoreFileProvider - pass dependencies in, instead of using Globals 2020-03-15 16:10:02 -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 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
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 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 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
adelikat 1337beed1b remove designer null check hacks in favor of the intended DesignMode flag 2020-03-01 16:49:37 -06:00
adelikat 9474771098 ToolBox.cs - replace serious of ifs with LINQ filters 2020-03-01 16:30:51 -06:00
adelikat 4bfb4ab00d
Gameshark refactor (#1867)
* first round of GameShark.cs cleanups, redundant code and stylecop cleanup

* simplify how gba readonly values are set

* a few more cleanups

* GameShark - use NESGameGenieDecoder for nes logic

* remove now unused NESGameGeneie tool

* Client.Common - move nes encode/decoder to a cheats folder

* GameShark - move genesis game genie coding logic to its own class

* remove NesGameGenieEncoder that i snow unused

* fix naming

* remove GenGameGenie in favor of using the unified Cheat Code decoder

* move Gameboy/GameGear decoding logic from GameShark to its own class, cleanup

* remove GBGameGenie, was only exposed via the toolbox, GameShark tool does all of this logic

* GameShark - move snes game genie decoding logic to its own class

* cleanup

* remove unused snes GameGenie tool

* move Gb GameShark decoding to its own class

* cleanup

* move Genesis action replay decoding logic to its own class

* cleanup

* cleanup

* cleanup

* cleanup

* move Sms ActionReplay decoding to its own class, cleanlup

* cleanup

* move snes action replay decoding to its own class

* cleanup with a helper method

* cleanup

* more cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* move Psx GameShark decoding to its own class

* Move saturn gameshark parsing to its own class

* cleanup

* cleanup

* move N64 decoder logic to its own class

* remove GBA cheat code that hasn't been ready for 5 years, easier to try to implement this in the re-architected code, so delete for now at least

* start to detangle GBA gameshark mess

* Gameshark - remove most gba cheat code functionality for now, easier to rebuild it later

* Gameshark - cleanup

* cleanup

* cleanup

* cleanup

* redesign nes decoder to simpler design

* simplify more

* convert psx and saturn decoders and simplify

* convert more decoders

* convert more decoders

* convert more decoders

* convert more decoders

* convert gba decoder

* convert more decoders

* convert and simplify N64 decoder

* GameShark - simplify more
2020-02-29 15:18:40 -06:00
adelikat dff8a536f0 address some typos 2020-02-28 13:09:05 -06:00
adelikat 46d05de51f nothing to see here 2020-02-28 12:52:48 -06:00
adelikat 402acad0f6 cleanup NESMusicRipper.cs 2020-02-28 12:11:51 -06:00
adelikat 4bf463a2fc use object initializers in Client.EmuHawk 2020-02-28 11:15:06 -06:00
YoshiRulz 4e5849030b
Fix typo 2020-02-28 12:13:12 +10:00
James Groom c9d20426d3
Cleanup HawkFile (#1865) 2020-02-27 17:41:07 -06:00
YoshiRulz a22a1637d0 Cleanup VirtualPadAnalogStick and use LUTs for polar conversion 2020-02-27 04:34:31 +00:00
YoshiRulz 71e3dbf6bc Replace RangeStruct with ValueTuple, add deconstruction for Range 2020-02-27 04:34:31 +00:00
adelikat 7e741b1200 misc cleanups in lua code 2020-02-26 17:06:04 -06:00
adelikat f5e9e8eecd cleanup VersionInfo.cs a bit 2020-02-26 15:33:50 -06:00
adelikat e1bb93971a use expression body in various places 2020-02-25 15:14:14 -06:00
adelikat 72d4b0ac46 use inline out 2020-02-25 15:14:13 -06:00
alyosha-tas 961f682cdc SubGBHawk: misc. movie stuff 2020-02-23 19:20:49 -05:00
YoshiRulz 9829fd699b Unify helpers for generating file extension lists (for open/save) 2020-02-20 21:59:20 +00:00
YoshiRulz f71cc532a8
Misc. cleanups 2020-02-21 07:05:13 +10:00
adelikat dedd618db4 subneshawk - delete a bunch of code by using the underlying core for services, cleanup, and implement some services that were missing 2020-02-18 13:19:17 -06:00
YoshiRulz 3afcf416e8
Follow attribute class best practices, cleanup docs on attributes 2020-02-19 03:54:50 +10:00
J.D. Purcell f7174eb398 Make display scaling apply to InputRoll column header widths. 2020-02-17 12:34:37 -05:00
adelikat ae87aabbb0 Multidisk Bundler - hack to auto-select Game Gear, also reposition/size dropdown so you can read "Game Gear" 2020-02-16 16:06:00 -06:00
adelikat 4b50ea36e1 remove MemDomain CanPoke() extension method now that all it does is check the Writable flag which is better named and more conscise 2020-02-15 12:37:39 -06:00
adelikat 656f2b814e Move IEmulator extensions to the Emulation.Common namespace, the intent is that these are used and serve as built in functionality, so it's overly tedious to when most situations require both Common and an additional extensions namespace 2020-02-15 12:33:15 -06:00
adelikat fc8a90f433 we should probably use clone here 2020-02-15 11:54:23 -06:00
adelikat 192973dcd7 Tastudio - hide N64 "fake analog" controls by default 2020-02-08 11:03:03 -06:00
Zach ef18c1a3a6
Fix Macro Functionality (fixes #1838) (#1839)
* Initial fixes for macro menu items

* Arguments for this constructor can't be optional.
2020-02-07 13:45:13 -06:00
adelikat dc2a41c737 Lua console - clear on screen text when closing lua console 2020-02-03 17:20:49 -06:00
adelikat 38a525eefd Lua console - immediatley update on screen graphics when disabling a lua script 2020-02-03 17:17:11 -06:00
adelikat 626efe8caf put control extension methods into the EmuHawk names space isntead of a custom one. We want these to be found and used, and most dialogs use them 2020-02-03 12:54:32 -06:00
adelikat c2bec296e6 simplify some repeated boilerplate on the DragEnter event by consolidating it to an extension method 2020-02-03 12:42:28 -06:00
adelikat 74e63cd566 Tastudio - some reorg 2020-02-02 13:32:22 -06:00
adelikat bfd33e5399 separate out lua and ram watch on screen message lists so they can't clobber each other, fixes #1831 2020-02-02 12:09:13 -06:00
adelikat 58ff3fa60d Tastudio - remember the "Bind Markers to input" settings as a tastudio setting 2020-02-01 16:21:38 -06:00
adelikat e7399a5e10 oops, add code lost in designer shenanigans 2020-02-01 15:47:49 -06:00
adelikat 67ec75f644 Basic Bot - don't display messages while botting, recalculate Start enable on max value change, add checkbox to wire to mainform's invisible emulation for faster botting (possibly) 2020-02-01 15:43:06 -06:00
adelikat 1836ad86b6 Basic bot - if bot is unable to run and a message box is shown, show a specific error as to why it can't, instead of a generic error 2020-02-01 15:02:32 -06:00
adelikat 285c251135 Basic Bot - default to >= operator for main value 2020-02-01 15:02:32 -06:00
YoshiRulz 1fdb7a6fe2
Allow external tools to have any namespace / class name if annotated
This change is more convenient at the cost of a little duplicate code in
ToolManager. The annotation is [ExternalToolEntryPointForm], and having no more
than one such class per assembly is enforced.
2020-01-30 23:41:52 +10:00
adelikat 07239d6678 BasicBot - cleanup and simplifications 2020-01-26 13:48:15 -06:00
adelikat 3b5d0ab231 Virtualpad - Saturn - add previous and next buttons to console buttons, fixes #1703 2020-01-25 14:32:33 -06:00
adelikat 415dd5375b Virtualpad - use a reasonable size for the standard controller 2020-01-25 14:26:57 -06:00
adelikat 791498bb7e rename SatSchema.cs to SaturnSchema.cs 2020-01-25 14:22:04 -06:00
adelikat 1fa0882f8e nitpick some virtual pad schema class names 2020-01-25 14:21:36 -06:00
adelikat 45e0abe39d convert Config.cs from fields to properties 2020-01-25 12:35:33 -06:00