mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-25 10:30:50 +00:00
DeskTop: More overlay resource identifiers
This commit is contained in:
parent
cab4983514
commit
c837871bfb
@ -25,7 +25,7 @@ clean:
|
||||
rm -f $(OUTDIR)/*.built
|
||||
rm -f $(OUTDIR)/*.sys
|
||||
|
||||
$(OUTDIR)/desktop_res.inc: desktop_res.s desktop_res_builder.s
|
||||
$(OUTDIR)/desktop_res.inc: desktop_res.s desktop_res_builder.s res/build_res_inc.pl
|
||||
$(CC65)/ca65 $(CAFLAGS) --listing $(OUTDIR)/desktop_res.list -o $@ desktop_res_builder.s
|
||||
cat $(OUTDIR)/desktop_res.list | res/build_res_inc.pl > $@
|
||||
|
||||
|
@ -99,15 +99,15 @@ data.
|
||||
|
||||
### "DeskTop" Application
|
||||
|
||||
`desktop.s` which pulls in:
|
||||
`desktop.s` which includes in:
|
||||
* `desktop_aux.s`
|
||||
* `desktop_lc.s` (which pulls in `desktop_res.s`)
|
||||
* `desktop_main.s`
|
||||
|
||||
DeskTop application code is in the lower 48k of both Aux and Main:
|
||||
|
||||
* Aux $851F-$BFFF - sitting above the GUI library
|
||||
* Main $4000-$BEFF
|
||||
* Aux $851F-$BFFF - sitting above the GUI library (`desktop_aux.s`)
|
||||
* Main $4000-$BEFF (`desktop_main.s`)
|
||||
|
||||
...and in the Aux language card area (accessible from both aux and
|
||||
main code) are relays, buffers and resources:
|
||||
@ -118,6 +118,11 @@ main code) are relays, buffers and resources:
|
||||
|
||||
($C000-$CFFF is reserved for I/O, and main $BF page and language card is ProDOS)
|
||||
|
||||
`desktop_res.s` defines these common resources. It is built as part of
|
||||
`desktop.s`. Early in the build process it is also built as part of
|
||||
`desktop_res_build.s` which is processed to produce `out/desktop_res.inc`,
|
||||
which is used by the overlay sources.
|
||||
|
||||
Aux $1B00-$1F7F holds lists of icons, one for the desktop then one for up
|
||||
to 8 windows. First byte is a count, up to 127 icon entries. Icon numbers
|
||||
map indirectly into a table at $ED00 that holds the type, coordinates, etc.
|
||||
|
@ -530,7 +530,27 @@ dialog_label_pos:
|
||||
.endproc
|
||||
|
||||
;; ???
|
||||
.byte $00,$04,$00,$02,$00,$5A,$01,$6C,$00,$05,$00,$03,$00,$59,$01,$6B,$00,$06,$00,$16,$00,$58,$01,$16,$00,$06,$00,$59,$00,$58,$01,$59,$00,$D2,$00,$5C,$00,$36,$01,$67,$00
|
||||
.byte $00
|
||||
|
||||
rect_D6D8:
|
||||
DEFINE_RECT 4,2,346,108
|
||||
rect_D6E0:
|
||||
DEFINE_RECT 5,3,345,107
|
||||
|
||||
;; Line endpoints
|
||||
pos_D6E8:
|
||||
DEFINE_POINT 6,22
|
||||
pos_D6EC:
|
||||
DEFINE_POINT 344,22
|
||||
|
||||
;; Line endpoints
|
||||
pos_D6F0:
|
||||
DEFINE_POINT 6,89
|
||||
pos_D6F4:
|
||||
DEFINE_POINT 344,89
|
||||
|
||||
rect_D6F8:
|
||||
DEFINE_RECT 210,92,310,103
|
||||
|
||||
rect_D700:
|
||||
DEFINE_RECT 40,92,140,103
|
||||
@ -574,8 +594,11 @@ enter_the_full_pathname_label2:
|
||||
|
||||
.byte $00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$06,$00,$17,$00,$58,$01,$57
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00
|
||||
.byte $00,$00
|
||||
|
||||
rect_D888:
|
||||
DEFINE_RECT 0,0,0,0
|
||||
.byte 0
|
||||
|
||||
the_dos_33_disk_label:
|
||||
PASCAL_STRING "the DOS 3.3 disk in slot drive ?"
|
||||
|
@ -364,19 +364,19 @@ L0C0F: lda L0C1E
|
||||
L0C1E: .byte 0
|
||||
L0C1F: .byte 0
|
||||
L0C20: ldy #$27
|
||||
sty $D888
|
||||
sty rect_D888
|
||||
ldy #$00
|
||||
sty $D889
|
||||
sty rect_D888+1
|
||||
tax
|
||||
lsr a
|
||||
lsr a
|
||||
sta L0CA9
|
||||
beq L0C5B
|
||||
add16 $D888, #$0078, $D888
|
||||
add16 rect_D888, #$0078, rect_D888
|
||||
lda L0CA9
|
||||
cmp #$01
|
||||
beq L0C5B
|
||||
add16 $D888, #$0078, $D888
|
||||
add16 rect_D888, #$0078, rect_D888
|
||||
L0C5B: asl L0CA9
|
||||
asl L0CA9
|
||||
txa
|
||||
@ -387,13 +387,13 @@ L0C5B: asl L0CA9
|
||||
asl a
|
||||
clc
|
||||
adc #$2B
|
||||
sta $D88A
|
||||
sta rect_D888+2
|
||||
lda #$00
|
||||
sta $D88B
|
||||
add16 $D888, #$0077, $D88C
|
||||
add16 $D88A, #$0007, $D88E
|
||||
sta rect_D888+3
|
||||
add16 rect_D888, #$0077, rect_D888+4
|
||||
add16 rect_D888+2, #$0007, rect_D888+6
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, $D888
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D888
|
||||
rts
|
||||
|
||||
L0CA9: .byte 0
|
||||
|
@ -419,15 +419,15 @@ L9390: MGTK_RELAY_CALL MGTK::OpenWindow, winfo_entry_picker
|
||||
lda winfo_entry_picker
|
||||
jsr set_port_from_window_id
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, $D6D8
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, $D6E0
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, $D6E8
|
||||
MGTK_RELAY_CALL MGTK::LineTo, $D6EC
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, $D6F0
|
||||
MGTK_RELAY_CALL MGTK::LineTo, $D6F4
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_D6D8
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_D6E0
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, pos_D6E8
|
||||
MGTK_RELAY_CALL MGTK::LineTo, pos_D6EC
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, pos_D6F0
|
||||
MGTK_RELAY_CALL MGTK::LineTo, pos_D6F4
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, $D6F8
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_D6F8
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_D700
|
||||
jsr L94A9
|
||||
jsr L94BA
|
||||
@ -559,7 +559,7 @@ L953F: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
sta screentowindow_window_id
|
||||
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, screentowindow_windowx
|
||||
MGTK_RELAY_CALL MGTK::InRect, $D6F8
|
||||
MGTK_RELAY_CALL MGTK::InRect, rect_D6F8
|
||||
cmp #MGTK::inrect_inside
|
||||
beq L957C
|
||||
lda L95BF
|
||||
@ -571,7 +571,7 @@ L957C: lda L95BF
|
||||
jmp L953F
|
||||
|
||||
L9584: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, $D6F8
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D6F8
|
||||
lda L95BF
|
||||
clc
|
||||
adc #$80
|
||||
@ -583,7 +583,7 @@ L95A2: lda L95BF
|
||||
return #$FF
|
||||
|
||||
L95AA: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, $D6F8
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D6F8
|
||||
return #$00
|
||||
|
||||
L95BF: .byte 0
|
||||
@ -655,11 +655,11 @@ L9683: lda winfo_entry_picker
|
||||
sta screentowindow_window_id
|
||||
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, screentowindow_windowx
|
||||
MGTK_RELAY_CALL MGTK::InRect, $D6F8
|
||||
MGTK_RELAY_CALL MGTK::InRect, rect_D6F8
|
||||
cmp #MGTK::inrect_inside
|
||||
bne L96C8
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, $D6F8
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D6F8
|
||||
jsr L953A
|
||||
bmi L96C7
|
||||
lda #$00
|
||||
@ -829,9 +829,9 @@ L9822: lda event_modifiers
|
||||
: return #$FF
|
||||
|
||||
L985E: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, $D6F8
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D6F8
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, $D6F8
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, rect_D6F8
|
||||
return #$00
|
||||
|
||||
L9885: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
|
@ -246,7 +246,7 @@ L531F: bit L5105
|
||||
beq L5341
|
||||
cmp #MGTK::ctl_vertical_scroll_bar
|
||||
bne L5340
|
||||
lda winfo_entrydlg_file_picker + MGTK::winfo_offset_vscroll
|
||||
lda winfo_entrydlg_file_picker_vscroll
|
||||
and #$01
|
||||
beq L5340
|
||||
jmp L5469
|
||||
@ -378,7 +378,7 @@ L5488: lda #MGTK::ctl_vertical_scroll_bar
|
||||
jsr L606D
|
||||
rts
|
||||
|
||||
L54BA: lda winfo_entrydlg_file_picker + MGTK::winfo_offset_vthumbpos
|
||||
L54BA: lda winfo_entrydlg_file_picker_vthumbpos
|
||||
sec
|
||||
sbc #$09
|
||||
bpl L54C4
|
||||
@ -392,7 +392,7 @@ L54C4: sta updatethumb_thumbpos
|
||||
jsr L606D
|
||||
rts
|
||||
|
||||
L54DF: lda winfo_entrydlg_file_picker + MGTK::winfo_offset_vthumbpos
|
||||
L54DF: lda winfo_entrydlg_file_picker_vthumbpos
|
||||
clc
|
||||
adc #$09
|
||||
cmp $177F
|
||||
@ -408,7 +408,7 @@ L54EF: sta updatethumb_thumbpos
|
||||
jsr L606D
|
||||
rts
|
||||
|
||||
L550A: lda winfo_entrydlg_file_picker + MGTK::winfo_offset_vthumbpos
|
||||
L550A: lda winfo_entrydlg_file_picker_vthumbpos
|
||||
bne L5510
|
||||
rts
|
||||
|
||||
@ -424,8 +424,8 @@ L5510: sec
|
||||
jsr L555F
|
||||
jmp L550A
|
||||
|
||||
L5533: lda winfo_entrydlg_file_picker + MGTK::winfo_offset_vthumbpos
|
||||
cmp winfo_entrydlg_file_picker + MGTK::winfo_offset_vthumbmax
|
||||
L5533: lda winfo_entrydlg_file_picker_vthumbpos
|
||||
cmp winfo_entrydlg_file_picker_vthumbmax
|
||||
bne L553C
|
||||
rts
|
||||
|
||||
@ -1606,7 +1606,7 @@ L6163: sta L61B0
|
||||
rts
|
||||
|
||||
L6181: lda $177F
|
||||
sta winfo_entrydlg_file_picker + MGTK::winfo_offset_vthumbmax
|
||||
sta winfo_entrydlg_file_picker_vthumbmax
|
||||
.assert MGTK::ctl_vertical_scroll_bar = MGTK::activatectl_activate, error, "need to match"
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta activatectl_which_ctl
|
||||
|
@ -25,23 +25,24 @@ while (<STDIN>) {
|
||||
next;
|
||||
}
|
||||
|
||||
next if $proc;
|
||||
|
||||
if ($line =~ m/^(\S+)\s*:=\s*(.*)/) {
|
||||
my ($symbol, $value) = ($1, $2);
|
||||
next if $value =~ m/::/;
|
||||
$value =~ s/\*/\$$addr/; # foo := * + 2
|
||||
$symbol = $proc . '_' . $symbol if $proc;
|
||||
push @equates, [$symbol, $value];
|
||||
next;
|
||||
}
|
||||
|
||||
if ($line =~ m/^(\S+):/) {
|
||||
push @symbols, [$1, $addr];
|
||||
my ($symbol) = ($1);
|
||||
$symbol = $proc . '_' . $symbol if $proc;
|
||||
push @symbols, [$symbol, $addr];
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $pair (@symbols) {
|
||||
printf "%-24s := \$%s\n", @$pair[0], @$pair[1];
|
||||
printf "%-30s := \$%s\n", @$pair[0], @$pair[1];
|
||||
}
|
||||
|
||||
foreach my $pair (@equates) {
|
||||
|
Loading…
Reference in New Issue
Block a user