Commit Graph

160 Commits

Author SHA1 Message Date
adelikat 099bee6bf5 fix off by one error in BulkReadByte fixes #1944 2020-04-24 13:51:59 -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 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
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
adelikat c985dfa96d fix hex editor scrolling 2020-03-20 21:08:52 -05:00
adelikat 0a33940704 remove CoreComm from IEmulator, and remove it from NullEmulator 2020-03-15 08:54:56 -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
feos 9dd9b4cc0d
Bulkread (#1834)
* POC of a memory domain bulk read concept, wired up to hex editor, very sloppy currently

* do the todo

* delegates for bulkreads

* refactor bulk reads to take in a range and a pre-allocated array for the values

Co-authored-by: adelikat <adelikat@tasvideos.org>
2020-03-11 10:53:42 -05:00
adelikat 630858cbd4 misc cleanups in Emulation.Common 2020-03-01 14:39:24 -06:00
adelikat 13bc770063 misc cleanups in Emulation.Common 2020-02-26 16:32:00 -06:00
adelikat 2c9d8bba40 cleanup DSKIDentifier.cs, misc cleanups in Emulation.Common 2020-02-26 15:51:29 -06:00
YoshiRulz 3afcf416e8
Follow attribute class best practices, cleanup docs on attributes 2020-02-19 03:54:50 +10: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 656f2b814e Move IEmulator extensions to the Emulation.Common namespace, the intent is that these are used and serve as built in functionality, so it's overly tedious to when most situations require both Common and an additional extensions namespace 2020-02-15 12:33:15 -06:00
adelikat 063e3b2a13 revert foreach loop in MemoryCallbackSystem - see #1823 2020-02-01 14:53:03 -06:00
adelikat 6e5a3910de ControllerDefinition - auto-initialize properties 2020-01-19 13:32:43 -06:00
YoshiRulz 7932c401e1
Improve exception docs in BizHawk.Emulation.Common 2020-01-02 21:51:21 +10:00
adelikat 18fbd9af1c MessageConfig - don't use Global.Emulator 2019-12-21 14:58:33 -06:00
adelikat 71aaf349b5 Fix GPGX one off hack to fix trace logger, and instead do a less bad hack in CallbackBasedTraceBuffer 2019-12-15 12:13:10 -06:00
warmCabin baca4e2af8
allow onmemoryexecute to have null address 2019-12-10 23:02:18 -05:00
adelikat 7d8522e0b3 Remove snowy null emulator option and simplify Null Emulator 2019-12-06 18:42:00 -06:00
adelikat 45a777c983 Simplifications and cleanups in Emulation.Common 2019-11-08 09:48:53 -06:00
adelikat 40ac534f51 Memory callback system - simplify and remove now unused methods 2019-11-05 20:02:45 -06:00
adelikat 2b7cb1bb7d BizHawk.Emulation.Common - cleanups -> C#6/7isms, fix some typos, variable naming, spaces to tabs 2019-10-29 13:59:08 -05:00
zeromus 1258b2fa81 optimize CallMemoryCallbacks 2019-06-14 09:19:06 -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 779975f689
Use nameof 2019-03-28 14:17:14 +11:00
Brian Armstrong fe3455be7d call with value, not 0 2019-01-24 03:25:50 -08: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 8a27fe9c56 fix copypaste error 2018-10-24 20:03:20 +03:00
gifvex f48a795090 MemoryCallbackSystem: fix #1159 2018-04-02 18:19:40 -04:00
zeromus b868c07a10 blind commit: add SMP hooks to bsnes to test hook scoping system (need to build a waterbox to proceed) 2017-08-23 10:08:43 -04:00
adelikat 56859e9581 MemoryCallbacks - Change "domain" to "scope" 2017-08-03 20:03:40 -05:00
adelikat cd289c474e memorycallbacks with domains - Phase 2 - change api to Call methods and refactor accordingly, everything should behave as it was before the refactor at this point. No cores have yet to be implemented with domains other than the default bus they already had 2017-08-03 18:08:07 -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
zeromus 89e87bc4e3 fix crash in axis constraints application when not connecting any n64 controllers (fixes #946) 2017-07-29 13:57:50 -05:00
adelikat c6e0e9fa57 Rename CoreAttributes to CoreAttribute as to not be a bad person 2017-07-12 14:10:55 -05:00
nattthebear cf608bfca9 playernumber stuff: This is all medium whack 2017-06-11 10:49:22 -04:00
nattthebear 7f2e06b0b5 clean things up and make gpgx fully (?) multi-instance correct 2017-05-28 13:46:08 -04:00
nattthebear 7d0330bb9e snes9x - cleanup usage of the IMonitor semantics. This makes memory domains slower. 2017-05-28 13:12:48 -04: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 34d1e4fe57 NullEmulator - add a ServiceNotApplicable decoration 2017-05-05 09:54:46 -05:00
adelikat a0956f39cc meh 2017-05-05 09:52:19 -05:00
adelikat 5eec274b5d some refactoring of NullVideo/NullEmulator - maybe this is better code, maybe not 2017-05-05 09:51:00 -05:00