Пример #1
0
        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();
            }
        }
Пример #2
0
        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();
            }
        }
Пример #3
0
        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();
            }
        }
Пример #4
0
 public C64ImageHeader(D64FileEntry dirEntry)
 {
     this.dirEntry             = dirEntry;
     this.PreferredBaseAddress = Address.Ptr16(2048);
 }
Пример #5
0
 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();
     }
 }
Пример #6
0
 public C64ImageHeader(D64FileEntry dirEntry)
 {
     this.dirEntry = dirEntry;
     this.PreferredBaseAddress = Address.Ptr16(2048);
 }