Revision 1448
Added by markw about 1 year ago
| atari_chips/pokeyv2/pokeycfg.c | ||
|---|---|---|
|
//fseek(input,0,SEEK_SET);
|
||
|
fclose(input);
|
||
|
input = fopen(filename,"r");
|
||
|
writeProtect(0);
|
||
|
|
||
|
cprintf("Erasing");
|
||
|
writeProtect(0);
|
||
|
eraseSector(1);
|
||
|
cputc('.');
|
||
|
writeProtect(0);
|
||
|
eraseSector(2);
|
||
|
cputc('.');
|
||
|
writeProtect(0);
|
||
|
eraseSector(3);
|
||
|
cputc('.');
|
||
|
writeProtect(0);
|
||
|
eraseSector(4);
|
||
|
cprintf(" Done\r\n");
|
||
|
|
||
| ... | ... | |
|
j = config[4];
|
||
|
config[4] = 4;
|
||
|
cprintf("Flashing M%c%c... please wait",config[4],j);
|
||
|
writeProtect(0);
|
||
|
{
|
||
|
unsigned long addr;
|
||
|
unsigned long maxaddr;
|
||
| ... | ... | |
|
cprintf("Press key then START AGAIN!\r\n");
|
||
|
fclose(input);
|
||
|
|
||
|
writeProtect(1);
|
||
|
while(!kbhit());
|
||
|
return;
|
||
|
}
|
||
For some reason the M16 core turns write protect on after erasing some sectors. Guess: Perhaps some sectors do not exist on some device and in error case it protects itself?