mirror of
https://github.com/mi57730/a2d.git
synced 2025-03-08 13:30:31 +00:00
Start work on first overlay
This commit is contained in:
parent
194034239d
commit
3f9f64a504
@ -3,7 +3,7 @@ CC65 = ~/dev/cc65/bin
|
||||
CAFLAGS = --target apple2enh --list-bytes 0
|
||||
CCFLAGS = --config asm.cfg
|
||||
|
||||
TARGETS = loader.built mgtk.built desktop.built invoker.built
|
||||
TARGETS = loader.built mgtk.built desktop.built invoker.built ovl1.built
|
||||
|
||||
.PHONY: clean all
|
||||
all: $(TARGETS)
|
||||
|
@ -24,6 +24,7 @@ The file is broken down into multiple segments:
|
||||
* segment 6: main - A$0290-$03EF, L$0160, mark $012E80 (Invoker)
|
||||
* overlays dynamically loaded for these actions:
|
||||
* disk copy - A$0800, L$0200, mark $012FE0
|
||||
* _(there's a $2F00 gap here - TBD)_
|
||||
* format/erase - A$0800, L$1400, mark $0160E0
|
||||
* selector - A$9000, L$1000, mark $0174E0
|
||||
* common - A$5000, L$2000, mark $0184E0 (used by selector, copy, delete)
|
||||
|
125
desktop/ovl1.s
Normal file
125
desktop/ovl1.s
Normal file
@ -0,0 +1,125 @@
|
||||
|
||||
.setcpu "6502"
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/auxmem.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
|
||||
L1800 := $1800
|
||||
MGTK_RELAY := $D000
|
||||
DESKTOP_RELAY := $D040
|
||||
|
||||
;;; ==================================================
|
||||
;;; Overlay for Disk Copy
|
||||
;;; ==================================================
|
||||
|
||||
.org $800
|
||||
|
||||
.proc disk_copy_overlay
|
||||
jmp start
|
||||
|
||||
;;; ==================================================
|
||||
;;; Menu - relocated up ot $D400
|
||||
|
||||
menu_target := $D400
|
||||
|
||||
.proc menu_bar
|
||||
DEFINE_MENU_BAR 1
|
||||
DEFINE_MENU_BAR_ITEM 1, menu_target + (menu_label - menu_bar), menu_target + (menu - menu_bar)
|
||||
|
||||
menu: DEFINE_MENU 1
|
||||
DEFINE_MENU_ITEM menu_target + (item_label - menu_bar)
|
||||
|
||||
menu_label:
|
||||
PASCAL_STRING " Disk copy version 1.1 "
|
||||
item_label:
|
||||
PASCAL_STRING "Rien"
|
||||
.endproc
|
||||
|
||||
;;; ==================================================
|
||||
|
||||
L0842: .byte 3
|
||||
.addr str_desktop2
|
||||
.addr $1C00
|
||||
|
||||
L0847: .byte $00,$02
|
||||
L0849: .byte $00,$E0,$31,$01,$04
|
||||
L084E: .byte $00,$00,$18,$00,$02,$00,$00,$01
|
||||
.byte $00
|
||||
|
||||
str_desktop2:
|
||||
PASCAL_STRING "DeskTop2"
|
||||
|
||||
ptr := $6
|
||||
|
||||
start: lda #$80
|
||||
sta ptr
|
||||
yax_call DESKTOP_RELAY, $6, $0
|
||||
yax_call MGTK_RELAY, MGTK::CloseAll, $0
|
||||
yax_call MGTK_RELAY, MGTK::SetZP1, ptr
|
||||
|
||||
;; Copy menu bar up to language card, and use it.
|
||||
ldx #.sizeof(menu_bar)
|
||||
L0881: lda menu_bar,x
|
||||
sta $D400,x
|
||||
dex
|
||||
bpl L0881
|
||||
yax_call MGTK_RELAY, MGTK::SetMenu, menu_target
|
||||
|
||||
;; Clear most of the system bitmap
|
||||
ldx #BITMAP_SIZE - 3
|
||||
lda #0
|
||||
: sta BITMAP+1,x
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
|
||||
ldy #$C8
|
||||
lda #$42
|
||||
ldx #$08
|
||||
jsr L08D3
|
||||
lda L0847
|
||||
sta L084E
|
||||
sta L0849
|
||||
ldy #$CE
|
||||
lda #$48
|
||||
ldx #$08
|
||||
jsr L08D3
|
||||
ldy #$CA
|
||||
lda #$4D
|
||||
ldx #$08
|
||||
jsr L08D3
|
||||
ldy #$CC
|
||||
lda #$55
|
||||
ldx #$08
|
||||
jsr L08D3
|
||||
sta ALTZPOFF
|
||||
lda $C082
|
||||
jmp L1800
|
||||
|
||||
L08D3: sty L08E7
|
||||
sta L08E8
|
||||
stx L08E9
|
||||
php
|
||||
sei
|
||||
sta ALTZPOFF
|
||||
lda $C082
|
||||
jsr MLI
|
||||
L08E7: brk
|
||||
L08E8: brk
|
||||
L08E9: brk
|
||||
tax
|
||||
sta ALTZPON
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
plp
|
||||
txa
|
||||
L08F6: bne L08F6
|
||||
rts
|
||||
|
||||
PAD_TO $A00
|
||||
.endproc
|
@ -31,7 +31,7 @@ function stats {
|
||||
#do_make clean
|
||||
do_make all
|
||||
|
||||
TARGETS="loader mgtk desktop invoker"
|
||||
TARGETS="loader mgtk desktop invoker ovl1"
|
||||
|
||||
# Verify original and output match
|
||||
echo "Verifying diffs:"
|
||||
|
@ -14,7 +14,7 @@ ROMIN2 := $C082
|
||||
NEWVIDEO := $C029 ; IIgs - new video modes
|
||||
SHADOW := $C035 ; IIgs - inhibit shadowing
|
||||
|
||||
AN3_ON := $C05F ; Le Chat Mauve
|
||||
AN3_ON := $C05F ; AppleColor Adapter Card / Le Chat Mauve
|
||||
AN3_OFF := $C05E
|
||||
HR1_ON := $C0B3
|
||||
HR1_OFF := $C0B2
|
||||
|
Loading…
x
Reference in New Issue
Block a user