@dj_sharp
what if I told you that you're doing it wrong? Don't use [0..0] arrays. Don't use debugger. Make ur engine more object-oriented; right now it looks much like it's written in C.
This is just a hack, and I know this. Currently I don't use [0..0] arrays for PByteArray type because of "Range Check Error". And because of this I got problem with debugger(I didn't know about this till I switched to 32-bit version of Lazarus and Windows). Why I use PByteArray? Because dynamic arrays suck. Performance is low and so on. About object oriented - I like plain-style, not because I can't use OOP(at work all my code use classes and so on), just it was more fun for me