Commit Graph

143 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
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 c66243254c remove unused GameInfo parameter in some core constructors 2020-03-15 10:19:01 -05: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
adelikat ae872d5c4f move Get/Set Register logic from Intellivision to CP1610 2020-02-18 15:45:49 -06:00
YoshiRulz 3afcf416e8
Follow attribute class best practices, cleanup docs on attributes 2020-02-19 03:54:50 +10: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 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
J.D. Purcell fec63fb66a Spaces -> tabs, fix mixed newlines. 2019-11-03 20:58:36 -05: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
nattthebear e8145af463 i hope this breaks something 2018-05-12 12:55:42 -04:00
alyosha-tas 92ec68349c Intellivision: Fix Space Patrol 2018-02-17 16:08:46 -05: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
alyosha-tas a264fa64c2 Intellivision: small STIC clean up 2017-07-23 10:55:17 -04:00
adelikat c6e0e9fa57 Rename CoreAttributes to CoreAttribute as to not be a bad person 2017-07-12 14:10:55 -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
adelikat 59139ab266 Spell out Numerator and Denominator 2017-05-05 11:25:38 -05:00
adelikat 62a13d961d Move VsyncNum and VsyncDen out of CoreComm and into IVideoProvider 2017-05-05 11:21:37 -05:00
adelikat 698c6741ae Refactor IEmulator and remove the IController property, instead pass it as a paramter to the FrameAdvance() method 2017-05-01 20:09:11 -05:00
adelikat ded1c2d7b7 Break off BoardName from IEmulator into a separate IBoardInfo service 2017-04-30 21:01:54 -05:00
adelikat 3192cc70ae slight refactor to IEmulator - make the IController property set only to more clearly express the client -> core relationship 2017-04-26 19:09:00 -05:00
adelikat 7f663a0ed6 misc. cleanup for Coleco and Intellivision 2017-04-24 12:24:56 -05:00
adelikat b488529a7b Intellivision - debugger - fix flags to be boolean 2017-04-23 13:30:57 -05:00
adelikat 8ad021c6fd Intellivision - implement memory callbacks 2017-04-23 13:28:40 -05:00
adelikat 4260ad528b Intellivision - implement the BoardName property 2017-04-23 12:47:26 -05:00
adelikat 71f33e53f5 Intellivision - nitpick - let the controller deck assign Power and Reset 2017-04-23 12:41:11 -05:00
adelikat 4b695e2820 Intellivision - implement IDisassemblable 2017-04-23 12:30:41 -05:00
adelikat d03577ade6 Intellivision - partially implement IDebuggable - flag/register getting and setting, and TotalExecutedCycles 2017-04-23 12:30:41 -05:00
adelikat 30aa86cd7e Intellivision - more cleanup 2017-04-23 11:10:26 -05:00
adelikat 0f36bce22a Intellivision - actually support lag variable setting, and some misc cleanup 2017-04-23 10:53:26 -05:00
J.D. Purcell b53502eed8 Spaces -> tabs. 2017-04-15 16:37:30 -04:00
J.D. Purcell ed3bf0e62b Fix mixed line endings. 2017-04-15 15:53:02 -04:00
adelikat 37c989c661 more misc code cleanups, with some C#6isms 2017-04-10 11:24:53 -05:00
nattthebear 7814c26d9d possibly make intellivision sound worse 2017-04-05 17:24:48 -04:00
alyosha-tas ae27d0ae94 Intellivision add Power/Reset
Also fix Aspect ratio
2017-03-05 18:45:32 -05:00
alyosha-tas c5e2529eb4 Intellivision fix aspect ratio 2017-03-05 17:42:01 -05:00
alyosha-tas 14a0d114b8 Intellivision more sound work 2017-03-01 10:20:37 +08:00
adelikat 61e8b51802 Intellivision - mark the core as released, add alyosha as an author, and add the framerate entry to PlatformFrameRates 2017-02-18 15:01:09 -06:00
alyosha-tas fbfe28ed76 Intellivision implement System Bus memory domain 2017-02-09 12:53:11 -05:00
alyosha-tas 5a5c067a9d Intellivision: finally fix sound
Apparently sound provider really really really didn't want me to give it more samples then it expected.
2017-02-08 20:47:10 -05:00
alyosha-tas 65c5cdc3f5 Intellivision more sound work
Emualtion should be correct now, but it sounds off for the first 1 second after the emualtor starts, or when you pause and unpause it.
Also sounds awful when recording a movie.
Not sure what is happeneing.
2017-02-07 19:59:59 -05:00
alyosha-tas f0ffd4d835 Intellivision: Sound improvements
Sound is still not quite right, after asking on AtariAge it seems I'm not timing it properly.

Still a couple of bugs to work out but this should be closer.
2017-02-07 11:31:05 -05:00
adelikat 35c4df9256 Intellivision - add System Ram and Executive Rom memory domains 2017-02-05 09:50:08 -06:00
alyosha-tas bc92e9cc2b Intellivision STIC improvements 2016-12-28 14:37:49 -05:00