Commit Graph

199 Commits

Author SHA1 Message Date
adelikat 06f6e71c75 mGBA - make rom memory domain pokable, seems to work, supposedly it is wired up 2020-05-01 19:09:29 -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 f6735a9f9b mGBA - implement memory execute callbacks 2020-04-23 11:56:26 -05:00
adelikat 325551ecd0 consistently check if callbacks exist before calling memory callbacks, across all cores 2020-04-21 16:42:57 -05:00
adelikat dfe7f8e3ab refactor core preferences to be a dictionary<string, string> to be stored in config, and consolidate subnes and subgb into just another core selection 2020-04-18 09:55:57 -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
adelikat 6e40c46aa1 some nitpick cleanups 2020-04-12 13:29:58 -05:00
adelikat ceef1f4489 oops 2020-04-11 12:58:28 -05:00
adelikat 7c79cfab67 mGBA - implement IDebuggable.SetCpuRegister() 2020-04-11 12:57:47 -05: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
adelikat 04cd7d867c mGBA - fix NRE that can happen when rebooting core, fixes #1915 2020-04-10 08:47:52 -05:00
zeromus 6b462630e0 fix crash in MGBA memory callbacks due to GC of temporarily marshaled delegate (by keeping an instance referenced in a member, as usual) 2020-04-03 18:42:22 -04:00
adelikat be8db22d6c mgba- throw NotImplemented on callbacks with no address, we don't support that yet (likely ever) 2020-04-02 17:40:27 -05:00
adelikat cea0762c07 cleanup a few things in MGBAMemoryCallbackSystem 2020-04-02 17:40:27 -05:00
adelikat f97ef09c41 mgba - pass in mgba class instead of core pointer to MGBAMemoryCallbackSystem, seems cleaner either way. Still crash 2020-04-02 17:40:27 -05:00
feos fc5d8b2de6 add some stuff 2020-04-02 17:40:27 -05:00
feos 4597e8b334 tweaks 2020-04-02 17:40:27 -05:00
adelikat e44aa5d94a mGBA - pass core pointer to memory callback system 2020-04-02 17:40:27 -05:00
adelikat 75a991a36d bad attempt at wiring up mGBA memory hooks 2020-04-02 17:40:27 -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
adelikat 028bc83c88 refactor CoreComm usage in some Gameboy cores 2020-03-15 09:28:27 -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
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
adelikat 185dbda19a misc redundant code removal, empty argument in object intiializer, redundant elses 2020-02-25 15:14:13 -06:00
YoshiRulz 3afcf416e8
Follow attribute class best practices, cleanup docs on attributes 2020-02-19 03:54:50 +10:00
adelikat 54ba1e12eb set get only properties in Emulation.Cores, and a few other simplfiications 2020-02-18 11:11:59 -06:00
adelikat 606c3bf1c2
use more advanced language features in Emulation.Cores (#1852)
* Use expression bodies in Emulation.Cores, and a few other misc cleanups

* remove unused usings in Emulation.Common

* cleanups in Tables_Direct.cs

* some cleanups in nes boards - redundant code

* remove some redundant array initializers in Emulation.Cores

* cleanup AmstradCPC.Controllers

* use object initializers in a lot of places

* nes mappers - remove disch's notes comments in favor of the nesdev wiki link

* cleanup CdtConverter.cs, mostly use of object initializers

* remove redundant .ToString() calls in Emulation.Cores

* using var in Emulation.Cores

* AmstradCPC/ZXSpectrum - simplify some linq, tabs instead of spaces, a few other misc cleanups

* Use null-propagation in Emulation.Cores
2020-02-17 16:54:51 -06:00
adelikat 4b7a7dd293
Make Binary states default and Textstates opt-in for cores (#1848)
* Rewind & State config - remove the default option

* remove the savestate type of default, not that this is a breaking config change for anyone that had specifically set savestates to text

* remove BinaryStatesPreferred from IStatable and use config setting when starting movies from "Now" in record movie dialog

* remove BinaryStatesPreferred from cores

* make text savestates an extension method off of IStatable and an inteface ITextStatable it uses if the core implements it. This will allow cores to opt in to text states if desired

* make cores with actual text savestate impleemntations get ITextStatable, remove text state logic from cores that just have a binary as as text implementation
2020-02-15 10:22:26 -06:00
feos 340fe48f3a finish mgba tracer 2020-02-03 22:23:35 +03:00
feos b1be2f5937 bump mgbahawk version 2020-02-03 12:55:19 +03:00
feos 335a55306f mGBA trace logging 2020-02-03 12:50:41 +03:00
adelikat fef746dffa properly dispose of IDisposables in core savestate code, and a few other places 2019-12-06 17:33:17 -06:00
feos 5ca08b6c29
Camhack support (#1725)
for the camhack to work we have to save a state, hack memory, advance twice to see the changes, then load the state to prevent desync. since we can omit the framebuffer in savestates, loading them can happen without updating the screen, so the hacked camera remains visible.

advancing 2 frames automatically is done like tastudio does it when it seeks to a frame, only from lua now.

and the most questionable part is "invisible emulation", which is how Gens calls this IIRC, when everything that can distract or slow us down is skipped: sound, video, tools updates.

new lua functions:
- client.invisibleemulation()
- client.seekframe()

* for a test, mGBA core uses fake video and audio buffers and renders to them when we want to "skip" rendering. proper setup would involve actually skipping rendering those inside the core.
* allow disabling video and audio updates for gpgx too (proper approach, no fake buffers involved)
* add the script for Sonic Advance
2019-11-23 12:27:14 +03:00
YoshiRulz 4dd40305bc
Merge branch 'master' into interp_cores 2019-06-15 02:11:24 +10:00
James Groom 067477ce18
Merge branch 'master' into clean_docs 2019-06-14 13:28:39 +00:00
feos 3a8b3361e3 minor tweak to mgba, update its version in hawk 2019-06-10 22:02:19 +03:00
Brian Armstrong 2c6ecb68bd Merge branch 'master' into brian/mem_callback_addr_value 2019-06-06 02:11:04 -07:00
Brian Armstrong d41bd867b8 flags 2019-06-06 02:04:47 -07:00
YoshiRulz 2642ef4049
Remove empty docs 2019-06-06 16:41:10 +10:00
YoshiRulz 9af93be0d3
Use string interpolation 2019-04-04 02:41:18 +10:00
James Groom 4e91f88af3
Use nameof in cores 2019-03-28 14:18:58 +11:00
Brian Armstrong a8f293eec8 Call mem callbacks with addr, value 2019-01-24 03:23:21 -08:00
alyosha-tas c19c7cd5c3 SubNESHawk
also Input register shift fix

# Conflicts:
#	BizHawk.Client.EmuHawk/MainForm.Designer.cs
#	BizHawk.Client.EmuHawk/MainForm.Events.cs
#	BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.IEmulator.cs
#	BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IEmulator.cs
#	BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.run.cs
2019-01-10 18:25:59 +03:00
feos 0dc8187cb5 update mgba info 2018-06-23 16:23:53 +03:00
nattthebear e8145af463 i hope this breaks something 2018-05-12 12:55:42 -04:00
nattthebear 13a3ae1a32 support palette settings in mgba, fixes #1042 (probably) 2018-02-21 19:20:10 -05:00
nattthebear 213c8189e8 update mgba 2017-11-14 19:46:40 -05:00
adelikat ebcd237858 Merge branch 'master' into domainedmemoryhooks 2017-10-29 12:38:29 -05:00