private Program LoadImage(Address addrPreferred, D64FileEntry selectedFile) { byte[] imageBytes = selectedFile.GetBytes(); switch (selectedFile.FileType & FileType.FileTypeMask) { case FileType.PRG: return(LoadPrg(Services, imageBytes)); case FileType.SEQ: return(LoadSeq(Services, addrPreferred, imageBytes)); default: throw new NotImplementedException(); } }
private Program LoadImage(Address addrPreferred, D64FileEntry selectedFile) { byte[] imageBytes = selectedFile.GetBytes(); switch (selectedFile.FileType & FileType.FileTypeMask) { case FileType.PRG: return(LoadPrg(imageBytes)); case FileType.SEQ: var image = new LoadedImage(addrPreferred, imageBytes); var arch = new Mos6502ProcessorArchitecture(); return(new Program( image, image.CreateImageMap(), arch, new DefaultPlatform(Services, arch))); default: throw new NotImplementedException(); } }
private Program LoadImage(Address addrPreferred, D64FileEntry selectedFile) { byte[] imageBytes = selectedFile.GetBytes(); switch (selectedFile.FileType & FileType.FileTypeMask) { case FileType.PRG: return(LoadPrg(imageBytes)); case FileType.SEQ: var mem = new MemoryArea(addrPreferred, imageBytes); var arch = new Mos6502ProcessorArchitecture("mos6502"); return(new Program( new SegmentMap( mem.BaseAddress, new ImageSegment("c64", mem, AccessMode.ReadWriteExecute)), arch, new DefaultPlatform(Services, arch))); default: throw new NotImplementedException(); } }
public C64ImageHeader(D64FileEntry dirEntry) { this.dirEntry = dirEntry; this.PreferredBaseAddress = Address.Ptr16(2048); }
private Program LoadImage(Address addrPreferred, D64FileEntry selectedFile) { byte[] imageBytes = selectedFile.GetBytes(); switch (selectedFile.FileType & FileType.FileTypeMask) { case FileType.PRG: return LoadPrg(imageBytes); case FileType.SEQ: var image = new LoadedImage(addrPreferred, imageBytes); var arch = new Mos6502ProcessorArchitecture(); return new Program( image, image.CreateImageMap(), arch, new DefaultPlatform(Services, arch)); default: throw new NotImplementedException(); } }