Started 128K model
This commit is contained in:
@@ -9,8 +9,14 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
public enum MachineModel
|
||||
{
|
||||
Spectrum48K,
|
||||
SpectrumPlus2A
|
||||
}
|
||||
public class SpectrumMachine
|
||||
{
|
||||
public MachineModel CurrentModel { get; private set; } = MachineModel.Spectrum48K;
|
||||
// The Hardware
|
||||
public Z80 Cpu { get; private set; }
|
||||
public MemoryBus Memory { get; private set; }
|
||||
@@ -43,6 +49,15 @@ namespace Core
|
||||
public event Action<double, bool>? OnStatsUpdated; // Passes FPS and TapeLoaded status
|
||||
public event Action<string>? OnMachineCrashed;
|
||||
|
||||
public void SetMachineModel(MachineModel newModel)
|
||||
{
|
||||
if (CurrentModel == newModel) return; // Do nothing if it's the same
|
||||
|
||||
CurrentModel = newModel;
|
||||
|
||||
// Flag the main loop to perform a hard reset on the next frame
|
||||
_pendingReset = true;
|
||||
}
|
||||
public SpectrumMachine(IAudioDevice beeperDevice)
|
||||
{
|
||||
_beeper = beeperDevice;
|
||||
|
||||
Reference in New Issue
Block a user