wire up reset button for tic80 and make biz_time_rm tick post frame
This commit is contained in:
parent
cb3bd6af72
commit
170ea47464
Assets/dll
src/BizHawk.Emulation.Cores/Computers/TIC80
waterbox/tic80
Binary file not shown.
|
@ -117,6 +117,7 @@ namespace BizHawk.Emulation.Cores.Computers.TIC80
|
|||
{
|
||||
public long Time;
|
||||
public bool Crop;
|
||||
public bool Reset;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
|
|
|
@ -111,6 +111,8 @@ namespace BizHawk.Emulation.Cores.Computers.TIC80
|
|||
ret.CategoryLabels[name] = "Keyboard";
|
||||
}
|
||||
|
||||
ret.BoolButtons.Add("Reset");
|
||||
|
||||
return ret.MakeImmutable();
|
||||
}
|
||||
|
||||
|
@ -199,7 +201,8 @@ namespace BizHawk.Emulation.Cores.Computers.TIC80
|
|||
return new LibTIC80.FrameInfo
|
||||
{
|
||||
Time = GetRtcTime(!DeterministicEmulation),
|
||||
Crop = _settings.Crop
|
||||
Crop = _settings.Crop,
|
||||
Reset = controller.IsPressed("Reset"),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ typedef struct
|
|||
FrameInfo b;
|
||||
u64 time;
|
||||
bool crop;
|
||||
bool reset;
|
||||
} MyFrameInfo;
|
||||
|
||||
bool lagged;
|
||||
|
@ -73,9 +74,13 @@ void (*inputcb)() = 0;
|
|||
|
||||
ECL_EXPORT void FrameAdvance(MyFrameInfo* f)
|
||||
{
|
||||
if (f->reset)
|
||||
{
|
||||
tic_api_reset((tic_mem*)tic);
|
||||
}
|
||||
|
||||
lagged = true;
|
||||
biz_time = f->time;
|
||||
biz_clock_rm = (biz_clock_rm + 1) % 60;
|
||||
|
||||
tic80_tick(tic, biz_inputs);
|
||||
tic80_sound(tic);
|
||||
|
@ -111,6 +116,8 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f)
|
|||
f->b.Height = height;
|
||||
|
||||
f->b.Lagged = lagged;
|
||||
|
||||
biz_clock_rm = (biz_clock_rm + 1) % 60;
|
||||
}
|
||||
|
||||
ECL_EXPORT void SetInputCallback(void (*callback)())
|
||||
|
|
Loading…
Reference in New Issue