mirror of
https://github.com/cc65/cc65.git
synced 2025-08-15 06:27:36 +00:00
New code from Karri
git-svn-id: svn://svn.cc65.org/cc65/trunk@3316 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -12,5 +12,19 @@
|
|||||||
.global __iodir: zp
|
.global __iodir: zp
|
||||||
.global __viddma: zp
|
.global __viddma: zp
|
||||||
.global __sprsys: zp
|
.global __sprsys: zp
|
||||||
|
.global _abc_score_ptr0: zp
|
||||||
|
.global _abc_score_ptr1: zp
|
||||||
|
.global _abc_score_ptr2: zp
|
||||||
|
.global _abc_score_ptr3: zp
|
||||||
|
.global _FileEntry: zp
|
||||||
|
.global _FileStartBlock: zp
|
||||||
|
.global _FileBlockOffset: zp
|
||||||
|
.global _FileExecFlag: zp
|
||||||
|
.global _FileDestAddr: zp
|
||||||
|
.global _FileFileLen: zp
|
||||||
|
.global _FileCurrBlock: zp
|
||||||
|
.global _FileBlockByte: zp
|
||||||
|
.global _FileDestPtr: zp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -16,4 +16,23 @@ __iodir: .res 1
|
|||||||
__viddma: .res 1
|
__viddma: .res 1
|
||||||
__sprsys: .res 1
|
__sprsys: .res 1
|
||||||
|
|
||||||
|
; ------------------------------------------------------------------------
|
||||||
|
; sound effect pointers for multitimbral Lynx music hardware
|
||||||
|
_abc_score_ptr0: .res 2
|
||||||
|
_abc_score_ptr1: .res 2
|
||||||
|
_abc_score_ptr2: .res 2
|
||||||
|
_abc_score_ptr3: .res 2
|
||||||
|
|
||||||
|
; ------------------------------------------------------------------------
|
||||||
|
; Filesystem variables needed for reading stuff from the Lynx cart
|
||||||
|
_FileEntry: ; The file directory entry is 8 bytes
|
||||||
|
_FileStartBlock: .res 1
|
||||||
|
_FileBlockOffset: .res 2
|
||||||
|
_FileExecFlag: .res 1
|
||||||
|
_FileDestAddr: .res 2
|
||||||
|
_FileFileLen: .res 2
|
||||||
|
|
||||||
|
_FileCurrBlock: .res 1
|
||||||
|
_FileBlockByte: .res 2
|
||||||
|
_FileDestPtr: .res 2
|
||||||
|
|
||||||
|
@@ -13,17 +13,16 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
|
.include "extzp.inc"
|
||||||
|
|
||||||
.include "tgi-kernel.inc"
|
.include "tgi-kernel.inc"
|
||||||
.include "tgi-mode.inc"
|
.include "tgi-mode.inc"
|
||||||
.include "tgi-error.inc"
|
.include "tgi-error.inc"
|
||||||
|
|
||||||
.include "lynx.inc"
|
.include "lynx.inc"
|
||||||
.include "extzp.inc"
|
|
||||||
|
|
||||||
.macpack generic
|
.macpack generic
|
||||||
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Header. Includes jump table and constants.
|
; Header. Includes jump table and constants.
|
||||||
|
|
||||||
@@ -42,8 +41,11 @@
|
|||||||
.byte 8 ; System font Y size
|
.byte 8 ; System font Y size
|
||||||
.res 4, $00 ; Reserved for future extensions
|
.res 4, $00 ; Reserved for future extensions
|
||||||
|
|
||||||
; Next comes the jump table. All entries must be valid and may point to an RTS
|
; Next comes the jump table. Currently all entries must be valid and may point
|
||||||
; for test versions (function not implemented).
|
; to an RTS for test versions (function not implemented). A future version may
|
||||||
|
; allow for emulation: In this case the vector will be zero. Emulation means
|
||||||
|
; that the graphics kernel will emulate the function by using lower level
|
||||||
|
; primitives - for example ploting a line by using calls to SETPIXEL.
|
||||||
|
|
||||||
.addr INSTALL
|
.addr INSTALL
|
||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
@@ -67,6 +69,7 @@
|
|||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
.addr 0 ; IRQ entry is unused
|
||||||
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|
||||||
@@ -323,6 +326,7 @@ CLEAR: lda #<cls_sprite
|
|||||||
; from the new buffer. This is usually noticed by the user.
|
; from the new buffer. This is usually noticed by the user.
|
||||||
|
|
||||||
SETVIEWPAGE:
|
SETVIEWPAGE:
|
||||||
|
cmp #1
|
||||||
beq @L1 ; page == maxpages-1
|
beq @L1 ; page == maxpages-1
|
||||||
ldy #<$de20 ; page 0
|
ldy #<$de20 ; page 0
|
||||||
ldx #>$de20
|
ldx #>$de20
|
||||||
@@ -357,6 +361,7 @@ SETVIEWPAGE:
|
|||||||
;
|
;
|
||||||
|
|
||||||
SETDRAWPAGE:
|
SETDRAWPAGE:
|
||||||
|
cmp #1
|
||||||
beq @L1 ; page == maxpages-1
|
beq @L1 ; page == maxpages-1
|
||||||
lda #<$de20 ; page 0
|
lda #<$de20 ; page 0
|
||||||
ldx #>$de20
|
ldx #>$de20
|
||||||
@@ -487,7 +492,13 @@ GETPIXEL:
|
|||||||
sta ptr1+1
|
sta ptr1+1
|
||||||
|
|
||||||
ldx #0
|
ldx #0
|
||||||
|
lda #15
|
||||||
|
sta MAPCTL
|
||||||
lda (ptr1),y
|
lda (ptr1),y
|
||||||
|
tay
|
||||||
|
lda #$0c
|
||||||
|
sta MAPCTL
|
||||||
|
tya
|
||||||
plp
|
plp
|
||||||
bcc @L1
|
bcc @L1
|
||||||
and #$f
|
and #$f
|
||||||
@@ -506,8 +517,7 @@ GETPIXEL:
|
|||||||
; Must set an error code: NO
|
; Must set an error code: NO
|
||||||
;
|
;
|
||||||
|
|
||||||
.data
|
.data
|
||||||
|
|
||||||
line_sprite:
|
line_sprite:
|
||||||
.byte 0 ; Will be replaced by the code
|
.byte 0 ; Will be replaced by the code
|
||||||
.byte %00110000
|
.byte %00110000
|
||||||
@@ -527,6 +537,7 @@ line_tilt:
|
|||||||
line_c:
|
line_c:
|
||||||
.byte $e
|
.byte $e
|
||||||
|
|
||||||
|
.code
|
||||||
LINE:
|
LINE:
|
||||||
lda DRAWINDEX
|
lda DRAWINDEX
|
||||||
sta line_c
|
sta line_c
|
||||||
|
Reference in New Issue
Block a user