.PHONY: clean
clean:
- @for i in common conio dbg em runtime tgi $(ALLTARGETS); do \
+ @for i in common conio dbg em joystick runtime tgi $(ALLTARGETS); do \
$(MAKE) -C $$i clean; \
done
; Must set an error code: YES
;
-INIT: cmp #TGI_MODE_640_200_2 ; Correct mode?
- beq @L1 ; Jump if yes
- lda #TGI_ERR_INV_MODE ; ## Error
- bne @L9
+INIT:
; Initialize variables
; Done, reset the error code
lda #TGI_ERR_OK
-@L9: sta ERROR
+ sta ERROR
rts
; ------------------------------------------------------------------------
; Must set an error code: YES
;
-INIT: cmp #TGI_MODE_640_480_2 ; Correct mode?
- beq @L1 ; Jump if yes
- lda #TGI_ERR_INV_MODE ; ## Error
- bne @L9
-
-@L1: lda pages ; is there enough memory?
+INIT:
+ lda pages ; is there enough memory?
bne @L11 ; Jump if there is one screen
lda #TGI_ERR_INV_MODE ; ## Error
bne @L9
; Must set an error code: YES
;
-INIT: cmp #TGI_MODE_320_200_2 ; Correct mode?
- beq @L1 ; Jump if yes
- lda #TGI_ERR_INV_MODE ; ## Error
- bne @L9
+INIT:
; Initialize variables
-@L1: ldx #$FF
+ ldx #$FF
stx BITMASK
; Switch into graphics mode
; Done, reset the error code
lda #TGI_ERR_OK
-@L9: sta ERROR
+ sta ERROR
rts
; ------------------------------------------------------------------------
;
OUTTEXT:
- lda X1
+ lda TEXTDIR
+; cmp #TGI_TEXT_HORIZONTAL ; this is equal 0
+ bne @vertical
+
+ lda X1 ; horizontal text output
ldx X1+1
ldy Y1
sta r11L
stx r0H
jmp PutString
+@vertical:
+ lda X1 ; vertical text output
+ ldx X1+1
+ ldy Y1
+ sta r11L
+ stx r11H
+ sty r1H
+ ldy #0
+ lda (ptr3),y
+ beq @end
+ jsr PutChar
+ inc ptr3
+ bne @L1
+ inc ptr3+1
+@L1: lda Y1
+ clc
+ adc #8
+ sta Y1
+ bne @vertical
+@end: rts
+
;-------------
; copies of some runtime routines