Commit Graph

129 Commits

Author SHA1 Message Date
adelikat 96a85d4442 Z80 Interrupts - remove unnecessary public property 2020-04-29 17:21:26 -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
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 5886416cbf refactor CoreComm usage in more cores 2020-03-15 09:22:58 -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 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 27352a6f8e add Get/SetCpuFlagsAndRegisters to Z80, and remove all the boilerplate from related cores 2020-02-16 17:55:40 -06:00
adelikat d1266aa82d fix coleco and oddessy2 text states 2020-02-16 13:41:10 -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
YoshiRulz 6f3f01125c
Enable SA1504 and fix noncompliance
"All accessors should be single-line or multi-line"
i.e. no block form on one line
2020-01-25 14:56:56 +10:00
alyosha-tas 263fdfebc3 MSXHawk: audio 2020-01-24 19:47:16 -05:00
adelikat f83261c116 misc cleanups in emulator core service logic 2020-01-11 13:19:51 -06:00
adelikat fef746dffa properly dispose of IDisposables in core savestate code, and a few other places 2019-12-06 17:33:17 -06:00
James Groom 4e91f88af3
Use nameof in cores 2019-03-28 14:18:58 +11: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
alyosha-tas 59f43b144e Core Code Cleanup 2018-12-05 09:01:25 -06:00
alyosha-tas 994e415a1b ColecoHawk: Add remainder of SGM domain 2018-07-07 08:14:51 -04:00
alyosha-tas 0e58e36b67 COlecoHawk: Add SGM memory domain, fix super action controller 2018-07-05 16:48:08 -04: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
Asnivor e2eac983a1
Merge pull request #1149 from TASVideos/master
Bringing ZXSpectrum branch up to date with master
2018-03-19 15:52:55 +00:00
alyosha-tas 81e80acf86 z80: make TotalExecutedCycles long and change related variables accordingly 2018-03-18 09:55:56 -04:00
alyosha-tas 42131c5d57 Coleco: Fix audio quality 2018-03-13 16:31:21 -04:00
alyosha-tas c839bffc33 A2600: Add Driving controller and fix coleco Super Action Controller 2018-03-12 09:12:41 -04:00
alyosha-tas b5321b8d1e Coleco: Finalize Turbo Controller (fixes burn rubber) 2018-03-11 14:49:53 -04:00
alyosha-tas 38a07e8246 Coleco: Fix noise channel audio 2018-03-09 19:32:49 -05:00
alyosha-tas 1cd82aa5d9 ColecoHawk: Fix turbo controller 2018-03-08 19:58:38 -05:00
alyosha-tas b0445521c9 ColecoVision: SGM Sound 2018-03-04 11:00:32 -05:00
alyosha-tas 88f874f123 Oops missed a savestate variable 2018-03-03 11:01:04 -05:00
alyosha-tas f4aa1269ab Coleco: Initial commits for Super Game Module 2018-03-03 10:55:15 -05:00
alyosha-tas 82d8060fc8 Add mode 1 to ColecoVision 2018-02-25 15:31:03 -05:00
adelikat ebcd237858 Merge branch 'master' into domainedmemoryhooks 2017-10-29 12:38:29 -05:00
alyosha-tas cf9bfbe726 Update ColecoVision.cs 2017-10-25 19:17:00 -04:00
alyosha-tas 9d9133720c Add files via upload 2017-10-13 18:00:08 -04:00
alyosha-tas ce6dcab323 Add files via upload 2017-10-13 17:50:54 -04:00
alyosha-tas 0d8b9c42cc Add reset button to colecovision
Fixes #992
2017-10-06 10:51:40 -04:00
adelikat 04ce66c397 phase 1 of changing memory callback api to specify domain - require cores to specify which domains are available and have the domain passed in when creating callbacks. Still todo - cores need to pass in domain name on CallReads/Writes/Executes methods 2017-08-01 22:05:17 -05:00
adelikat c6e0e9fa57 Rename CoreAttributes to CoreAttribute as to not be a bad person 2017-07-12 14:10:55 -05:00
adelikat c1a746c7d6 Don't expose Colecovision syncSettings, aquire sync settings the intended way instead 2017-05-30 12:37:47 -05:00
adelikat ae8f44096a oops, fix colecovision 2017-05-08 21:07:12 -05:00
adelikat 01eb150b3d ColecoVision - cleanup 2017-05-08 11:37:16 -05:00
adelikat d7928377f2 ColecoVision merge MemoryMap.cs into ColecoVision.cs 2017-05-08 11:31:00 -05:00
adelikat 44ef1f9568 ColecoVision - break off IEmulator properties to their own file, move Input.cs code to ColecoVision.cs 2017-05-08 11:29:09 -05:00
adelikat c33fbfddf4 Colecovision - virtualpad support for new controller options 2017-05-07 10:04:15 -05:00
adelikat 1dae91e6a8 clean up core constructors - consistent parameter casing, and put them at the top of the class 2017-05-05 19:05:36 -05:00