mirror of
https://github.com/cc65/cc65.git
synced 2025-04-06 04:41:08 +00:00
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:
parent
5e55e1c651
commit
3a3eaf99cb
@ -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
|
||||
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>
|
||||
|
||||
No extended memory drivers are currently available for the Lynx.
|
||||
|
@ -125,7 +125,6 @@ void __fastcall__ lynx_eeprom_erase (unsigned char cell);
|
||||
#define tgi_setframerate(rate) tgi_ioctl(3, (unsigned)(rate))
|
||||
#define tgi_busy() tgi_ioctl(4, 0)
|
||||
#define tgi_updatedisplay() tgi_ioctl(4, 1)
|
||||
#define tgi_setvblhook(addr) tgi_ioctl(5, (unsigned)(addr))
|
||||
|
||||
/* End of lynx.h */
|
||||
#endif
|
||||
|
@ -162,6 +162,7 @@ _exit: jsr donelib ; Run module destructors
|
||||
noret: bra noret
|
||||
|
||||
|
||||
.segment "CODE"
|
||||
IRQStub:
|
||||
phy
|
||||
phx
|
||||
|
@ -107,7 +107,6 @@ BGINDEX: .res 1 ; Pen to use for text background
|
||||
; Double buffer IRQ stuff
|
||||
DRAWPAGE: .res 1
|
||||
SWAPREQUEST: .res 1
|
||||
VBLHOOK: .res 3
|
||||
|
||||
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
|
||||
@ -168,8 +167,6 @@ INSTALL:
|
||||
stz BGINDEX
|
||||
stz DRAWPAGE
|
||||
stz SWAPREQUEST
|
||||
lda #$60 ; rts op-code
|
||||
sta VBLHOOK
|
||||
rts
|
||||
|
||||
|
||||
@ -245,27 +242,13 @@ GETERROR:
|
||||
;
|
||||
; To update displays you can call tgi_ioctl(4, 1) it will wait for the
|
||||
; 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:
|
||||
pha ; Almost all control routines succeed
|
||||
lda #TGI_ERR_OK
|
||||
sta ERROR
|
||||
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
|
||||
bne ControlFramerate
|
||||
|
||||
@ -280,6 +263,7 @@ ControlFramerate:
|
||||
cmp #3
|
||||
bne ControlTextBG
|
||||
|
||||
lda ptr1
|
||||
cmp #75 ; Set framerate
|
||||
beq rate75
|
||||
cmp #60
|
||||
@ -478,7 +462,6 @@ IRQ:
|
||||
jsr SETDRAWPAGE
|
||||
stz SWAPREQUEST
|
||||
@L0:
|
||||
jsr VBLHOOK
|
||||
IRQEND:
|
||||
clc
|
||||
rts
|
||||
|
Loading…
x
Reference in New Issue
Block a user