2017-11-29 21:31:53 +00:00
|
|
|
|
using BizHawk.Emulation.Cores.Components.Z80A;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
|
|
|
|
{
|
2017-12-05 10:02:57 +00:00
|
|
|
|
public partial class ZX48 : SpectrumBase
|
2017-11-29 21:31:53 +00:00
|
|
|
|
{
|
|
|
|
|
#region Construction
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Main constructor
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="spectrum"></param>
|
|
|
|
|
/// <param name="cpu"></param>
|
2017-12-07 17:24:30 +00:00
|
|
|
|
public ZX48(ZXSpectrum spectrum, Z80A cpu, ZXSpectrum.BorderType borderType, byte[] file)
|
2017-11-29 21:31:53 +00:00
|
|
|
|
{
|
|
|
|
|
Spectrum = spectrum;
|
|
|
|
|
CPU = cpu;
|
|
|
|
|
|
|
|
|
|
ReInitMemory();
|
2017-12-11 12:54:48 +00:00
|
|
|
|
|
|
|
|
|
ULADevice = new ULA48(this);
|
|
|
|
|
|
2017-12-07 17:24:30 +00:00
|
|
|
|
InitScreenConfig(borderType);
|
2017-11-29 21:31:53 +00:00
|
|
|
|
InitScreen();
|
|
|
|
|
|
|
|
|
|
ResetULACycle();
|
|
|
|
|
|
|
|
|
|
BuzzerDevice = new Buzzer(this);
|
|
|
|
|
BuzzerDevice.Init(44100, UlaFrameCycleCount);
|
|
|
|
|
|
|
|
|
|
KeyboardDevice = new Keyboard48(this);
|
2017-12-01 17:33:56 +00:00
|
|
|
|
KempstonDevice = new KempstonJoystick(this);
|
2017-11-29 21:31:53 +00:00
|
|
|
|
|
|
|
|
|
TapeProvider = new DefaultTapeProvider(file);
|
|
|
|
|
|
|
|
|
|
TapeDevice = new Tape(TapeProvider);
|
|
|
|
|
TapeDevice.Init(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|