mirror of
https://github.com/Pecusx/jataricart.git
synced 2026-05-20 22:33:22 +02:00
a little more flexibility to integrate flasher into other projects
This commit is contained in:
+29
-5
@@ -34,6 +34,13 @@ _DEST equ $A000
|
|||||||
|
|
||||||
; test code
|
; test code
|
||||||
org $2000
|
org $2000
|
||||||
|
FINISH_PROCESS_JMP
|
||||||
|
.print "#define FINISH_PROCESS_JMP 0x",*-$2000+6
|
||||||
|
jmp FINISH_PROCESS
|
||||||
|
MAIN_PROCESS_JMP
|
||||||
|
.print "#define MAIN_PROCESS_JMP 0x",*-$2000+6
|
||||||
|
jmp MAIN_PROCESS
|
||||||
|
.print "#define STARTFLASHWRITE 0x",*-$2000+6
|
||||||
STARTFLASHWRITE
|
STARTFLASHWRITE
|
||||||
mva #$A0 106
|
mva #$A0 106
|
||||||
jsr opened
|
jsr opened
|
||||||
@@ -44,15 +51,18 @@ STARTFLASHWRITE
|
|||||||
sta 66
|
sta 66
|
||||||
; waiting for cart to be inserted
|
; waiting for cart to be inserted
|
||||||
jsr print
|
jsr print
|
||||||
|
.print "#define TITLE 0x",*-$2000+6
|
||||||
TITLE+128
|
TITLE+128
|
||||||
dta $9b,c'JatariCart/MaxFlash flasher'
|
dta $9b,c'JatariCart/MaxFlash flasher'
|
||||||
dta $9b
|
dta $9b
|
||||||
dta c'by JHusak, 10.02.2023'
|
dta c'by JHusak, 10.02.2023'
|
||||||
dta $9b
|
dta $9b
|
||||||
dta c'JatariCart of size '
|
dta c'JatariCart of size '
|
||||||
|
.print "#define CARTSIZE1 0x",*-$2000+6
|
||||||
CARTSIZE+128
|
CARTSIZE+128
|
||||||
dta c' kB needed',$9b,$9b
|
dta c' kB needed',$9b,$9b
|
||||||
dta c'Insert JatariCart of '
|
dta c'Insert JatariCart of '
|
||||||
|
.print "#define CARTSIZE2 0x",*-$2000+6
|
||||||
CARTSIZE+128
|
CARTSIZE+128
|
||||||
dta c' kB...',0
|
dta c' kB...',0
|
||||||
|
|
||||||
@@ -184,7 +194,7 @@ FORMAT
|
|||||||
.endif
|
.endif
|
||||||
printdone jsr print
|
printdone jsr print
|
||||||
dta c'done:)',$9b,0
|
dta c'done:)',$9b,0
|
||||||
rts
|
jmp eraseSRC_FF
|
||||||
|
|
||||||
printformatting
|
printformatting
|
||||||
jsr print
|
jsr print
|
||||||
@@ -281,12 +291,25 @@ dmaon mva #34 dmactls
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
cartoff_and_accept_bank_change
|
cartoff_and_accept_bank_change
|
||||||
sta $d580
|
sta $d5ff
|
||||||
accept_bank_change
|
accept_bank_change
|
||||||
lda $d013
|
lda $d013
|
||||||
sta $3fa
|
sta $3fa
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
eraseSRC_FF
|
||||||
|
mwa #_SOURCE e_csrc
|
||||||
|
lda #$FF
|
||||||
|
e_loop
|
||||||
|
sta e_csrc:$6000 ; src
|
||||||
|
inc e_csrc
|
||||||
|
bne e_loop
|
||||||
|
inc e_csrc+1
|
||||||
|
lda e_csrc+1
|
||||||
|
cmp #>_SOURCE+$20
|
||||||
|
bne e_loop
|
||||||
|
rts
|
||||||
|
|
||||||
VERIFY
|
VERIFY
|
||||||
;mwa #_SOURCE _csrc
|
;mwa #_SOURCE _csrc
|
||||||
;mwa #_DEST _cdst
|
;mwa #_DEST _cdst
|
||||||
@@ -377,7 +400,6 @@ skip pha
|
|||||||
jsr printhex
|
jsr printhex
|
||||||
lda #':'
|
lda #':'
|
||||||
jmp outchar
|
jmp outchar
|
||||||
|
|
||||||
MAIN_PROCESS
|
MAIN_PROCESS
|
||||||
;mva #0 dmactls
|
;mva #0 dmactls
|
||||||
;sta dmactl
|
;sta dmactl
|
||||||
@@ -419,7 +441,8 @@ formatted_next2
|
|||||||
bne formatted_next2
|
bne formatted_next2
|
||||||
jsr flashend
|
jsr flashend
|
||||||
jsr flashlockchip
|
jsr flashlockchip
|
||||||
jmp COMPARE_CRC16_DEST_ALL
|
jsr COMPARE_CRC16_DEST_ALL
|
||||||
|
jmp eraseSRC_FF
|
||||||
|
|
||||||
FINISH_PROCESS
|
FINISH_PROCESS
|
||||||
jsr print
|
jsr print
|
||||||
@@ -478,6 +501,7 @@ GetBankNumToX
|
|||||||
|
|
||||||
org $2e2
|
org $2e2
|
||||||
dta a(STARTFLASHWRITE)
|
dta a(STARTFLASHWRITE)
|
||||||
|
.print "#define END_OF_MAIN_CODE 0x",*-$2000+6
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------
|
; ---------------------------------------
|
||||||
@@ -493,7 +517,7 @@ GetBankNumToX
|
|||||||
BANKS_FILE :1
|
BANKS_FILE :1
|
||||||
;------------
|
;------------
|
||||||
org $2e2
|
org $2e2
|
||||||
dta a(MAIN_PROCESS)
|
dta a(MAIN_PROCESS_JMP)
|
||||||
;------------
|
;------------
|
||||||
.endl
|
.endl
|
||||||
.endr
|
.endr
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
_SOURCE equ $6000
|
||||||
|
BankNum equ $88
|
||||||
|
MAIN_PROCESS_JMP equ $2003
|
||||||
|
|
||||||
|
opt h-
|
||||||
|
org 0
|
||||||
|
;dta a($ffff)
|
||||||
|
;------------
|
||||||
|
dta a(BankNum)
|
||||||
|
dta a(BankNum)
|
||||||
|
.print "#define BLK_BANKNUM 0x",*
|
||||||
|
dta 0
|
||||||
|
;------------
|
||||||
|
dta a(_SOURCE)
|
||||||
|
dta a(_SOURCE+$1fff)
|
||||||
|
.print "#define BLK_SOURCE 0x",*
|
||||||
|
:8192 dta 0
|
||||||
|
;------------
|
||||||
|
dta a($2e2)
|
||||||
|
dta a($2e3)
|
||||||
|
dta a(MAIN_PROCESS_JMP)
|
||||||
|
TEnd
|
||||||
|
;------------
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
.define TITLE dta c'Menu4Car generated'
|
||||||
|
.define CARTSIZE dta c' 1024'
|
||||||
|
.define BANKS 0
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
../makeflashwrite.sh . noprocess | grep "^#define" | sed "s/\\$//" >flashgenerator.h
|
||||||
|
mads bankpart.asx | grep "^#define" | sed "s/\\$//" >>flashgenerator.h
|
||||||
Reference in New Issue
Block a user