1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-08-02 09:29:35 +00:00

Added ECM mode and background gfx.

This commit is contained in:
jespergravgaard 2018-12-27 22:57:22 +01:00
parent d956ff9fcf
commit 22aa93e802
11 changed files with 5801 additions and 4458 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -7,7 +7,7 @@ const byte* PLAYFIELD_SPRITE_PTRS = (PLAYFIELD_SCREEN+SPRITE_PTRS);
// Address of the sprites covering the playfield
const byte* PLAYFIELD_SPRITES = $2000;
// Address of the charset
byte* PLAYFIELD_CHARSET = $2800;
const byte* PLAYFIELD_CHARSET = $2800;
// The size of the playfield
const byte PLAYFIELD_LINES = 22;
@ -20,8 +20,8 @@ byte[PLAYFIELD_LINES*PLAYFIELD_COLS] playfield;
// Pointer to the current piece in the current orientation. Updated each time current_orientation is updated.
byte* current_piece_gfx = 0;
// The color of the current piece
byte current_piece_color = 0;
// The char of the current piece
byte current_piece_char = 0;
// Position of top left corner of current moving piece on the playfield
byte current_xpos = 3;

View File

@ -170,5 +170,5 @@ align($40) byte[4*4*4] PIECE_I = {
// The different pieces
word[] PIECES = { (word)PIECE_T, (word)PIECE_S, (word)PIECE_Z, (word)PIECE_J, (word)PIECE_O, (word)PIECE_I, (word)PIECE_L };
// The colors to use for the pieces
byte[] PIECES_COLORS = { WHITE, LIGHT_GREY, GREEN, LIGHT_GREY, WHITE, WHITE, GREEN };
// The chars to use for the different pieces
byte[] PIECES_CHARS = { $57, $58, $98, $58, $57, $57, $98 };

View File

@ -157,7 +157,7 @@ void play_lock_current() {
byte col = current_xpos;
for(byte c:0..3) {
if(current_piece_gfx[i++]!=0) {
playfield_line[col] = current_piece_color;
playfield_line[col] = current_piece_char;
}
col++;
}
@ -177,7 +177,7 @@ void play_spawn_current() {
current_piece_gfx = current_piece + current_orientation;
current_xpos = 3;
current_ypos = 0;
current_piece_color = PIECES_COLORS[piece_idx];
current_piece_char = PIECES_CHARS[piece_idx];
}
// Look through the playfield for lines - and remove any lines found

View File

@ -1,10 +1,15 @@
import "tetris-data"
kickasm(pc PLAYFIELD_CHARSET, resource "nes-charset.png") {{
.var charset = LoadPicture("nes-charset.png", List().add($000000, $ffffff))
.for (var c=0; c<32; c++)
.for (var y=0;y<8; y++)
.byte charset.getSinglecolorByte(c,y)
kickasm(pc PLAYFIELD_CHARSET, resource "nes-screen.imap") {{
.fill 8,$00 // Place a filled char at the start of the charset
.import binary "nes-screen.imap"
}}
const byte PLAYFIELD_SCREEN_ORIGINAL_WIDTH=32;
const byte* PLAYFIELD_SCREEN_ORIGINAL = $2c00;
// Address of the screen data original
kickasm(pc PLAYFIELD_SCREEN_ORIGINAL, resource "nes-screen.iscr") {{
.import binary "nes-screen.iscr"
}}
// Pointers to the screen address for rendering each playfield line
@ -12,27 +17,52 @@ byte*[PLAYFIELD_LINES+3] screen_lines;
// Initialize rendering
void render_init() {
*BGCOL = BLACK;
// Clear the screen
fill(PLAYFIELD_SCREEN,1000,$d0);
fill(COLS,1000,BLACK);
vicSelectGfxBank(PLAYFIELD_SCREEN);
*D018 = toD018(PLAYFIELD_SCREEN, PLAYFIELD_CHARSET);
// Enable Extended Background Color Mode
*D011 = VIC_ECM | VIC_DEN | VIC_RSEL | 3;
*BGCOL1 = BLACK;
*BGCOL2 = BLUE;
*BGCOL3 = CYAN;
*BGCOL4 = GREY;
fill(COLS,1000,DARK_GREY);
render_screen_original(PLAYFIELD_SCREEN);
// Initialize the screen line pointers;
byte* li = COLS + 40 + 15;
byte* li = PLAYFIELD_SCREEN + 40 + 16;
for(byte i:0..PLAYFIELD_LINES+2) {
screen_lines[i<<1] = li;
li += 40;
}
// Prepare the playfield frame
byte* line = COLS + 14;
byte* line = COLS + 15;
for(byte l:0..PLAYFIELD_LINES+1) {
for(byte c:0..PLAYFIELD_COLS+1) {
*(line+c) = DARK_GREY;
*(line+c) = WHITE;
}
line +=40;
}
}
// Copy the original screen data to the passed screen
void render_screen_original(byte* screen) {
byte SPACE = 0;
byte* orig = PLAYFIELD_SCREEN_ORIGINAL+32*2;
for(byte y:0..24) {
byte x=0;
do {
*screen++ = SPACE;
} while(++x!=4);
do {
*screen++ = (*orig++)+1; // +$c0 to get grey background, +1 because the charset is loaded to PLAYFIELD_CHARSET+8
} while(++x!=36);
do {
*screen++ = SPACE;
} while(++x!=40);
}
}
// Render the static playfield on the screen
void render_playfield() {
byte i = 0;
@ -56,7 +86,7 @@ void render_current() {
byte current_cell = current_piece_gfx[i++];
if(current_cell!=0) {
if(xpos<PLAYFIELD_COLS) {
screen_line[xpos] = current_piece_color;
screen_line[xpos] = current_piece_char;
}
}
xpos++;

View File

@ -3,15 +3,26 @@
.pc = $80d "Program"
.label RASTER = $d012
.label BORDERCOL = $d020
.label BGCOL = $d021
.label BGCOL1 = $d021
.label BGCOL2 = $d022
.label BGCOL3 = $d023
.label BGCOL4 = $d024
.label D011 = $d011
.const VIC_ECM = $40
.const VIC_DEN = $10
.const VIC_RSEL = 8
.label D018 = $d018
.label COLS = $d800
.label CIA1_PORT_A = $dc00
.label CIA1_PORT_B = $dc01
.label CIA2_PORT_A = $dd00
.label CIA2_PORT_A_DDR = $dd02
.const BLACK = 0
.const WHITE = 1
.const GREEN = 5
.const CYAN = 3
.const BLUE = 6
.const DARK_GREY = $b
.const LIGHT_GREY = $f
.const GREY = $c
.const KEY_Z = $c
.const KEY_LSHIFT = $f
.const KEY_X = $17
@ -33,6 +44,7 @@
.label PLAYFIELD_CHARSET = $2800
.const PLAYFIELD_LINES = $16
.const PLAYFIELD_COLS = $a
.label PLAYFIELD_SCREEN_ORIGINAL = $2c00
.const current_movedown_slow = $32
.const current_movedown_fast = 5
.const COLLISION_NONE = 0
@ -47,16 +59,16 @@
.label current_orientation = $e
.label current_piece_gfx = $f
.label current_piece = $c
.label current_piece_color = $12
.label current_piece_char = $12
.label current_piece_12 = 5
.label current_xpos_48 = 4
.label current_piece_gfx_53 = 5
.label current_piece_color_62 = 7
.label current_piece_char_62 = 7
.label current_xpos_96 = 4
.label current_piece_gfx_87 = 5
.label current_piece_gfx_88 = 5
.label current_piece_color_75 = 7
.label current_piece_color_76 = 7
.label current_piece_char_75 = 7
.label current_piece_char_76 = 7
.label current_piece_71 = 5
.label current_piece_72 = 5
.label current_piece_73 = 5
@ -74,8 +86,8 @@ main: {
sta current_piece_gfx_87
lda current_piece_gfx+1
sta current_piece_gfx_87+1
lda current_piece_color
sta current_piece_color_75
lda current_piece_char
sta current_piece_char_75
lda #3
sta current_xpos_48
ldx #0
@ -129,8 +141,8 @@ main: {
sta current_piece_gfx_88
lda current_piece_gfx+1
sta current_piece_gfx_88+1
lda current_piece_color
sta current_piece_color_76
lda current_piece_char
sta current_piece_char_76
jsr render_current
b10:
dec BORDERCOL
@ -169,7 +181,7 @@ render_current: {
lda xpos
cmp #PLAYFIELD_COLS
bcs b4
lda current_piece_color_62
lda current_piece_char_62
ldy xpos
sta (screen_line),y
b4:
@ -480,8 +492,8 @@ play_spawn_current: {
sta current_piece_gfx
lda PIECES+1,y
sta current_piece_gfx+1
lda PIECES_COLORS,x
sta current_piece_color
lda PIECES_CHARS,x
sta current_piece_char
rts
b2:
jsr sid_rnd
@ -576,7 +588,7 @@ play_lock_current: {
lda (current_piece_gfx),y
cmp #0
beq b3
lda current_piece_color
lda current_piece_char
ldy col
sta (playfield_line),y
b3:
@ -775,27 +787,33 @@ play_init: {
rts
}
render_init: {
.label _10 = $c
.const vicSelectGfxBank1_toDd001_return = 3^(>PLAYFIELD_SCREEN)>>6
.const toD0181_return = (>(PLAYFIELD_SCREEN&$3fff)<<2)|(>PLAYFIELD_CHARSET)>>2&$f
.label _15 = $c
.label li = 5
.label line = 5
.label l = 2
lda #3
sta CIA2_PORT_A_DDR
lda #vicSelectGfxBank1_toDd001_return
sta CIA2_PORT_A
lda #toD0181_return
sta D018
lda #VIC_ECM|VIC_DEN|VIC_RSEL|3
sta D011
lda #BLACK
sta BGCOL
ldx #$d0
lda #<PLAYFIELD_SCREEN
sta fill.addr
lda #>PLAYFIELD_SCREEN
sta fill.addr+1
sta BGCOL1
lda #BLUE
sta BGCOL2
lda #CYAN
sta BGCOL3
lda #GREY
sta BGCOL4
jsr fill
ldx #BLACK
lda #<COLS
sta fill.addr
lda #>COLS
sta fill.addr+1
jsr fill
lda #<COLS+$28+$f
jsr render_screen_original
lda #<PLAYFIELD_SCREEN+$28+$10
sta li
lda #>COLS+$28+$f
lda #>PLAYFIELD_SCREEN+$28+$10
sta li+1
ldx #0
b1:
@ -818,9 +836,9 @@ render_init: {
bne b1
lda #0
sta l
lda #<COLS+$e
lda #<COLS+$f
sta line
lda #>COLS+$e
lda #>COLS+$f
sta line+1
b2:
ldx #0
@ -828,13 +846,13 @@ render_init: {
txa
clc
adc line
sta _10
sta _15
lda #0
adc line+1
sta _10+1
lda #DARK_GREY
sta _15+1
lda #WHITE
ldy #0
sta (_10),y
sta (_15),y
inx
cpx #PLAYFIELD_COLS+1+1
bne b3
@ -851,18 +869,78 @@ render_init: {
bne b2
rts
}
fill: {
.label end = $c
.label addr = 5
lda addr
clc
adc #<$3e8
sta end
lda addr+1
adc #>$3e8
sta end+1
render_screen_original: {
.const SPACE = 0
.label screen = $c
.label orig = 5
.label y = 2
lda #0
sta y
lda #<PLAYFIELD_SCREEN_ORIGINAL+$20*2
sta orig
lda #>PLAYFIELD_SCREEN_ORIGINAL+$20*2
sta orig+1
lda #<PLAYFIELD_SCREEN
sta screen
lda #>PLAYFIELD_SCREEN
sta screen+1
b1:
txa
ldx #0
b2:
lda #SPACE
ldy #0
sta (screen),y
inc screen
bne !+
inc screen+1
!:
inx
cpx #4
bne b2
b3:
ldy #0
lda (orig),y
clc
adc #1
sta (screen),y
inc screen
bne !+
inc screen+1
!:
inc orig
bne !+
inc orig+1
!:
inx
cpx #$24
bne b3
b4:
lda #SPACE
ldy #0
sta (screen),y
inc screen
bne !+
inc screen+1
!:
inx
cpx #$28
bne b4
inc y
lda y
cmp #$19
bne b1
rts
}
fill: {
.const size = $3e8
.label end = COLS+size
.label addr = 5
lda #<COLS
sta addr
lda #>COLS
sta addr+1
b1:
lda #DARK_GREY
ldy #0
sta (addr),y
inc addr
@ -870,10 +948,10 @@ fill: {
inc addr+1
!:
lda addr+1
cmp end+1
cmp #>end
bne b1
lda addr
cmp end
cmp #<end
bne b1
rts
}
@ -904,15 +982,16 @@ sid_rnd_init: {
PIECE_O: .byte 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.align $40
PIECE_I: .byte 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0
PIECES_COLORS: .byte WHITE, LIGHT_GREY, GREEN, LIGHT_GREY, WHITE, WHITE, GREEN
PIECES_CHARS: .byte $57, $58, $98, $58, $57, $57, $98
playfield_lines: .fill 2*PLAYFIELD_LINES, 0
playfield: .fill PLAYFIELD_LINES*PLAYFIELD_COLS, 0
screen_lines: .fill 2*(PLAYFIELD_LINES+3), 0
PIECES: .word PIECE_T, PIECE_S, PIECE_Z, PIECE_J, PIECE_O, PIECE_I, PIECE_L
playfield_lines_idx: .fill PLAYFIELD_LINES+1, 0
.pc = PLAYFIELD_CHARSET "Inline"
.var charset = LoadPicture("nes-charset.png", List().add($000000, $ffffff))
.for (var c=0; c<32; c++)
.for (var y=0;y<8; y++)
.byte charset.getSinglecolorByte(c,y)
.fill 8,$00 // Place a filled char at the start of the charset
.import binary "nes-screen.imap"
.pc = PLAYFIELD_SCREEN_ORIGINAL "Inline"
.import binary "nes-screen.iscr"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,20 @@
(label) @14
(label) @26
(label) @27
(label) @begin
(label) @end
(byte*) BGCOL
(const byte*) BGCOL#0 BGCOL = ((byte*))(word/dword/signed dword) 53281
(byte*) BGCOL1
(const byte*) BGCOL1#0 BGCOL1 = ((byte*))(word/dword/signed dword) 53281
(byte*) BGCOL2
(const byte*) BGCOL2#0 BGCOL2 = ((byte*))(word/dword/signed dword) 53282
(byte*) BGCOL3
(const byte*) BGCOL3#0 BGCOL3 = ((byte*))(word/dword/signed dword) 53283
(byte*) BGCOL4
(const byte*) BGCOL4#0 BGCOL4 = ((byte*))(word/dword/signed dword) 53284
(byte) BLACK
(const byte) BLACK#0 BLACK = (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) BLUE
(const byte) BLUE#0 BLUE = (byte/signed byte/word/signed word/dword/signed dword) 6
(byte*) BORDERCOL
(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280
(byte) BROWN
@ -24,7 +28,9 @@
(byte*) CIA1_PORT_B_DDR
(byte*) CIA2_INTERRUPT
(byte*) CIA2_PORT_A
(const byte*) CIA2_PORT_A#0 CIA2_PORT_A = ((byte*))(word/dword/signed dword) 56576
(byte*) CIA2_PORT_A_DDR
(const byte*) CIA2_PORT_A_DDR#0 CIA2_PORT_A_DDR = ((byte*))(word/dword/signed dword) 56578
(byte*) CIA2_PORT_B
(byte*) CIA2_PORT_B_DDR
(byte) CIA_INTERRUPT_CLEAR
@ -41,14 +47,17 @@
(byte*) COLS
(const byte*) COLS#0 COLS = ((byte*))(word/dword/signed dword) 55296
(byte) CYAN
(const byte) CYAN#0 CYAN = (byte/signed byte/word/signed word/dword/signed dword) 3
(byte*) D011
(const byte*) D011#0 D011 = ((byte*))(word/dword/signed dword) 53265
(byte*) D016
(byte*) D018
(const byte*) D018#0 D018 = ((byte*))(word/dword/signed dword) 53272
(byte) DARK_GREY
(const byte) DARK_GREY#0 DARK_GREY = (byte/signed byte/word/signed word/dword/signed dword) 11
(byte) GREEN
(const byte) GREEN#0 GREEN = (byte/signed byte/word/signed word/dword/signed dword) 5
(byte) GREY
(const byte) GREY#0 GREY = (byte/signed byte/word/signed word/dword/signed dword) 12
(void()**) HARDWARE_IRQ
(byte) IRQ_COLLISION_BG
(byte) IRQ_COLLISION_SPRITE
@ -144,12 +153,11 @@
(byte) LIGHT_BLUE
(byte) LIGHT_GREEN
(byte) LIGHT_GREY
(const byte) LIGHT_GREY#0 LIGHT_GREY = (byte/signed byte/word/signed word/dword/signed dword) 15
(byte) ORANGE
(word[]) PIECES
(const word[]) PIECES#0 PIECES = { ((word))(const byte[4*4*4]) PIECE_T#0, ((word))(const byte[4*4*4]) PIECE_S#0, ((word))(const byte[4*4*4]) PIECE_Z#0, ((word))(const byte[4*4*4]) PIECE_J#0, ((word))(const byte[4*4*4]) PIECE_O#0, ((word))(const byte[4*4*4]) PIECE_I#0, ((word))(const byte[4*4*4]) PIECE_L#0 }
(byte[]) PIECES_COLORS
(const byte[]) PIECES_COLORS#0 PIECES_COLORS = { (const byte) WHITE#0, (const byte) LIGHT_GREY#0, (const byte) GREEN#0, (const byte) LIGHT_GREY#0, (const byte) WHITE#0, (const byte) WHITE#0, (const byte) GREEN#0 }
(byte[]) PIECES_CHARS
(const byte[]) PIECES_CHARS#0 PIECES_CHARS = { (byte/signed byte/word/signed word/dword/signed dword) 87, (byte/signed byte/word/signed word/dword/signed dword) 88, (byte/word/signed word/dword/signed dword) 152, (byte/signed byte/word/signed word/dword/signed dword) 88, (byte/signed byte/word/signed word/dword/signed dword) 87, (byte/signed byte/word/signed word/dword/signed dword) 87, (byte/word/signed word/dword/signed dword) 152 }
(byte[4*4*4]) PIECE_I
(const byte[4*4*4]) PIECE_I#0 PIECE_I = { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0 }
(byte[4*4*4]) PIECE_J
@ -173,6 +181,9 @@
(const byte) PLAYFIELD_LINES#0 PLAYFIELD_LINES = (byte/signed byte/word/signed word/dword/signed dword) 22
(byte*) PLAYFIELD_SCREEN
(const byte*) PLAYFIELD_SCREEN#0 PLAYFIELD_SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(byte*) PLAYFIELD_SCREEN_ORIGINAL
(const byte*) PLAYFIELD_SCREEN_ORIGINAL#0 PLAYFIELD_SCREEN_ORIGINAL = ((byte*))(word/signed word/dword/signed dword) 11264
(byte) PLAYFIELD_SCREEN_ORIGINAL_WIDTH
(byte*) PLAYFIELD_SPRITES
(byte*) PLAYFIELD_SPRITE_PTRS
(byte*) PROCPORT
@ -221,10 +232,13 @@
(byte*) VIC_CONTROL2
(byte) VIC_CSEL
(byte) VIC_DEN
(const byte) VIC_DEN#0 VIC_DEN = (byte/signed byte/word/signed word/dword/signed dword) 16
(byte) VIC_ECM
(const byte) VIC_ECM#0 VIC_ECM = (byte/signed byte/word/signed word/dword/signed dword) 64
(byte) VIC_MCM
(byte*) VIC_MEMORY
(byte) VIC_RSEL
(const byte) VIC_RSEL#0 VIC_RSEL = (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) VIC_RST8
(byte) WHITE
(const byte) WHITE#0 WHITE = (byte/signed byte/word/signed word/dword/signed dword) 1
@ -254,14 +268,14 @@
(byte*~) current_piece#73 current_piece#73 zp ZP_WORD:5 4.0
(byte*~) current_piece#74 current_piece#74 zp ZP_WORD:5 4.0
(byte*~) current_piece#75 current_piece zp ZP_WORD:12 4.0
(byte) current_piece_color
(byte) current_piece_color#11 current_piece_color zp ZP_BYTE:18 1.04
(byte) current_piece_color#13 current_piece_color zp ZP_BYTE:18 0.7272727272727273
(byte) current_piece_color#16 current_piece_color zp ZP_BYTE:18 19.96078431372549
(byte) current_piece_color#21 current_piece_color zp ZP_BYTE:18 6.0
(byte) current_piece_color#62 current_piece_color#62 zp ZP_BYTE:7 53.368421052631575
(byte~) current_piece_color#75 current_piece_color#75 zp ZP_BYTE:7 4.0
(byte~) current_piece_color#76 current_piece_color#76 zp ZP_BYTE:7 22.0
(byte) current_piece_char
(byte) current_piece_char#11 current_piece_char zp ZP_BYTE:18 1.04
(byte) current_piece_char#13 current_piece_char zp ZP_BYTE:18 0.7272727272727273
(byte) current_piece_char#16 current_piece_char zp ZP_BYTE:18 19.96078431372549
(byte) current_piece_char#21 current_piece_char zp ZP_BYTE:18 6.0
(byte) current_piece_char#62 current_piece_char#62 zp ZP_BYTE:7 53.368421052631575
(byte~) current_piece_char#75 current_piece_char#75 zp ZP_BYTE:7 4.0
(byte~) current_piece_char#76 current_piece_char#76 zp ZP_BYTE:7 22.0
(byte*) current_piece_gfx
(byte*) current_piece_gfx#10 current_piece_gfx zp ZP_WORD:15 19.96078431372549
(byte*) current_piece_gfx#14 current_piece_gfx zp ZP_WORD:15 0.2962962962962963
@ -292,15 +306,14 @@
(label) fill::@1
(label) fill::@return
(byte*) fill::addr
(byte*) fill::addr#0 addr zp ZP_WORD:5 2.0
(byte*) fill::addr#1 addr zp ZP_WORD:5 16.5
(byte*) fill::addr#2 addr zp ZP_WORD:5 17.5
(byte*) fill::addr#2 addr zp ZP_WORD:5 16.5
(byte*) fill::end
(byte*) fill::end#0 end zp ZP_WORD:12 2.6
(const byte*) fill::end#0 end = (const byte*) COLS#0+(const word) fill::size#0
(word) fill::size
(const word) fill::size#0 size = (word/signed word/dword/signed dword) 1000
(byte*) fill::start
(byte) fill::val
(byte) fill::val#3 reg byte x 1.8333333333333333
(byte[]) keyboard_char_keycodes
(byte()) keyboard_event_get()
(label) keyboard_event_get::@3
@ -688,13 +701,14 @@
(byte) render_current::ypos2#1 ypos2 zp ZP_BYTE:8 67.33333333333333
(byte) render_current::ypos2#2 ypos2 zp ZP_BYTE:8 29.000000000000004
(void()) render_init()
(byte*~) render_init::$10 $10 zp ZP_WORD:12 202.0
(byte~) render_init::$5 reg byte a 22.0
(byte~) render_init::$10 reg byte a 22.0
(byte*~) render_init::$15 $15 zp ZP_WORD:12 202.0
(label) render_init::@1
(label) render_init::@2
(label) render_init::@3
(label) render_init::@5
(label) render_init::@7
(label) render_init::@8
(label) render_init::@9
(label) render_init::@return
(byte) render_init::c
(byte) render_init::c#1 reg byte x 151.5
@ -711,6 +725,32 @@
(byte*) render_init::line
(byte*) render_init::line#1 line zp ZP_WORD:5 7.333333333333333
(byte*) render_init::line#4 line zp ZP_WORD:5 20.499999999999996
(label) render_init::toD0181
(word~) render_init::toD0181_$0
(word~) render_init::toD0181_$1
(word~) render_init::toD0181_$2
(byte~) render_init::toD0181_$3
(word~) render_init::toD0181_$4
(byte~) render_init::toD0181_$5
(byte~) render_init::toD0181_$6
(byte~) render_init::toD0181_$7
(byte~) render_init::toD0181_$8
(byte*) render_init::toD0181_gfx
(byte) render_init::toD0181_return
(const byte) render_init::toD0181_return#0 toD0181_return = >((word))(const byte*) PLAYFIELD_SCREEN#0&(word/signed word/dword/signed dword) 16383<<(byte/signed byte/word/signed word/dword/signed dword) 2|>((word))(const byte*) PLAYFIELD_CHARSET#0>>(byte/signed byte/word/signed word/dword/signed dword) 2&(byte/signed byte/word/signed word/dword/signed dword) 15
(byte*) render_init::toD0181_screen
(label) render_init::vicSelectGfxBank1
(byte~) render_init::vicSelectGfxBank1_$0
(label) render_init::vicSelectGfxBank1_@1
(byte*) render_init::vicSelectGfxBank1_gfx
(label) render_init::vicSelectGfxBank1_toDd001
(word~) render_init::vicSelectGfxBank1_toDd001_$0
(byte~) render_init::vicSelectGfxBank1_toDd001_$1
(byte~) render_init::vicSelectGfxBank1_toDd001_$2
(byte/word/dword~) render_init::vicSelectGfxBank1_toDd001_$3
(byte*) render_init::vicSelectGfxBank1_toDd001_gfx
(byte) render_init::vicSelectGfxBank1_toDd001_return
(const byte) render_init::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte/signed byte/word/signed word/dword/signed dword) 3^>((word))(const byte*) PLAYFIELD_SCREEN#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(void()) render_playfield()
(byte~) render_playfield::$1 reg byte a 202.0
(label) render_playfield::@1
@ -731,6 +771,38 @@
(byte*) render_playfield::line#0 line zp ZP_WORD:5 202.0
(byte*) render_playfield::line#1 line zp ZP_WORD:5 500.5
(byte*) render_playfield::line#2 line zp ZP_WORD:5 1552.0
(void()) render_screen_original((byte*) render_screen_original::screen)
(byte/signed word/word/dword/signed dword~) render_screen_original::$3 reg byte a 202.0
(label) render_screen_original::@1
(label) render_screen_original::@2
(label) render_screen_original::@3
(label) render_screen_original::@4
(label) render_screen_original::@7
(label) render_screen_original::@return
(byte) render_screen_original::SPACE
(const byte) render_screen_original::SPACE#0 SPACE = (byte/signed byte/word/signed word/dword/signed dword) 0
(byte*) render_screen_original::orig
(byte*) render_screen_original::orig#1 orig zp ZP_WORD:5 21.299999999999997
(byte*) render_screen_original::orig#2 orig zp ZP_WORD:5 101.0
(byte*) render_screen_original::orig#4 orig zp ZP_WORD:5 18.666666666666664
(byte*) render_screen_original::screen
(byte*) render_screen_original::screen#1 screen zp ZP_WORD:12 101.0
(byte*) render_screen_original::screen#2 screen zp ZP_WORD:12 75.75
(byte*) render_screen_original::screen#3 screen zp ZP_WORD:12 42.599999999999994
(byte*) render_screen_original::screen#4 screen zp ZP_WORD:12 157.0
(byte*) render_screen_original::screen#5 screen zp ZP_WORD:12 134.66666666666666
(byte*) render_screen_original::screen#6 screen zp ZP_WORD:12 202.0
(byte*) render_screen_original::screen#7 screen zp ZP_WORD:12 22.0
(byte) render_screen_original::x
(byte) render_screen_original::x#1 reg byte x 202.0
(byte) render_screen_original::x#2 reg byte x 202.0
(byte) render_screen_original::x#3 reg byte x 151.5
(byte) render_screen_original::x#4 reg byte x 67.33333333333333
(byte) render_screen_original::x#5 reg byte x 60.599999999999994
(byte) render_screen_original::x#6 reg byte x 101.0
(byte) render_screen_original::y
(byte) render_screen_original::y#1 y zp ZP_BYTE:2 16.5
(byte) render_screen_original::y#6 y zp ZP_BYTE:2 1.2222222222222223
(byte*[PLAYFIELD_LINES#0+3]) screen_lines
(const byte*[PLAYFIELD_LINES#0+3]) screen_lines#0 screen_lines = { fill( PLAYFIELD_LINES#0+3, 0) }
(byte()) sid_rnd()
@ -741,12 +813,12 @@
(void()) sid_rnd_init()
(label) sid_rnd_init::@return
zp ZP_BYTE:2 [ current_ypos#22 current_ypos#14 current_ypos#30 current_ypos#1 play_lock_current::ypos2#2 play_lock_current::ypos2#0 play_lock_current::ypos2#1 play_remove_lines::y#8 play_remove_lines::y#1 play_init::idx#2 play_init::idx#1 render_init::l#4 render_init::l#1 play_spawn_current::$3 ]
zp ZP_BYTE:2 [ current_ypos#22 current_ypos#14 current_ypos#30 current_ypos#1 play_lock_current::ypos2#2 play_lock_current::ypos2#0 play_lock_current::ypos2#1 play_remove_lines::y#8 play_remove_lines::y#1 play_init::idx#2 play_init::idx#1 render_init::l#4 render_init::l#1 render_screen_original::y#6 render_screen_original::y#1 play_spawn_current::$3 ]
zp ZP_BYTE:3 [ current_movedown_counter#12 current_movedown_counter#10 current_movedown_counter#1 play_remove_lines::x#2 play_remove_lines::x#1 play_lock_current::l#6 play_lock_current::l#1 ]
reg byte x [ current_ypos#10 current_ypos#71 ]
zp ZP_BYTE:4 [ current_xpos#48 current_xpos#96 render_playfield::l#2 render_playfield::l#1 play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 play_remove_lines::full#4 play_remove_lines::full#2 play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 keyboard_event_pressed::keycode#5 keyboard_event_scan::row#2 keyboard_event_scan::row#1 ]
zp ZP_WORD:5 [ current_piece_gfx#53 current_piece_gfx#87 current_piece_gfx#88 render_playfield::line#2 render_playfield::line#0 render_playfield::line#1 current_piece#12 current_piece#71 current_piece#72 current_piece#73 current_piece#74 play_collision::piece_gfx#0 play_init::pli#2 play_init::pli#1 render_init::li#2 render_init::li#1 render_init::line#4 render_init::line#1 fill::addr#2 fill::addr#0 fill::addr#1 play_lock_current::playfield_line#0 ]
zp ZP_BYTE:7 [ current_piece_color#62 current_piece_color#75 current_piece_color#76 render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 play_collision::xpos#5 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_lock_current::col#2 play_lock_current::col#0 play_lock_current::col#1 keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 play_remove_lines::c#0 keyboard_event_pressed::row_bits#0 ]
zp ZP_WORD:5 [ current_piece_gfx#53 current_piece_gfx#87 current_piece_gfx#88 render_playfield::line#2 render_playfield::line#0 render_playfield::line#1 current_piece#12 current_piece#71 current_piece#72 current_piece#73 current_piece#74 play_collision::piece_gfx#0 play_init::pli#2 play_init::pli#1 render_init::li#2 render_init::li#1 render_init::line#4 render_init::line#1 render_screen_original::orig#2 render_screen_original::orig#4 render_screen_original::orig#1 fill::addr#2 fill::addr#1 play_lock_current::playfield_line#0 ]
zp ZP_BYTE:7 [ current_piece_char#62 current_piece_char#75 current_piece_char#76 render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 play_collision::xpos#5 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_lock_current::col#2 play_lock_current::col#0 play_lock_current::col#1 keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 play_remove_lines::c#0 keyboard_event_pressed::row_bits#0 ]
zp ZP_BYTE:8 [ render_current::ypos2#2 render_current::ypos2#0 render_current::ypos2#1 play_collision::ypos2#2 play_collision::ypos2#0 play_collision::ypos2#1 play_lock_current::i#1 keyboard_event_scan::row_scan#0 ]
zp ZP_BYTE:9 [ render_current::l#3 render_current::l#1 play_collision::l#6 play_collision::l#1 ]
zp ZP_BYTE:10 [ render_current::i#2 render_current::i#1 render_current::i#4 render_current::i#8 play_collision::i#2 play_collision::i#3 play_collision::i#11 play_collision::i#13 ]
@ -760,11 +832,11 @@ reg byte x [ play_collision::c#2 play_collision::c#1 ]
reg byte a [ play_collision::return#14 ]
reg byte a [ play_move_leftright::return#1 ]
reg byte x [ play_move_down::movedown#6 play_move_down::movedown#3 play_move_down::movedown#7 play_move_down::movedown#2 play_move_down::movedown#10 ]
zp ZP_WORD:12 [ current_piece#20 current_piece#75 current_piece#16 current_piece#10 current_piece#70 render_init::$10 fill::end#0 ]
zp ZP_WORD:12 [ current_piece#20 current_piece#75 current_piece#16 current_piece#10 current_piece#70 render_screen_original::screen#6 render_screen_original::screen#5 render_screen_original::screen#4 render_screen_original::screen#7 render_screen_original::screen#3 render_screen_original::screen#1 render_screen_original::screen#2 render_init::$15 ]
zp ZP_BYTE:14 [ current_orientation#29 current_orientation#10 current_orientation#19 current_orientation#4 current_orientation#14 ]
zp ZP_WORD:15 [ current_piece_gfx#27 current_piece_gfx#10 current_piece_gfx#15 current_piece_gfx#17 current_piece_gfx#4 current_piece_gfx#14 ]
zp ZP_BYTE:17 [ current_xpos#34 current_xpos#11 current_xpos#20 current_xpos#5 current_xpos#16 current_xpos#3 ]
zp ZP_BYTE:18 [ current_piece_color#21 current_piece_color#16 current_piece_color#11 current_piece_color#13 ]
zp ZP_BYTE:18 [ current_piece_char#21 current_piece_char#16 current_piece_char#11 current_piece_char#13 ]
reg byte x [ play_move_down::return#2 ]
reg byte x [ play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ]
reg byte y [ play_remove_lines::r#2 play_remove_lines::r#3 play_remove_lines::r#1 ]
@ -777,7 +849,7 @@ zp ZP_BYTE:19 [ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_
reg byte x [ play_init::j#2 play_init::j#1 ]
reg byte x [ render_init::i#2 render_init::i#1 ]
reg byte x [ render_init::c#2 render_init::c#1 ]
reg byte x [ fill::val#3 ]
reg byte x [ render_screen_original::x#6 render_screen_original::x#5 render_screen_original::x#4 render_screen_original::x#1 render_screen_original::x#2 render_screen_original::x#3 ]
reg byte a [ keyboard_event_get::return#3 ]
zp ZP_BYTE:20 [ main::key_event#0 ]
reg byte a [ play_move_down::key_event#0 ]
@ -831,4 +903,5 @@ reg byte a [ keyboard_event_scan::event_type#0 ]
reg byte a [ keyboard_event_scan::$11 ]
reg byte a [ keyboard_matrix_read::return#0 ]
reg byte a [ play_init::$1 ]
reg byte a [ render_init::$5 ]
reg byte a [ render_init::$10 ]
reg byte a [ render_screen_original::$3 ]