; ; Text mode character mouse callbacks for the Ataris ; ; Christian Groessler, 03.01.2014 ; ; derived from Apple2 version by ; Oliver Schmidt, 22.09.2005 ; ; All functions in this module should be interrupt safe, because they may ; be called from an interrupt handler ; .export _mouse_txt_callbacks .importzp tmp4 .import mul40,loc_tmp .import mouse_txt_char ; screen code of mouse cursor .include "atari.inc" ; ------------------------------------------------------------------------ .bss backup: .res 1 visible:.res 1 ; ------------------------------------------------------------------------ .segment "EXTZP" : zeropage scrptr: .res 2 ; ------------------------------------------------------------------------ .rodata ; Callback structure _mouse_txt_callbacks: .addr hide .addr show .addr prep .addr draw .addr movex .addr movey ; ------------------------------------------------------------------------ .data ; setcursor getcursor: column: ldy #$00 ; Patched at runtime lda (scrptr),y rts setcursor: column2:ldy #$00 ; Patched at runtime sta (scrptr),y rts ; ------------------------------------------------------------------------ .code done: rts ; Hide the mouse cursor. hide: dec visible prep: jsr getcursor ; Get character at cursor position cmp #