Commit Graph

627 Commits

Author SHA1 Message Date
adelikat 099bee6bf5 fix off by one error in BulkReadByte fixes #1944 2020-04-24 13:51:59 -05:00
zeromus 10bceeb0dc Nope, I think it's a good idea now.
Revert "This reverts commit c878c85daeaaf0cae3e28f24bc1a8b511293d7b6."
This reverts commit 1d1f2a18c6.
2020-04-23 21:20:59 -04:00
zeromus 1d1f2a18c6 This reverts commit c878c85dae. 2020-04-23 21:06:12 -04:00
zeromus c878c85dae for your consideration: sync settings return flags instead of a bool, so we can have more granularity in what needs resetting than just "reboot core". for instance, we would like to minimize the number of times the window layout is redone by not doing it when the screen settings havent changed. HOWEVER, while I was writing this commit message, I realized, I should probably do it just by being more cautious in kicking off the layout (unless the data coming from the core has changed, a layout shouldnt happen). So I am going to make this commit, in case it inspires anyone, and then revert it. 2020-04-23 21:05:56 -04:00
adelikat 189a47ad3c move more movie loading logic out of Mainform and into MovieSession and also some extension methods 2020-04-18 11:25:37 -05:00
adelikat 2a9710b63c movie some video provider movie logic into an extension method 2020-04-18 10:49:15 -05:00
adelikat 9494243eef add an IStatable extension method that can load a state directly from a byte array, reduces the stream creation boiler plate in a number of palces 2020-04-18 10:26:08 -05:00
adelikat b736d48911 use constants for core string names and simplify core core name getting logic 2020-04-18 09:55:57 -05: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 62f3214ce2 create a memory callback based IInputCallbacks system that can be used by any core, wire it up to the mGBA core 2020-04-10 11:12:57 -05: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
adelikat a83c125ac4 Simplify nullemulator - emuHawk already handles cores with no video provider by using NullVideo, so no reason for NullEmulator to provide NullVideo 2020-04-08 13:26:51 -05:00
adelikat 786fd9d5a1 Database.SaveDatabaseEntry() - account for NotInDatabase rom status, and simplify 2020-04-08 10:21:35 -05:00
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