forked from Apple-2-HW/AppleIISd
Flasher working
This commit is contained in:
parent
7aaa9e9e18
commit
14c4e9e20e
BIN
Flasher.bin
Normal file
BIN
Flasher.bin
Normal file
Binary file not shown.
BIN
Flasher.dsk
Normal file
BIN
Flasher.dsk
Normal file
Binary file not shown.
Binary file not shown.
BIN
Software/AppleCommander-ac-1.5.0.jar
Normal file
BIN
Software/AppleCommander-ac-1.5.0.jar
Normal file
Binary file not shown.
44
Software/apple2enh-system.cfg
Normal file
44
Software/apple2enh-system.cfg
Normal file
@ -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
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user