Appple II - pass DiskII data to the DiskIIController instead of a hard coded path to read from
This commit is contained in:
parent
ae341fc81a
commit
c72fb5e0a5
|
@ -29,7 +29,7 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
|
|||
_diskIIRom = comm.CoreFileProvider.GetFirmware(
|
||||
SystemId, "DiskII", true, "The DiskII firmware is required");
|
||||
|
||||
_machine = new Machine();
|
||||
_machine = new Machine(_diskIIRom);
|
||||
|
||||
var vidService = new BizVideoService(_machine);
|
||||
_soundService = new BizAudioService(_machine);
|
||||
|
|
|
@ -9,10 +9,11 @@ namespace Jellyfish.Virtu
|
|||
{
|
||||
public sealed class DiskIIController : PeripheralCard
|
||||
{
|
||||
public DiskIIController(Machine machine) :
|
||||
public DiskIIController(Machine machine, byte[] diskIIRom) :
|
||||
base(machine)
|
||||
{
|
||||
Drive1 = new DiskIIDrive(machine);
|
||||
_romRegionC1C7 = diskIIRom;
|
||||
Drive1 = new DiskIIDrive(machine);
|
||||
Drive2 = new DiskIIDrive(machine);
|
||||
|
||||
Drives = new Collection<DiskIIDrive> { Drive1, Drive2 };
|
||||
|
@ -20,11 +21,7 @@ namespace Jellyfish.Virtu
|
|||
BootDrive = Drive1;
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
//TODO lol!!
|
||||
StorageService.LoadResource("c:\\apple\\DiskII.rom", stream => stream.ReadBlock(_romRegionC1C7));
|
||||
}
|
||||
public override void Initialize() { }
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
|
|
|
@ -64,9 +64,11 @@ namespace Jellyfish.Virtu
|
|||
|
||||
public sealed class Machine : IDisposable
|
||||
{
|
||||
public Machine()
|
||||
public Machine(byte[] diskIIRom)
|
||||
{
|
||||
Events = new MachineEvents();
|
||||
|
||||
|
||||
Events = new MachineEvents();
|
||||
Services = new MachineServices();
|
||||
|
||||
Cpu = new Cpu(this);
|
||||
|
@ -84,7 +86,7 @@ namespace Jellyfish.Virtu
|
|||
Slot3 = emptySlot;
|
||||
Slot4 = emptySlot;
|
||||
Slot5 = emptySlot;
|
||||
Slot6 = new DiskIIController(this);
|
||||
Slot6 = new DiskIIController(this, diskIIRom);
|
||||
Slot7 = emptySlot;
|
||||
|
||||
Slots = new Collection<PeripheralCard> { null, Slot1, Slot2, Slot3, Slot4, Slot5, Slot6, Slot7 };
|
||||
|
|
Loading…
Reference in New Issue