BizHawk/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128K/ZX128.cs

60 lines
1.4 KiB
C#
Raw Normal View History

2017-12-05 10:02:57 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BizHawk.Emulation.Cores.Components.Z80A;
namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
public partial class ZX128 : SpectrumBase
{
#region Construction
/// <summary>
/// Main constructor
/// </summary>
/// <param name="spectrum"></param>
/// <param name="cpu"></param>
public ZX128(ZXSpectrum spectrum, Z80A cpu, byte[] file)
{
Spectrum = spectrum;
CPU = cpu;
ROMPaged = false;
SHADOWPaged = false;
RAMPaged = 0;
PagingDisabled = false;
// init addressable memory from ROM and RAM banks
ReInitMemory();
//RAM = new byte[0x4000 + 0xC000];
//DisplayLineTime = 132;
VsyncNumerator = 3546900;
InitScreenConfig();
InitScreen();
ResetULACycle();
BuzzerDevice = new Buzzer(this);
BuzzerDevice.Init(44100, UlaFrameCycleCount);
AYDevice = new AYSound();
2017-12-05 10:02:57 +00:00
KeyboardDevice = new Keyboard48(this);
KempstonDevice = new KempstonJoystick(this);
TapeProvider = new DefaultTapeProvider(file);
TapeDevice = new Tape(TapeProvider);
TapeDevice.Init(this);
}
#endregion
}
}