A strange behavior when the buffer is filled with CopyTo and this is output with SignalGenerator.Write.
The board hangs and only a complete reset with Erase All and so on helps.
When debugging it can be seen that the buffer is filled the same as if I do it with the alternative of transferring every single element …
This is a hobby project to build for a 40 years old Z80 experiment system, which stored the programs on cassette recorder and loaded from it, now so a kind of MemoryTape without changing the system, but the code should not just be sounds, but interpreted to edit them on the PC with a macro assembler.
So, a byte looks and for this your signal generator and SignalCapture are excellent suitable …
Sorry, but I don’t understand you, what you mean with references. ICollection.CopyTo(Array, Int32) Method (System.Collections) | Microsoft Docs
The copied objects, not their pointers, are in a perfect copied state.
This also in a normal console project.
Only with the application of the method Write of SignalGenerator it bangs …
Unfortunately, the effort to transfer objects from an ArrayList is necessary because the method for SignalGenerator.Write only accepts a native array of TimeSpan structures.
It would be better if there is still an overload for the Write method that also accept objects that implement ICollection …
Can you please provide a simple project that we can reproduce?
If datatype are same, values are same then I don’t see why signal generate different value.
We need full example and value with it. Example 1/2 may not happened but 1/3 may.
Strange, because above the values 2500 and 5000 are to be seen, only the deep copy probably does not work.
I had tested the three variants in a simple console project under .NET 6 and all work identically.
Is it then probably a deeper problem of TinyCLR?
Well, I have a workaround with the single copying of the array elements …