First public commit.
This commit is contained in:
parent
2a48f52979
commit
4bac9d83ed
288 changed files with 18417 additions and 1076 deletions
67
lenser/atari/viewer/cart.s
Normal file
67
lenser/atari/viewer/cart.s
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
; lenser -- Atari 16K cartridge loader ($8000-$BFFF).
|
||||
;
|
||||
; Reuses the disk viewer unchanged. The disk viewer "stub" (origin $2000, which
|
||||
; begins with the 6-byte boot header and contains cont + the display list) and
|
||||
; the picture data (origin $4000) are stored back-to-back in the cartridge ROM
|
||||
; after this loader. We copy the stub to $2000 and the data to $4000, then jump
|
||||
; to cont ($2006) -- exactly the state a disk boot would have produced.
|
||||
;
|
||||
; #defines set by viewer/assemble.py --
|
||||
; STUB_PAGES / DATA_PAGES 256-byte page counts to copy
|
||||
; STUB_LEN exact stub length (data follows it in ROM)
|
||||
;
|
||||
; assembled by atari/viewer/assemble.py via xa
|
||||
|
||||
* = $8000
|
||||
|
||||
S = $80
|
||||
D = $82
|
||||
|
||||
entry:
|
||||
; ---- copy the viewer stub to $2000 ----
|
||||
lda #<stubsrc
|
||||
sta S
|
||||
lda #>stubsrc
|
||||
sta S+1
|
||||
lda #$00
|
||||
sta D
|
||||
lda #$20
|
||||
sta D+1
|
||||
ldx #STUB_PAGES
|
||||
ldy #$00
|
||||
sc:
|
||||
lda (S),y
|
||||
sta (D),y
|
||||
iny
|
||||
bne sc
|
||||
inc S+1
|
||||
inc D+1
|
||||
dex
|
||||
bne sc
|
||||
|
||||
; ---- copy the picture data to $4000 ----
|
||||
lda #<datasrc
|
||||
sta S
|
||||
lda #>datasrc
|
||||
sta S+1
|
||||
lda #$00
|
||||
sta D
|
||||
lda #$40
|
||||
sta D+1
|
||||
ldx #DATA_PAGES
|
||||
ldy #$00
|
||||
dc:
|
||||
lda (S),y
|
||||
sta (D),y
|
||||
iny
|
||||
bne dc
|
||||
inc S+1
|
||||
inc D+1
|
||||
dex
|
||||
bne dc
|
||||
|
||||
jmp $2006 ; enter the disk viewer (cont)
|
||||
|
||||
stubsrc:
|
||||
; viewer stub + picture data appended here by the packager
|
||||
datasrc = stubsrc + STUB_LEN
|
||||
Loading…
Add table
Add a link
Reference in a new issue