Closed stefan-b-jakobsson closed 1 year ago
(Sorry for the coding style nitpicks. I try to keep the code very consistent.)
I tried to handle your comments in b6bb6c8. I think randomized RAM is useful, as it will tell you more realistically if a program will fly on the real thing. But I now put it behind the option "-randram". Besides code formatting, I made changes so that these debug options do not have a performance impact when not selected. The commit ae453bb disables the debug message "buffer full...". It was originally disabled in R35, but I managed to have it return in the code you merged during the weekend. It is way too noisy, and should be removed.
About code formatting. I have no problem with strict formatting rules - I like that code looks consistent. I must improve my skills, but it's hard to learn old dogs new tricks (or to format code differently than what they are used to) :-)
This PR is to improve debugging in two ways that are somewhat linked to each other.
Currently, all RAM is initialized to zero in the emulator. This is not the case on real hardware, where you must not rely on the values of uninitialized RAM.
From experience, it's easy to write code by mistake that needs some part of RAM being initialized to zero when you use the current emulator.
To make this kind of bug easier to find, I propose the following changes: