2019-01-12 00:59:32 +00:00
|
|
|
%import c64utils
|
2019-01-20 16:45:57 +00:00
|
|
|
%import c64lib
|
2019-01-12 00:59:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
~ main {
|
|
|
|
|
|
|
|
sub start() {
|
2019-01-15 20:35:15 +00:00
|
|
|
c64.SCROLY &= %11101111 ; blank the screen
|
2019-01-12 00:59:32 +00:00
|
|
|
c64utils.set_rasterirq_excl(40)
|
|
|
|
|
2019-01-15 20:35:15 +00:00
|
|
|
while(true) {
|
|
|
|
}
|
2019-01-12 00:59:32 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
~ irq {
|
|
|
|
|
|
|
|
const ubyte barheight = 4
|
2019-04-15 23:19:51 +00:00
|
|
|
ubyte[] colors = [6,2,4,5,15,7,1,13,3,12,8,11,9]
|
2019-01-25 00:35:46 +00:00
|
|
|
ubyte color = 0
|
2019-01-12 00:59:32 +00:00
|
|
|
ubyte ypos = 0
|
|
|
|
|
|
|
|
sub irq() {
|
2019-03-19 00:22:26 +00:00
|
|
|
Y++ ; slight timing delay to avoid rasterline transition issues
|
2019-01-25 00:35:46 +00:00
|
|
|
ubyte rasterpos = c64.RASTER
|
2019-03-19 00:22:26 +00:00
|
|
|
|
2019-01-12 00:59:32 +00:00
|
|
|
if color!=len(colors) {
|
|
|
|
c64.EXTCOL = colors[color]
|
|
|
|
color++
|
2019-03-19 00:22:26 +00:00
|
|
|
c64.RASTER = rasterpos+barheight
|
2019-01-12 00:59:32 +00:00
|
|
|
}
|
|
|
|
else {
|
2019-01-25 00:35:46 +00:00
|
|
|
ypos += 2
|
2019-01-12 00:59:32 +00:00
|
|
|
c64.EXTCOL = 0
|
2019-01-25 00:35:46 +00:00
|
|
|
color = 0
|
2019-03-19 00:22:26 +00:00
|
|
|
c64.RASTER = sin8u(ypos)/2+40
|
2019-01-12 00:59:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|