2002-03-08 16:49:31 +00:00
|
|
|
;
|
|
|
|
; Maciej 'YTM/Elysium' Witkowiak
|
|
|
|
;
|
|
|
|
; Screen size variables
|
|
|
|
;
|
2003-04-17 11:45:53 +00:00
|
|
|
; 6.3.2001, 17.4.2003
|
2002-03-08 16:49:31 +00:00
|
|
|
|
2005-02-26 09:28:46 +00:00
|
|
|
|
2012-02-08 15:23:45 +00:00
|
|
|
.export xsize, ysize
|
|
|
|
.export screensize
|
2012-02-08 17:01:59 +00:00
|
|
|
.importzp cursor_r, cursor_c
|
2012-02-08 15:23:45 +00:00
|
|
|
.import _cursor
|
|
|
|
.constructor initscrsize
|
|
|
|
|
|
|
|
.include "geossym.inc"
|
2002-03-08 16:49:31 +00:00
|
|
|
|
2012-02-08 15:23:45 +00:00
|
|
|
.segment "INIT"
|
2002-03-08 16:49:31 +00:00
|
|
|
|
|
|
|
initscrsize:
|
2012-02-22 22:59:38 +00:00
|
|
|
.ifdef __GEOS_CBM__
|
2012-02-08 15:23:45 +00:00
|
|
|
lda graphMode
|
|
|
|
bpl L1
|
|
|
|
lda #80 ; 80 columns (more or less)
|
|
|
|
.byte $2c
|
|
|
|
L1: lda #40 ; 40 columns (more or less)
|
|
|
|
sta xsize
|
|
|
|
lda #24 ; something like that for Y size
|
2012-02-07 13:42:27 +00:00
|
|
|
.else
|
2012-02-08 15:23:45 +00:00
|
|
|
lda #70 ; 70 columns (more or less)
|
|
|
|
sta xsize
|
|
|
|
lda #23 ; something like that for Y size
|
2012-02-07 13:42:27 +00:00
|
|
|
.endif
|
2012-02-08 15:23:45 +00:00
|
|
|
sta ysize
|
|
|
|
ldx #1
|
|
|
|
stx cursor_r
|
|
|
|
dex
|
|
|
|
stx cursor_c
|
|
|
|
txa
|
|
|
|
jmp _cursor ; home and update cursor
|
|
|
|
|
2012-02-09 10:40:59 +00:00
|
|
|
.code
|
|
|
|
|
2012-02-08 15:23:45 +00:00
|
|
|
screensize:
|
|
|
|
ldx xsize
|
|
|
|
ldy ysize
|
2003-04-17 11:45:53 +00:00
|
|
|
rts
|
|
|
|
|
2002-03-08 16:49:31 +00:00
|
|
|
.bss
|
|
|
|
|
2012-02-08 15:23:45 +00:00
|
|
|
xsize:
|
|
|
|
.res 1
|
|
|
|
ysize:
|
|
|
|
.res 1
|