MGTK: Cursor/events/initialization. ($16004..$166DE)

This commit is contained in:
eric-ja 2018-04-01 11:27:39 -05:00 committed by Joshua Bell
parent f4139c08b5
commit c1c3171f46
5 changed files with 908 additions and 553 deletions

View File

@ -5,7 +5,9 @@ FEATURES {
}
MEMORY {
MAIN: file = %O, define = yes, start = %S, size = $20000; # 128k; custom loader handles details
BSS: file = "", start = $0000, size = $10000;
}
SEGMENTS {
CODE: load = MAIN, type = rw;
BSS: load = BSS, type = bss;
}

File diff suppressed because it is too large Load Diff

View File

@ -40,6 +40,7 @@ HR3_OFF := $C0B6
;;; Monitor
INIT := $FB2F
VERSION := $FBB3
BELL1 := $FBDD
VTAB := $FC22
VTABZ := $FC24
@ -50,6 +51,8 @@ SETKBD := $FE89
SETVID := $FE93
MONZ := $FF69
F8VERSION := $06
;;; Miscellaneous
IRQ_VECTOR := $3FE

View File

@ -420,3 +420,35 @@
inc arg+1
skip:
.endmacro
;;; Helper macros to set up a scoped block of parameters at a pre-determined
;;; address.
;;;
;;; Note: to use this macro, your cfg must have a BSS segment:
;;; (BSS: load = BSS, type = bss)
;;;
;;; Example:
;;; .proc my_function
;;; PARAM_BLOCK params, $82
;;; arg1: .res 1
;;; arg2: .res 2
;;; arg3: .res 2
;;; END_PARAM_BLOCK
;;;
;;; lda params::arg1 ; equiv. to lda $82
;;; lda params::arg2 ; equiv. to lda $83
;;; lda params::arg3 ; equiv. to lda $85
;;;
.macro PARAM_BLOCK name, addr
.scope name
.pushseg
.bss
.feature org_per_seg
.org addr
start:
.endmacro
.macro END_PARAM_BLOCK
.popseg
.endscope
.endmacro

View File

@ -607,6 +607,21 @@ winfo_offset_port := 20
winfo_offset_nextwinfo := 56
winfo_size := 58
short_event_size := 4 ; events that don't have mouse coordinates
event_size := 5 ; any kind of event
cursor_height := 12
cursor_width := 2
cursor_offset_mask := cursor_width * cursor_height
cursor_offset_hotspot := 2 * cursor_width * cursor_height
cursor_size := cursor_offset_hotspot + 2
font_offset_fonttype := 0
font_offset_lastchar := 1
font_offset_height := 2
font_offset_charwidth := 3
;;; Errors
@ -614,10 +629,14 @@ error_empty_object := $81
error_bad_object := $82
error_font_too_big := $83
error_invalid_op_sys := $90
error_no_mouse := $92
error_invalid_irq_setting := $93
error_invalid_hook := $94
error_desktop_not_initialized := $95
error_irq_in_use := $97
error_invalid_event := $98
error_event_buffer_full := $99
error_window_already_exists := $9D
error_window_id_required := $9E
error_window_not_found := $9F