Flasher working
This commit is contained in:
parent
7aaa9e9e18
commit
14c4e9e20e
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,44 @@
|
||||||
|
# Configuration for ProDOS 8 system programs (allowing for 3KB in LC)
|
||||||
|
|
||||||
|
SYMBOLS {
|
||||||
|
__EXEHDR__: type = import;
|
||||||
|
__FILETYPE__: type = weak, value = $00FF; # ProDOS file type
|
||||||
|
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||||
|
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||||
|
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||||
|
}
|
||||||
|
MEMORY {
|
||||||
|
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||||
|
HEADER: file = %O, start = $2000 - $003A, size = $003A;
|
||||||
|
MAIN: file = %O, define = yes, start = $2000, size = $BF00 - $2000;
|
||||||
|
BSS: file = "", start = __ONCE_RUN__, size = $BF00 - __STACKSIZE__ - __ONCE_RUN__;
|
||||||
|
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||||
|
}
|
||||||
|
SEGMENTS {
|
||||||
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||||
|
STARTUP: load = MAIN, type = ro;
|
||||||
|
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||||
|
CODE: load = MAIN, type = ro;
|
||||||
|
RODATA: load = MAIN, type = ro;
|
||||||
|
DATA: load = MAIN, type = rw;
|
||||||
|
INIT: load = MAIN, type = rw;
|
||||||
|
ONCE: load = MAIN, type = ro, define = yes;
|
||||||
|
LC: load = MAIN, run = LC, type = ro, optional = yes;
|
||||||
|
BSS: load = BSS, type = bss, define = yes;
|
||||||
|
}
|
||||||
|
FEATURES {
|
||||||
|
CONDES: type = constructor,
|
||||||
|
label = __CONSTRUCTOR_TABLE__,
|
||||||
|
count = __CONSTRUCTOR_COUNT__,
|
||||||
|
segment = ONCE;
|
||||||
|
CONDES: type = destructor,
|
||||||
|
label = __DESTRUCTOR_TABLE__,
|
||||||
|
count = __DESTRUCTOR_COUNT__,
|
||||||
|
segment = RODATA;
|
||||||
|
CONDES: type = interruptor,
|
||||||
|
label = __INTERRUPTOR_TABLE__,
|
||||||
|
count = __INTERRUPTOR_COUNT__,
|
||||||
|
segment = RODATA,
|
||||||
|
import = __CALLIRQ__;
|
||||||
|
}
|
|
@ -1,3 +1,3 @@
|
||||||
make
|
make
|
||||||
java -jar AppleCommander-1.3.5.jar -d cc65.dsk %~n1
|
java -jar AppleCommander-ac-1.5.0.jar -d flasher.dsk %~n1
|
||||||
java -jar AppleCommander-1.3.5.jar -cc65 cc65.dsk %~n1 bin < %1
|
java -jar AppleCommander-ac-1.5.0.jar -as flasher.dsk %~n1 < %1
|
||||||
|
|
|
@ -23,7 +23,7 @@ LIBS :=
|
||||||
# Custom linker configuration file
|
# Custom linker configuration file
|
||||||
# Use only if you don't want to place it in SRCDIR
|
# Use only if you don't want to place it in SRCDIR
|
||||||
# Default: none
|
# Default: none
|
||||||
CONFIG :=
|
CONFIG := apple2enh-system.cfg
|
||||||
|
|
||||||
# Additional C compiler flags and options.
|
# Additional C compiler flags and options.
|
||||||
# Default: none
|
# Default: none
|
||||||
|
|
|
@ -36,7 +36,7 @@ int main()
|
||||||
uint8* pSlotRom = SLOT_ROM_START;
|
uint8* pSlotRom = SLOT_ROM_START;
|
||||||
uint8* pExtRom = EXT_ROM_START;
|
uint8* pExtRom = EXT_ROM_START;
|
||||||
|
|
||||||
videomode(VIDEOMODE_80COL);
|
videomode(VIDEOMODE_40COL);
|
||||||
clrscr();
|
clrscr();
|
||||||
cprintf("AppleIISd firmware flasher\r\n");
|
cprintf("AppleIISd firmware flasher\r\n");
|
||||||
cprintf("(c) 2019 Florian Reitz\r\n\r\n");
|
cprintf("(c) 2019 Florian Reitz\r\n\r\n");
|
||||||
|
@ -52,6 +52,7 @@ int main()
|
||||||
if((slotNum < 1) || (slotNum > 7))
|
if((slotNum < 1) || (slotNum > 7))
|
||||||
{
|
{
|
||||||
cprintf("\r\nInvalid slot number!");
|
cprintf("\r\nInvalid slot number!");
|
||||||
|
cgetc();
|
||||||
return 1; // failure
|
return 1; // failure
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,6 +111,7 @@ int main()
|
||||||
retval = 1;
|
retval = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cgetc();
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,6 +129,10 @@ boolean writeChip(const uint8* pSource, uint8* pDest, uint16 length)
|
||||||
}
|
}
|
||||||
|
|
||||||
*pDest = data;
|
*pDest = data;
|
||||||
|
|
||||||
|
// use print as writecycle
|
||||||
|
printStatus((i * 100u / length) + 1);
|
||||||
|
|
||||||
if(*pDest != data)
|
if(*pDest != data)
|
||||||
{
|
{
|
||||||
// verification not successful
|
// verification not successful
|
||||||
|
@ -134,7 +140,6 @@ boolean writeChip(const uint8* pSource, uint8* pDest, uint16 length)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
printStatus((i * 100u / length) + 1);
|
|
||||||
pDest++;
|
pDest++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +153,7 @@ void printStatus(uint8 percentage)
|
||||||
uint8 x = wherex();
|
uint8 x = wherex();
|
||||||
char cState = (percentage < 100) ? state_char[state] : ' ';
|
char cState = (percentage < 100) ? state_char[state] : ' ';
|
||||||
|
|
||||||
cprintf("% 2hhu%% %c", percentage, cState);
|
cprintf("% 3hhu%% %c", percentage, cState);
|
||||||
gotox(x);
|
gotox(x);
|
||||||
|
|
||||||
while(wait < 0xff)
|
while(wait < 0xff)
|
||||||
|
|
Loading…
Reference in New Issue