Commit Graph

145 Commits

Author SHA1 Message Date
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 3abd526aa9 A7800Hawk - eek out a few % perf improvements by aggressively inlining some short tia methods that weren't getting inlined 2020-04-21 18:08:33 -05:00
adelikat 325551ecd0 consistently check if callbacks exist before calling memory callbacks, across all cores 2020-04-21 16:42:57 -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 095b22d489 refactor CoreComm usage in atari cores 2020-03-15 09:14:33 -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 8a60043697 a7800 - misc simplifications, remove mapperBase peek/poke methods since they weren't being used and did not differ from read/write on any mapper 2020-02-22 11:42:50 -06:00
adelikat cdcc1eabde use inline out variables in Emulation.Cores 2020-02-18 15:10:29 -06:00
YoshiRulz 3afcf416e8
Follow attribute class best practices, cleanup docs on attributes 2020-02-19 03:54:50 +10:00
adelikat d3c048c13c simplify atari 7800 mapper code 2020-02-18 07:23:21 -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 969642b6c7 add Get/SetCpuFlagsAndRegisters to MOS6502X, and have cores point to that, instead of the same boilerplate in each core 2020-02-16 17:44:52 -06:00
adelikat aa6654cf9d fix a7800hawk text savestates 2020-02-16 12:51:55 -06:00
adelikat 027dc01c8b
create StateSerializer as a base implementation of IStatable (#1850)
* create StateSerializer, an ITextStatable implementation using the Serializer class, and wire it up to the TI83 core

* wire StateSerializer to A2600 core

* wire up StateSerializer to AmstradCPC, C64, and ZXS

* wire up StateSerializer to MSX, A27800, and Coleco

* wire up state serializer to ChannelF, Vectrex, Intellivision

* fix GambatteLink to implement ITextStatable, implement TextSerializer in O2

* StateSerializer - wire up a loadstate callback and implement StateSerializer for NesHawk, a bit of rework to subNesHawk as a result

* fix subneshawk text savestates

* StateSerializer - implement byte[] buffer storing (optionally), wire up to PCE

* implement StateSerializer to SMS, tweak GGLink accordingly

* implement StateSerializer in GBHawk, fix link cores accordingly

* StateSerializer - use Serializer static methods to create serializers
2020-02-16 12:05:57 -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
adelikat f83261c116 misc cleanups in emulator core service logic 2020-01-11 13:19:51 -06:00
alyosha-tas f6695ad87c Atari 2600: fix audio in commando raid 2020-01-02 19:28:28 -05:00
alyosha-tas 6f53ad1af7 Fix settings initialization for several other cores 2019-12-27 17:45:37 -05:00
adelikat fef746dffa properly dispose of IDisposables in core savestate code, and a few other places 2019-12-06 17:33:17 -06:00
J.D. Purcell fec63fb66a Spaces -> tabs, fix mixed newlines. 2019-11-03 20:58:36 -05:00
alyosha-tas 2750a420ef A2600: audio bug fix (Space Jockey) 2019-11-03 20:21:25 -05:00
alyosha-tas 76df4758db A2600: update ball emulation
A7800: update m6532 to match 2600
2019-08-03 19:17:28 -04: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
James Groom 4e91f88af3
Use nameof in cores 2019-03-28 14:18:58 +11:00
alyosha-tas 6d0973ca7e
Merge pull request #1429 from YoshiRulz/master
Inconsequential changes (no whitespace)

looks good to me
2019-03-09 17:32:10 -06: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
YoshiRulz c0a28a320b
Inconsequential changes (no whitespace)
Remove useless semicolon, remove useless `? true : false`, move period to next
line
2019-01-07 22:02:02 +10:00
alyosha-tas afebde0d3e A7800: change 'trigger' to 'button' 2018-12-14 18:23:24 -06:00
alyosha-tas 59f43b144e Core Code Cleanup 2018-12-05 09:01:25 -06:00
alyosha-tas af39f65b03 A7800: cycle based DMA list fetching 2018-11-23 10:20:52 -06:00
alyosha-tas 572c7f34c8 A7800: expand cart size for some demos 2018-11-22 19:41:59 -06:00
alyosha-tas d8ec5df92d A7800: BG color and read mode latching 2018-11-22 18:31:54 -06:00
alyosha-tas d465ddbf53 A7800 mapper fix 2018-11-17 14:46:22 -06:00
alyosha-tas f91c14e42e A7800: more Pokey fixes, should sound correct now 2018-11-17 11:37:18 -06:00
alyosha-tas c8bb21ab38 A7800: more pokey work, starting to sound correct 2018-11-17 10:18:11 -06:00
alyosha-tas ca52715673 A7800: Audio Overhaul 2018-11-12 09:29:11 -06:00
alyosha-tas 2dc13967ce A7800: Add db entry and fix mirroring 2018-10-27 19:51:18 -05:00
alyosha-tas 738ffe596d A7800: DB update and bug fix 2018-10-25 19:28:21 -05:00
alyosha-tas 41d9bb6967 A7800: Pokey support for SGE mapper 2018-10-24 17:37:42 -05:00
alyosha-tas 77bba444fd A7800: Fix unplugged controller and Pokey sound 2018-06-28 18:10:28 -04:00
Scepheo f3ea6fe025 Use generic interface type on MOS 6052X for talking to the emulator core (#1189)
* Use generic interface type on MOS 6052X for talking to the emulator core
* Change CpuLink constructors to not use expression-bodies, to get the AppVeyor build to pass.
* Add comment explaining why IMOS6502XLink exists.
2018-05-20 23:18:53 +03:00
nattthebear e8145af463 i hope this breaks something 2018-05-12 12:55:42 -04:00
alyosha-tas b2ed6eb737 Always initialize independent instances of IController in cores to NullController
- Fixes #1168
2018-03-31 11:23:55 -04:00
alyosha-tas 0cc72f4ee3 A7800: Fix High score SaveRAM #1130 2018-03-14 17:10:13 -04:00
alyosha-tas 4208eea12f A7800Hawk fix cart parsing for RAM bank, fixes 1129 2018-03-10 08:06:07 -05:00
adelikat ebcd237858 Merge branch 'master' into domainedmemoryhooks 2017-10-29 12:38:29 -05:00