Add support for INITAD to the Atari binary format.

This commit is contained in:
Daniel Serpell
2019-02-18 00:24:52 -03:00
parent 417ef278a3
commit b03ae76b54
8 changed files with 108 additions and 7 deletions

View File

@@ -3,10 +3,12 @@ FEATURES {
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
# First memory segment in file, show message
LOADER: file = %O, start = $680, size = 128;
# First memory segment in file, load over COLOR registers:
COLOR: file = %O, start = $2C4, size = 5;
# Second memory segment, load at page 6:
PAGE6: file = %O, start = $600, size = 256;
PAGE6: file = %O, start = $600, size = 128;
# Third memory segment in file, load over SDLST register:
SDLST: file = %O, start = $230, size = 2;
# Main segment, load at "STARTADDRESS"
@@ -16,11 +18,13 @@ FILES {
%O: format = atari;
}
FORMATS {
atari: runad = start;
atari: runad = start,
initad = LOADER: show_load;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
# Place segments in memory areas:
LOADER: load = LOADER, type = rw;
COLOR: load = COLOR, type = rw;
PAGE6: load = PAGE6, type = rw;
SDLST: load = SDLST, type = rw;

View File

@@ -14,8 +14,25 @@
.macpack atari
; Default RUNAD is "start", export that:
.export start
.export start, show_load
; Loader
.segment "LOADER"
show_load:
ldx #0 ; channel 0
lda #<msg_load
sta ICBAL,x ; address
lda #>msg_load
sta ICBAH,x
lda #$FF
sta ICBLL,x ; length
sta ICBLH,x
lda #PUTREC
sta ICCOM,x
jmp CIOV
msg_load:
.byte "Loading....", ATEOL
; We load color values directly into registers
.segment "COLOR"

Binary file not shown.