mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 02:29:52 +00:00
Removed two extra bytes from the TGI driver's header.
Added "tgi_colors.s" and a missing mouse-driver support file. Added driver-module rules to the make-file. All changes by Greg King. git-svn-id: svn://svn.cc65.org/cc65/trunk@5004 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
9bf3446060
commit
ea32400df4
@ -1,11 +1,11 @@
|
||||
# -*- 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 $^
|
||||
@ -13,6 +13,12 @@
|
||||
%.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 $^
|
||||
|
||||
@ -21,9 +27,12 @@ S_OBJS = crt0.o \
|
||||
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
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
@ -33,9 +42,16 @@ EMDS = geos-vdc.emd
|
||||
|
||||
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)
|
||||
|
@ -1,7 +1,7 @@
|
||||
;
|
||||
; 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"
|
||||
|
||||
@ -19,8 +19,8 @@
|
||||
; ------------------------------------------------------------------------
|
||||
; 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
|
||||
@ -38,8 +38,8 @@ VDC_DATA = 31
|
||||
|
||||
.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
|
||||
@ -49,36 +49,36 @@ yres: .word 200 ; Y resolution
|
||||
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
|
||||
.word $100 ; Aspect ratio: 1.0
|
||||
|
||||
; Next comes the jump table. Currently all entries must be valid and may point
|
||||
; to an RTS for test versions (function not implemented).
|
||||
; 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).
|
||||
|
||||
.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
|
||||
.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
|
||||
@ -99,12 +99,6 @@ BITMASK: .res 1 ; $00 = clear, $01 = set pixels
|
||||
|
||||
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
|
||||
|
68
libsrc/geos/devel/mcbdefault.s
Normal file
68
libsrc/geos/devel/mcbdefault.s
Normal file
@ -0,0 +1,68 @@
|
||||
;
|
||||
; 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
|
||||
|
||||
|
11
libsrc/geos/devel/mouse_stddrv.s
Normal file
11
libsrc/geos/devel/mouse_stddrv.s
Normal file
@ -0,0 +1,11 @@
|
||||
;
|
||||
; 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"
|
8
libsrc/geos/devel/tgi_colors.s
Normal file
8
libsrc/geos/devel/tgi_colors.s
Normal file
@ -0,0 +1,8 @@
|
||||
;
|
||||
; 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
|
Loading…
Reference in New Issue
Block a user