+# -*- make -*-
#
# Makefile for GEOS lib
# for cc65
#
-#
%.o: %.s
- @$(AS) -o $@ $(AFLAGS) $<
+ @$(AS) -g -o $@ $(AFLAGS) $<
%.emd: %.o ../../runtime/zeropage.o
@$(LD) -o $@ -t module $^
%.joy: %.o ../../runtime/zeropage.o
@$(LD) -o $@ -t module $^
+%.mou: %.o ../../runtime/zeropage.o
+ @$(LD) -o $@ -t module $^
+
+%.ser: %.o ../../runtime/zeropage.o
+ @$(LD) -o $@ -t module $^
+
%.tgi: %.o ../../runtime/zeropage.o
@$(LD) -o $@ -t module $^
fio_module.o \
joy_stddrv.o \
mainargs.o \
+ mcbdefault.o \
+ mouse_stddrv.o \
oserror.o \
oserrlist.o \
randomize.o \
+ tgi_colors.o \
tgi_mode_table.o
#--------------------------------------------------------------------------
JOYS = geos-stdjoy.joy
+MOUS = #geos-stdmou.mou
+
+SERS =
+
TGIS = geos-tgi.tgi
-all: $(S_OBJS) $(EMDS) $(JOYS) $(TGIS)
+all: $(S_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
+
+../../runtime/zeropage.o:
+ $(MAKE) -C $(dir $@) $(notdir $@)
clean:
- @$(RM) *.~ core $(S_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o)
+ @$(RM) *.~ core $(S_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
;
-; Graphics driver for the 320x200x2 or 640x200x2 mode on GEOS 64/128
-; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl>
-; 28-31.12.2002
+; Graphics driver for the 320x200x2 and 640x200x2 modes on GEOS 64/128
+; 2010-08-17, Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl>
+; 2010-08-18, Greg King
.include "zeropage.inc"
; ------------------------------------------------------------------------
; Constants
-VDC_ADDR_REG = $D600 ; VDC address
-VDC_DATA_REG = $D601 ; VDC data
+VDC_ADDR_REG := $D600 ; VDC address
+VDC_DATA_REG := $D601 ; VDC data
VDC_DSP_HI = 12 ; registers used
VDC_DSP_LO = 13
.segment "JUMPTABLE"
-; First part of the header is a structure that has a magic and defines the
-; capabilities of the driver
+; First part of the header is a structure that has a magic signature,
+; and defines the capabilities of the driver.
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
pages: .byte 1 ; Number of screens available
.byte 8 ; System font X size
.byte 8 ; System font Y size
- .res 4, $00 ; Reserved for future extensions
-
-; Next comes the jump table. Currently all entries must be valid and may point
-; to an RTS for test versions (function not implemented).
-
- .word INSTALL
- .word UNINSTALL
- .word INIT
- .word DONE
- .word GETERROR
- .word CONTROL
- .word CLEAR
- .word SETVIEWPAGE
- .word SETDRAWPAGE
- .word SETCOLOR
- .word SETPALETTE
- .word GETPALETTE
- .word GETDEFPALETTE
- .word SETPIXEL
- .word GETPIXEL
- .word LINE
- .word BAR
- .word TEXTSTYLE
- .word OUTTEXT
- .word 0 ; IRQ entry is unused
+ .word $100 ; Aspect ratio: 1.0
+
+; Next comes the jump table. With the exception of IRQ, all entries must be
+; valid, and may point to an RTS for test versions (function not implemented).
+
+ .addr INSTALL
+ .addr UNINSTALL
+ .addr INIT
+ .addr DONE
+ .addr GETERROR
+ .addr CONTROL
+ .addr CLEAR
+ .addr SETVIEWPAGE
+ .addr SETDRAWPAGE
+ .addr SETCOLOR
+ .addr SETPALETTE
+ .addr GETPALETTE
+ .addr GETDEFPALETTE
+ .addr SETPIXEL
+ .addr GETPIXEL
+ .addr LINE
+ .addr BAR
+ .addr TEXTSTYLE
+ .addr OUTTEXT
+ .addr 0 ; IRQ entry is unused
; ------------------------------------------------------------------------
; Data.
-; Variables mapped to the zero page segment variables. Some of these are
+; Variables mapped to the zero-page segment variables. Some of these are
; used for passing parameters to the driver.
X1 = ptr1
OLDCOLOR: .res 1 ; colors before entering gfx mode
-; Line routine stuff
-
-OGora: .res 2
-OUkos: .res 2
-Y3: .res 2
-
; Text output stuff
TEXTMAGX: .res 1
TEXTMAGY: .res 1
--- /dev/null
+;
+; Mouse callbacks for GEOS.
+;
+; GEOS has a built-in mouse architecture. Half of this file does nothing
+; -- it exists merely to allow portable programs to link and run.
+;
+; 2.7.2001, Maciej 'YTM/Elysium' Witkowiak
+; 2004-03-20, Ullrich von Bassewitz
+; 2004-09-24, Greg King
+;
+
+; .constructor init_pointer
+ .export _mouse_def_callbacks
+
+; .include "mouse-kernel.inc"
+; .include "../inc/const.inc"
+; .include "../inc/geossym.inc"
+ .include "../inc/jumptab.inc"
+
+; .macpack generic
+
+; The functions below must be interrupt-safe,
+; because they might be called from an interrupt-handler.
+
+.code
+
+; --------------------------------------------------------------------------
+; Hide the mouse pointer. Always called with interrupts disabled.
+
+hide := MouseOff
+
+; --------------------------------------------------------------------------
+; Show the mouse pointer. Always called with interrupts disabled.
+
+show := MouseUp
+
+; --------------------------------------------------------------------------
+; Move the mouse pointer X position to the value in .XA. Always called with
+; interrupts disabled.
+
+.proc movex
+
+ rts
+
+.endproc
+
+; --------------------------------------------------------------------------
+; Move the mouse pointer Y position to the value in .XA. Always called with
+; interrupts disabled.
+
+.proc movey
+
+ rts
+
+.endproc
+
+; --------------------------------------------------------------------------
+; Callback structure
+
+.rodata
+
+_mouse_def_callbacks:
+ .addr hide
+ .addr show
+ .addr movex
+ .addr movey
+
+
--- /dev/null
+;
+; Name of the standard mouse driver
+;
+; 2010-01-25, Greg King
+;
+; const char mouse_stddrv[];
+;
+ .export _mouse_stddrv
+
+ .rodata
+_mouse_stddrv: .asciiz "geos-stdmou.mou"
--- /dev/null
+;
+; Target-specific black & white values, for use by the target-shared TGI kernel
+;
+
+ .include "tgi-kernel.inc"
+
+tgi_color_black = $00
+tgi_color_white = $01