sprites: merge in with rasterbars game

This commit is contained in:
Vince Weaver 2019-06-13 16:42:25 -04:00
parent 2dfddb5d5d
commit e13fe8dba4
9 changed files with 5623 additions and 5 deletions

View File

@ -18,6 +18,7 @@ SPACE_BARS: space_bars.o
space_bars.o: space_bars.s instructions.s game.s \
game_over.s gr_copy.s text_print.s title.s \
spacebars_title.inc screen_split.s \
sprites.s sprites_table.s sprites_screen.s \
vapor_lock.s delay_a.s lz4_decode.s SB_BACKGROUNDC.BIN.lz4
ca65 -o space_bars.o space_bars.s -l space_bars.lst

24
space_bars/asteroid.inc Normal file
View File

@ -0,0 +1,24 @@
; all hard-coded 3x2
asteroid_lookup:
.word asteroid_p1,explode0_p1,explode1_p1,explode2_p1,void_p1
asteroid_p1:
.byte $50,$85,$80
.byte $05,$88,$08
explode0_p1:
.byte $d0,$95,$d0
.byte $0d,$59,$0d
explode1_p1:
.byte $0d,$90,$0d
.byte $d0,$09,$d0
explode2_p1:
.byte $05,$80,$05
.byte $50,$08,$50
void_p1:
.byte $00,$00,$00
.byte $00,$00,$00

38
space_bars/earth.inc Normal file
View File

@ -0,0 +1,38 @@
earth_low: .byte $28 ; ysize=48
.byte $A0,$FF,$00, $A0,$FF,$00, $A0,$FF,$00, $A0,$27,$00, $50, $00, $30
.byte $08, $A3,$00, $15, $00,$00, $01, $A4,$11, $10
.byte $18, $D5, $50, $05, $00, $01, $05
.byte $18, $00, $8A, $08, $50,$50, $A7,$00, $70
.byte $50, $58, $75, $27,$27, $75, $22, $A3,$00
.byte $55, $50, $00, $15, $89, $81, $11
.byte $51, $05, $51, $91, $01, $00, $55
.byte $11, $40, $01, $05, $11, $00, $55
.byte $05, $55, $50, $55, $A4,$00, $27, $07
.byte $72,$72, $77, $07, $00, $20, $00,$00, $50
.byte $15, $10, $00, $01, $11, $00, $51
.byte $15, $05,$05, $11,$11, $05, $11, $08, $10
.byte $55,$55, $08, $85, $55,$55, $05, $55, $50
.byte $A4,$00, $07, $22, $72, $70, $22,$22, $A4,$00
.byte $44, $11,$11, $00,$00, $11, $91, $11, $88
.byte $15, $11, $19, $50, $15, $11,$11, $01
.byte $80, $55, $08, $00, $A5,$55, $50, $55,$55, $05
.byte $A1
earth_high: .byte $28 ; ysize=48
.byte $A0,$FF,$00, $A0,$FF,$00, $A0,$FF,$00, $A0,$26,$00, $50,$50, $70, $C5
.byte $7A, $22,$22, $88, $48, $88, $55, $0E
.byte $A4,$44, $45, $4A, $F5, $84, $88, $55
.byte $54, $58, $4A, $88, $5A,$5A, $85, $80
.byte $50, $80, $A5,$00, $D0, $F5, $FF, $8F
.byte $F8,$F8, $8F, $88, $22,$22, $55, $88,$88, $85
.byte $48, $5E, $54, $44, $8E, $58, $84
.byte $EE, $54, $88,$88, $44, $95, $54, $88
.byte $EE, $05, $A6,$88, $80,$80, $00, $88, $78
.byte $8F,$8F, $8A, $78, $77, $87, $22,$22, $88
.byte $48,$48, $58, $54, $44, $5A, $84, $48
.byte $58, $D8, $44,$44, $88, $44, $5A, $45
.byte $88,$88, $5A, $58, $88,$88, $58, $A6,$88, $78
.byte $88, $85, $87, $58, $88, $A4,$22, $77
.byte $44,$44, $88, $55, $44, $E4, $44, $5A
.byte $48, $44, $4E, $80, $48, $D4,$D4, $84
.byte $55, $88, $5A, $58, $A9,$88
.byte $A1

5
space_bars/gr_offsets.s Normal file
View File

@ -0,0 +1,5 @@
gr_offsets:
.word $400,$480,$500,$580,$600,$680,$700,$780
.word $428,$4a8,$528,$5a8,$628,$6a8,$728,$7a8
.word $450,$4d0,$550,$5d0,$650,$6d0,$750,$7d0
gr_offsets_done:

BIN
space_bars/random.data Normal file

Binary file not shown.

View File

@ -25,15 +25,46 @@ BASL = $28
BASH = $29
MASK = $2E
COLOR = $30
FRAME = $60
FRAMEH = $61
BLARGH = $69
ZPOS = $78
GREEN0 = $80
GREEN1 = $81
GREEN2 = $82
GREEN3 = $83
GREEN4 = $84
ZERO = $85
GAME_OVER = $86
SPRITE_XPOS = $E0
SPRITE_YPOS = $E1
RANDOM_PTR = $E2
ASTEROID_X = $E3
ASTEROID_Y = $E4
ASTEROID_SUBX = $E5
ASTEROID_EXPLODE= $E6
FIRE_X = $E7
FIRE_Y = $E8
YADD = $E9
BLAST1 = $EA
BLAST2 = $EB
FIRE = $EC
LEVEL_DONE = $ED
DRAW_PAGE = $EE
LASTKEY = $F1
PADDLE_STATUS = $F2
XPOS = $F3
YPOS = $F4
WHICH = $F5
ASTEROID_SPEED = $F6
TEMP = $FA
TEMPY = $FB
INL = $FC
@ -65,6 +96,15 @@ WAIT = $FCA8 ;; delay 1/2(26+27A+5A^2) us
;==================
; show title screen
;==================
@ -81,6 +121,17 @@ WAIT = $FCA8 ;; delay 1/2(26+27A+5A^2) us
; Mode7
;==================
; TODO
;==================
; 40x192 sprites
;==================
jsr start_sprites
lda GAME_OVER
bne game_over_man
;==================
; Rasterbars
;==================
@ -90,7 +141,7 @@ WAIT = $FCA8 ;; delay 1/2(26+27A+5A^2) us
;==================
; Game Over
;==================
game_over_man:
jsr game_over
loop_forever:
@ -135,11 +186,8 @@ clear_page_loop:
bpl clear_page_loop
rts
gr_offsets:
.word $400,$480,$500,$580,$600,$680,$700,$780
.word $428,$4a8,$528,$5a8,$628,$6a8,$728,$7a8
.word $450,$4d0,$550,$5d0,$650,$6d0,$750,$7d0
.include "gr_offsets.s"
.include "../asm_routines/gr_unrle.s"
.include "../asm_routines/keypress.s"
@ -159,3 +207,6 @@ gr_offsets:
.include "spacebars_title.inc"
.align $100
.include "mode7_sprites.inc"
.align $100
.include "sprites.s"

1433
space_bars/sprites.s Normal file

File diff suppressed because it is too large Load Diff

4032
space_bars/sprites_screen.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
y_lookup_h:
.byte >(smc032+1),>(smc033+1),>(smc034+1),>(smc035+1),>(smc036+1),>(smc037+1),>(smc038+1),>(smc039+1)
.byte >(smc040+1),>(smc041+1),>(smc042+1),>(smc043+1),>(smc044+1),>(smc045+1),>(smc046+1),>(smc047+1)
.byte >(smc048+1),>(smc049+1),>(smc050+1),>(smc051+1),>(smc052+1),>(smc053+1),>(smc054+1),>(smc055+1)
.byte >(smc056+1),>(smc057+1),>(smc058+1),>(smc059+1),>(smc060+1),>(smc061+1),>(smc062+1),>(smc063+1)
.byte >(smc064+1),>(smc065+1),>(smc066+1),>(smc067+1),>(smc068+1),>(smc069+1),>(smc070+1),>(smc071+1)
.byte >(smc072+1),>(smc073+1),>(smc074+1),>(smc075+1),>(smc076+1),>(smc077+1),>(smc078+1),>(smc079+1)
.byte >(smc080+1),>(smc081+1),>(smc082+1),>(smc083+1),>(smc084+1),>(smc085+1),>(smc086+1),>(smc087+1)
.byte >(smc088+1),>(smc089+1),>(smc090+1),>(smc091+1),>(smc092+1),>(smc093+1),>(smc094+1),>(smc095+1)
.byte >(smc096+1),>(smc097+1),>(smc098+1),>(smc099+1),>(smc100+1),>(smc101+1),>(smc102+1),>(smc103+1)
.byte >(smc104+1),>(smc105+1),>(smc106+1),>(smc107+1),>(smc108+1),>(smc109+1),>(smc110+1),>(smc111+1)
.byte >(smc112+1),>(smc113+1),>(smc114+1),>(smc115+1),>(smc116+1),>(smc117+1),>(smc118+1),>(smc119+1)
.byte >(smc120+1),>(smc121+1),>(smc122+1),>(smc123+1),>(smc124+1),>(smc125+1),>(smc126+1),>(smc127+1)
.byte >(smc128+1),>(smc129+1),>(smc130+1),>(smc131+1),>(smc132+1),>(smc133+1),>(smc134+1),>(smc135+1)
.byte >(smc136+1),>(smc137+1),>(smc138+1),>(smc139+1),>(smc140+1),>(smc141+1),>(smc142+1),>(smc143+1)
.byte >(smc144+1),>(smc145+1),>(smc146+1),>(smc147+1),>(smc148+1),>(smc149+1),>(smc150+1),>(smc151+1)
.byte >(smc152+1),>(smc153+1),>(smc154+1),>(smc155+1),>(smc156+1),>(smc157+1),>(smc158+1),>(smc159+1)
y_lookup_l:
.byte <(smc032+1),<(smc033+1),<(smc034+1),<(smc035+1),<(smc036+1),<(smc037+1),<(smc038+1),<(smc039+1)
.byte <(smc040+1),<(smc041+1),<(smc042+1),<(smc043+1),<(smc044+1),<(smc045+1),<(smc046+1),<(smc047+1)
.byte <(smc048+1),<(smc049+1),<(smc050+1),<(smc051+1),<(smc052+1),<(smc053+1),<(smc054+1),<(smc055+1)
.byte <(smc056+1),<(smc057+1),<(smc058+1),<(smc059+1),<(smc060+1),<(smc061+1),<(smc062+1),<(smc063+1)
.byte <(smc064+1),<(smc065+1),<(smc066+1),<(smc067+1),<(smc068+1),<(smc069+1),<(smc070+1),<(smc071+1)
.byte <(smc072+1),<(smc073+1),<(smc074+1),<(smc075+1),<(smc076+1),<(smc077+1),<(smc078+1),<(smc079+1)
.byte <(smc080+1),<(smc081+1),<(smc082+1),<(smc083+1),<(smc084+1),<(smc085+1),<(smc086+1),<(smc087+1)
.byte <(smc088+1),<(smc089+1),<(smc090+1),<(smc091+1),<(smc092+1),<(smc093+1),<(smc094+1),<(smc095+1)
.byte <(smc096+1),<(smc097+1),<(smc098+1),<(smc099+1),<(smc100+1),<(smc101+1),<(smc102+1),<(smc103+1)
.byte <(smc104+1),<(smc105+1),<(smc106+1),<(smc107+1),<(smc108+1),<(smc109+1),<(smc110+1),<(smc111+1)
.byte <(smc112+1),<(smc113+1),<(smc114+1),<(smc115+1),<(smc116+1),<(smc117+1),<(smc118+1),<(smc119+1)
.byte <(smc120+1),<(smc121+1),<(smc122+1),<(smc123+1),<(smc124+1),<(smc125+1),<(smc126+1),<(smc127+1)
.byte <(smc128+1),<(smc129+1),<(smc130+1),<(smc131+1),<(smc132+1),<(smc133+1),<(smc134+1),<(smc135+1)
.byte <(smc136+1),<(smc137+1),<(smc138+1),<(smc139+1),<(smc140+1),<(smc141+1),<(smc142+1),<(smc143+1)
.byte <(smc144+1),<(smc145+1),<(smc146+1),<(smc147+1),<(smc148+1),<(smc149+1),<(smc150+1),<(smc151+1)
.byte <(smc152+1),<(smc153+1),<(smc154+1),<(smc155+1),<(smc156+1),<(smc157+1),<(smc158+1),<(smc159+1)