Beispiel #1
0
        /// <summary>
        /// Analyzes the result of a ZIF-socket read.
        /// </summary>
        /// <param name="results">The array of results.</param>
        /// <param name="eprom">The eprom.</param>
        /// <param name="address">The address.</param>
        /// <param name="result">
        /// If <see cref="ReadSoundness.SeemsToBeAOkay"/> is returned,
        /// this result can be trusted.
        /// </param>
        /// <returns>The result of the analyzis.</returns>
        public static ReadSoundness AnalyzeEpromReadSoundness(
            ZIFSocket[] results,
            Eprom eprom,
            int address,
            out ZIFSocket result)
        {
            result = null;
            var refLenght  = results.Length;
            var revResults = results.Reverse().ToArray();

            var withCorrectAddresses = revResults.TakeWhile(x => eprom.GetAddress(x) == address).ToArray();

            if (withCorrectAddresses.Length == 0)
            {
                return(ReadSoundness.TryRewrite);
            }
            if (withCorrectAddresses.Length != refLenght)
            {
                return(ReadSoundness.TryReread);
            }

            var refData     = eprom.GetData(revResults[0]);
            var withRefData = revResults.TakeWhile(x => eprom.GetData(x).SequenceEqual(refData)).ToArray();

            if (withRefData.Length != refLenght)
            {
                return(ReadSoundness.TryReread);
            }

            result = revResults[0];
            return(ReadSoundness.SeemsToBeAOkay);
        }
Beispiel #2
0
        /// <summary>
        /// Calculates and writes some statistics about the connected Top Programmer
        /// and the UBS connection.
        /// </summary>
        /// <param name="shouter">The public address instance.</param>
        /// <returns>Exit code. 0 is fine; all other is bad.</returns>
        public static int ProgStat(IShouter shouter)
        {
            using (var td = TopDevice.Create(shouter))
            {
                var writeZif = new ZIFSocket(40);
                writeZif.SetAll(false);
                td.WriteZIF(writeZif, "");
                td.WriteZIF(writeZif, "");
                Stopwatch sw = new Stopwatch();
                sw.Start();
                for (var i = 0; i < 1000; i++)
                {
                    td.WriteZIF(writeZif, "");
                }
                sw.Stop();
                shouter.ShoutLine(0, "Average WriteZif = {0}ms (1000 performed)", (double)sw.ElapsedMilliseconds / 1000);

                sw.Reset();

                sw.Start();
                for (var i = 0; i < 1000; i++)
                {
                    td.ReadZIF("");
                }
                sw.Stop();
                shouter.ShoutLine(0, "Average ReadZif  = {0}ms (1000 performed)", (double)sw.ElapsedMilliseconds / 1000);
            }
            return(0);
        }
Beispiel #3
0
        public static int DevGndPins(Shouter shouter)
        {
            var  onScreen = "n/f = increase pinnumber by 1/10; p/b = decrease pinnumber by 1/10; q = quit!";
            byte p        = 0;
            var  quit     = false;

            while (!quit)
            {
                var tr  = new PinTranslator(40, 40, 0);
                var zif = new ZIFSocket(40);
                zif.SetAll(true);
                using (var td = TopDevice.Create(shouter))
                {
                    td.SetVccLevel(0x2D);
                    td.ApplyGnd(tr.ToZIF, new Pin {
                        Number = 40
                    });
                    td.ApplyVcc(tr.ToZIF, new Pin {
                        Number = 20
                    });
                    td.PullUpsEnable(true);
                    td.WriteZIF(zif, "");
                    Console.WriteLine(onScreen);
                    switch (Console.ReadKey().Key)
                    {
                    case ConsoleKey.N:
                        p++;
                        break;

                    case ConsoleKey.F:
                        p += 10;
                        break;

                    case ConsoleKey.P:
                        p--;
                        break;

                    case ConsoleKey.B:
                        p -= 10;
                        break;

                    case ConsoleKey.Q:
                        quit = true;
                        break;

                    default:
                        Console.WriteLine(onScreen);
                        break;
                    }
                }
            }
            return(0);
        }
Beispiel #4
0
        /// <summary>
        /// For dev.
        /// </summary>
        /// <param name="shouter">The shouter instance.</param>
        /// <returns>Exit code. 0 is fine; all other is bad.</returns>
        public static int Dev(IShouter shouter)
        {
            //var fpgaFile = new FPGAProgram(@"C:\Top\Topwin6\Blib2\ictest.bit");
            //Console.WriteLine(fpgaFile);
            {
                var tr  = new PinTranslator(40, 40, 0);
                var zif = new ZIFSocket(40);
                zif.SetAll(true);
                using (var td = TopDevice.Create(shouter))
                {
                    td.SetVccLevel(5.0);
                    td.SetVppLevel(13.0);
                    td.ApplyGnd(tr.ToZIF, new Pin {
                        Number = 10
                    });
                    td.ApplyVcc(tr.ToZIF, new Pin {
                        Number = 40
                    });
                    td.PullUpsEnable(true);
                    td.WriteZIF(zif, "");
                    Console.ReadLine();
                }
            }

            {
                var tr  = new PinTranslator(40, 40, 0);
                var zif = new ZIFSocket(40);
                zif.SetAll(false);
                using (var td = TopDevice.Create(shouter))
                {
                    td.SetVccLevel(5.0);
                    td.SetVppLevel(21.0);
                    td.ApplyGnd(tr.ToZIF, new Pin {
                        Number = 10
                    });
                    td.ApplyVcc(tr.ToZIF, new Pin {
                        Number = 40
                    });
                    td.PullUpsEnable(true);
                    td.WriteZIF(zif, "");
                    Console.ReadLine();
                }
            }
            //Console.WriteLine("Testing {0} for Erasure }};-P", args[1]);
            //var fileData = Tools.ReadBinaryFile(args[1]).ToArray();

            //if(fileData.Any(b => b != 0xff))
            //  throw new U2PaException("No good }};-(");
            //else Console.WriteLine("File {0} filled with all nice little 0xFF's }};-P", args[1]);

            return(0);
        }
Beispiel #5
0
        /// <summary>
        /// Writes a <see cref="ZIFSocket"/>.
        /// </summary>
        /// <param name="zif">The ZIF to be written.</param>
        /// <param name="packageName">The meassage to shout.</param>
        public virtual void WriteZIF(ZIFSocket zif, string packageName)
        {
            var rawBytes = zif.ToTopBytes();
            var package  = new byte[]
            {
                0x10, rawBytes[0],
                0x11, rawBytes[1],
                0x12, rawBytes[2],
                0x13, rawBytes[3],
                0x14, rawBytes[4],
                0x0A, 0x15, 0xFF
            };

            BulkDevice.SendPackage(5, package, "{0} written to ZIF.", packageName);
        }
Beispiel #6
0
        /// <summary>
        /// A simple SRAM test.
        /// </summary>
        /// <param name="shouter">Public shouter instance.</param>
        /// <param name="sram">The SRAM type.</param>
        /// <param name="progressBar">The progress bar.</param>
        /// <param name="passName">The name of the pass.</param>
        /// <param name="totalNumberOfAdresses">The total number of adresses.</param>
        /// <param name="dataGenerator">A device the generates values for addresses.</param>
        /// <returns>Tuples of non-working addresses: (address, read_byte, expected_byte).</returns>
        public List <Tuple <int, string, string> > SRamTestPass(IShouter shouter, SRam sram, ProgressBar progressBar, string passName, int totalNumberOfAdresses, IDataGenerator dataGenerator)
        {
            progressBar.Shout(passName);
            var translator = sram.GetPinTranslator(ZIFType);

            SetVccLevel(sram.VccLevel);
            ApplyGnd(translator.ToZIF, sram.GndPins);
            ApplyVcc(translator.ToZIF, sram.VccPins);
            PullUpsEnable(true);

            var badCells  = new List <Tuple <int, string, string> >();
            var writerZif = new ZIFSocket(40);

            for (var address = 0; address < totalNumberOfAdresses; address++)
            {
                writerZif.SetAll(true);
                writerZif.Disable(sram.GndPins, translator.ToZIF);
                writerZif.Enable(sram.Constants, translator.ToZIF);
                writerZif.Enable(sram.ChipEnable, translator.ToZIF);
                sram.SetAddress(writerZif, address);
                sram.SetData(writerZif, dataGenerator.GetData(address));

                WriteZIF(writerZif, "");
                writerZif.Enable(sram.WriteEnable, translator.ToZIF);
                WriteZIF(writerZif, "");
                writerZif.Disable(sram.WriteEnable, translator.ToZIF);
                WriteZIF(writerZif, "");

                progressBar.Progress();
            }

            for (var address = 0; address < totalNumberOfAdresses; address++)
            {
                writerZif.SetAll(true);
                writerZif.Disable(sram.GndPins, translator.ToZIF);
                writerZif.Enable(sram.Constants, translator.ToZIF);
                writerZif.Enable(sram.ChipEnable, translator.ToZIF);
                writerZif.Enable(sram.OutputEnable, translator.ToZIF);
                writerZif.Disable(sram.WriteEnable, translator.ToZIF);
                sram.SetAddress(writerZif, address);
                WriteZIF(writerZif, "Writing SRam address.");

                var readerZif    = ReadZIF("Reading SRam data.")[0];
                var dataOutPins  = sram.DataOutPins.Length != 0 ? sram.DataOutPins : sram.DataPins;
                var expectedData = dataGenerator.GetData(address);

                var addressBitCounter = 0;
                foreach (var i in dataOutPins.Select(translator.ToZIF))
                {
                    if (readerZif[i] != expectedData[addressBitCounter++])
                    {
                        addressBitCounter = 0;
                        var expected = "";
                        var read     = "";
                        foreach (var j in dataOutPins.Select(translator.ToZIF))
                        {
                            expected = expected + (expectedData[addressBitCounter++] ? "1" : "0");
                            read     = read + (readerZif[j] ? "1" : "0");
                        }
                        badCells.Add(Tuple.Create(address, read, expected));
                        progressBar.Shout("{0}: Bad cell at address {1}", passName, address.ToString("X4"));
                        break;
                    }
                }
                progressBar.Progress();
            }
            return(badCells);
        }
Beispiel #7
0
        /// <summary>
        /// A simple SRAM test.
        /// </summary>
        /// <param name="shouter">Public shouter instance.</param>
        /// <param name="sram">The SRAM type.</param>
        /// <param name="progressBar">The progress bar.</param>
        /// <param name="totalNumberOfAdresses">The total number of adresses.</param>
        /// <param name="firstBit">The value of the first bit to write to the SRAM.</param>
        /// <returns>Tuples of non-working addresses: (address, read_byte, expected_byte).</returns>
        public List <Tuple <int, string, string> > OldSRamTest(IShouter shouter, SRam sram, ProgressBar progressBar, int totalNumberOfAdresses, bool firstBit)
        {
            var translator = sram.GetPinTranslator(ZIFType);

            SetVccLevel(sram.VccLevel);
            ApplyGnd(translator.ToZIF, sram.GndPins);
            ApplyVcc(translator.ToZIF, sram.VccPins);
            PullUpsEnable(true);

            var badCells  = new List <Tuple <int, string, string> >();
            var writerZif = new ZIFSocket(40);
            var startBit  = firstBit;

            for (var address = 0; address < totalNumberOfAdresses; address++)
            {
                var bit = startBit;
                writerZif.SetAll(true);
                writerZif.Disable(sram.GndPins, translator.ToZIF);
                writerZif.Enable(sram.Constants, translator.ToZIF);
                writerZif.Enable(sram.ChipEnable, translator.ToZIF);
                sram.SetAddress(writerZif, address);
                foreach (var i in sram.DataPins.Select(translator.ToZIF))
                {
                    writerZif[i] = bit;
                    bit          = !bit;
                }
                startBit = !startBit;
                WriteZIF(writerZif, "");

                writerZif.Enable(sram.WriteEnable, translator.ToZIF);
                WriteZIF(writerZif, "");

                writerZif.Disable(sram.WriteEnable, translator.ToZIF);
                WriteZIF(writerZif, "");

                progressBar.Progress();
            }

            startBit = firstBit;
            for (var address = 0; address < totalNumberOfAdresses; address++)
            {
                var bit = startBit;
                writerZif.SetAll(true);
                writerZif.Disable(sram.GndPins, translator.ToZIF);
                writerZif.Enable(sram.Constants, translator.ToZIF);
                writerZif.Enable(sram.ChipEnable, translator.ToZIF);
                writerZif.Enable(sram.OutputEnable, translator.ToZIF);
                writerZif.Disable(sram.WriteEnable, translator.ToZIF);
                sram.SetAddress(writerZif, address);
                WriteZIF(writerZif, "Writing SRam address.");

                var readerZif   = ReadZIF("Reading SRam data.")[0];
                var dataOutPins = sram.DataOutPins.Length != 0 ? sram.DataOutPins : sram.DataPins;
                foreach (var i in dataOutPins.Select(translator.ToZIF))
                {
                    if (readerZif[i] != bit)
                    {
                        var expected = "";
                        var read     = "";
                        bit = startBit;
                        foreach (var j in dataOutPins.Select(translator.ToZIF))
                        {
                            expected = expected + (bit ? "1" : "0");
                            read     = read + (readerZif[j] ? "1" : "0");
                            bit      = !bit;
                        }
                        badCells.Add(Tuple.Create(address, read, expected));
                        progressBar.Shout("Bad cell at address {0}", address.ToString("X4"));
                        break;
                    }
                    bit = !bit;
                }

                startBit = !startBit;
                progressBar.Progress();
            }
            return(badCells);
        }
Beispiel #8
0
        /// <summary>
        /// NOT WORKING YET!
        /// </summary>
        /// <param name="eprom"></param>
        /// <param name="bytes"></param>
        public void WriteEpromFast(Eprom eprom, IList <byte> bytes)
        {
            if (eprom.VppPins.Any(p => eprom.OutputEnable.Any(q => p.Number == q.Number)))
            {
                throw new U2PaException("Fast Programming Algoritm can't by used for this EPROM (yet)");
            }
            var totalNumberOfAdresses = eprom.AddressPins.Length == 0 ? 0 : 1 << eprom.AddressPins.Length;
            var translator            = eprom.GetPinTranslator(ZIFType);

            {
                var zif = new ZIFSocket(ZIFType);
                zif.SetAll(true);
                zif.Disable(eprom.Program, translator.ToZIF);

                WriteZIF(zif, "Apply 1 to all pins");
                SetVccLevel(eprom.VccLevel);
                SetVppLevel(eprom.VppLevel);
                ApplyGnd(translator.ToZIF, eprom.GndPins);
                ApplyVcc(translator.ToZIF, eprom.VccPins);
                ApplyVpp(translator.ToZIF, eprom.VppPins);
            }

            using (var progress = new ProgressBar(Shouter, totalNumberOfAdresses))
            {
                progress.Init();
                foreach (var address in Enumerable.Range(0, totalNumberOfAdresses))
                {
                    var pulse = 1;
                    while (pulse <= 32)
                    {
                        // Writing
                        var writerZif = new ZIFSocket(40);
                        writerZif.SetAll(true);
                        writerZif.Disable(eprom.GndPins, translator.ToZIF);
                        writerZif.Enable(eprom.Constants, translator.ToZIF);
                        writerZif.Disable(eprom.ChipEnable, translator.ToZIF);
                        writerZif.Disable(eprom.OutputEnable, translator.ToZIF);
                        writerZif.Disable(eprom.Program, translator.ToZIF);

                        eprom.SetAddress(writerZif, address);

                        var data = eprom.DataPins.Length > 8
              ? new[] { bytes[2 * address], bytes[2 * address + 1] }
              : new[] { bytes[address] };
                        eprom.SetData(writerZif, data);

                        WriteZIF(writerZif, "Write address & d ata to ZIF");
                        writerZif.Enable(eprom.ChipEnable, translator.ToZIF);
                        writerZif.Enable(eprom.Program, translator.ToZIF);
                        WriteZIF(writerZif, "Start pulse E");
                        writerZif.Disable(eprom.ChipEnable, translator.ToZIF);
                        writerZif.Disable(eprom.Program, translator.ToZIF);
                        BulkDevice.Delay(pulse);
                        WriteZIF(writerZif, "End pulse E");

                        // Reading
                        var addressZif = new ZIFSocket(40);
                        addressZif.SetAll(true);
                        addressZif.Disable(eprom.GndPins, translator.ToZIF);
                        addressZif.Enable(eprom.Constants, translator.ToZIF);
                        addressZif.Enable(eprom.ChipEnable, translator.ToZIF);
                        addressZif.Enable(eprom.OutputEnable, translator.ToZIF);
                        addressZif.Disable(eprom.Program, translator.ToZIF);
                        eprom.SetAddress(addressZif, address);

                        WriteZIF(addressZif, "Write address");
                        var       dataZifs = ReadZIF("Read data");
                        ZIFSocket resultZif;
                        if (Tools.AnalyzeEpromReadSoundness(dataZifs, eprom, address, out resultZif) == ReadSoundness.SeemsToBeAOkay)
                        {
                            if (eprom.GetData(resultZif).SequenceEqual(data))
                            {
                                // Data validates; now we overprogram
                                writerZif.Enable(eprom.ChipEnable, translator.ToZIF);
                                writerZif.Enable(eprom.Program, translator.ToZIF);
                                WriteZIF(writerZif, "Overprogram");
                                BulkDevice.Delay(3 * pulse);
                                writerZif.Disable(eprom.ChipEnable, translator.ToZIF);
                                writerZif.Disable(eprom.Program, translator.ToZIF);
                                WriteZIF(writerZif, "End pulse E");
                                break;
                            }
                            else
                            {
                                Console.WriteLine("Pulse: {0}", pulse);
                                Console.WriteLine("Address: {0}", address.ToString("X4"));
                                Console.WriteLine(eprom.GetData(writerZif).First());
                                Console.WriteLine(eprom.GetData(resultZif).First());
                            }
                        }


                        pulse *= 2;
                    }
                    if (pulse > 32)
                    {
                        progress.Shout("Address {0} doesn't validate! }};-(", address.ToString("X4"));
                    }
                    progress.Progress();
                }
            }
        }
Beispiel #9
0
        /// <summary>
        /// Writes an EPROM using the Classic Algorithm
        /// </summary>
        /// <param name="eprom">The EPROM type.</param>
        /// <param name="bytes">The bytes to write.</param>
        /// <param name="patch">Not used yet!</param>
        public void WriteEpromClassic(Eprom eprom, IList <byte> bytes, IList <int> patch = null)
        {
            var totalNumberOfAdresses = eprom.AddressPins.Length == 0 ? 0 : 1 << eprom.AddressPins.Length;
            var translator            = eprom.GetPinTranslator(ZIFType);

            SetVccLevel(eprom.VccLevel);
            ApplyGnd(translator.ToZIF, eprom.GndPins);
            ApplyVcc(translator.ToZIF, eprom.VccPins);

            var initZif = new ZIFSocket(ZIFType);

            initZif.SetAll(true);
            initZif.Disable(eprom.GndPins, translator.ToZIF);
            initZif.Enable(eprom.Constants, translator.ToZIF);
            initZif.Disable(eprom.ChipEnable, translator.ToZIF);
            initZif.Disable(eprom.OutputEnable, translator.ToZIF);
            initZif.Disable(eprom.Program, translator.ToZIF);
            WriteZIF(initZif, "Apply 1 to all data and address pins");

            SetVppLevel(eprom.VppLevel);
            ApplyVpp(translator.ToZIF, eprom.VppPins);
            PullUpsEnable(true);

            using (var progress = new ProgressBar(Shouter, totalNumberOfAdresses))
            {
                progress.Init();
                foreach (var address in Enumerable.Range(0, totalNumberOfAdresses))
                {
                    //if(patch != null)
                    //{
                    //  if(!patch.Contains(address))
                    //    continue;
                    //  progress.Shout("Now patching address {0}", address);
                    //}

                    var zif = new ZIFSocket(40);

                    // Pull up all pins
                    zif.SetAll(true);

                    zif.Disable(eprom.GndPins, translator.ToZIF);
                    zif.Enable(eprom.Constants, translator.ToZIF);
                    zif.Disable(eprom.Program, translator.ToZIF);
                    zif.Disable(eprom.ChipEnable, translator.ToZIF);
                    zif.Disable(eprom.OutputEnable, translator.ToZIF);

                    // Set address and data
                    eprom.SetAddress(zif, address);
                    var data = eprom.DataPins.Length > 8
            ? new[] { bytes[2 * address], bytes[2 * address + 1] }
            : new[] { bytes[address] };
                    eprom.SetData(zif, data);

                    // Prepare ZIF without programming in order to let it stabilize
                    // TODO: Do we really need to do this?
                    WriteZIF(zif, "Write address & data to ZIF");

                    // In order to let the boost converter for manual Vcc
                    // spin up to full output voltage.
                    if (address == 0 && eprom.InitialProgDelay != 0)
                    {
                        BulkDevice.Delay(eprom.InitialProgDelay);
                    }

                    // Enter programming mode
                    zif.Enable(eprom.Program, translator.ToZIF);
                    zif.Enable(eprom.ChipEnable, translator.ToZIF);
                    WriteZIF(zif, "Start pulse E");

                    // Exit programming mode after at least <pulse> ms
                    zif.Disable(eprom.Program, translator.ToZIF);
                    zif.Disable(eprom.ChipEnable, translator.ToZIF);
                    BulkDevice.Delay(eprom.ProgPulse);
                    WriteZIF(zif, "End pulse E");

                    progress.Progress();
                }
            }
        }
Beispiel #10
0
        /// <summary>
        /// Reads an EPROM.
        /// </summary>
        /// <param name="eprom">The EPROM type.</param>
        /// <param name="progressBar">The progress bar.</param>
        /// <param name="bytes">The list that accumulates the read bytes.</param>
        /// <param name="fromAddress">Start reading this address.</param>
        /// <param name="totalNumberOfAdresses">The total number of adesses.</param>
        /// <returns>The next adress to be read.</returns>
        public int ReadEprom(
            Eprom eprom,
            ProgressBar progressBar,
            IList <byte> bytes,
            int fromAddress,
            int totalNumberOfAdresses)
        {
            const int rewriteCount = 5;
            const int rereadCount  = 5;

            Shouter.ShoutLine(2, "Reading EPROM{0}", eprom.Type);
            SetVccLevel(eprom.VccLevel);
            var translator = eprom.GetPinTranslator(ZIFType);

            ApplyVcc(translator.ToZIF, eprom.VccPins);
            ApplyGnd(translator.ToZIF, eprom.GndPins);
            PullUpsEnable(true);

            var zif           = new ZIFSocket(ZIFType);
            var returnAddress = fromAddress;

            Shouter.ShoutLine(2, "Now reading bytes...");
            progressBar.Init();
            foreach (var address in Enumerable.Range(fromAddress, totalNumberOfAdresses - fromAddress))
            {
                zif.SetAll(true);
                zif.Disable(eprom.GndPins, translator.ToZIF);
                zif.Enable(eprom.Constants, translator.ToZIF);
                zif.Enable(eprom.ChipEnable, translator.ToZIF);
                zif.Enable(eprom.OutputEnable, translator.ToZIF);

                eprom.SetAddress(zif, returnAddress = address);


                ZIFSocket resultZIF = null;
                var       result    = ReadSoundness.TryRewrite;

                for (var i = 0; i < rewriteCount; i++)
                {
                    if (result == ReadSoundness.SeemsToBeAOkay)
                    {
                        break;
                    }

                    if (result == ReadSoundness.TryRewrite)
                    {
                        if (i > 0)
                        {
                            progressBar.Shout("A: {0}; WS: {1}ms", address.ToString("X4"), 100 * i);
                        }
                        WriteZIF(zif, String.Format("A: {0}", address.ToString("X4")));
                        if (i > 0)
                        {
                            Thread.Sleep(100 * i);
                        }
                        result = ReadSoundness.TryReread;
                    }

                    for (var j = 0; j < rereadCount; j++)
                    {
                        if (result != ReadSoundness.TryReread)
                        {
                            break;
                        }

                        if (j > 0)
                        {
                            progressBar.Shout("A: {0}; WS: {1}ms; RS: {2}ms", address.ToString("X4"), 100 * i, 100 * (j * i));
                            Thread.Sleep(100 * (j * i));
                        }
                        var readZifs = ReadZIF(String.Format("for address {0}", address.ToString("X4")));
                        result = Tools.AnalyzeEpromReadSoundness(readZifs, eprom, address, out resultZIF);
                        if (j == rereadCount - 1)
                        {
                            result = ReadSoundness.TryRewrite;
                        }
                        if (result == ReadSoundness.SeemsToBeAOkay && j > 0)
                        {
                            progressBar.Shout("Address: {0} read }};-P", address.ToString("X4"));
                        }
                    }
                }

                if (result != ReadSoundness.SeemsToBeAOkay)
                {
                    return(returnAddress);
                }

                foreach (var b in eprom.GetData(resultZIF))
                {
                    bytes.Add(b);
                }

                progressBar.Progress();
            }
            return(returnAddress + 1);
        }