Commit Graph

2323 Commits

Author SHA1 Message Date
adelikat ce4037fad8 cleanup PopulateWithDefaultHeaderValues() 2020-04-14 17:15:46 -05:00
adelikat 2b17c6d310 simplify some LogGenerator code 2020-04-14 16:44:37 -05:00
adelikat 831621b864 remove some unused code 2020-04-14 16:25:28 -05:00
adelikat 017573f4c6 IStringLog - remove unused method 2020-04-14 15:57:55 -05:00
adelikat c6b39492a0 misc cleanups in Bk2Movie and TasMovie 2020-04-14 15:52:41 -05:00
adelikat e29b02a472 simplify Bk2Movie and TasMovie constructors 2020-04-14 14:55:25 -05:00
adelikat 8c852c1b70 refactor importers to pass in a config instance, instead of using Global.Config 2020-04-13 19:51:42 -05:00
YoshiRulz 28bc772580
Re-implement GetHashCode for SystemInfo
but not by calling the base method; like the old one removed in 46a7e6491 did
2020-04-14 01:38:30 +10:00
YoshiRulz e514dfd117
Move/rename Lua library classes 2020-04-13 19:42:14 +10:00
YoshiRulz e226ff102b
Replace dynamic type with Object in API
Using the dynamic type here is no better than object because the values are
primitive types -- more likely to be cast/typechecked than used as a receiver
param for a method call.
2020-04-13 17:05:38 +10:00
adelikat 46a7e64911 misc cleanups 2020-04-12 17:41:55 -05:00
adelikat fd31922788 cleanup BkmMnemonicConstants 2020-04-12 17:20:54 -05:00
adelikat de54b80447 remove FrameworkFastZipWriter - interesting idea that didn't pan out 2020-04-12 16:56:41 -05:00
adelikat ff029968f3 fix compile error, some nitpick cleanups 2020-04-12 15:30:40 -05:00
adelikat b964ff4c32 remove unused miniz, a faster zip library that didn't pan out 2020-04-12 15:20:00 -05:00
adelikat 1ef5c2083f actually remove IonicZipWriter instead of not compiling it 2020-04-12 15:02:48 -05:00
adelikat e0df266cb7 remove remaining globals in LuaFunctionList 2020-04-12 14:17:16 -05:00
adelikat 42c6168c7e LuaFunctionList - remove global usage, make an IEnumerable instead of List since add/remove needs to be carefully controlled 2020-04-12 13:29:58 -05:00
adelikat 622733d31a SavestateManager - pass in IEmulator, reduces some global dependencies 2020-04-12 13:29:58 -05:00
adelikat acf959fd4b SaveSlotManager - pass in dependencies instead of using Globals 2020-04-12 13:29:58 -05:00
YoshiRulz e8cd4535ae
Remove unused class IonicZipWriter from compilation
Don't need to worry about this NuGet package...
2020-04-13 04:00:25 +10:00
YoshiRulz 1ee131ed78
Merge ApiHawk project into Client.Common and EmuHawk 2020-04-12 17:40:42 +10:00
feos 8dd31a39e5 one more mame mnemonics 2020-04-10 19:28:31 +03:00
feos a1c553d1de mame: add button mnemonics 2020-04-10 13:44:17 +03:00
YoshiRulz 489084242f Move [AssemblyVersion]/[AssemblyFileVersion] to VersionInfo.cs
ApiHawk was using hardcoded "1.1.0.0". BizInvoke, Bizware.BizwareGL, and
WinForms.Controls were not annotated, and had the default "0.0.0.0". All four of
these projects did not include the Version source files.
2020-04-08 23:04:08 +00:00
adelikat 2b281116ed misc cleanups 2020-04-08 16:03:35 -05:00
YoshiRulz 573aa13c64
Replace Tuple with ValueTuple in input system 2020-04-08 02:24:48 +10:00
adelikat a47f89582b LuaDeprecatedMethod - documentation generation failed to filter it out, instead though mark it as depcreated in documentation, Lua functions list - fix column sorting, simplifications 2020-04-06 17:12:24 -05:00
adelikat eae2ee7e29 remove DS lua library since it has no methods and no immediately plans to add any 2020-04-03 13:23:26 -05:00
YoshiRulz 7797689c53
Add LuaDeprecatedMethodAttribute and apply to client.transformPointX/Y 2020-04-01 09:49:27 +10:00
zeromus 667a218c58 hook up melonds screen control stuff to settings 2020-03-31 18:30:08 -04:00
YoshiRulz 0ba7a5a7df
Rename axis-related types, members, and locals
I left a few methods where they had an equivalent *Bool*() for buttons, and also
left some in TAStudio that get serialised.
2020-03-31 17:29:55 +10:00
zeromus e45943c26a raw capability for DisplayManager handling the NDS screen layouts. someone else will have to hook up the configuration in "CreateCoreScreenControl()". Gap, rotation, and layouts all supported. You will see that other configurations with varying view sizes won't be hard either.
Note that this was actually not very difficult, compared to dealing with the client sizing logic, which was teetering on the brink of total collapse. I may have messed something up while trying to support it here (mainly related to emu-space and client-space padding). There were many assumptions that the core's videoProvider would remain sensible, which this "core screen control" system subverts. The padding and sizing was added after I designed the pipeline specifically for this, so the padding and sizing is not handling it very well. Nonetheless, I think it works.
2020-03-29 21:50:06 -04:00
adelikat 7c2802b4c3 DS - change to incrmeent/decrement view hotkeys instead of just one that increments 2020-03-29 14:41:42 -05:00
adelikat 9bc5d74c67 DS - add hotkey to toggle video screen options 2020-03-29 12:05:05 -05:00
adelikat a072879dca DS - fixes to dsm importer, add mnemonics for LidOpen and LidClose 2020-03-28 17:45:48 -05:00
adelikat 6511632f15 add .dsm importer, doesn't import commands yet, need some examples, doesn't parse the TimeAtBoot value 2020-03-28 17:08:09 -05:00
adelikat d1032f38f8 DS - add a DS lua library with a touchScreenStart() method, add a cross hair stylus input display script 2020-03-28 15:43:31 -05:00
campbell000 373a05dcb4
Fixes joypad.set() method in Lua Console (#1898)
* Fixed lua joypad set method to accept button inputs with "P{controller}"
designations. Also allowed joypad set method to accept 0 or 1 as per
documentation

* Added comment
2020-03-24 12:40:18 -05:00
adelikat 8988c9bb8f O2 - bk2 mnemonics for some missing buttons 2020-03-23 14:06:05 -05:00
adelikat 8da4b13f94 mnemonics for a few missing NDS buttons 2020-03-21 12:09:23 -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
adelikat 8ea04c3ed5 cleanup StringLog.cs, removes a warning 2020-03-19 10:28:34 -05:00
alyosha-tas 5d88199c97 vbm import: properly parse GBC into movie header 2020-03-16 16:55:49 -04:00
alyosha-tas bc61ce3114 VBM import: always import as GB. 2020-03-16 16:30:35 -04:00
alyosha-tas ab6caa70d2 VBM import: import gambatte movie if gambatte is the loaded core 2020-03-16 16:16:32 -04:00
adelikat b9f80121df fix loading of 83P (ti-83) files from zip from the recent menu 2020-03-15 18:48:40 -05:00
adelikat 250d3b6c49 simplify CheatList.Sort using OrderBy extension method 2020-03-15 18:32:31 -05:00
adelikat 4152dce1ca Simplify some core name shenanigans with an extension method 2020-03-15 18:18:00 -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 965c7555ce FirmwareManager - replace query syntax with LINQ expressions. Query syntax is a pain unless you really need it 2020-03-15 16:27:32 -05:00
adelikat 5f2b4fe4d2 PathEntryCOlleciton use this instead of Global reference to this, sheesh 2020-03-15 16:16:58 -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 c66243254c remove unused GameInfo parameter in some core constructors 2020-03-15 10:19:01 -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 9fa59bad42 refactor CoreComm usages in Computer cores 2020-03-15 09:10:13 -05:00
adelikat d6af18accb remove CoreComm from MAME, easily added back if firmware is needed 2020-03-15 08:58:17 -05:00
adelikat 42dc7edd23 pass in rom annotation details to Octoshock so it can set coreComm, ideally the core should figure all this out but this works okay 2020-03-14 21:36:51 -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 9037c82985 use switch expressions on CoreSystemEnum converters, and add some enums that haven't been there for a long time (does anyone use this?) 2020-03-14 15:24:46 -05:00
adelikat 2c007e5049 remove a few more psp references 2020-03-14 15:18:58 -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 a50467846c simplify CoreFileProvider 2020-03-14 14:50:50 -05:00
adelikat 235ff78e9f Simplify CoreFileProvider - make Firmware private and an explicit dependency 2020-03-14 14:27:13 -05:00
adelikat 6c5dc8532f remove some useless regions 2020-03-14 14:23:13 -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 cd7d907c0d get rid of CoreFileProvider SubFileDirectory 2020-03-14 14:02:19 -05:00
adelikat e655ad3abd remove obsolete ICoreFileProvider.PathSubfile(), and instead pass in the neccessary base path the the bsnes core that needs it 2020-03-14 13:56:20 -05:00
adelikat b2066d9a73 remove obsolete ICoreFileProvider string GetFirmware method and replace the one usage for ti83 shenangians with an inline FirmwareManager usage 2020-03-14 12:39:45 -05:00
adelikat 104689655f remove unused ICoreFileProvider method and implementation 2020-03-14 12:29:30 -05:00
adelikat eba20781b4 add to ICoreFileProvider and remove casting to CoreFileProvider shenanigans in RomLoader 2020-03-14 12:28:19 -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
adelikat 51539ebebd Simplify FirmwareManager 2020-03-14 11:59:14 -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 acaaa126bb
Add item names to ValueTuple return type 2020-03-07 07:57:25 +10:00
adelikat e6eb667e56 RamSearchEngine - simplify 2020-03-04 19:19:32 -06:00
adelikat ebc3ea7ca0 RamSearch - simplify slightly 2020-03-04 19:10:26 -06:00
adelikat eff3f310a8 ramSearchEngine - fix AddRange broken in earlier refactor, oops 2020-03-04 19:07:36 -06:00
adelikat 74c12779b0 RamSearchEngine - use HawkFloatEquality() for float equality comparisons 2020-03-04 19:02:00 -06:00
adelikat d1db498d20 RamSearchEngine - List -> IEnumerable 2020-03-04 18:44:22 -06:00
adelikat a84fca5f8f make WatchList constants not all caps 2020-03-04 18:43:31 -06:00
adelikat 888a5225fe create an OrderBy() overload that does OrderBy or OrderByDesc, and use it to simplify sorting in RamSearchEngine (can be used to simplify other things like CheatList) 2020-03-04 18:40:26 -06:00
adelikat d6e56f8aa8 RamSearchEngine - simplify watchList creation with extension methods 2020-03-04 18:15:04 -06:00
adelikat 35ab6762a2 RamSearchEngine - simplify a bit 2020-03-04 17:51:57 -06:00
adelikat e460394d41 RamSearchEngine - cleanup code slightly by making ToFloat() an extension method, also fix CompareDifrerent by float comparisons that were all incorrect 2020-03-04 17:39:05 -06:00
adelikat 51dcd3db46 remove now redundant casts 2020-03-03 19:09:44 -06:00
adelikat d38e8a0503 cleanup 2020-03-03 18:41:53 -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