Merge remote-tracking branch 'upstream/master' into cassette

Conflicts:
	asminc/atari.inc
	libsrc/atari/mou/atrst.s
This commit is contained in:
Christian Groessler
2014-01-30 10:48:13 +01:00
17 changed files with 158 additions and 37 deletions

View File

@@ -50,10 +50,18 @@ endif
.SUFFIXES:
.PHONY: all lib $(TARGETS) mostlyclean clean
.PHONY: all lib $(TARGETS) mostlyclean clean install
ifndef TARGET
datadir = $(prefix)/share/cc65
INSTALLDIRS = ../asminc ../cfg ../include \
$(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*)) \
../lib ../targetutil $(addprefix ../,$(DRVTYPES))
INSTALL = install
all lib: $(TARGETS)
$(TARGETS):
@@ -65,6 +73,21 @@ mostlyclean:
clean:
$(call RMDIR,../wrk ../lib ../targetutil $(addprefix ../,$(DRVTYPES)))
install:
$(foreach dir,$(INSTALLDIRS),$(INSTALL_recipe))
##########
define INSTALL_recipe
$(if $(prefix),,$(error variable `prefix' must be set))
$(INSTALL) -d $(subst ..,$(DESTDIR)$(datadir),$(dir))
$(INSTALL) -m644 $(dir)/* $(subst ..,$(DESTDIR)$(datadir),$(dir))
endef
##########
else # TARGET
CA65FLAGS =

View File

@@ -107,7 +107,7 @@ exit: ldx #$02
txs ; Re-init stack pointer
; We're done
jmp (done)
jmp done
.segment "INIT"
@@ -148,8 +148,8 @@ init: ldx #zpspace-1
; No BASIC.SYSTEM so quit to ProDOS dispatcher instead
lda #<quit
ldx #>quit
sta done
stx done+1
sta done+1
stx done+2
; No BASIC.SYSTEM so use addr of ProDOS system global page
lda #<$BF00
@@ -202,8 +202,8 @@ q_param:.byte $04 ; param_count
.data
; Location to jump to when we're done
done: .addr DOSWARM
; Final jump when we're done
done: jmp DOSWARM ; Potentially patched at runtime
.segment "ZPSAVE"

View File

@@ -161,8 +161,8 @@ setbuf: lda #$00 ; Low byte
; Call loader stub after C libary shutdown
lda #<target
ldx #>target
sta done
stx done+1
sta done+1
stx done+2
; Initiate C libary shutdown
jmp _exit

View File

@@ -16,6 +16,6 @@ initreboot:
; Quit to PWRUP
lda #<$FAA6
ldx #>$FAA6
sta done
stx done+1
sta done+1
stx done+2
rts

View File

@@ -7,8 +7,16 @@
;
.export _joy_static_stddrv
.ifdef __ATARIXL__
.import _atrxstd_joy
.else
.import _atrstd_joy
.endif
.rodata
.ifdef __ATARIXL__
_joy_static_stddrv := _atrxstd_joy
.else
_joy_static_stddrv := _atrstd_joy
.endif

View File

@@ -10,4 +10,9 @@
.rodata
_joy_stddrv: .asciiz "atrstd.joy"
_joy_stddrv:
.ifdef __ATARIXL__
.asciiz "atrxstd.joy"
.else
.asciiz "atrstd.joy"
.endif

View File

@@ -446,6 +446,14 @@ IOCTL: lda #<MOUSE_ERR_INV_IOCTL ; We don't support ioclts for now
IRQ:
; Turn mouse polling IRQ back on in case it disabled itself due to CRITIC
; flag being set.
lda POKMSK
ora #%00000001 ; timer 1 enable
sta POKMSK
sta IRQEN
; Check for a pressed button and place the result into Buttons
ldx #0
@@ -514,7 +522,12 @@ IRQ:
; T1Han: Local IRQ routine to poll mouse
;
T1Han: tya
T1Han: lda CRITIC ; if CRITIC flag is set, disable the
bne disable_me ; high frequency polling IRQ, in order
; not to interfere with SIO I/O (e.g.
; floppy access)
tya
pha
txa
pha
@@ -695,3 +708,22 @@ mmexit: sty oldval
pla
rti
.endif
; Disable the interrupt source which caused us to be called.
; The interrupt will be enabled again by the "IRQ" routine.
; The "IRQ" routine, despite its name, is called from the
; vertical blank NMI interrupt *only* if the CRITIC flag has
; been cleared.
disable_me:
lda POKMSK
and #%11111110 ; timer 1 disable
sta IRQEN
sta POKMSK
.ifdef __ATARIXL__
rts
.else
pla
rti
.endif

View File

@@ -7,8 +7,16 @@
;
.export _tgi_static_stddrv
.ifdef __ATARIXL__
.import _atrx8_tgi
.else
.import _atr8_tgi
.endif
.rodata
.ifdef __ATARIXL__
_tgi_static_stddrv := _atrx8_tgi
.else
_tgi_static_stddrv := _atr8_tgi
.endif

View File

@@ -10,4 +10,9 @@
.rodata
_tgi_stddrv: .asciiz "atr8.tgi"
_tgi_stddrv:
.ifdef __ATARIXL__
.asciiz "atrx8.tgi"
.else
.asciiz "atr8.tgi"
.endif