mirror of
https://github.com/jeremysrand/BuGS.git
synced 2024-12-28 21:31:08 +00:00
Add some code to set the scan line control bytes and the colour palette for all of the different levels of the game.
This commit is contained in:
parent
a9810ecb75
commit
ceb2d00ff0
@ -63,6 +63,7 @@
|
||||
9D1716A42491C49300C83148 /* system601.2mg */ = {isa = PBXFileReference; lastKnownFileType = file; path = system601.2mg; sourceTree = "<group>"; };
|
||||
9D1716A62491C49300C83148 /* tail.mk */ = {isa = PBXFileReference; lastKnownFileType = text; path = tail.mk; sourceTree = "<group>"; };
|
||||
9D1716A92491C49300C83148 /* BuGS.xcscheme */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = BuGS.xcscheme; path = ../../BuGS.xcodeproj/xcshareddata/xcschemes/BuGS.xcscheme; sourceTree = "<group>"; };
|
||||
9D62AF3B249871A300348F45 /* colour.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = colour.s; sourceTree = "<group>"; };
|
||||
9D8FFC602491CA28005C9327 /* game.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = game.s; sourceTree = "<group>"; };
|
||||
9D8FFC612491CAF0005C9327 /* game.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = game.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@ -103,6 +104,7 @@
|
||||
9D1716902491C49300C83148 /* main.h */,
|
||||
9D8FFC602491CA28005C9327 /* game.s */,
|
||||
9D8FFC612491CAF0005C9327 /* game.h */,
|
||||
9D62AF3B249871A300348F45 /* colour.s */,
|
||||
9D1716912491C49300C83148 /* main.rez */,
|
||||
9D1716932491C49300C83148 /* Makefile */,
|
||||
9D1716952491C49300C83148 /* make */,
|
||||
|
290
BuGS/colour.s
Normal file
290
BuGS/colour.s
Normal file
@ -0,0 +1,290 @@
|
||||
;
|
||||
; colour.s
|
||||
; BuGS
|
||||
;
|
||||
; Created by Jeremy Rand on 2020-06-15.
|
||||
;Copyright © 2020 Jeremy Rand. All rights reserved.
|
||||
;
|
||||
|
||||
case on
|
||||
mcopy colour.macros
|
||||
keep colour
|
||||
|
||||
colour start
|
||||
|
||||
setColour entry
|
||||
asl a ; x 2
|
||||
asl a ; x 4
|
||||
asl a ; x 8
|
||||
asl a ; x 16
|
||||
asl a ; x 32
|
||||
tay
|
||||
ldx #0
|
||||
loop lda colour1,y
|
||||
sta $e19e00,x
|
||||
inx
|
||||
inx
|
||||
iny
|
||||
iny
|
||||
cpx #32
|
||||
bne loop
|
||||
rtl
|
||||
|
||||
|
||||
colour1 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ffc' ; Off-white
|
||||
|
||||
|
||||
colour2 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$0ff0' ; Yellow
|
||||
|
||||
|
||||
colour3 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
|
||||
|
||||
colour4 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$0f0c' ; Light Violet
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$0f0c' ; Light Violet
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$0f0c' ; Light Violet
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$0f0c' ; Light Violet
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$0f0c' ; Light Violet
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
|
||||
|
||||
colour5 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$00ff' ; Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00ff' ; Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00ff' ; Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00ff' ; Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00ff' ; Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
|
||||
colour6 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
|
||||
colour7 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$0ff0' ; Yellow
|
||||
|
||||
colour8 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
|
||||
colour9 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00f0' ; Green
|
||||
|
||||
colour10 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ffc' ; Off-white
|
||||
|
||||
colour11 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0ffc' ; Off-white
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$00f0' ; Green
|
||||
|
||||
colour12 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
dc i2'$0fc0' ; Orange
|
||||
dc i2'$000f' ; Blue
|
||||
dc i2'$00fc' ; Light Tourquiose
|
||||
anop
|
||||
colour13 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$00ff' ; Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00ff' ; Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00ff' ; Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00ff' ; Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ff0' ; Yellow
|
||||
dc i2'$00ff' ; Tourquiose
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$0ff0' ; Yellow
|
||||
|
||||
colour14 anop
|
||||
dc i2'$0000' ; Black
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$0f00' ; Red
|
||||
dc i2'$00f0' ; Green
|
||||
dc i2'$0f0f' ; Violet
|
||||
dc i2'$0f00' ; Red
|
||||
|
||||
end
|
14
BuGS/game.s
14
BuGS/game.s
@ -11,12 +11,16 @@
|
||||
keep game
|
||||
|
||||
game start
|
||||
jsl clearScreen
|
||||
jsl setupScreen
|
||||
|
||||
lda #0
|
||||
jsl setColour
|
||||
|
||||
jsl waitForKey
|
||||
rtl
|
||||
|
||||
|
||||
clearScreen entry
|
||||
setupScreen entry
|
||||
short i,m
|
||||
lda $e0c035 ; Enable shadowing of SHR
|
||||
and #$f7
|
||||
@ -35,9 +39,9 @@ clearScreen entry
|
||||
sta $e1c068
|
||||
ldx #$0000
|
||||
|
||||
lda #$9cfe
|
||||
lda #$9dfe
|
||||
tcs
|
||||
ldy #$7d00
|
||||
ldy #$7e00
|
||||
nextWord anop
|
||||
phx
|
||||
dey
|
||||
@ -51,6 +55,8 @@ nextWord anop
|
||||
tcs
|
||||
pld
|
||||
cli
|
||||
|
||||
|
||||
rtl
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user