Lynx changes by Karri Kaksonen.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4181 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2009-09-17 09:32:05 +00:00
parent 5e55e1c651
commit 3a3eaf99cb
4 changed files with 2 additions and 22 deletions

View File

@@ -146,9 +146,6 @@ To update displays you can call tgi_updatedisplay() or tgi_ioctl(4, 1) it
will wait for the next VBL interrupt and set the draw buffer to the will wait for the next VBL interrupt and set the draw buffer to the
view buffer. The draw buffer is also changed to (drawbuffer xor 1). view buffer. The draw buffer is also changed to (drawbuffer xor 1).
Set an address for a subroutine you want to call at every VBL by calling
tgi_setvblhook(addr) or tgi_ioctl(5, addr).
<sect1>Extended memory drivers<p> <sect1>Extended memory drivers<p>
No extended memory drivers are currently available for the Lynx. No extended memory drivers are currently available for the Lynx.

View File

@@ -125,7 +125,6 @@ void __fastcall__ lynx_eeprom_erase (unsigned char cell);
#define tgi_setframerate(rate) tgi_ioctl(3, (unsigned)(rate)) #define tgi_setframerate(rate) tgi_ioctl(3, (unsigned)(rate))
#define tgi_busy() tgi_ioctl(4, 0) #define tgi_busy() tgi_ioctl(4, 0)
#define tgi_updatedisplay() tgi_ioctl(4, 1) #define tgi_updatedisplay() tgi_ioctl(4, 1)
#define tgi_setvblhook(addr) tgi_ioctl(5, (unsigned)(addr))
/* End of lynx.h */ /* End of lynx.h */
#endif #endif

View File

@@ -162,6 +162,7 @@ _exit: jsr donelib ; Run module destructors
noret: bra noret noret: bra noret
.segment "CODE"
IRQStub: IRQStub:
phy phy
phx phx

View File

@@ -107,7 +107,6 @@ BGINDEX: .res 1 ; Pen to use for text background
; Double buffer IRQ stuff ; Double buffer IRQ stuff
DRAWPAGE: .res 1 DRAWPAGE: .res 1
SWAPREQUEST: .res 1 SWAPREQUEST: .res 1
VBLHOOK: .res 3
text_bitmap: .res 8*(1+20+1)+1 text_bitmap: .res 8*(1+20+1)+1
; 8 rows with (one offset-byte plus 20 character bytes plus one fill-byte) plus one 0-offset-byte ; 8 rows with (one offset-byte plus 20 character bytes plus one fill-byte) plus one 0-offset-byte
@@ -168,8 +167,6 @@ INSTALL:
stz BGINDEX stz BGINDEX
stz DRAWPAGE stz DRAWPAGE
stz SWAPREQUEST stz SWAPREQUEST
lda #$60 ; rts op-code
sta VBLHOOK
rts rts
@@ -245,27 +242,13 @@ GETERROR:
; ;
; To update displays you can call tgi_ioctl(4, 1) it will wait for the ; To update displays you can call tgi_ioctl(4, 1) it will wait for the
; next VBL interrupt and swap draw and view buffers. ; next VBL interrupt and swap draw and view buffers.
;
; Set an address for a subroutine you want to call at every VBL
; tgi_ioctl(5, hook)
CONTROL: CONTROL:
pha ; Almost all control routines succeed pha ; Almost all control routines succeed
lda #TGI_ERR_OK lda #TGI_ERR_OK
sta ERROR sta ERROR
pla pla
cmp #5
bne ControlSwapRequest
lda ptr1 ; Set IRQ routine to be called at VBL
sta VBLHOOK+1
lda ptr1+1
sta VBLHOOK+2
lda #$43 ; jmp op-code
sta VBLHOOK
rts
ControlSwapRequest:
cmp #4 cmp #4
bne ControlFramerate bne ControlFramerate
@@ -280,6 +263,7 @@ ControlFramerate:
cmp #3 cmp #3
bne ControlTextBG bne ControlTextBG
lda ptr1
cmp #75 ; Set framerate cmp #75 ; Set framerate
beq rate75 beq rate75
cmp #60 cmp #60
@@ -478,7 +462,6 @@ IRQ:
jsr SETDRAWPAGE jsr SETDRAWPAGE
stz SWAPREQUEST stz SWAPREQUEST
@L0: @L0:
jsr VBLHOOK
IRQEND: IRQEND:
clc clc
rts rts