Commit Graph

613 Commits

Author SHA1 Message Date
adelikat 2401c37a7f delete ScreenArranger and move the relevant logic to MelonDS, and simplify, also use a pre-allocated buffer instead of making a new one every time 2020-04-01 18:58:08 -05: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 97beecc4c9 fix more mixups in bulk reading (fixes #1903) 2020-03-30 17:18:16 -04:00
zeromus c3389f14e1 fix bulkread mistakes (see #1903) 2020-03-30 05:21:07 -04:00
YoshiRulz 4237d09d22
Maybe fix off-by-one in 270deg layout 2020-03-30 12:35:28 +10:00
YoshiRulz e0e90a5f33
Reimplement ScreenArranger, refactor MelonDS.GetVideoBuffer 2020-03-30 03:50:49 +10:00
adelikat b9f6432ddf DS - wire up rotate options, screen logic doens't work yet 2020-03-29 11:07:18 -05:00
adelikat 5f889e2568 DS - add screen gap option 2020-03-28 15:12:47 -05:00
adelikat 0aaf2b4151 DS - rethink ScreenArranger, fix side by side options 2020-03-28 14:48:24 -05:00
adelikat 730156b5db DS - wire up some screen setting options, the side by side ones don't work because screen arranger has a bug, and it is flawed, going to refactor all of this 2020-03-28 12:03:26 -05:00
adelikat e2ac7d7a8f cleanup ds video options code 2020-03-28 10:31:25 -05:00
adelikat 6ee8d6d312 Add DS to the Core picker dialog 2020-03-25 18:37:12 -05:00
adelikat 81bcf45d53 SystemLookup.cs - pointless refactoring 2020-03-25 18:37:12 -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
SuuperW 88904e6b44 support custom screen layouts in MelonDS core (no UI yet) 2020-03-22 18:40:52 -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 c985dfa96d fix hex editor scrolling 2020-03-20 21:08:52 -05:00
adelikat 32e632851e remove setters from IMemoryDomains MainMemory and SystemBus properties, those shoudln't be set by the calling code, nor were they being used 2020-03-19 14:50:04 -05:00
YoshiRulz 8ae01f2f42
Fix tuple item names in return type 2020-03-19 15:15:39 +10:00
adelikat 5cc1c234cd Nitpick 2020-03-15 18:37:49 -05:00
adelikat 4152dce1ca Simplify some core name shenanigans with an extension method 2020-03-15 18:18:00 -05:00
adelikat d3f37a5beb remove CoreComm.Clone(), it is now safe to pass around into subcores 2020-03-15 10:12:20 -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 983a9a3a11 fix CoreComm documentation 2020-03-15 09:48:18 -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 015043fd50 add IRomInfo service 2020-03-14 21:43:53 -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 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 211883889b simplify CoreCom copying by implementing a Clone method, simplifies all the cores that have cores in them, this copies a lot more things than the original code had but it seems that's either fine or fixing broken stuff 2020-03-14 15:08:24 -05:00
adelikat a50467846c simplify CoreFileProvider 2020-03-14 14:50:50 -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
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 ddbabd6067
Split path to fork in project dependency tree
Emulation.Common does not depend on Emulation.DiscSystem, but Emulation.Cores
still depends on both
2020-03-13 09:46:24 +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 630858cbd4 misc cleanups in Emulation.Common 2020-03-01 14:39:24 -06:00
adelikat 565a319cef
Remove unused sound files (#1868)
* Remove unused ZeromusSynchronizer ISynchronizingAudioBuffer implementation as it hasn't been used in quite some time, also remove unused MetaspuAsyncSoundProvider that is no longer used. Remove some unsed methods on MetaspuSoundProvider

* use switch expression

* remove unused buffer

* remove unused NitsujaSynchronizer, even though it was the default, the only usage of ISynchronizingAudioBuffer is the vecna one

* remove enum ESynchMethod now that it only had 1 option

* expose VecnaSyncrhonizer and remove Metaspu static class

* remove unused method on ISynchronizingAudioBuffer
2020-03-01 14:18:24 -06:00
YoshiRulz e5da8c765a
Move IController.ToDictionary extension to BizHawk.Emulation.Common 2020-02-28 13:26:27 +10:00
adelikat b810060fcf move AdvancedRomLoaderType out of Emulation.Common, it doesn't belong here (moved to EmuHawk where it is used) 2020-02-26 16:36:15 -06:00
adelikat 13bc770063 misc cleanups in Emulation.Common 2020-02-26 16:32:00 -06:00