Code: Select all
/* Intialise RAM contents */
static void initialise_ram(void) {
int loc = 0, val = 0xff;
/* Don't know why, but RAM seems to start in this state: */
while (loc < 0x10000) {
machine_ram[loc++] = val;
machine_ram[loc++] = val;
machine_ram[loc++] = val;
machine_ram[loc++] = val;
if ((loc & 0xff) != 0)
val ^= 0xff;
}
}
Code: Select all
0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0...
EDIT: I do it just like that now, with: https://github.com/jedie/DragonPy/commi ... 286343R186
But i would like to know why is that so?