-
Notifications
You must be signed in to change notification settings - Fork 1
Partial changelog for ApiHawk
James Groom edited this page Mar 12, 2023
·
62 revisions
2.8 to 2.9 dev (note: changes to ApiHawk in dev builds may not make it into the next release):
- Change return type of
IEmulationApi.GetRegisters
andIMovieApi.GetHeader
fromDictionary
toIReadOnlyDictionary
, and change return type ofIMovie.GetComments
andIMovie.GetSubtitles
fromList
toIReadOnlyList
. commit - Remove useless yield methods from
IEmulationApi
. commit - Merge
IGameInfoApi
intoIEmulationApi
.IGameInfoApi
will remain with a deprecation warning for a while. commit - Deprecate constructors for
ExternalToolApplicability.*
attributes which take aCoreSystem
enum in favour of new overloads which take astring
. commit- You should use the constants in
VSystemID.Raw
, like in the HelloWorld sample (see linked commit), rather than string literals.
- You should use the constants in
- Rename
RomWhitelist
toRomList
. commit - Change return type of
IEmulationApi.Disassemble
to(string, int)
tuple. commit - Change
SocketServer.SendScreenshot
to include the same length prefix in its sent message asSendString
. commit - Add
IUserDataApi.Keys
. commit - Change the return type of
IMemoryApi.ReadByteRange
fromList<byte>
toIReadOnlyList<byte>
, the type of thememoryblock
param ofIMemoryApi.WriteByteRange
fromList<byte>
toIReadOnlyList<byte>
, and the return type ofIMemoryApi.GetMemoryDomainList
fromList<string>
toIReadOnlyCollection<string>
. commit - Change the return type of
IEmuClientApi.LoadState
,IEmuClientApi.OpenRom
,ISaveStateApi.Load
, andISaveStateApi.LoadSlot
fromvoid
tobool
. commit 1, commit 2 - Deprecate IGuiApi.DrawText in favour of new method PixelText (to match Lua). commit
- Change
ApiContainer.MemoryEvents
andApiContainer.MemorySaveState
to returnnull
instead of throwing if the loaded core doesn't support the necessary features. commit
2.7 to 2.8:
- meta: The .NET 6 SDK is now required for working with BizHawk. The VS installer will automatically include this with VS2019 updates.
- Use
int?
inIJoypadApi.SetAnalog
overloads (instead ofobject
) to matchSet
overloads. commit - Add optional
duration
param toIGuiApi.AddMessage
(overrides config for a single call). commit - Add
IInputApi.GetPressedButtons
, deprecatingIInputApi.Get
. commit - Add
IInputApi.GetPressedAxes
. commit - Change return type of
IInputApi.GetMouse
fromDictionary
toIReadOnlyDictionary
. commit
2.6.3 to 2.7:
- Add
IEmuClientApi.GetApproxFramerate
. commit - Encode screenshots as JPEG if file extension is
".jpg"
. commit - Add
VSystemID.Raw
class (to complement theCoreNames
class). You can use it when applying[ExternalToolApplicability.*]
to your tool, or when callingIEmulationApi.GetSystemId
. commit - Replace
Dictionary
/IDictionary
withIReadOnlyDictionary
in these methods' signatures:IGameInfo.GetOptions
,IJoypadApi.Get
,IJoypadApi.GetImmediate
,IJoypadApi.GetWithMovie
,IJoypadApi.Set
,IJoypadApi.SetAnalog
, andIMovieApi.GetInput
. commit - Merged various
IGameInfoApi
methods into a singleIGameInfo? GetGameInfo()
which then has the same properties exposed. commit
2.6.2 to 2.6.3:
- Add
ICommApi.MMF.ReadBytesFromFile
. commit - Allow using most of
ICommApi.MMF
w/o passing--mmf
on the command-line. commit
2.6.1 to 2.6.2:
- Remove methods
IEmuClientApi.GetInput
andIEmuClientApi.SetInput
. If you were using these, you may find a lot of missing types when updating.IInputApi
(host) andIJoypadApi
(virtual), which were the preferred choice, are now the only public APIs for input. commit - Change encoding used by
SocketServer
from ASCII to UTF-8. commit - Add params to
SocketServer.SendString
andSocketServer.ReceiveMessage
for overriding the default encoding. commit - Change
SocketServer.SendString
to prefix the sent message with length, and changeSocketServer.ReceiveMessage
(now renamedReceiveString
) to expect the same. commit- You can still use
SocketServer.SendBytes
to send arbitrary messages, though at that point you might as well ditch the whole wrapper. It's only needed for Lua. -
SocketServer.SendScreenshot
was missed, so it does not prefix the sent message with length, though it does expect the received message to be prefixed.
- You can still use
- Refactor some
abstract
properties inIToolForm
(superinterface ofIExternalToolForm
). commit- This is to make the semantics of "hidden"/"background" tools clearer. If you plan making your tool run in the background, look to the sole example of RAM Watch (in the linked commit).
- If your tool has
EmuHawk.ToolFormBase
as a supertype, no change is required.
2.6 to 2.6.1:
- (no changes)
2.5.2 to 2.6:
- meta: The .NET 5 SDK is now required for working with BizHawk. The VS installer will automatically include this with VS2019 updates.
- Add get-only prop
IToolApi.AvailableTools
of typeIEnumerable<Type>
. commit - Allow disabling frame skip by passing
0
toIEmuClient.FrameSkip
. commit - Remove parameter from internal-use method
IEmuClient.OnRomLoaded
, and remove internal-use methodIEmuClient.UpdateEmulatorAndVP
. commit - Allow ext. tools to have a single prop
ApiContainer? _apiContainer
which is set by EmuHawk, so multiple[RequiredApi]
props can be replaced with one. commit - Change
Type IToolApi.GetTool()
toIToolForm IToolApi.GetTool()
(it now returns the tool instance as expected, instead of the type). commit - Add get-only prop
IMemoryApi.MainMemoryName
of typestring
. As the main memory domain isn't always the first one, using this prop will guarantee using the correct domain (this brings feature-parity with Lua as themainmemory
lib has always done this). commit - Removed
ClientApi
(the static one). Make sure you're using an instance ofIEmuClientApi
! commit - Removed
[BizHawkExternalTool]
and[BizHawkExternalToolUsage]
(previously deprecated in favour of[ExternalTool]
and[ExternalToolApplicability.*]
). commit - Added an enum param to most
IGuiApi
methods, which is the surface on which to draw. Passing this for every draw call is a bit annoying though, so there's also... commit - Added
IGuiApi.WithSurface
, which takes an enum (the surface) and anAction
(put your draw calls in here, leaving the surface as the defaultnull
). commit - Deprecated
IGuiApi.DrawNew
,IGuiApi.DrawFinish
, andIGuiApi.HasGUISurface
. commit
2.5.1 to 2.5.2:
- (no changes)
2.5 to 2.5.1:
- Change signatures of some
IJoypadApi
methods to useIDictionary<,>
instead ofDictionary<,>
. commit - Change signatures of some
IJoypadApi
methods to useint?
instead offloat?
orfloat
. commit
2.4.2 to 2.5:
-
IToolForm
(whichIExternalToolForm
inherits from) was changed so all the update callbacks are now consolidated. This should make it easier to manage once-per-frame processing. commit 1, commit 2 - You can now ship dependencies! A
string[]
parameterLoadAssemblyFiles
was added to[ExternalTool]
, just put the filenames in there. Make sure your users put the extra assemblies in the ext. tool dir alongside your tool before they try loading it. commit - (no commits for these sorry, they're all over the place)
- Rename API types:
-
IComm
⟹ICommApi
-
IEmu
⟹IEmulationApi
-
IGameInfo
⟹IGameInfoApi
-
IGui
⟹IGuiApi
-
IInput
⟹IInputApi
-
IInputMovie
⟹IMovieApi
-
IJoypad
⟹IJoypadApi
-
IMem
⟹IMemoryApi
-
IMemEvents
⟹IMemoryEventsApi
-
IMemorySaveState
⟹IMemorySaveStateApi
-
ISaveState
⟹ISaveStateApi
-
ISql
⟹ISQLiteApi
-
ITool
⟹IToolApi
-
IUserData
⟹IUserDataApi
-
- Replace
ClientApi
withIEmuClientApi
(which is anIExternalApi
; a staticClientApi
is still present to make migration easier). - Remove most of
ICommApi
(fmr.IComm
), and expose the helper classes which were previously used in their implementations. - As usual, a bunch of types were moved around (mostly from
BizHawk.Client.EmuHawk
toBizHawk.Client.Common
). You may have to update yourusing
s or<Reference/>
s.
- Rename API types:
- Add overloads for
IGuiApi.DrawImage
/IGuiApi.DrawImageRegion
(fmr.IGui.DrawImage
/IGui.DrawImageRegion
) that takeImage
s instead of filenames. commit -
IMovieApi.Length
(fmr.IInputMovie.Length
) now returnsint
instead ofdouble
. commit - Remove
IEmuClientApi.UnpauseEmulation
(fmr.ClientApi.UnpauseEmulation
). It was a duplicate ofIEmuClientApi.Unpause
, so use that. commit - Rename
IEmuClientApi.SetExtraPadding
(fmr.ClientApi.SetExtraPadding
) toSetClientExtraPadding
. commit - Remove
IEmuClientApi.CloseEmulatorWithCode
(fmr.ClientApi.CloseEmulatorWithCode
).IEmuClientApi.CloseEmulator
now takes an optional exit code. commit - Remove
IEmuClientApi.RunningSystem
(fmr.ClientApi.RunningSystem
). This probably won't affect anyone, asIEmulationApi.GetSystemId
is more accurate and has been available for a while. commit
2.4 to 2.4.2:
- meta:
BizHawk.Client.EmuHawk
and some other assemblies were updated from .NET Framework 4.6.1 to 4.8; however most are now .NET Standard 2.0 (this is only relevant if your VS installation is older and is missing the new targeting packs) - some ApiHawk types changed namespace to either
BizHawk.Client.Common
orBizHawk.Client.EmuHawk
(theBizHawk.Client.ApiHawk
namespace and assembly was removed entirely): commit 1, commit 2 - attributes are nicer; using a new attribute, IETFs can be called anything: commit 1, commit 2, commit 3
- IETFs can be in any namespace
- return type of
IEmu.PutSettings
was changed frombool
to a flag-type enumPutSettingsDirtyBits
- return types of
IInput.GetMouse
,IInputMovie.GetInput
,IJoypad.Get
,IJoypad.GetImmediate
, andISql.ReadCommand
now useobject
instead ofdynamic
- return type of
IGui.GetPadding
was changed fromPadding
toValueTuple<int, int, int, int>
- some bugs were fixed idk check the commit history