diff --git a/Flasher.bin b/Flasher.bin new file mode 100644 index 0000000..6b5fcb9 Binary files /dev/null and b/Flasher.bin differ diff --git a/Flasher.dsk b/Flasher.dsk new file mode 100644 index 0000000..17081ad Binary files /dev/null and b/Flasher.dsk differ diff --git a/Software/AppleCommander-1.3.5.jar b/Software/AppleCommander-1.3.5.jar deleted file mode 100644 index f74e7cb..0000000 Binary files a/Software/AppleCommander-1.3.5.jar and /dev/null differ diff --git a/Software/AppleCommander-ac-1.5.0.jar b/Software/AppleCommander-ac-1.5.0.jar new file mode 100644 index 0000000..a708fd5 Binary files /dev/null and b/Software/AppleCommander-ac-1.5.0.jar differ diff --git a/Software/apple2enh-system.cfg b/Software/apple2enh-system.cfg new file mode 100644 index 0000000..0170feb --- /dev/null +++ b/Software/apple2enh-system.cfg @@ -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__; +} diff --git a/Software/make_image.bat b/Software/make_image.bat index 6a4903a..6424d15 100644 --- a/Software/make_image.bat +++ b/Software/make_image.bat @@ -1,3 +1,3 @@ make -java -jar AppleCommander-1.3.5.jar -d cc65.dsk %~n1 -java -jar AppleCommander-1.3.5.jar -cc65 cc65.dsk %~n1 bin < %1 +java -jar AppleCommander-ac-1.5.0.jar -d flasher.dsk %~n1 +java -jar AppleCommander-ac-1.5.0.jar -as flasher.dsk %~n1 < %1 diff --git a/Software/makefile b/Software/makefile index d4887d5..7ebddf6 100644 --- a/Software/makefile +++ b/Software/makefile @@ -23,7 +23,7 @@ LIBS := # Custom linker configuration file # Use only if you don't want to place it in SRCDIR # Default: none -CONFIG := +CONFIG := apple2enh-system.cfg # Additional C compiler flags and options. # Default: none diff --git a/Software/src/Flasher.c b/Software/src/Flasher.c index 62197b2..8db7569 100644 --- a/Software/src/Flasher.c +++ b/Software/src/Flasher.c @@ -36,7 +36,7 @@ int main() uint8* pSlotRom = SLOT_ROM_START; uint8* pExtRom = EXT_ROM_START; - videomode(VIDEOMODE_80COL); + videomode(VIDEOMODE_40COL); clrscr(); cprintf("AppleIISd firmware flasher\r\n"); cprintf("(c) 2019 Florian Reitz\r\n\r\n"); @@ -52,6 +52,7 @@ int main() if((slotNum < 1) || (slotNum > 7)) { cprintf("\r\nInvalid slot number!"); + cgetc(); return 1; // failure } @@ -110,6 +111,7 @@ int main() retval = 1; } + cgetc(); return retval; } @@ -127,6 +129,10 @@ boolean writeChip(const uint8* pSource, uint8* pDest, uint16 length) } *pDest = data; + + // use print as writecycle + printStatus((i * 100u / length) + 1); + if(*pDest != data) { // verification not successful @@ -134,7 +140,6 @@ boolean writeChip(const uint8* pSource, uint8* pDest, uint16 length) return FALSE; } - printStatus((i * 100u / length) + 1); pDest++; } @@ -148,7 +153,7 @@ void printStatus(uint8 percentage) uint8 x = wherex(); char cState = (percentage < 100) ? state_char[state] : ' '; - cprintf("% 2hhu%% %c", percentage, cState); + cprintf("% 3hhu%% %c", percentage, cState); gotox(x); while(wait < 0xff)