2016-09-10 18:04:57 +00:00
|
|
|
;
|
2016-12-21 22:03:28 +00:00
|
|
|
; hisprite.s
|
2016-09-10 18:04:57 +00:00
|
|
|
;
|
|
|
|
; Created by Quinn Dunki on 7/19/16
|
|
|
|
; Copyright (c) 2015 One Girl, One Laptop Productions. All rights reserved.
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
.org $6000
|
|
|
|
|
|
|
|
.include "macros.s"
|
|
|
|
|
|
|
|
; Softswitches
|
|
|
|
TEXT = $c050
|
|
|
|
HIRES1 = $c057
|
|
|
|
HIRES2 = $c058
|
|
|
|
|
|
|
|
|
|
|
|
; ROM entry points
|
|
|
|
COUT = $fded
|
|
|
|
ROMWAIT = $fca8
|
|
|
|
|
|
|
|
; Zero page locations we use (unused by Monitor, Applesoft, or ProDOS)
|
|
|
|
PARAM0 = $06
|
|
|
|
PARAM1 = $07
|
|
|
|
PARAM2 = $08
|
|
|
|
PARAM3 = $09
|
|
|
|
SCRATCH0 = $19
|
|
|
|
SCRATCH1 = $1a
|
|
|
|
|
|
|
|
; Macros
|
|
|
|
.macro BLITBYTE xPos,yPos,addr
|
|
|
|
lda #xPos
|
|
|
|
sta PARAM0
|
|
|
|
lda #yPos
|
|
|
|
sta PARAM1
|
|
|
|
lda #<addr
|
|
|
|
sta PARAM2
|
|
|
|
lda #>addr
|
|
|
|
sta PARAM3
|
|
|
|
jsr BlitSpriteOnByte
|
|
|
|
.endmacro
|
|
|
|
|
|
|
|
.macro BLIT xPos,yPos,addr
|
|
|
|
lda #xPos
|
|
|
|
sta PARAM0
|
|
|
|
lda #yPos
|
|
|
|
sta PARAM1
|
|
|
|
lda #<addr
|
|
|
|
sta PARAM2
|
|
|
|
lda #>addr
|
|
|
|
sta PARAM3
|
|
|
|
jsr BlitSprite
|
|
|
|
.endmacro
|
|
|
|
|
|
|
|
|
|
|
|
.macro WAIT
|
|
|
|
lda #$80
|
|
|
|
jsr $fca8
|
|
|
|
.endmacro
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main:
|
|
|
|
jsr EnableHires
|
|
|
|
|
2016-12-22 22:28:46 +00:00
|
|
|
; lda #$00
|
|
|
|
; jsr VenetianFill
|
2016-09-10 18:04:57 +00:00
|
|
|
|
2016-12-22 22:28:46 +00:00
|
|
|
lda #<bgFilename
|
|
|
|
sta PARAM0
|
|
|
|
lda #>bgFilename
|
2016-09-10 18:04:57 +00:00
|
|
|
sta PARAM1
|
2016-12-22 22:28:46 +00:00
|
|
|
jsr BloadHires
|
2016-09-10 18:04:57 +00:00
|
|
|
|
|
|
|
|
2016-12-22 22:28:46 +00:00
|
|
|
ldx #0
|
|
|
|
;;;;
|
|
|
|
; stz PARAM0
|
|
|
|
; stz PARAM1
|
|
|
|
; jsr BOXW_MAG
|
|
|
|
;
|
|
|
|
; lda #10
|
|
|
|
; sta PARAM1
|
|
|
|
; jsr BOXW_MIX
|
|
|
|
;
|
|
|
|
; lda #20
|
|
|
|
; sta PARAM1
|
|
|
|
; jsr BOXW_ORG
|
|
|
|
;
|
|
|
|
; rts
|
2016-12-21 22:03:28 +00:00
|
|
|
;;;;
|
2016-09-10 18:04:57 +00:00
|
|
|
|
2016-12-21 22:03:28 +00:00
|
|
|
loop:
|
|
|
|
txa
|
|
|
|
sta PARAM0
|
|
|
|
lda #0
|
|
|
|
sta PARAM1
|
2016-09-10 18:04:57 +00:00
|
|
|
|
2016-12-21 22:03:28 +00:00
|
|
|
lda #<bgBuffer
|
|
|
|
sta PARAM2
|
|
|
|
lda #>bgBuffer
|
|
|
|
sta PARAM3
|
|
|
|
jsr SaveBackground
|
2016-09-10 18:04:57 +00:00
|
|
|
|
2016-12-21 22:03:28 +00:00
|
|
|
jsr BOXW_MAG
|
|
|
|
lda #$80
|
|
|
|
jsr ROMWAIT
|
2016-09-10 18:04:57 +00:00
|
|
|
|
2016-12-21 22:03:28 +00:00
|
|
|
jsr RestoreBackground
|
2016-09-10 18:04:57 +00:00
|
|
|
|
2016-12-21 22:03:28 +00:00
|
|
|
inx
|
|
|
|
cpx #133
|
2016-12-22 22:28:46 +00:00
|
|
|
bne loop
|
2016-09-10 18:04:57 +00:00
|
|
|
rts
|
|
|
|
|
2016-12-21 22:03:28 +00:00
|
|
|
bgBuffer:
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
.byte 0
|
|
|
|
|
2016-12-22 22:28:46 +00:00
|
|
|
bgFilename:
|
|
|
|
.byte "KOL",0
|
|
|
|
|
2016-12-21 22:03:28 +00:00
|
|
|
.include "graphics.s"
|
2016-09-10 18:04:57 +00:00
|
|
|
.include "hgrtableX.s"
|
|
|
|
.include "hgrtableY.s"
|
|
|
|
.include "spritegen0.s"
|
|
|
|
.include "spritegen1.s"
|
|
|
|
.include "spritegen2.s"
|
|
|
|
.include "spritegen3.s"
|
2016-12-21 22:03:28 +00:00
|
|
|
.include "spritegen4.s"
|
2016-09-10 18:04:57 +00:00
|
|
|
|
|
|
|
; Suppress some linker warnings - Must be the last thing in the file
|
|
|
|
.SEGMENT "ZPSAVE"
|
|
|
|
.SEGMENT "EXEHDR"
|
|
|
|
.SEGMENT "STARTUP"
|
|
|
|
.SEGMENT "INIT"
|
|
|
|
.SEGMENT "LOWCODE"
|