1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-04-08 14:37:40 +00:00

Rearranged Tetris files.

This commit is contained in:
jespergravgaard 2018-12-27 00:09:10 +01:00
parent 53a161d52f
commit d956ff9fcf
14 changed files with 6055 additions and 5977 deletions

View File

@ -1,4 +1,4 @@
import "playfield-sprites"
import "tetris-sprites"
void main() {
init_sprites();

View File

@ -0,0 +1,28 @@
// Memory Layout and Shared Data
// Address of the screen
const byte* PLAYFIELD_SCREEN = $0400;
// Screen Sprite pointers
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;
// The size of the playfield
const byte PLAYFIELD_LINES = 22;
const byte PLAYFIELD_COLS = 10;
// The playfield. 0 is empty non-zero is color.
// The playfield is layed out line by line, meaning the first 10 bytes are line 1, the next 10 line 2 and so forth,
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;
// Position of top left corner of current moving piece on the playfield
byte current_xpos = 3;
byte current_ypos = 0;

View File

@ -0,0 +1,225 @@
// Implementation of the games play logic
import "tetris-data"
import "tetris-pieces"
// Pointers to the playfield address for each playfield line
byte*[PLAYFIELD_LINES] playfield_lines;
// Indixes into the playfield for each playfield line
byte[PLAYFIELD_LINES+1] playfield_lines_idx;
// The current moving piece. Points to the start of the piece definition.
byte* current_piece = 0;
// The curent piece orientation - each piece have 4 orientations (00/$10/$20/$30).
// The orientation chooses one of the 4 sub-graphics of the piece.
byte current_orientation = 0;
// The rate of moving down the current piece (number of frames between moves if movedown is not forced)
const byte current_movedown_slow = 50;
// The rate of moving down the current piece fast (number of frames between moves if movedown is not forced)
const byte current_movedown_fast = 5;
// Counts up to the next movedown of current piece
byte current_movedown_counter = 0;
// Move down the current piece
// Return non-zero if a render is needed
byte play_move_down(byte key_event) {
// Handle moving down current piece
++current_movedown_counter;
byte movedown = 0;
// As soon as space is pressed move down once
if(key_event==KEY_SPACE) {
movedown++;
}
// While space is held down move down faster
if(keyboard_event_pressed(KEY_SPACE)!=0) {
if(current_movedown_counter>=current_movedown_fast) {
movedown++;
}
}
// Move down slowly otherwise
if(current_movedown_counter>=current_movedown_slow) {
movedown++;
}
// Attempt movedown
if(movedown!=0) {
if(play_collision(current_xpos,current_ypos+1,current_orientation)==COLLISION_NONE) {
// Move current piece down
current_ypos++;
} else {
// Lock current piece
play_lock_current();
// Check for any lines and remove them
play_remove_lines();
// Spawn a new piece
play_spawn_current();
}
current_movedown_counter = 0;
return 1;
}
return 0;
}
// Move left/right or rotate the current piece
// Return non-zero if a render is needed
byte play_move_leftright(byte key_event) {
// Handle keyboard events
if(key_event==KEY_COMMA) {
if(play_collision(current_xpos-1,current_ypos,current_orientation)==COLLISION_NONE) {
current_xpos--;
return 1;
}
} else if(key_event==KEY_DOT) {
if(play_collision(current_xpos+1,current_ypos,current_orientation)==COLLISION_NONE) {
current_xpos++;
return 1;
}
}
return 0;
}
// Rotate the current piece based on key-presses
// Return non-zero if a render is needed
byte play_move_rotate(byte key_event) {
// Handle keyboard events
byte orientation = $80;
if(key_event==KEY_Z) {
orientation = (current_orientation-$10)&$3f;
} else if(key_event==KEY_X) {
orientation = (current_orientation+$10)&$3f;
} else {
return 0;
}
if(play_collision(current_xpos, current_ypos, orientation) == COLLISION_NONE) {
current_orientation = orientation;
current_piece_gfx = current_piece + current_orientation;
return 1;
}
return 0;
}
// No collision
const byte COLLISION_NONE = 0;
// Playfield piece collision (cell on top of other cell on the playfield)
const byte COLLISION_PLAYFIELD = 1;
// Bottom collision (cell below bottom of the playfield)
const byte COLLISION_BOTTOM = 2;
// Left side collision (cell beyond the left side of the playfield)
const byte COLLISION_LEFT = 4;
// Right side collision (cell beyond the right side of the playfield)
const byte COLLISION_RIGHT = 8;
// Test if there is a collision between the current piece moved to (x, y) and anything on the playfield or the playfield boundaries
// Returns information about the type of the collision detected
byte play_collision(byte xpos, byte ypos, byte orientation) {
byte* piece_gfx = current_piece + orientation;
byte i = 0;
byte ypos2 = ypos<<1;
for(byte l:0..3) {
byte* playfield_line = playfield_lines[ypos2];
byte col = xpos;
for(byte c:0..3) {
if(piece_gfx[i++]!=0) {
if(ypos2>=2*PLAYFIELD_LINES) {
// Below the playfield bottom
return COLLISION_BOTTOM;
}
if((col&$80)!=0) {
// Beyond left side of the playfield
return COLLISION_LEFT;
}
if(col>=PLAYFIELD_COLS) {
// Beyond left side of the playfield
return COLLISION_RIGHT;
}
if(playfield_line[col]!=0) {
// Collision with a playfield cell
return COLLISION_PLAYFIELD;
}
}
col++;
}
ypos2 += 2;
}
return COLLISION_NONE;
}
// Lock the current piece onto the playfield
void play_lock_current() {
byte i = 0;
byte ypos2 = current_ypos<<1;
for(byte l:0..3) {
byte* playfield_line = playfield_lines[ypos2];
byte col = current_xpos;
for(byte c:0..3) {
if(current_piece_gfx[i++]!=0) {
playfield_line[col] = current_piece_color;
}
col++;
}
ypos2 += 2;
}
}
// Spawn a new piece
void play_spawn_current() {
// Pick a random piece (0-6)
byte piece_idx = 7;
while(piece_idx==7) {
piece_idx = sid_rnd()&7;
}
current_piece = PIECES[piece_idx<<1];
current_orientation = 0;
current_piece_gfx = current_piece + current_orientation;
current_xpos = 3;
current_ypos = 0;
current_piece_color = PIECES_COLORS[piece_idx];
}
// Look through the playfield for lines - and remove any lines found
// Utilizes two cursors on the playfield - one reading cells and one writing cells
// Whenever a full line is detected the writing cursor is instructed to write to the same line once more.
void play_remove_lines() {
// Start both cursors at the end of the playfield
byte r = PLAYFIELD_LINES*PLAYFIELD_COLS-1;
byte w = PLAYFIELD_LINES*PLAYFIELD_COLS-1;
// Read all lines and rewrite them
for(byte y:0..PLAYFIELD_LINES-1) {
byte full = 1;
for(byte x:0..PLAYFIELD_COLS-1) {
byte c = playfield[r--];
if(c==0) {
full = 0;
}
playfield[w--] = c;
}
// If the line is full then re-write it.
if(full==1) {
w = w + PLAYFIELD_COLS;
}
}
// Write zeros in the rest of the lines
while(w!=$ff) {
playfield[w--] = 0;
}
}
// Initialize data tables
void play_init() {
// Initialize the playfield line pointers;
byte idx = 0;
byte* pli = playfield;
for(byte j:0..PLAYFIELD_LINES-1) {
playfield_lines[j<<1] = pli;
playfield_lines_idx[j] = idx;
pli += PLAYFIELD_COLS;
idx += PLAYFIELD_COLS;
}
playfield_lines_idx[PLAYFIELD_LINES] = PLAYFIELD_COLS*PLAYFIELD_LINES;
}

View File

@ -0,0 +1,67 @@
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)
}}
// Pointers to the screen address for rendering each playfield line
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);
// Initialize the screen line pointers;
byte* li = COLS + 40 + 15;
for(byte i:0..PLAYFIELD_LINES+2) {
screen_lines[i<<1] = li;
li += 40;
}
// Prepare the playfield frame
byte* line = COLS + 14;
for(byte l:0..PLAYFIELD_LINES+1) {
for(byte c:0..PLAYFIELD_COLS+1) {
*(line+c) = DARK_GREY;
}
line +=40;
}
}
// Render the static playfield on the screen
void render_playfield() {
byte i = 0;
for(byte l:0..PLAYFIELD_LINES-1) {
byte* line = screen_lines[l<<1];
for(byte c:0..PLAYFIELD_COLS-1) {
*(line++) = playfield[i++];
}
}
}
// Render the current moving piece at position (current_xpos, current_ypos)
void render_current() {
byte i = 0;
byte ypos2 = current_ypos<<1;
for(byte l:0..3) {
if(ypos2<2*PLAYFIELD_LINES) {
byte* screen_line = screen_lines[ypos2];
byte xpos = current_xpos;
for(byte c:0..3) {
byte current_cell = current_piece_gfx[i++];
if(current_cell!=0) {
if(xpos<PLAYFIELD_COLS) {
screen_line[xpos] = current_piece_color;
}
}
xpos++;
}
}
ypos2 += 2;
}
}

View File

@ -1,15 +1,20 @@
// A sprite multiplexer covering the playfield with a black layer to give the pixel perfect 3-single-color NES playfield
import "c64"
import "tetris-data"
// Address of the sprites covering the playfield
const byte* PLAYFIELD_SPRITES = $2000;
// Address for the charset
const byte* PLAYFIELD_CHARSET = $1000;
// Address of the screen
const byte* PLAYFIELD_SCREEN = $0400;
// Screen Sprite pointers
const byte* PLAYFIELD_SPRITE_PTRS = (PLAYFIELD_SCREEN+SPRITE_PTRS);
kickasm(pc PLAYFIELD_SPRITES, resource "nes-playfield.png") {{
.var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000))
.for(var sy=0;sy<10;sy++) {
.for(var sx=0;sx<3;sx++) {
.for (var y=0;y<21; y++) {
.for (var c=0; c<3; c++) {
.byte sprites.getSinglecolorByte(sx*3+c,sy*21+y)
}
}
.byte 0
}
}
}}
// Setup the sprites
void init_sprites() {
@ -106,18 +111,3 @@ interrupt(hardware_clobber) void irq() {
*BORDERCOL = BLACK;
}
kickasm(pc PLAYFIELD_SPRITES, resource "nes-playfield.png") {{
.var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000))
.for(var sy=0;sy<10;sy++) {
.for(var sx=0;sx<3;sx++) {
.for (var y=0;y<21; y++) {
.for (var c=0; c<3; c++) {
.byte sprites.getSinglecolorByte(sx*3+c,sy*21+y)
}
}
.byte 0
}
}
}}

View File

@ -3,55 +3,16 @@ import "c64"
import "memory"
import "keyboard"
import "sid"
import "tetris-pieces"
// The size of the playfield
const byte PLAYFIELD_LINES = 22;
const byte PLAYFIELD_COLS = 10;
// The playfield. 0 is empty non-zero is color.
// The playfield is layed out line by line, meaning the first 10 bytes are line 1, the next 10 line 2 and so forth,
byte[PLAYFIELD_LINES*PLAYFIELD_COLS] playfield;
// Pointers to the playfield address for each playfield line
byte*[PLAYFIELD_LINES] playfield_lines;
// Indixes into the playfield for each playfield line
byte[PLAYFIELD_LINES+1] playfield_lines_idx;
// The current moving piece. Points to the start of the piece definition.
byte* current_piece = 0;
// The curent piece orientation - each piece have 4 orientations (00/$10/$20/$30).
// The orientation chooses one of the 4 sub-graphics of the piece.
byte current_orientation = 0;
// 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;
// Position of top left corner of current moving piece on the playfield
byte current_xpos = 3;
byte current_ypos = 0;
// The rate of moving down the current piece (number of frames between moves if movedown is not forced)
const byte current_movedown_slow = 50;
// The rate of moving down the current piece fast (number of frames between moves if movedown is not forced)
const byte current_movedown_fast = 5;
// Counts up to the next movedown of current piece
byte current_movedown_counter = 0;
import "tetris-data"
import "tetris-render"
import "tetris-play"
void main() {
sid_rnd_init();
asm { sei }
render_init();
tables_init();
spawn_current();
play_init();
play_spawn_current();
render_playfield();
render_current();
while(true) {
@ -73,274 +34,3 @@ void main() {
(*BORDERCOL)--;
}
}
// Move down the current piece
// Return non-zero if a render is needed
byte play_move_down(byte key_event) {
// Handle moving down current piece
++current_movedown_counter;
byte movedown = 0;
// As soon as space is pressed move down once
if(key_event==KEY_SPACE) {
movedown++;
}
// While space is held down move down faster
if(keyboard_event_pressed(KEY_SPACE)!=0) {
if(current_movedown_counter>=current_movedown_fast) {
movedown++;
}
}
// Move down slowly otherwise
if(current_movedown_counter>=current_movedown_slow) {
movedown++;
}
// Attempt movedown
if(movedown!=0) {
if(collision(current_xpos,current_ypos+1,current_orientation)==COLLISION_NONE) {
// Move current piece down
current_ypos++;
} else {
// Lock current piece
lock_current();
// Check for new lines
remove_lines();
// Spawn a new piece
spawn_current();
}
current_movedown_counter = 0;
return 1;
}
return 0;
}
// Move left/right or rotate the current piece
// Return non-zero if a render is needed
byte play_move_leftright(byte key_event) {
// Handle keyboard events
if(key_event==KEY_COMMA) {
if(collision(current_xpos-1,current_ypos,current_orientation)==COLLISION_NONE) {
current_xpos--;
return 1;
}
} else if(key_event==KEY_DOT) {
if(collision(current_xpos+1,current_ypos,current_orientation)==COLLISION_NONE) {
current_xpos++;
return 1;
}
}
return 0;
}
// Rotate the current piece based on key-presses
// Return non-zero if a render is needed
byte play_move_rotate(byte key_event) {
// Handle keyboard events
byte orientation = $80;
if(key_event==KEY_Z) {
orientation = (current_orientation-$10)&$3f;
} else if(key_event==KEY_X) {
orientation = (current_orientation+$10)&$3f;
} else {
return 0;
}
if(collision(current_xpos, current_ypos, orientation) == COLLISION_NONE) {
current_orientation = orientation;
current_piece_gfx = current_piece + current_orientation;
return 1;
}
return 0;
}
// No collision
const byte COLLISION_NONE = 0;
// Playfield piece collision (cell on top of other cell on the playfield)
const byte COLLISION_PLAYFIELD = 1;
// Bottom collision (cell below bottom of the playfield)
const byte COLLISION_BOTTOM = 2;
// Left side collision (cell beyond the left side of the playfield)
const byte COLLISION_LEFT = 4;
// Right side collision (cell beyond the right side of the playfield)
const byte COLLISION_RIGHT = 8;
// Test if there is a collision between the current piece moved to (x, y) and anything on the playfield or the playfield boundaries
// Returns information about the type of the collision detected
byte collision(byte xpos, byte ypos, byte orientation) {
byte* piece_gfx = current_piece + orientation;
byte i = 0;
byte ypos2 = ypos<<1;
for(byte l:0..3) {
byte* playfield_line = playfield_lines[ypos2];
byte col = xpos;
for(byte c:0..3) {
if(piece_gfx[i++]!=0) {
if(ypos2>=2*PLAYFIELD_LINES) {
// Below the playfield bottom
return COLLISION_BOTTOM;
}
if((col&$80)!=0) {
// Beyond left side of the playfield
return COLLISION_LEFT;
}
if(col>=PLAYFIELD_COLS) {
// Beyond left side of the playfield
return COLLISION_RIGHT;
}
if(playfield_line[col]!=0) {
// Collision with a playfield cell
return COLLISION_PLAYFIELD;
}
}
col++;
}
ypos2 += 2;
}
return COLLISION_NONE;
}
// Lock the current piece onto the playfield
void lock_current() {
byte i = 0;
byte ypos2 = current_ypos<<1;
for(byte l:0..3) {
byte* playfield_line = playfield_lines[ypos2];
byte col = current_xpos;
for(byte c:0..3) {
if(current_piece_gfx[i++]!=0) {
playfield_line[col] = current_piece_color;
}
col++;
}
ypos2 += 2;
}
}
// Spawn a new piece
void spawn_current() {
// Pick a random piece (0-6)
byte piece_idx = 7;
while(piece_idx==7) {
piece_idx = sid_rnd()&7;
}
current_piece = PIECES[piece_idx<<1];
current_orientation = 0;
current_piece_gfx = current_piece + current_orientation;
current_xpos = 3;
current_ypos = 0;
current_piece_color = PIECES_COLORS[piece_idx];
}
// Look through the playfield for lines - and remove any lines found
// Utilizes two cursors on the playfield - one reading cells and one writing cells
// Whenever a full line is detected the writing cursor is instructed to write to the same line once more.
void remove_lines() {
// Start both cursors at the end of the playfield
byte r = PLAYFIELD_LINES*PLAYFIELD_COLS-1;
byte w = PLAYFIELD_LINES*PLAYFIELD_COLS-1;
// Read all lines and rewrite them
for(byte y:0..PLAYFIELD_LINES-1) {
byte full = 1;
for(byte x:0..PLAYFIELD_COLS-1) {
byte c = playfield[r--];
if(c==0) {
full = 0;
}
playfield[w--] = c;
}
// If the line is full then re-write it.
if(full==1) {
w = w + PLAYFIELD_COLS;
}
}
// Write zeros in the rest of the lines
while(w!=$ff) {
playfield[w--] = 0;
}
}
// Initialize data tables
void tables_init() {
// Initialize the playfield line pointers;
byte idx = 0;
byte* pli = playfield;
for(byte j:0..PLAYFIELD_LINES-1) {
playfield_lines[j<<1] = pli;
playfield_lines_idx[j] = idx;
pli += PLAYFIELD_COLS;
idx += PLAYFIELD_COLS;
}
playfield_lines_idx[PLAYFIELD_LINES] = PLAYFIELD_COLS*PLAYFIELD_LINES;
}
// The screen
byte* SCREEN = $400;
// The charset
byte* CHARSET = $2800;
kickasm(pc CHARSET, resource "charset.png") {{
.var charset = LoadPicture("charset.png", List().add($000000, $ffffff, $523fa0, $77c1c9))
.for (var c=0; c<16; c++)
.for (var y=0;y<8; y++)
.byte charset.getMulticolorByte(c,y)
}}
// Pointers to the screen address for rendering each playfield line
byte*[PLAYFIELD_LINES+3] screen_lines;
// Initialize rendering
void render_init() {
*BGCOL = BLACK;
// Clear the screen
fill(SCREEN,1000,$d0);
fill(COLS,1000,BLACK);
// Initialize the screen line pointers;
byte* li = COLS + 40 + 15;
for(byte i:0..PLAYFIELD_LINES+2) {
screen_lines[i<<1] = li;
li += 40;
}
// Prepare the playfield frame
byte* line = COLS + 14;
for(byte l:0..PLAYFIELD_LINES+1) {
for(byte c:0..PLAYFIELD_COLS+1) {
*(line+c) = DARK_GREY;
}
line +=40;
}
}
// Render the static playfield on the screen
void render_playfield() {
byte i = 0;
for(byte l:0..PLAYFIELD_LINES-1) {
byte* line = screen_lines[l<<1];
for(byte c:0..PLAYFIELD_COLS-1) {
*(line++) = playfield[i++];
}
}
}
// Render the current moving piece at position (current_xpos, current_ypos)
void render_current() {
byte i = 0;
byte ypos2 = current_ypos<<1;
for(byte l:0..3) {
if(ypos2<2*PLAYFIELD_LINES) {
byte* screen_line = screen_lines[ypos2];
byte xpos = current_xpos;
for(byte c:0..3) {
byte current_cell = current_piece_gfx[i++];
if(current_cell!=0) {
if(xpos<PLAYFIELD_COLS) {
screen_line[xpos] = current_piece_color;
}
}
xpos++;
}
}
ypos2 += 2;
}
}

View File

@ -27,9 +27,11 @@
.label HARDWARE_IRQ = $fffe
.const BLACK = 0
.const DARK_GREY = $b
.label PLAYFIELD_SPRITES = $2000
.label PLAYFIELD_CHARSET = $1000
.label PLAYFIELD_SCREEN = $400
.label PLAYFIELD_SPRITES = $2000
.label PLAYFIELD_CHARSET = $2800
.const PLAYFIELD_LINES = $16
.const PLAYFIELD_COLS = $a
.const IRQ_RASTER_FIRST = $31
.label PLAYFIELD_SPRITE_PTRS = PLAYFIELD_SCREEN+SPRITE_PTRS
.const toSpritePtr1_return = PLAYFIELD_SPRITES>>6

View File

@ -1,18 +1,7 @@
@begin: scope:[] from
[0] phi()
to:@5
@5: scope:[] from @begin
[1] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0
[2] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50
to:toSpritePtr1
toSpritePtr1: scope:[] from @5
[3] phi()
to:@9
@9: scope:[] from toSpritePtr1
[4] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0
[5] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:@7
@7: scope:[] from @9
to:@4
@4: scope:[] from @begin
kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000))
.for(var sy=0;sy<10;sy++) {
.for(var sx=0;sx<3;sx++) {
@ -25,8 +14,19 @@ toSpritePtr1: scope:[] from @5
}
}
}}
to:@5
@5: scope:[] from @4
[2] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0
[3] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50
to:toSpritePtr1
toSpritePtr1: scope:[] from @5
[4] phi()
to:@9
@9: scope:[] from toSpritePtr1
[5] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0
[6] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:@8
@8: scope:[] from @7
@8: scope:[] from @9
[7] phi()
[8] call main
to:@end

View File

@ -2,7 +2,7 @@ Resolved forward reference irq to interrupt(HARDWARE_CLOBBER)(void()) irq()
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
Inlined call call vicSelectGfxBank (byte*) PLAYFIELD_SCREEN
Inlined call (byte~) init_sprites::$1 ← call toD018 (byte*) PLAYFIELD_SCREEN (byte*) PLAYFIELD_CHARSET
Inlined call (byte~) $1 ← call toSpritePtr (byte*) PLAYFIELD_SPRITES
Inlined call (byte~) $2 ← call toSpritePtr (byte*) PLAYFIELD_SPRITES
Inlined call (byte~) irq::$2 ← call toSpritePtr (byte*) PLAYFIELD_SPRITES
CONTROL FLOW GRAPH SSA
@ -88,21 +88,44 @@ CONTROL FLOW GRAPH SSA
(byte) LIGHT_GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) 15
to:@4
@4: scope:[] from @begin
(byte*) PLAYFIELD_SPRITES#0 ← ((byte*)) (word/signed word/dword/signed dword) 8192
(byte*) PLAYFIELD_CHARSET#0 ← ((byte*)) (word/signed word/dword/signed dword) 4096
(byte*) PLAYFIELD_SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
(byte*~) $0 ← (byte*) PLAYFIELD_SCREEN#0 + (word) SPRITE_PTRS#0
(byte*) PLAYFIELD_SPRITE_PTRS#0 ← (byte*~) $0
(byte*) PLAYFIELD_SPRITES#0 ← ((byte*)) (word/signed word/dword/signed dword) 8192
(byte*) PLAYFIELD_CHARSET#0 ← ((byte*)) (word/signed word/dword/signed dword) 10240
(byte) PLAYFIELD_LINES#0 ← (byte/signed byte/word/signed word/dword/signed dword) 22
(byte) PLAYFIELD_COLS#0 ← (byte/signed byte/word/signed word/dword/signed dword) 10
(byte~) $1 ← (byte) PLAYFIELD_LINES#0 * (byte) PLAYFIELD_COLS#0
(byte[$1]) playfield#0 ← { fill( $1, 0) }
(byte*) current_piece_gfx#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) current_piece_color#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) current_xpos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) current_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
kickasm(location (byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000))
.for(var sy=0;sy<10;sy++) {
.for(var sx=0;sx<3;sx++) {
.for (var y=0;y<21; y++) {
.for (var c=0; c<3; c++) {
.byte sprites.getSinglecolorByte(sx*3+c,sy*21+y)
}
}
.byte 0
}
}
}}
to:@5
init_sprites: scope:[init_sprites] from main
(byte*) PLAYFIELD_CHARSET#6 ← phi( main/(byte*) PLAYFIELD_CHARSET#7 )
(byte*) init_sprites::vicSelectGfxBank1_gfx#0 ← (byte*) PLAYFIELD_SCREEN#0
to:init_sprites::vicSelectGfxBank1
init_sprites::vicSelectGfxBank1: scope:[init_sprites] from init_sprites
(byte*) PLAYFIELD_CHARSET#5 ← phi( init_sprites/(byte*) PLAYFIELD_CHARSET#6 )
(byte*) init_sprites::vicSelectGfxBank1_gfx#1 ← phi( init_sprites/(byte*) init_sprites::vicSelectGfxBank1_gfx#0 )
*((byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3
(byte*) init_sprites::vicSelectGfxBank1_toDd001_gfx#0 ← (byte*) init_sprites::vicSelectGfxBank1_gfx#1
to:init_sprites::vicSelectGfxBank1_toDd001
init_sprites::vicSelectGfxBank1_toDd001: scope:[init_sprites] from init_sprites::vicSelectGfxBank1
(byte*) PLAYFIELD_CHARSET#4 ← phi( init_sprites::vicSelectGfxBank1/(byte*) PLAYFIELD_CHARSET#5 )
(byte*) init_sprites::vicSelectGfxBank1_toDd001_gfx#1 ← phi( init_sprites::vicSelectGfxBank1/(byte*) init_sprites::vicSelectGfxBank1_toDd001_gfx#0 )
(word) init_sprites::vicSelectGfxBank1_toDd001_$0#0 ← ((word)) (byte*) init_sprites::vicSelectGfxBank1_toDd001_gfx#1
(byte) init_sprites::vicSelectGfxBank1_toDd001_$1#0 ← > (word) init_sprites::vicSelectGfxBank1_toDd001_$0#0
@ -111,17 +134,20 @@ init_sprites::vicSelectGfxBank1_toDd001: scope:[init_sprites] from init_sprites
(byte) init_sprites::vicSelectGfxBank1_toDd001_return#0 ← (byte/word/dword) init_sprites::vicSelectGfxBank1_toDd001_$3#0
to:init_sprites::vicSelectGfxBank1_toDd001_@return
init_sprites::vicSelectGfxBank1_toDd001_@return: scope:[init_sprites] from init_sprites::vicSelectGfxBank1_toDd001
(byte*) PLAYFIELD_CHARSET#3 ← phi( init_sprites::vicSelectGfxBank1_toDd001/(byte*) PLAYFIELD_CHARSET#4 )
(byte) init_sprites::vicSelectGfxBank1_toDd001_return#2 ← phi( init_sprites::vicSelectGfxBank1_toDd001/(byte) init_sprites::vicSelectGfxBank1_toDd001_return#0 )
(byte) init_sprites::vicSelectGfxBank1_toDd001_return#1 ← (byte) init_sprites::vicSelectGfxBank1_toDd001_return#2
to:init_sprites::vicSelectGfxBank1_@1
init_sprites::vicSelectGfxBank1_@1: scope:[init_sprites] from init_sprites::vicSelectGfxBank1_toDd001_@return
(byte*) PLAYFIELD_CHARSET#2 ← phi( init_sprites::vicSelectGfxBank1_toDd001_@return/(byte*) PLAYFIELD_CHARSET#3 )
(byte) init_sprites::vicSelectGfxBank1_toDd001_return#3 ← phi( init_sprites::vicSelectGfxBank1_toDd001_@return/(byte) init_sprites::vicSelectGfxBank1_toDd001_return#1 )
(byte) init_sprites::vicSelectGfxBank1_$0#0 ← (byte) init_sprites::vicSelectGfxBank1_toDd001_return#3
*((byte*) CIA2_PORT_A#0) ← (byte) init_sprites::vicSelectGfxBank1_$0#0
to:init_sprites::@3
init_sprites::@3: scope:[init_sprites] from init_sprites::vicSelectGfxBank1_@1
(byte*) PLAYFIELD_CHARSET#1 ← phi( init_sprites::vicSelectGfxBank1_@1/(byte*) PLAYFIELD_CHARSET#2 )
(byte*) init_sprites::toD0181_screen#0 ← (byte*) PLAYFIELD_SCREEN#0
(byte*) init_sprites::toD0181_gfx#0 ← (byte*) PLAYFIELD_CHARSET#0
(byte*) init_sprites::toD0181_gfx#0 ← (byte*) PLAYFIELD_CHARSET#1
to:init_sprites::toD0181
init_sprites::toD0181: scope:[init_sprites] from init_sprites::@3
(byte*) init_sprites::toD0181_gfx#1 ← phi( init_sprites::@3/(byte*) init_sprites::toD0181_gfx#0 )
@ -171,14 +197,16 @@ init_sprites::@return: scope:[init_sprites] from init_sprites::@1
return
to:@return
@5: scope:[] from @4
(byte*) PLAYFIELD_CHARSET#12 ← phi( @4/(byte*) PLAYFIELD_CHARSET#0 )
(byte) IRQ_RASTER_FIRST#0 ← (byte/signed byte/word/signed word/dword/signed dword) 49
(byte) irq_raster_next#0 ← (byte) IRQ_RASTER_FIRST#0
(byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50
(byte*) toSpritePtr1_sprite#0 ← (byte*) PLAYFIELD_SPRITES#0
to:toSpritePtr1
toSpritePtr1: scope:[] from @5
(byte) irq_raster_next#19 ← phi( @5/(byte) irq_raster_next#0 )
(byte) irq_sprite_ypos#18 ← phi( @5/(byte) irq_sprite_ypos#0 )
(byte*) PLAYFIELD_CHARSET#11 ← phi( @5/(byte*) PLAYFIELD_CHARSET#12 )
(byte) irq_raster_next#18 ← phi( @5/(byte) irq_raster_next#0 )
(byte) irq_sprite_ypos#16 ← phi( @5/(byte) irq_sprite_ypos#0 )
(byte*) toSpritePtr1_sprite#1 ← phi( @5/(byte*) toSpritePtr1_sprite#0 )
(word) toSpritePtr1_$0#0 ← ((word)) (byte*) toSpritePtr1_sprite#1
(word) toSpritePtr1_$1#0 ← (word) toSpritePtr1_$0#0 >> (byte/signed byte/word/signed word/dword/signed dword) 6
@ -186,19 +214,21 @@ toSpritePtr1: scope:[] from @5
(byte) toSpritePtr1_return#0 ← (byte) toSpritePtr1_$2#0
to:toSpritePtr1_@return
toSpritePtr1_@return: scope:[] from toSpritePtr1
(byte) irq_raster_next#18 ← phi( toSpritePtr1/(byte) irq_raster_next#19 )
(byte) irq_sprite_ypos#16 ← phi( toSpritePtr1/(byte) irq_sprite_ypos#18 )
(byte*) PLAYFIELD_CHARSET#10 ← phi( toSpritePtr1/(byte*) PLAYFIELD_CHARSET#11 )
(byte) irq_raster_next#17 ← phi( toSpritePtr1/(byte) irq_raster_next#18 )
(byte) irq_sprite_ypos#14 ← phi( toSpritePtr1/(byte) irq_sprite_ypos#16 )
(byte) toSpritePtr1_return#2 ← phi( toSpritePtr1/(byte) toSpritePtr1_return#0 )
(byte) toSpritePtr1_return#1 ← (byte) toSpritePtr1_return#2
to:@9
@9: scope:[] from toSpritePtr1_@return
(byte) irq_raster_next#17 ← phi( toSpritePtr1_@return/(byte) irq_raster_next#18 )
(byte) irq_sprite_ypos#15 ← phi( toSpritePtr1_@return/(byte) irq_sprite_ypos#16 )
(byte*) PLAYFIELD_CHARSET#9 ← phi( toSpritePtr1_@return/(byte*) PLAYFIELD_CHARSET#10 )
(byte) irq_raster_next#16 ← phi( toSpritePtr1_@return/(byte) irq_raster_next#17 )
(byte) irq_sprite_ypos#13 ← phi( toSpritePtr1_@return/(byte) irq_sprite_ypos#14 )
(byte) toSpritePtr1_return#3 ← phi( toSpritePtr1_@return/(byte) toSpritePtr1_return#1 )
(byte~) $1 ← (byte) toSpritePtr1_return#3
(byte) irq_sprite_ptr#0 ← (byte~) $1
(byte~) $2 ← (byte) toSpritePtr1_return#3
(byte) irq_sprite_ptr#0 ← (byte~) $2
(byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:@7
to:@8
init_irq: scope:[init_irq] from main::@7
asm { sei }
*((byte*) IRQ_STATUS#0) ← (byte) IRQ_RASTER#0
@ -259,8 +289,8 @@ irq::@2: scope:[irq] from irq::@5
(byte*) irq::toSpritePtr2_sprite#0 ← (byte*) PLAYFIELD_SPRITES#0
to:irq::toSpritePtr2
irq::toSpritePtr2: scope:[irq] from irq::@2
(byte) irq_sprite_ypos#19 ← phi( irq::@2/(byte) irq_sprite_ypos#1 )
(byte) irq_cnt#16 ← phi( irq::@2/(byte) irq_cnt#2 )
(byte) irq_sprite_ypos#18 ← phi( irq::@2/(byte) irq_sprite_ypos#1 )
(byte) irq_cnt#15 ← phi( irq::@2/(byte) irq_cnt#2 )
(byte) irq_raster_next#14 ← phi( irq::@2/(byte) irq_raster_next#1 )
(byte*) irq::toSpritePtr2_sprite#1 ← phi( irq::@2/(byte*) irq::toSpritePtr2_sprite#0 )
(word) irq::toSpritePtr2_$0#0 ← ((word)) (byte*) irq::toSpritePtr2_sprite#1
@ -269,14 +299,14 @@ irq::toSpritePtr2: scope:[irq] from irq::@2
(byte) irq::toSpritePtr2_return#0 ← (byte) irq::toSpritePtr2_$2#0
to:irq::toSpritePtr2_@return
irq::toSpritePtr2_@return: scope:[irq] from irq::toSpritePtr2
(byte) irq_sprite_ypos#17 ← phi( irq::toSpritePtr2/(byte) irq_sprite_ypos#19 )
(byte) irq_cnt#14 ← phi( irq::toSpritePtr2/(byte) irq_cnt#16 )
(byte) irq_sprite_ypos#17 ← phi( irq::toSpritePtr2/(byte) irq_sprite_ypos#18 )
(byte) irq_cnt#14 ← phi( irq::toSpritePtr2/(byte) irq_cnt#15 )
(byte) irq_raster_next#11 ← phi( irq::toSpritePtr2/(byte) irq_raster_next#14 )
(byte) irq::toSpritePtr2_return#2 ← phi( irq::toSpritePtr2/(byte) irq::toSpritePtr2_return#0 )
(byte) irq::toSpritePtr2_return#1 ← (byte) irq::toSpritePtr2_return#2
to:irq::@9
irq::@9: scope:[irq] from irq::toSpritePtr2_@return
(byte) irq_sprite_ypos#14 ← phi( irq::toSpritePtr2_@return/(byte) irq_sprite_ypos#17 )
(byte) irq_sprite_ypos#15 ← phi( irq::toSpritePtr2_@return/(byte) irq_sprite_ypos#17 )
(byte) irq_cnt#13 ← phi( irq::toSpritePtr2_@return/(byte) irq_cnt#14 )
(byte) irq_raster_next#8 ← phi( irq::toSpritePtr2_@return/(byte) irq_raster_next#11 )
(byte) irq::toSpritePtr2_return#3 ← phi( irq::toSpritePtr2_@return/(byte) irq::toSpritePtr2_return#1 )
@ -294,7 +324,7 @@ irq::@6: scope:[irq] from irq::@5
to:irq::@3
irq::@3: scope:[irq] from irq::@6 irq::@9
(byte) irq_sprite_ptr#10 ← phi( irq::@6/(byte) irq_sprite_ptr#2 irq::@9/(byte) irq_sprite_ptr#1 )
(byte) irq_sprite_ypos#11 ← phi( irq::@6/(byte) irq_sprite_ypos#2 irq::@9/(byte) irq_sprite_ypos#14 )
(byte) irq_sprite_ypos#11 ← phi( irq::@6/(byte) irq_sprite_ypos#2 irq::@9/(byte) irq_sprite_ypos#15 )
(byte) irq_cnt#9 ← phi( irq::@6/(byte) irq_cnt#12 irq::@9/(byte) irq_cnt#13 )
(byte) irq_raster_next#5 ← phi( irq::@6/(byte) irq_raster_next#2 irq::@9/(byte) irq_raster_next#8 )
(byte) irq::raster_next#0 ← (byte) irq_raster_next#5
@ -332,25 +362,8 @@ irq::@return: scope:[irq] from irq::@4
(byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#6
return
to:@return
@7: scope:[] from @9
(byte) irq_raster_next#16 ← phi( @9/(byte) irq_raster_next#17 )
(byte) irq_cnt#15 ← phi( @9/(byte) irq_cnt#0 )
(byte) irq_sprite_ptr#13 ← phi( @9/(byte) irq_sprite_ptr#0 )
(byte) irq_sprite_ypos#13 ← phi( @9/(byte) irq_sprite_ypos#15 )
kickasm(location (byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000))
.for(var sy=0;sy<10;sy++) {
.for(var sx=0;sx<3;sx++) {
.for (var y=0;y<21; y++) {
.for (var c=0; c<3; c++) {
.byte sprites.getSinglecolorByte(sx*3+c,sy*21+y)
}
}
.byte 0
}
}
}}
to:@8
main: scope:[main] from @8
(byte*) PLAYFIELD_CHARSET#7 ← phi( @8/(byte*) PLAYFIELD_CHARSET#8 )
call init_sprites
to:main::@7
main::@7: scope:[main] from main
@ -367,11 +380,12 @@ main::@2: scope:[main] from main::@1
main::@return: scope:[main] from main::@1
return
to:@return
@8: scope:[] from @7
(byte) irq_raster_next#15 ← phi( @7/(byte) irq_raster_next#16 )
(byte) irq_cnt#11 ← phi( @7/(byte) irq_cnt#15 )
(byte) irq_sprite_ptr#12 ← phi( @7/(byte) irq_sprite_ptr#13 )
(byte) irq_sprite_ypos#8 ← phi( @7/(byte) irq_sprite_ypos#13 )
@8: scope:[] from @9
(byte*) PLAYFIELD_CHARSET#8 ← phi( @9/(byte*) PLAYFIELD_CHARSET#9 )
(byte) irq_raster_next#15 ← phi( @9/(byte) irq_raster_next#16 )
(byte) irq_cnt#11 ← phi( @9/(byte) irq_cnt#0 )
(byte) irq_sprite_ptr#12 ← phi( @9/(byte) irq_sprite_ptr#0 )
(byte) irq_sprite_ypos#8 ← phi( @9/(byte) irq_sprite_ypos#13 )
call main
to:@10
@10: scope:[] from @8
@ -381,10 +395,10 @@ main::@return: scope:[main] from main::@1
SYMBOL TABLE SSA
(byte*~) $0
(byte~) $1
(byte~) $2
(label) @10
(label) @4
(label) @5
(label) @7
(label) @8
(label) @9
(label) @begin
@ -481,6 +495,22 @@ SYMBOL TABLE SSA
(byte) PINK#0
(byte*) PLAYFIELD_CHARSET
(byte*) PLAYFIELD_CHARSET#0
(byte*) PLAYFIELD_CHARSET#1
(byte*) PLAYFIELD_CHARSET#10
(byte*) PLAYFIELD_CHARSET#11
(byte*) PLAYFIELD_CHARSET#12
(byte*) PLAYFIELD_CHARSET#2
(byte*) PLAYFIELD_CHARSET#3
(byte*) PLAYFIELD_CHARSET#4
(byte*) PLAYFIELD_CHARSET#5
(byte*) PLAYFIELD_CHARSET#6
(byte*) PLAYFIELD_CHARSET#7
(byte*) PLAYFIELD_CHARSET#8
(byte*) PLAYFIELD_CHARSET#9
(byte) PLAYFIELD_COLS
(byte) PLAYFIELD_COLS#0
(byte) PLAYFIELD_LINES
(byte) PLAYFIELD_LINES#0
(byte*) PLAYFIELD_SCREEN
(byte*) PLAYFIELD_SCREEN#0
(byte*) PLAYFIELD_SPRITES
@ -557,6 +587,14 @@ SYMBOL TABLE SSA
(byte) WHITE#0
(byte) YELLOW
(byte) YELLOW#0
(byte) current_piece_color
(byte) current_piece_color#0
(byte*) current_piece_gfx
(byte*) current_piece_gfx#0
(byte) current_xpos
(byte) current_xpos#0
(byte) current_ypos
(byte) current_ypos#0
(void()) init_irq()
(void()*~) init_irq::$0
(label) init_irq::@return
@ -689,7 +727,6 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte) irq_cnt#13
(byte) irq_cnt#14
(byte) irq_cnt#15
(byte) irq_cnt#16
(byte) irq_cnt#2
(byte) irq_cnt#3
(byte) irq_cnt#4
@ -710,7 +747,6 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte) irq_raster_next#16
(byte) irq_raster_next#17
(byte) irq_raster_next#18
(byte) irq_raster_next#19
(byte) irq_raster_next#2
(byte) irq_raster_next#3
(byte) irq_raster_next#4
@ -725,7 +761,6 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte) irq_sprite_ptr#10
(byte) irq_sprite_ptr#11
(byte) irq_sprite_ptr#12
(byte) irq_sprite_ptr#13
(byte) irq_sprite_ptr#2
(byte) irq_sprite_ptr#3
(byte) irq_sprite_ptr#4
@ -746,7 +781,6 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte) irq_sprite_ypos#16
(byte) irq_sprite_ypos#17
(byte) irq_sprite_ypos#18
(byte) irq_sprite_ypos#19
(byte) irq_sprite_ypos#2
(byte) irq_sprite_ypos#3
(byte) irq_sprite_ypos#4
@ -761,6 +795,8 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(label) main::@7
(label) main::@8
(label) main::@return
(byte[$1]) playfield
(byte[$1]) playfield#0
(label) toSpritePtr1
(word~) toSpritePtr1_$0
(word) toSpritePtr1_$0#0
@ -783,11 +819,12 @@ Culled Empty Block (label) @10
Successful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not (bool~) irq::$5 ← (byte~) irq::$3 != (byte/signed byte/word/signed word/dword/signed dword) 3 from (bool~) irq::$4 ← (byte~) irq::$3 == (byte/signed byte/word/signed word/dword/signed dword) 3
Successful SSA optimization Pass2UnaryNotSimplification
Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte) irq_raster_next#0 (byte) irq_raster_next#19 (byte) irq_raster_next#18 (byte) irq_raster_next#17 (byte) irq_raster_next#16 (byte) irq_raster_next#15
Alias candidate removed (volatile)(byte) toSpritePtr1_return#0 = (byte) toSpritePtr1_$2#0 (byte) toSpritePtr1_return#2 (byte) toSpritePtr1_return#1 (byte) toSpritePtr1_return#3 (byte~) $1 (byte) irq_sprite_ptr#0 (byte) irq_sprite_ptr#13 (byte) irq_sprite_ptr#12
Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte) irq_raster_next#0 (byte) irq_raster_next#18 (byte) irq_raster_next#17 (byte) irq_raster_next#16 (byte) irq_raster_next#15
Alias candidate removed (volatile)(byte) toSpritePtr1_return#0 = (byte) toSpritePtr1_$2#0 (byte) toSpritePtr1_return#2 (byte) toSpritePtr1_return#1 (byte) toSpritePtr1_return#3 (byte~) $2 (byte) irq_sprite_ptr#0 (byte) irq_sprite_ptr#12
Alias candidate removed (volatile)(byte) irq::toSpritePtr2_return#0 = (byte) irq::toSpritePtr2_$2#0 (byte) irq::toSpritePtr2_return#2 (byte) irq::toSpritePtr2_return#1 (byte) irq::toSpritePtr2_return#3 (byte~) irq::$2 (byte) irq_sprite_ptr#1
Alias (byte*) PLAYFIELD_SPRITE_PTRS#0 = (byte*~) $0
Alias (byte*) init_sprites::vicSelectGfxBank1_gfx#0 = (byte*) init_sprites::vicSelectGfxBank1_gfx#1 (byte*) init_sprites::vicSelectGfxBank1_toDd001_gfx#0 (byte*) init_sprites::vicSelectGfxBank1_toDd001_gfx#1
Alias (byte*) PLAYFIELD_CHARSET#1 = (byte*) PLAYFIELD_CHARSET#5 (byte*) PLAYFIELD_CHARSET#6 (byte*) PLAYFIELD_CHARSET#4 (byte*) PLAYFIELD_CHARSET#3 (byte*) PLAYFIELD_CHARSET#2
Alias (byte) init_sprites::vicSelectGfxBank1_toDd001_return#0 = (byte/word/dword) init_sprites::vicSelectGfxBank1_toDd001_$3#0 (byte) init_sprites::vicSelectGfxBank1_toDd001_return#2 (byte) init_sprites::vicSelectGfxBank1_toDd001_return#1 (byte) init_sprites::vicSelectGfxBank1_toDd001_return#3 (byte) init_sprites::vicSelectGfxBank1_$0#0
Alias (byte*) init_sprites::toD0181_screen#0 = (byte*) init_sprites::toD0181_screen#1
Alias (byte*) init_sprites::toD0181_gfx#0 = (byte*) init_sprites::toD0181_gfx#1
@ -795,16 +832,17 @@ Alias (byte) init_sprites::toD0181_return#0 = (byte) init_sprites::toD0181_$8#0
Alias (byte) init_sprites::xpos#0 = (byte/signed word/word/dword/signed dword/signed byte~) init_sprites::$3
Alias (byte) init_sprites::s2#0 = (byte~) init_sprites::$4
Alias (byte) init_sprites::xpos#1 = (byte/signed word/word/dword/signed dword~) init_sprites::$5
Alias (byte*) PLAYFIELD_CHARSET#0 = (byte*) PLAYFIELD_CHARSET#12 (byte*) PLAYFIELD_CHARSET#11 (byte*) PLAYFIELD_CHARSET#10 (byte*) PLAYFIELD_CHARSET#9 (byte*) PLAYFIELD_CHARSET#8
Alias (byte*) PLAYFIELD_SPRITES#0 = (byte*) toSpritePtr1_sprite#0 (byte*) toSpritePtr1_sprite#1
Alias (byte) irq_sprite_ypos#0 = (byte) irq_sprite_ypos#18 (byte) irq_sprite_ypos#16 (byte) irq_sprite_ypos#15 (byte) irq_sprite_ypos#13 (byte) irq_sprite_ypos#8
Alias (byte) irq_sprite_ypos#0 = (byte) irq_sprite_ypos#16 (byte) irq_sprite_ypos#14 (byte) irq_sprite_ypos#13 (byte) irq_sprite_ypos#8
Alias (byte) irq_sprite_ptr#4 = (byte) irq_sprite_ptr#7 (byte) irq_sprite_ptr#5
Alias (byte) irq_cnt#4 = (byte) irq_cnt#6
Alias (byte) irq_raster_next#10 = (byte) irq_raster_next#7 (byte) irq_raster_next#4
Alias (byte) irq_sprite_ypos#5 = (byte) irq_sprite_ypos#9 (byte) irq_sprite_ypos#6
Alias (byte*) irq::toSpritePtr2_sprite#0 = (byte*) irq::toSpritePtr2_sprite#1
Alias (byte) irq_raster_next#1 = (byte) irq_raster_next#14 (byte) irq_raster_next#11 (byte) irq_raster_next#8
Alias (byte) irq_cnt#13 = (byte) irq_cnt#16 (byte) irq_cnt#2 (byte) irq_cnt#14
Alias (byte) irq_sprite_ypos#1 = (byte) irq_sprite_ypos#19 (byte) irq_sprite_ypos#17 (byte) irq_sprite_ypos#14
Alias (byte) irq_cnt#13 = (byte) irq_cnt#15 (byte) irq_cnt#2 (byte) irq_cnt#14
Alias (byte) irq_sprite_ypos#1 = (byte) irq_sprite_ypos#18 (byte) irq_sprite_ypos#17 (byte) irq_sprite_ypos#15
Alias (byte) irq_cnt#1 = (byte) irq_cnt#12
Alias (byte) irq::raster_next#0 = (byte) irq::raster_next#3
Alias (byte) irq_cnt#10 = (byte) irq_cnt#9
@ -815,29 +853,30 @@ Alias (byte) irq_cnt#3 = (byte) irq_cnt#5 (byte) irq_cnt#7
Alias (byte) irq_raster_next#3 = (byte) irq_raster_next#6 (byte) irq_raster_next#9
Alias (byte) irq_sprite_ypos#10 = (byte) irq_sprite_ypos#7 (byte) irq_sprite_ypos#3
Alias (byte) irq_sprite_ptr#3 = (byte) irq_sprite_ptr#6 (byte) irq_sprite_ptr#8
Alias (byte) irq_cnt#0 = (byte) irq_cnt#15 (byte) irq_cnt#11
Alias (byte) irq_cnt#0 = (byte) irq_cnt#11
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte) irq_raster_next#0 (byte) irq_raster_next#19 (byte) irq_raster_next#18 (byte) irq_raster_next#17 (byte) irq_raster_next#16 (byte) irq_raster_next#15
Alias candidate removed (volatile)(byte) toSpritePtr1_return#0 = (byte) toSpritePtr1_$2#0 (byte) toSpritePtr1_return#2 (byte) toSpritePtr1_return#1 (byte) toSpritePtr1_return#3 (byte~) $1 (byte) irq_sprite_ptr#0 (byte) irq_sprite_ptr#13 (byte) irq_sprite_ptr#12
Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte) irq_raster_next#0 (byte) irq_raster_next#18 (byte) irq_raster_next#17 (byte) irq_raster_next#16 (byte) irq_raster_next#15
Alias candidate removed (volatile)(byte) toSpritePtr1_return#0 = (byte) toSpritePtr1_$2#0 (byte) toSpritePtr1_return#2 (byte) toSpritePtr1_return#1 (byte) toSpritePtr1_return#3 (byte~) $2 (byte) irq_sprite_ptr#0 (byte) irq_sprite_ptr#12
Alias candidate removed (volatile)(byte) irq::toSpritePtr2_return#0 = (byte) irq::toSpritePtr2_$2#0 (byte) irq::toSpritePtr2_return#2 (byte) irq::toSpritePtr2_return#1 (byte) irq::toSpritePtr2_return#3 (byte~) irq::$2 (byte) irq_sprite_ptr#1
Alias (byte) irq_cnt#10 = (byte) irq_cnt#3
Alias (byte) irq_raster_next#12 = (byte) irq_raster_next#3
Alias (byte) irq_sprite_ypos#10 = (byte) irq_sprite_ypos#11
Alias (byte) irq_sprite_ptr#10 = (byte) irq_sprite_ptr#3
Successful SSA optimization Pass2AliasElimination
Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte) irq_raster_next#0 (byte) irq_raster_next#19 (byte) irq_raster_next#18 (byte) irq_raster_next#17 (byte) irq_raster_next#16 (byte) irq_raster_next#15
Alias candidate removed (volatile)(byte) toSpritePtr1_return#0 = (byte) toSpritePtr1_$2#0 (byte) toSpritePtr1_return#2 (byte) toSpritePtr1_return#1 (byte) toSpritePtr1_return#3 (byte~) $1 (byte) irq_sprite_ptr#0 (byte) irq_sprite_ptr#13 (byte) irq_sprite_ptr#12
Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte) irq_raster_next#0 (byte) irq_raster_next#18 (byte) irq_raster_next#17 (byte) irq_raster_next#16 (byte) irq_raster_next#15
Alias candidate removed (volatile)(byte) toSpritePtr1_return#0 = (byte) toSpritePtr1_$2#0 (byte) toSpritePtr1_return#2 (byte) toSpritePtr1_return#1 (byte) toSpritePtr1_return#3 (byte~) $2 (byte) irq_sprite_ptr#0 (byte) irq_sprite_ptr#12
Alias candidate removed (volatile)(byte) irq::toSpritePtr2_return#0 = (byte) irq::toSpritePtr2_$2#0 (byte) irq::toSpritePtr2_return#2 (byte) irq::toSpritePtr2_return#1 (byte) irq::toSpritePtr2_return#3 (byte~) irq::$2 (byte) irq_sprite_ptr#1
Self Phi Eliminated (byte) irq_sprite_ypos#5
Self Phi Eliminated (byte) irq_sprite_ptr#4
Self Phi Eliminated (byte) irq_cnt#4
Self Phi Eliminated (byte) irq_raster_next#10
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte) irq_raster_next#19 (byte) irq_raster_next#0
Redundant Phi (byte*) PLAYFIELD_CHARSET#1 (byte*) PLAYFIELD_CHARSET#7
Redundant Phi (byte) irq_raster_next#18 (byte) irq_raster_next#0
Redundant Phi (byte) toSpritePtr1_return#2 (byte) toSpritePtr1_return#0
Redundant Phi (byte) irq_raster_next#18 (byte) irq_raster_next#19
Redundant Phi (byte) toSpritePtr1_return#3 (byte) toSpritePtr1_return#1
Redundant Phi (byte) irq_raster_next#17 (byte) irq_raster_next#18
Redundant Phi (byte) toSpritePtr1_return#3 (byte) toSpritePtr1_return#1
Redundant Phi (byte) irq_raster_next#16 (byte) irq_raster_next#17
Redundant Phi (byte) irq_sprite_ypos#4 (byte) irq_sprite_ypos#0
Redundant Phi (byte) irq_sprite_ptr#9 (byte) irq_sprite_ptr#12
Redundant Phi (byte) irq_cnt#8 (byte) irq_cnt#0
@ -848,9 +887,8 @@ Redundant Phi (byte) irq_cnt#4 (byte) irq_cnt#8
Redundant Phi (byte) irq_raster_next#10 (byte) irq_raster_next#13
Redundant Phi (byte) irq::toSpritePtr2_return#2 (byte) irq::toSpritePtr2_return#0
Redundant Phi (byte) irq::toSpritePtr2_return#3 (byte) irq::toSpritePtr2_return#1
Redundant Phi (byte) irq_sprite_ptr#13 (byte) irq_sprite_ptr#0
Redundant Phi (byte) irq_raster_next#16 (byte) irq_raster_next#17
Redundant Phi (byte) irq_sprite_ptr#12 (byte) irq_sprite_ptr#13
Redundant Phi (byte*) PLAYFIELD_CHARSET#7 (byte*) PLAYFIELD_CHARSET#0
Redundant Phi (byte) irq_sprite_ptr#12 (byte) irq_sprite_ptr#0
Redundant Phi (byte) irq_raster_next#15 (byte) irq_raster_next#16
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) init_sprites::$6 if((byte) init_sprites::s#1!=rangelast(0,3)) goto init_sprites::@1
@ -937,15 +975,22 @@ Constant (const byte) GREY#0 = 12
Constant (const byte) LIGHT_GREEN#0 = 13
Constant (const byte) LIGHT_BLUE#0 = 14
Constant (const byte) LIGHT_GREY#0 = 15
Constant (const byte*) PLAYFIELD_SPRITES#0 = ((byte*))8192
Constant (const byte*) PLAYFIELD_CHARSET#0 = ((byte*))4096
Constant (const byte*) PLAYFIELD_SCREEN#0 = ((byte*))1024
Constant (const byte*) PLAYFIELD_SPRITES#0 = ((byte*))8192
Constant (const byte*) PLAYFIELD_CHARSET#0 = ((byte*))10240
Constant (const byte) PLAYFIELD_LINES#0 = 22
Constant (const byte) PLAYFIELD_COLS#0 = 10
Constant (const byte*) current_piece_gfx#0 = ((byte*))0
Constant (const byte) current_piece_color#0 = 0
Constant (const byte) current_xpos#0 = 3
Constant (const byte) current_ypos#0 = 0
Constant (const byte/signed byte/word/signed word/dword/signed dword) init_sprites::$2 = 14*8
Constant (const byte) init_sprites::s#0 = 0
Constant (const byte) IRQ_RASTER_FIRST#0 = 49
Constant (const void()*) init_irq::$0 = &irq
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) PLAYFIELD_SPRITE_PTRS#0 = PLAYFIELD_SCREEN#0+SPRITE_PTRS#0
Constant (const byte) $1 = PLAYFIELD_LINES#0*PLAYFIELD_COLS#0
Constant (const byte*) init_sprites::vicSelectGfxBank1_gfx#0 = PLAYFIELD_SCREEN#0
Constant (const byte*) init_sprites::toD0181_screen#0 = PLAYFIELD_SCREEN#0
Constant (const byte*) init_sprites::toD0181_gfx#0 = PLAYFIELD_CHARSET#0
@ -953,6 +998,7 @@ Constant (const byte) init_sprites::xpos#0 = 24+init_sprites::$2
Constant (const word) toSpritePtr1_$0#0 = ((word))PLAYFIELD_SPRITES#0
Constant (const byte*) irq::toSpritePtr2_sprite#0 = PLAYFIELD_SPRITES#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte[$1]) playfield#0 = { fill( $1, 0) }
Constant (const word) init_sprites::vicSelectGfxBank1_toDd001_$0#0 = ((word))init_sprites::vicSelectGfxBank1_gfx#0
Constant (const word) init_sprites::toD0181_$0#0 = ((word))init_sprites::toD0181_screen#0
Constant (const word) init_sprites::toD0181_$4#0 = ((word))init_sprites::toD0181_gfx#0
@ -978,7 +1024,7 @@ Constant (const byte) toSpritePtr1_return#1 = toSpritePtr1_return#0
Constant (const byte) irq::toSpritePtr2_return#0 = irq::toSpritePtr2_$2#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) init_sprites::toD0181_return#0 = init_sprites::toD0181_$3#0|init_sprites::toD0181_$7#0
Constant (const byte) $1 = toSpritePtr1_return#1
Constant (const byte) $2 = toSpritePtr1_return#1
Constant (const byte) irq::toSpritePtr2_return#1 = irq::toSpritePtr2_return#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) irq::$2 = irq::toSpritePtr2_return#1
@ -999,7 +1045,6 @@ Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Resolved ranged next value init_sprites::s#1 ← ++ init_sprites::s#2 to ++
Resolved ranged comparison value if(init_sprites::s#1!=rangelast(0,3)) goto init_sprites::@1 to (byte/signed byte/word/signed word/dword/signed dword) 4
Culled Empty Block (label) @4
Culled Empty Block (label) init_sprites::vicSelectGfxBank1_toDd001_@return
Culled Empty Block (label) init_sprites::@3
Culled Empty Block (label) init_sprites::toD0181_@return
@ -1020,7 +1065,8 @@ Constant inlined init_sprites::toD0181_$2#0 = ((word))(const byte*) PLAYFIELD_SC
Constant inlined init_sprites::toD0181_$3#0 = >((word))(const byte*) PLAYFIELD_SCREEN#0&(word/signed word/dword/signed dword) 16383<<(byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined init_sprites::toD0181_$0#0 = ((word))(const byte*) PLAYFIELD_SCREEN#0
Constant inlined init_sprites::toD0181_$1#0 = ((word))(const byte*) PLAYFIELD_SCREEN#0&(word/signed word/dword/signed dword) 16383
Constant inlined $1 = (const byte) toSpritePtr1_return#0
Constant inlined $1 = (const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0
Constant inlined $2 = (const byte) toSpritePtr1_return#0
Constant inlined init_sprites::xpos#0 = (byte/signed byte/word/signed word/dword/signed dword) 24+(byte/signed byte/word/signed word/dword/signed dword) 14*(byte/signed byte/word/signed word/dword/signed dword) 8
Constant inlined init_irq::$0 = &interrupt(HARDWARE_CLOBBER)(void()) irq()
Constant inlined irq::toSpritePtr2_sprite#0 = (const byte*) PLAYFIELD_SPRITES#0
@ -1062,10 +1108,10 @@ Calls in [main] to init_sprites:11 init_irq:13
Created 4 initial phi equivalence classes
Coalesced [45] init_sprites::s#3 ← init_sprites::s#1
Coalesced [46] init_sprites::xpos#3 ← init_sprites::xpos#1
Coalesced [66] irq_raster_next#20 ← irq_raster_next#2
Coalesced [66] irq_raster_next#19 ← irq_raster_next#2
Coalesced [72] irq::raster_next#5 ← irq::raster_next#1
Coalesced [78] irq::raster_next#4 ← irq::raster_next#0
Coalesced [84] irq_raster_next#21 ← irq_raster_next#1
Coalesced [84] irq_raster_next#20 ← irq_raster_next#1
Coalesced down to 4 phi equivalence classes
Culled Empty Block (label) init_sprites::@5
Culled Empty Block (label) irq::@10
@ -1083,19 +1129,8 @@ Adding NOP phi() at start of irq::toSpritePtr2
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi()
to:@5
@5: scope:[] from @begin
[1] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0
[2] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50
to:toSpritePtr1
toSpritePtr1: scope:[] from @5
[3] phi()
to:@9
@9: scope:[] from toSpritePtr1
[4] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0
[5] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:@7
@7: scope:[] from @9
to:@4
@4: scope:[] from @begin
kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000))
.for(var sy=0;sy<10;sy++) {
.for(var sx=0;sx<3;sx++) {
@ -1108,8 +1143,19 @@ toSpritePtr1: scope:[] from @5
}
}
}}
to:@5
@5: scope:[] from @4
[2] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0
[3] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50
to:toSpritePtr1
toSpritePtr1: scope:[] from @5
[4] phi()
to:@9
@9: scope:[] from toSpritePtr1
[5] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0
[6] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:@8
@8: scope:[] from @7
@8: scope:[] from @9
[7] phi()
[8] call main
to:@end
@ -1282,6 +1328,8 @@ VARIABLE REGISTER WEIGHTS
(byte) ORANGE
(byte) PINK
(byte*) PLAYFIELD_CHARSET
(byte) PLAYFIELD_COLS
(byte) PLAYFIELD_LINES
(byte*) PLAYFIELD_SCREEN
(byte*) PLAYFIELD_SPRITES
(byte*) PLAYFIELD_SPRITE_PTRS
@ -1320,6 +1368,10 @@ VARIABLE REGISTER WEIGHTS
(byte) VIC_RST8
(byte) WHITE
(byte) YELLOW
(byte) current_piece_color
(byte*) current_piece_gfx
(byte) current_xpos
(byte) current_ypos
(void()) init_irq()
(void()) init_sprites()
(byte) init_sprites::s
@ -1385,6 +1437,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte) irq_sprite_ypos#1 20.0
(byte) irq_sprite_ypos#2 20.0
(void()) main()
(byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield
(word~) toSpritePtr1_$0
(word~) toSpritePtr1_$1
(byte~) toSpritePtr1_$2
@ -1486,9 +1539,11 @@ INITIAL ASM
.label HARDWARE_IRQ = $fffe
.const BLACK = 0
.const DARK_GREY = $b
.label PLAYFIELD_SPRITES = $2000
.label PLAYFIELD_CHARSET = $1000
.label PLAYFIELD_SCREEN = $400
.label PLAYFIELD_SPRITES = $2000
.label PLAYFIELD_CHARSET = $2800
.const PLAYFIELD_LINES = $16
.const PLAYFIELD_COLS = $a
.const IRQ_RASTER_FIRST = $31
.label PLAYFIELD_SPRITE_PTRS = PLAYFIELD_SCREEN+SPRITE_PTRS
.const toSpritePtr1_return = PLAYFIELD_SPRITES>>6
@ -1507,35 +1562,35 @@ INITIAL ASM
.label irq_cnt_13 = $13
//SEG2 @begin
bbegin:
jmp b4
//SEG3 @4
b4:
//SEG4 kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000)) .for(var sy=0;sy<10;sy++) { .for(var sx=0;sx<3;sx++) { .for (var y=0;y<21; y++) { .for (var c=0; c<3; c++) { .byte sprites.getSinglecolorByte(sx*3+c,sy*21+y) } } .byte 0 } } }}
jmp b5
//SEG3 @5
//SEG5 @5
b5:
//SEG4 [1] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
//SEG6 [2] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
lda #IRQ_RASTER_FIRST
sta irq_raster_next
//SEG5 [2] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
//SEG7 [3] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
lda #$32
sta irq_sprite_ypos
//SEG6 [3] phi from @5 to toSpritePtr1 [phi:@5->toSpritePtr1]
//SEG8 [4] phi from @5 to toSpritePtr1 [phi:@5->toSpritePtr1]
toSpritePtr1_from_b5:
jmp toSpritePtr1
//SEG7 toSpritePtr1
//SEG9 toSpritePtr1
toSpritePtr1:
jmp b9
//SEG8 @9
//SEG10 @9
b9:
//SEG9 [4] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0 -- vbuz1=vbuc1
//SEG11 [5] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0 -- vbuz1=vbuc1
lda #toSpritePtr1_return
sta irq_sprite_ptr
//SEG10 [5] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
//SEG12 [6] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
lda #0
sta irq_cnt
jmp b7
//SEG11 @7
b7:
//SEG12 kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000)) .for(var sy=0;sy<10;sy++) { .for(var sx=0;sx<3;sx++) { .for (var y=0;y<21; y++) { .for (var c=0; c<3; c++) { .byte sprites.getSinglecolorByte(sx*3+c,sy*21+y) } } .byte 0 } } }}
//SEG13 [7] phi from @7 to @8 [phi:@7->@8]
b8_from_b7:
//SEG13 [7] phi from @9 to @8 [phi:@9->@8]
b8_from_b9:
jmp b8
//SEG14 @8
b8:
@ -1880,10 +1935,10 @@ irq: {
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [1] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( ) always clobbers reg byte a
Statement [2] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ ] ( ) always clobbers reg byte a
Statement [4] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0 [ ] ( ) always clobbers reg byte a
Statement [5] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( ) always clobbers reg byte a
Statement [2] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( ) always clobbers reg byte a
Statement [3] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ ] ( ) always clobbers reg byte a
Statement [5] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0 [ ] ( ) always clobbers reg byte a
Statement [6] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( ) always clobbers reg byte a
Statement [16] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:8::init_irq:13 [ ] ) always clobbers reg byte a
Statement asm { ldaCIA1_INTERRUPT } always clobbers reg byte a
Statement [18] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:8::init_irq:13 [ ] ) always clobbers reg byte a
@ -1922,10 +1977,10 @@ Statement [74] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/si
Statement [75] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [76] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [78] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [1] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( ) always clobbers reg byte a
Statement [2] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ ] ( ) always clobbers reg byte a
Statement [4] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0 [ ] ( ) always clobbers reg byte a
Statement [5] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( ) always clobbers reg byte a
Statement [2] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( ) always clobbers reg byte a
Statement [3] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ ] ( ) always clobbers reg byte a
Statement [5] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0 [ ] ( ) always clobbers reg byte a
Statement [6] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( ) always clobbers reg byte a
Statement [16] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:8::init_irq:13 [ ] ) always clobbers reg byte a
Statement asm { ldaCIA1_INTERRUPT } always clobbers reg byte a
Statement [18] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:8::init_irq:13 [ ] ) always clobbers reg byte a
@ -2072,9 +2127,11 @@ ASSEMBLER BEFORE OPTIMIZATION
.label HARDWARE_IRQ = $fffe
.const BLACK = 0
.const DARK_GREY = $b
.label PLAYFIELD_SPRITES = $2000
.label PLAYFIELD_CHARSET = $1000
.label PLAYFIELD_SCREEN = $400
.label PLAYFIELD_SPRITES = $2000
.label PLAYFIELD_CHARSET = $2800
.const PLAYFIELD_LINES = $16
.const PLAYFIELD_COLS = $a
.const IRQ_RASTER_FIRST = $31
.label PLAYFIELD_SPRITE_PTRS = PLAYFIELD_SCREEN+SPRITE_PTRS
.const toSpritePtr1_return = PLAYFIELD_SPRITES>>6
@ -2084,35 +2141,35 @@ ASSEMBLER BEFORE OPTIMIZATION
.label irq_cnt = 6
//SEG2 @begin
bbegin:
jmp b4
//SEG3 @4
b4:
//SEG4 kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000)) .for(var sy=0;sy<10;sy++) { .for(var sx=0;sx<3;sx++) { .for (var y=0;y<21; y++) { .for (var c=0; c<3; c++) { .byte sprites.getSinglecolorByte(sx*3+c,sy*21+y) } } .byte 0 } } }}
jmp b5
//SEG3 @5
//SEG5 @5
b5:
//SEG4 [1] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
//SEG6 [2] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
lda #IRQ_RASTER_FIRST
sta irq_raster_next
//SEG5 [2] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
//SEG7 [3] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
lda #$32
sta irq_sprite_ypos
//SEG6 [3] phi from @5 to toSpritePtr1 [phi:@5->toSpritePtr1]
//SEG8 [4] phi from @5 to toSpritePtr1 [phi:@5->toSpritePtr1]
toSpritePtr1_from_b5:
jmp toSpritePtr1
//SEG7 toSpritePtr1
//SEG9 toSpritePtr1
toSpritePtr1:
jmp b9
//SEG8 @9
//SEG10 @9
b9:
//SEG9 [4] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0 -- vbuz1=vbuc1
//SEG11 [5] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0 -- vbuz1=vbuc1
lda #toSpritePtr1_return
sta irq_sprite_ptr
//SEG10 [5] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
//SEG12 [6] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
lda #0
sta irq_cnt
jmp b7
//SEG11 @7
b7:
//SEG12 kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000)) .for(var sy=0;sy<10;sy++) { .for(var sx=0;sx<3;sx++) { .for (var y=0;y<21; y++) { .for (var c=0; c<3; c++) { .byte sprites.getSinglecolorByte(sx*3+c,sy*21+y) } } .byte 0 } } }}
//SEG13 [7] phi from @7 to @8 [phi:@7->@8]
b8_from_b7:
//SEG13 [7] phi from @9 to @8 [phi:@9->@8]
b8_from_b9:
jmp b8
//SEG14 @8
b8:
@ -2423,10 +2480,10 @@ irq: {
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b4
Removing instruction jmp b5
Removing instruction jmp toSpritePtr1
Removing instruction jmp b9
Removing instruction jmp b7
Removing instruction jmp b8
Removing instruction jmp bend
Removing instruction jmp b7
@ -2455,11 +2512,11 @@ Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b1 with b1
Replacing label b4_from_b3 with b4
Replacing label b3_from_b9 with b3
Removing instruction b4:
Removing instruction b5:
Removing instruction toSpritePtr1_from_b5:
Removing instruction toSpritePtr1:
Removing instruction b7:
Removing instruction b8_from_b7:
Removing instruction b8_from_b9:
Removing instruction main_from_b8:
Removing instruction bend_from_b8:
Removing instruction b7_from_main:
@ -2496,8 +2553,8 @@ Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
FINAL SYMBOL TABLE
(label) @4
(label) @5
(label) @7
(label) @8
(label) @9
(label) @begin
@ -2561,7 +2618,11 @@ FINAL SYMBOL TABLE
(byte) ORANGE
(byte) PINK
(byte*) PLAYFIELD_CHARSET
(const byte*) PLAYFIELD_CHARSET#0 PLAYFIELD_CHARSET = ((byte*))(word/signed word/dword/signed dword) 4096
(const byte*) PLAYFIELD_CHARSET#0 PLAYFIELD_CHARSET = ((byte*))(word/signed word/dword/signed dword) 10240
(byte) PLAYFIELD_COLS
(const byte) PLAYFIELD_COLS#0 PLAYFIELD_COLS = (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) PLAYFIELD_LINES
(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_SPRITES
@ -2617,6 +2678,10 @@ FINAL SYMBOL TABLE
(byte) VIC_RST8
(byte) WHITE
(byte) YELLOW
(byte) current_piece_color
(byte*) current_piece_gfx
(byte) current_xpos
(byte) current_ypos
(void()) init_irq()
(label) init_irq::@return
(void()) init_sprites()
@ -2705,6 +2770,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(void()) main()
(label) main::@2
(label) main::@7
(byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield
(label) toSpritePtr1
(word~) toSpritePtr1_$0
(word~) toSpritePtr1_$1
@ -2762,9 +2828,11 @@ Score: 1274
.label HARDWARE_IRQ = $fffe
.const BLACK = 0
.const DARK_GREY = $b
.label PLAYFIELD_SPRITES = $2000
.label PLAYFIELD_CHARSET = $1000
.label PLAYFIELD_SCREEN = $400
.label PLAYFIELD_SPRITES = $2000
.label PLAYFIELD_CHARSET = $2800
.const PLAYFIELD_LINES = $16
.const PLAYFIELD_COLS = $a
.const IRQ_RASTER_FIRST = $31
.label PLAYFIELD_SPRITE_PTRS = PLAYFIELD_SCREEN+SPRITE_PTRS
.const toSpritePtr1_return = PLAYFIELD_SPRITES>>6
@ -2774,25 +2842,25 @@ Score: 1274
.label irq_cnt = 6
//SEG2 @begin
bbegin:
//SEG3 @5
//SEG4 [1] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
//SEG3 @4
//SEG4 kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000)) .for(var sy=0;sy<10;sy++) { .for(var sx=0;sx<3;sx++) { .for (var y=0;y<21; y++) { .for (var c=0; c<3; c++) { .byte sprites.getSinglecolorByte(sx*3+c,sy*21+y) } } .byte 0 } } }}
//SEG5 @5
//SEG6 [2] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
lda #IRQ_RASTER_FIRST
sta irq_raster_next
//SEG5 [2] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
//SEG7 [3] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
lda #$32
sta irq_sprite_ypos
//SEG6 [3] phi from @5 to toSpritePtr1 [phi:@5->toSpritePtr1]
//SEG7 toSpritePtr1
//SEG8 @9
//SEG9 [4] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0 -- vbuz1=vbuc1
//SEG8 [4] phi from @5 to toSpritePtr1 [phi:@5->toSpritePtr1]
//SEG9 toSpritePtr1
//SEG10 @9
//SEG11 [5] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0 -- vbuz1=vbuc1
lda #toSpritePtr1_return
sta irq_sprite_ptr
//SEG10 [5] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
//SEG12 [6] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
lda #0
sta irq_cnt
//SEG11 @7
//SEG12 kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("nes-playfield.png", List().add($010101, $000000)) .for(var sy=0;sy<10;sy++) { .for(var sx=0;sx<3;sx++) { .for (var y=0;y<21; y++) { .for (var c=0; c<3; c++) { .byte sprites.getSinglecolorByte(sx*3+c,sy*21+y) } } .byte 0 } } }}
//SEG13 [7] phi from @7 to @8 [phi:@7->@8]
//SEG13 [7] phi from @9 to @8 [phi:@9->@8]
//SEG14 @8
//SEG15 [8] call main
//SEG16 [10] phi from @8 to main [phi:@8->main]

View File

@ -1,5 +1,5 @@
(label) @4
(label) @5
(label) @7
(label) @8
(label) @9
(label) @begin
@ -63,7 +63,11 @@
(byte) ORANGE
(byte) PINK
(byte*) PLAYFIELD_CHARSET
(const byte*) PLAYFIELD_CHARSET#0 PLAYFIELD_CHARSET = ((byte*))(word/signed word/dword/signed dword) 4096
(const byte*) PLAYFIELD_CHARSET#0 PLAYFIELD_CHARSET = ((byte*))(word/signed word/dword/signed dword) 10240
(byte) PLAYFIELD_COLS
(const byte) PLAYFIELD_COLS#0 PLAYFIELD_COLS = (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) PLAYFIELD_LINES
(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_SPRITES
@ -119,6 +123,10 @@
(byte) VIC_RST8
(byte) WHITE
(byte) YELLOW
(byte) current_piece_color
(byte*) current_piece_gfx
(byte) current_xpos
(byte) current_ypos
(void()) init_irq()
(label) init_irq::@return
(void()) init_sprites()
@ -207,6 +215,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(void()) main()
(label) main::@2
(label) main::@7
(byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield
(label) toSpritePtr1
(word~) toSpritePtr1_$0
(word~) toSpritePtr1_$1

View File

@ -29,6 +29,8 @@
.label SID_VOICE3_CONTROL = $d412
.const SID_CONTROL_NOISE = $80
.label SID_VOICE3_OSC = $d41b
.label PLAYFIELD_SCREEN = $400
.label PLAYFIELD_CHARSET = $2800
.const PLAYFIELD_LINES = $16
.const PLAYFIELD_COLS = $a
.const current_movedown_slow = $32
@ -38,37 +40,35 @@
.const COLLISION_BOTTOM = 2
.const COLLISION_LEFT = 4
.const COLLISION_RIGHT = 8
.label SCREEN = $400
.label CHARSET = $2800
.label keyboard_events_size = $13
.label current_movedown_counter = 3
.label current_ypos = 2
.label current_xpos = $11
.label current_orientation = $e
.label current_piece_gfx = $f
.label current_piece = $c
.label current_piece_color = $12
.label current_movedown_counter = 3
.label current_piece_15 = 5
.label current_xpos_63 = 4
.label current_piece_gfx_64 = 5
.label current_piece_color_67 = 7
.label current_piece_12 = 5
.label current_xpos_48 = 4
.label current_piece_gfx_53 = 5
.label current_piece_color_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_71 = 5
.label current_piece_72 = 5
.label current_piece_73 = 5
.label current_piece_74 = 5
.label current_piece_75 = 5
main: {
.label key_event = $14
.label render = $15
jsr sid_rnd_init
sei
jsr render_init
jsr tables_init
jsr spawn_current
jsr play_init
jsr play_spawn_current
jsr render_playfield
lda current_piece_gfx
sta current_piece_gfx_87
@ -77,10 +77,10 @@ main: {
lda current_piece_color
sta current_piece_color_75
lda #3
sta current_xpos_63
sta current_xpos_48
ldx #0
jsr render_current
ldy spawn_current._3
ldy play_spawn_current._3
lda PIECES,y
sta current_piece
lda PIECES+1,y
@ -157,19 +157,19 @@ render_current: {
sta screen_line
lda screen_lines+1,y
sta screen_line+1
lda current_xpos_63
lda current_xpos_48
sta xpos
ldx #0
b3:
ldy i
lda (current_piece_gfx_64),y
lda (current_piece_gfx_53),y
inc i
cmp #0
beq b4
lda xpos
cmp #PLAYFIELD_COLS
bcs b4
lda current_piece_color_67
lda current_piece_color_62
ldy xpos
sta (screen_line),y
b4:
@ -241,14 +241,14 @@ play_move_rotate: {
sta orientation
b4:
lda current_xpos
sta collision.xpos
sta play_collision.xpos
ldy current_ypos
ldx orientation
lda current_piece
sta current_piece_75
sta current_piece_74
lda current_piece+1
sta current_piece_75+1
jsr collision
sta current_piece_74+1
jsr play_collision
cmp #COLLISION_NONE
bne b3
lda orientation
@ -269,7 +269,7 @@ play_move_rotate: {
sta orientation
jmp b4
}
collision: {
play_collision: {
.label xpos = 7
.label piece_gfx = 5
.label ypos2 = 8
@ -368,14 +368,14 @@ play_move_leftright: {
bne b3
ldy current_xpos
iny
sty collision.xpos
sty play_collision.xpos
ldy current_ypos
ldx current_orientation
lda current_piece
sta current_piece_74
sta current_piece_73
lda current_piece+1
sta current_piece_74+1
jsr collision
sta current_piece_73+1
jsr play_collision
cmp #COLLISION_NONE
bne b3
inc current_xpos
@ -389,14 +389,14 @@ play_move_leftright: {
b1:
ldx current_xpos
dex
stx collision.xpos
stx play_collision.xpos
ldy current_ypos
ldx current_orientation
lda current_piece
sta current_piece_73
sta current_piece_72
lda current_piece+1
sta current_piece_73+1
jsr collision
sta current_piece_72+1
jsr play_collision
cmp #COLLISION_NONE
bne b3
dec current_xpos
@ -431,19 +431,19 @@ play_move_down: {
ldy current_ypos
iny
lda current_xpos
sta collision.xpos
sta play_collision.xpos
ldx current_orientation
lda current_piece
sta current_piece_72
sta current_piece_71
lda current_piece+1
sta current_piece_72+1
jsr collision
sta current_piece_71+1
jsr play_collision
cmp #COLLISION_NONE
beq b6
jsr lock_current
jsr remove_lines
jsr spawn_current
ldy spawn_current._3
jsr play_lock_current
jsr play_remove_lines
jsr play_spawn_current
ldy play_spawn_current._3
lda PIECES,y
sta current_piece
lda PIECES+1,y
@ -466,7 +466,7 @@ play_move_down: {
inc current_ypos
jmp b7
}
spawn_current: {
play_spawn_current: {
.label _3 = 2
ldx #7
b1:
@ -493,7 +493,7 @@ sid_rnd: {
lda SID_VOICE3_OSC
rts
}
remove_lines: {
play_remove_lines: {
.label c = 7
.label x = 3
.label y = 2
@ -545,7 +545,7 @@ remove_lines: {
dex
jmp b5
}
lock_current: {
play_lock_current: {
.label ypos2 = 2
.label playfield_line = 5
.label col = 7
@ -736,7 +736,7 @@ keyboard_matrix_read: {
eor #$ff
rts
}
tables_init: {
play_init: {
.label pli = 5
.label idx = 2
lda #0
@ -782,9 +782,9 @@ render_init: {
lda #BLACK
sta BGCOL
ldx #$d0
lda #<SCREEN
lda #<PLAYFIELD_SCREEN
sta fill.addr
lda #>SCREEN
lda #>PLAYFIELD_SCREEN
sta fill.addr+1
jsr fill
ldx #BLACK
@ -906,13 +906,13 @@ sid_rnd_init: {
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
playfield_lines: .fill 2*PLAYFIELD_LINES, 0
PIECES: .word PIECE_T, PIECE_S, PIECE_Z, PIECE_J, PIECE_O, PIECE_I, PIECE_L
playfield: .fill PLAYFIELD_LINES*PLAYFIELD_COLS, 0
playfield_lines_idx: .fill PLAYFIELD_LINES+1, 0
screen_lines: .fill 2*(PLAYFIELD_LINES+3), 0
.pc = CHARSET "Inline"
.var charset = LoadPicture("charset.png", List().add($000000, $ffffff, $523fa0, $77c1c9))
.for (var c=0; c<16; c++)
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.getMulticolorByte(c,y)
.byte charset.getSinglecolorByte(c,y)

View File

@ -1,14 +1,14 @@
@begin: scope:[] from
[0] phi()
to:@23
@23: scope:[] from @begin
kickasm(location (const byte*) CHARSET#0) {{ .var charset = LoadPicture("charset.png", List().add($000000, $ffffff, $523fa0, $77c1c9))
.for (var c=0; c<16; c++)
to:@14
@14: scope:[] from @begin
kickasm(location (const byte*) PLAYFIELD_CHARSET#0) {{ .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.getMulticolorByte(c,y)
.byte charset.getSinglecolorByte(c,y)
}}
to:@26
@26: scope:[] from @23
@26: scope:[] from @14
[2] phi()
[3] call main
to:@end
@ -24,31 +24,31 @@ main::@21: scope:[main] from main
to:main::@22
main::@22: scope:[main] from main::@21
[9] phi()
[10] call tables_init
[10] call play_init
to:main::@23
main::@23: scope:[main] from main::@22
[11] phi()
[12] call spawn_current
[12] call play_spawn_current
to:main::@24
main::@24: scope:[main] from main::@23
[13] phi()
[14] call render_playfield
to:main::@25
main::@25: scope:[main] from main::@24
[15] (byte*~) current_piece_gfx#87 ← (byte*) current_piece_gfx#10
[16] (byte~) current_piece_color#75 ← (byte) current_piece_color#15
[15] (byte*~) current_piece_gfx#87 ← (byte*) current_piece_gfx#17
[16] (byte~) current_piece_color#75 ← (byte) current_piece_color#13
[17] call render_current
[18] (byte*~) current_piece#71 ← (byte*)*((const word[]) PIECES#0 + (byte~) spawn_current::$3)
[18] (byte*~) current_piece#70 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$3)
to:main::@1
main::@1: scope:[main] from main::@10 main::@25
[19] (byte) current_movedown_counter#15 ← phi( main::@10/(byte) current_movedown_counter#12 main::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[19] (byte) current_movedown_counter#12 ← phi( main::@10/(byte) current_movedown_counter#10 main::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[19] (byte) keyboard_events_size#19 ← phi( main::@10/(byte) keyboard_events_size#16 main::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[19] (byte) current_piece_color#11 ← phi( main::@10/(byte) current_piece_color#13 main::@25/(byte) current_piece_color#15 )
[19] (byte) current_ypos#12 ← phi( main::@10/(byte) current_ypos#16 main::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[19] (byte) current_xpos#16 ← phi( main::@10/(byte) current_xpos#23 main::@25/(byte/signed byte/word/signed word/dword/signed dword) 3 )
[19] (byte*) current_piece_gfx#15 ← phi( main::@10/(byte*) current_piece_gfx#18 main::@25/(byte*) current_piece_gfx#10 )
[19] (byte) current_orientation#15 ← phi( main::@10/(byte) current_orientation#23 main::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[19] (byte*) current_piece#11 ← phi( main::@10/(byte*) current_piece#13 main::@25/(byte*~) current_piece#71 )
[19] (byte) current_piece_color#16 ← phi( main::@10/(byte) current_piece_color#11 main::@25/(byte) current_piece_color#13 )
[19] (byte) current_ypos#22 ← phi( main::@10/(byte) current_ypos#14 main::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[19] (byte) current_xpos#11 ← phi( main::@10/(byte) current_xpos#20 main::@25/(byte/signed byte/word/signed word/dword/signed dword) 3 )
[19] (byte*) current_piece_gfx#10 ← phi( main::@10/(byte*) current_piece_gfx#15 main::@25/(byte*) current_piece_gfx#17 )
[19] (byte) current_orientation#10 ← phi( main::@10/(byte) current_orientation#19 main::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[19] (byte*) current_piece#16 ← phi( main::@10/(byte*) current_piece#10 main::@25/(byte*~) current_piece#70 )
to:main::@4
main::@4: scope:[main] from main::@1 main::@4
[20] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4
@ -69,24 +69,24 @@ main::@28: scope:[main] from main::@27
[27] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3
[28] (byte) play_move_down::key_event#0 ← (byte) main::key_event#0
[29] call play_move_down
[30] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3
[30] (byte) play_move_down::return#3 ← (byte) play_move_down::return#2
to:main::@29
main::@29: scope:[main] from main::@28
[31] (byte~) main::$10 ← (byte) play_move_down::return#0
[31] (byte~) main::$10 ← (byte) play_move_down::return#3
[32] (byte) main::render#1 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte~) main::$10
[33] (byte) play_move_leftright::key_event#0 ← (byte) main::key_event#0
[34] call play_move_leftright
[35] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2
[35] (byte) play_move_leftright::return#4 ← (byte) play_move_leftright::return#1
to:main::@30
main::@30: scope:[main] from main::@29
[36] (byte~) main::$11 ← (byte) play_move_leftright::return#0
[36] (byte~) main::$11 ← (byte) play_move_leftright::return#4
[37] (byte) main::render#2 ← (byte) main::render#1 + (byte~) main::$11
[38] (byte) play_move_rotate::key_event#0 ← (byte) main::key_event#0
[39] call play_move_rotate
[40] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2
[40] (byte) play_move_rotate::return#4 ← (byte) play_move_rotate::return#1
to:main::@31
main::@31: scope:[main] from main::@30
[41] (byte~) main::$12 ← (byte) play_move_rotate::return#0
[41] (byte~) main::$12 ← (byte) play_move_rotate::return#4
[42] (byte) main::render#3 ← (byte) main::render#2 + (byte~) main::$12
[43] if((byte) main::render#3==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@10
to:main::@19
@ -95,21 +95,21 @@ main::@19: scope:[main] from main::@31
[45] call render_playfield
to:main::@32
main::@32: scope:[main] from main::@19
[46] (byte~) current_ypos#71 ← (byte) current_ypos#16
[47] (byte~) current_xpos#96 ← (byte) current_xpos#23
[48] (byte*~) current_piece_gfx#88 ← (byte*) current_piece_gfx#18
[49] (byte~) current_piece_color#76 ← (byte) current_piece_color#13
[46] (byte~) current_ypos#71 ← (byte) current_ypos#14
[47] (byte~) current_xpos#96 ← (byte) current_xpos#20
[48] (byte*~) current_piece_gfx#88 ← (byte*) current_piece_gfx#15
[49] (byte~) current_piece_color#76 ← (byte) current_piece_color#11
[50] call render_current
to:main::@10
main::@10: scope:[main] from main::@31 main::@32
[51] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0)
to:main::@1
render_current: scope:[render_current] from main::@25 main::@32
[52] (byte) current_piece_color#67 ← phi( main::@25/(byte~) current_piece_color#75 main::@32/(byte~) current_piece_color#76 )
[52] (byte*) current_piece_gfx#64 ← phi( main::@25/(byte*~) current_piece_gfx#87 main::@32/(byte*~) current_piece_gfx#88 )
[52] (byte) current_xpos#63 ← phi( main::@25/(byte/signed byte/word/signed word/dword/signed dword) 3 main::@32/(byte~) current_xpos#96 )
[52] (byte) current_ypos#22 ← phi( main::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@32/(byte~) current_ypos#71 )
[53] (byte) render_current::ypos2#0 ← (byte) current_ypos#22 << (byte/signed byte/word/signed word/dword/signed dword) 1
[52] (byte) current_piece_color#62 ← phi( main::@25/(byte~) current_piece_color#75 main::@32/(byte~) current_piece_color#76 )
[52] (byte*) current_piece_gfx#53 ← phi( main::@25/(byte*~) current_piece_gfx#87 main::@32/(byte*~) current_piece_gfx#88 )
[52] (byte) current_xpos#48 ← phi( main::@25/(byte/signed byte/word/signed word/dword/signed dword) 3 main::@32/(byte~) current_xpos#96 )
[52] (byte) current_ypos#10 ← phi( main::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@32/(byte~) current_ypos#71 )
[53] (byte) render_current::ypos2#0 ← (byte) current_ypos#10 << (byte/signed byte/word/signed word/dword/signed dword) 1
to:render_current::@1
render_current::@1: scope:[render_current] from render_current render_current::@2
[54] (byte) render_current::i#4 ← phi( render_current/(byte/signed byte/word/signed word/dword/signed dword) 0 render_current::@2/(byte) render_current::i#8 )
@ -119,13 +119,13 @@ render_current::@1: scope:[render_current] from render_current render_current::
to:render_current::@6
render_current::@6: scope:[render_current] from render_current::@1
[56] (byte*) render_current::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0+3]) screen_lines#0 + (byte) render_current::ypos2#2)
[57] (byte) render_current::xpos#0 ← (byte) current_xpos#63
[57] (byte) render_current::xpos#0 ← (byte) current_xpos#48
to:render_current::@3
render_current::@3: scope:[render_current] from render_current::@4 render_current::@6
[58] (byte) render_current::c#2 ← phi( render_current::@4/(byte) render_current::c#1 render_current::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[58] (byte) render_current::xpos#2 ← phi( render_current::@4/(byte) render_current::xpos#1 render_current::@6/(byte) render_current::xpos#0 )
[58] (byte) render_current::i#2 ← phi( render_current::@4/(byte) render_current::i#1 render_current::@6/(byte) render_current::i#4 )
[59] (byte) render_current::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_current::i#2)
[59] (byte) render_current::current_cell#0 ← *((byte*) current_piece_gfx#53 + (byte) render_current::i#2)
[60] (byte) render_current::i#1 ← ++ (byte) render_current::i#2
[61] if((byte) render_current::current_cell#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_current::@4
to:render_current::@7
@ -133,7 +133,7 @@ render_current::@7: scope:[render_current] from render_current::@3
[62] if((byte) render_current::xpos#2>=(const byte) PLAYFIELD_COLS#0) goto render_current::@4
to:render_current::@8
render_current::@8: scope:[render_current] from render_current::@7
[63] *((byte*) render_current::screen_line#0 + (byte) render_current::xpos#2) ← (byte) current_piece_color#67
[63] *((byte*) render_current::screen_line#0 + (byte) render_current::xpos#2) ← (byte) current_piece_color#62
to:render_current::@4
render_current::@4: scope:[render_current] from render_current::@3 render_current::@7 render_current::@8
[64] (byte) render_current::xpos#1 ← ++ (byte) render_current::xpos#2
@ -182,91 +182,91 @@ play_move_rotate::@6: scope:[play_move_rotate] from play_move_rotate
[86] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X#0) goto play_move_rotate::@2
to:play_move_rotate::@return
play_move_rotate::@return: scope:[play_move_rotate] from play_move_rotate::@11 play_move_rotate::@14 play_move_rotate::@6
[87] (byte*) current_piece_gfx#18 ← phi( play_move_rotate::@11/(byte*) current_piece_gfx#8 play_move_rotate::@14/(byte*) current_piece_gfx#17 play_move_rotate::@6/(byte*) current_piece_gfx#17 )
[87] (byte) current_orientation#23 ← phi( play_move_rotate::@11/(byte) current_orientation#8 play_move_rotate::@14/(byte) current_orientation#18 play_move_rotate::@6/(byte) current_orientation#18 )
[87] (byte) play_move_rotate::return#2 ← phi( play_move_rotate::@11/(byte/signed byte/word/signed word/dword/signed dword) 1 play_move_rotate::@14/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_rotate::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[87] (byte*) current_piece_gfx#15 ← phi( play_move_rotate::@11/(byte*) current_piece_gfx#4 play_move_rotate::@14/(byte*) current_piece_gfx#14 play_move_rotate::@6/(byte*) current_piece_gfx#14 )
[87] (byte) current_orientation#19 ← phi( play_move_rotate::@11/(byte) current_orientation#4 play_move_rotate::@14/(byte) current_orientation#14 play_move_rotate::@6/(byte) current_orientation#14 )
[87] (byte) play_move_rotate::return#1 ← phi( play_move_rotate::@11/(byte/signed byte/word/signed word/dword/signed dword) 1 play_move_rotate::@14/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_rotate::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[88] return
to:@return
play_move_rotate::@2: scope:[play_move_rotate] from play_move_rotate::@6
[89] (byte/signed word/word/dword/signed dword~) play_move_rotate::$2 ← (byte) current_orientation#18 + (byte/signed byte/word/signed word/dword/signed dword) 16
[89] (byte/signed word/word/dword/signed dword~) play_move_rotate::$2 ← (byte) current_orientation#14 + (byte/signed byte/word/signed word/dword/signed dword) 16
[90] (byte) play_move_rotate::orientation#2 ← (byte/signed word/word/dword/signed dword~) play_move_rotate::$2 & (byte/signed byte/word/signed word/dword/signed dword) 63
to:play_move_rotate::@4
play_move_rotate::@4: scope:[play_move_rotate] from play_move_rotate::@1 play_move_rotate::@2
[91] (byte) play_move_rotate::orientation#3 ← phi( play_move_rotate::@1/(byte) play_move_rotate::orientation#1 play_move_rotate::@2/(byte) play_move_rotate::orientation#2 )
[92] (byte) collision::xpos#3 ← (byte) current_xpos#23
[93] (byte) collision::ypos#3 ← (byte) current_ypos#16
[94] (byte) collision::orientation#3 ← (byte) play_move_rotate::orientation#3
[95] (byte*~) current_piece#75 ← (byte*) current_piece#13
[96] call collision
[97] (byte) collision::return#13 ← (byte) collision::return#14
[92] (byte) play_collision::xpos#3 ← (byte) current_xpos#20
[93] (byte) play_collision::ypos#3 ← (byte) current_ypos#14
[94] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3
[95] (byte*~) current_piece#74 ← (byte*) current_piece#10
[96] call play_collision
[97] (byte) play_collision::return#13 ← (byte) play_collision::return#14
to:play_move_rotate::@14
play_move_rotate::@14: scope:[play_move_rotate] from play_move_rotate::@4
[98] (byte~) play_move_rotate::$6 ← (byte) collision::return#13
[98] (byte~) play_move_rotate::$6 ← (byte) play_collision::return#13
[99] if((byte~) play_move_rotate::$6!=(const byte) COLLISION_NONE#0) goto play_move_rotate::@return
to:play_move_rotate::@11
play_move_rotate::@11: scope:[play_move_rotate] from play_move_rotate::@14
[100] (byte) current_orientation#8 ← (byte) play_move_rotate::orientation#3
[101] (byte*) current_piece_gfx#8 ← (byte*) current_piece#13 + (byte) current_orientation#8
[100] (byte) current_orientation#4 ← (byte) play_move_rotate::orientation#3
[101] (byte*) current_piece_gfx#4 ← (byte*) current_piece#10 + (byte) current_orientation#4
to:play_move_rotate::@return
play_move_rotate::@1: scope:[play_move_rotate] from play_move_rotate
[102] (byte/signed word/word/dword/signed dword~) play_move_rotate::$4 ← (byte) current_orientation#18 - (byte/signed byte/word/signed word/dword/signed dword) 16
[102] (byte/signed word/word/dword/signed dword~) play_move_rotate::$4 ← (byte) current_orientation#14 - (byte/signed byte/word/signed word/dword/signed dword) 16
[103] (byte) play_move_rotate::orientation#1 ← (byte/signed word/word/dword/signed dword~) play_move_rotate::$4 & (byte/signed byte/word/signed word/dword/signed dword) 63
to:play_move_rotate::@4
collision: scope:[collision] from play_move_down::@12 play_move_leftright::@1 play_move_leftright::@7 play_move_rotate::@4
[104] (byte) collision::xpos#5 ← phi( play_move_down::@12/(byte) collision::xpos#0 play_move_leftright::@1/(byte) collision::xpos#1 play_move_leftright::@7/(byte) collision::xpos#2 play_move_rotate::@4/(byte) collision::xpos#3 )
[104] (byte) collision::ypos#4 ← phi( play_move_down::@12/(byte) collision::ypos#0 play_move_leftright::@1/(byte) collision::ypos#1 play_move_leftright::@7/(byte) collision::ypos#2 play_move_rotate::@4/(byte) collision::ypos#3 )
[104] (byte) collision::orientation#4 ← phi( play_move_down::@12/(byte) collision::orientation#0 play_move_leftright::@1/(byte) collision::orientation#1 play_move_leftright::@7/(byte) collision::orientation#2 play_move_rotate::@4/(byte) collision::orientation#3 )
[104] (byte*) current_piece#15 ← phi( play_move_down::@12/(byte*~) current_piece#72 play_move_leftright::@1/(byte*~) current_piece#73 play_move_leftright::@7/(byte*~) current_piece#74 play_move_rotate::@4/(byte*~) current_piece#75 )
[105] (byte*) collision::piece_gfx#0 ← (byte*) current_piece#15 + (byte) collision::orientation#4
[106] (byte) collision::ypos2#0 ← (byte) collision::ypos#4 << (byte/signed byte/word/signed word/dword/signed dword) 1
to:collision::@1
collision::@1: scope:[collision] from collision collision::@20
[107] (byte) collision::l#6 ← phi( collision/(byte/signed byte/word/signed word/dword/signed dword) 0 collision::@20/(byte) collision::l#1 )
[107] (byte) collision::i#3 ← phi( collision/(byte/signed byte/word/signed word/dword/signed dword) 0 collision::@20/(byte~) collision::i#11 )
[107] (byte) collision::ypos2#2 ← phi( collision/(byte) collision::ypos2#0 collision::@20/(byte) collision::ypos2#1 )
[108] (byte*) collision::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte) collision::ypos2#2)
[109] (byte~) collision::col#9 ← (byte) collision::xpos#5
to:collision::@2
collision::@2: scope:[collision] from collision::@1 collision::@21
[110] (byte) collision::c#2 ← phi( collision::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 collision::@21/(byte) collision::c#1 )
[110] (byte) collision::col#2 ← phi( collision::@1/(byte~) collision::col#9 collision::@21/(byte) collision::col#1 )
[110] (byte) collision::i#2 ← phi( collision::@1/(byte) collision::i#3 collision::@21/(byte~) collision::i#13 )
[111] (byte) collision::i#1 ← ++ (byte) collision::i#2
[112] if(*((byte*) collision::piece_gfx#0 + (byte) collision::i#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto collision::@3
to:collision::@8
collision::@8: scope:[collision] from collision::@2
[113] if((byte) collision::ypos2#2<(byte/signed byte/word/signed word/dword/signed dword) 2*(const byte) PLAYFIELD_LINES#0) goto collision::@4
to:collision::@return
collision::@return: scope:[collision] from collision::@17 collision::@4 collision::@5 collision::@6 collision::@8
[114] (byte) collision::return#14 ← phi( collision::@4/(const byte) COLLISION_LEFT#0 collision::@5/(const byte) COLLISION_RIGHT#0 collision::@6/(const byte) COLLISION_PLAYFIELD#0 collision::@17/(const byte) COLLISION_NONE#0 collision::@8/(const byte) COLLISION_BOTTOM#0 )
play_collision: scope:[play_collision] from play_move_down::@12 play_move_leftright::@1 play_move_leftright::@7 play_move_rotate::@4
[104] (byte) play_collision::xpos#5 ← phi( play_move_down::@12/(byte) play_collision::xpos#0 play_move_leftright::@1/(byte) play_collision::xpos#1 play_move_leftright::@7/(byte) play_collision::xpos#2 play_move_rotate::@4/(byte) play_collision::xpos#3 )
[104] (byte) play_collision::ypos#4 ← phi( play_move_down::@12/(byte) play_collision::ypos#0 play_move_leftright::@1/(byte) play_collision::ypos#1 play_move_leftright::@7/(byte) play_collision::ypos#2 play_move_rotate::@4/(byte) play_collision::ypos#3 )
[104] (byte) play_collision::orientation#4 ← phi( play_move_down::@12/(byte) play_collision::orientation#0 play_move_leftright::@1/(byte) play_collision::orientation#1 play_move_leftright::@7/(byte) play_collision::orientation#2 play_move_rotate::@4/(byte) play_collision::orientation#3 )
[104] (byte*) current_piece#12 ← phi( play_move_down::@12/(byte*~) current_piece#71 play_move_leftright::@1/(byte*~) current_piece#72 play_move_leftright::@7/(byte*~) current_piece#73 play_move_rotate::@4/(byte*~) current_piece#74 )
[105] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#12 + (byte) play_collision::orientation#4
[106] (byte) play_collision::ypos2#0 ← (byte) play_collision::ypos#4 << (byte/signed byte/word/signed word/dword/signed dword) 1
to:play_collision::@1
play_collision::@1: scope:[play_collision] from play_collision play_collision::@20
[107] (byte) play_collision::l#6 ← phi( play_collision/(byte/signed byte/word/signed word/dword/signed dword) 0 play_collision::@20/(byte) play_collision::l#1 )
[107] (byte) play_collision::i#3 ← phi( play_collision/(byte/signed byte/word/signed word/dword/signed dword) 0 play_collision::@20/(byte~) play_collision::i#11 )
[107] (byte) play_collision::ypos2#2 ← phi( play_collision/(byte) play_collision::ypos2#0 play_collision::@20/(byte) play_collision::ypos2#1 )
[108] (byte*) play_collision::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte) play_collision::ypos2#2)
[109] (byte~) play_collision::col#9 ← (byte) play_collision::xpos#5
to:play_collision::@2
play_collision::@2: scope:[play_collision] from play_collision::@1 play_collision::@21
[110] (byte) play_collision::c#2 ← phi( play_collision::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 play_collision::@21/(byte) play_collision::c#1 )
[110] (byte) play_collision::col#2 ← phi( play_collision::@1/(byte~) play_collision::col#9 play_collision::@21/(byte) play_collision::col#1 )
[110] (byte) play_collision::i#2 ← phi( play_collision::@1/(byte) play_collision::i#3 play_collision::@21/(byte~) play_collision::i#13 )
[111] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2
[112] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_collision::@3
to:play_collision::@8
play_collision::@8: scope:[play_collision] from play_collision::@2
[113] if((byte) play_collision::ypos2#2<(byte/signed byte/word/signed word/dword/signed dword) 2*(const byte) PLAYFIELD_LINES#0) goto play_collision::@4
to:play_collision::@return
play_collision::@return: scope:[play_collision] from play_collision::@17 play_collision::@4 play_collision::@5 play_collision::@6 play_collision::@8
[114] (byte) play_collision::return#14 ← phi( play_collision::@4/(const byte) COLLISION_LEFT#0 play_collision::@5/(const byte) COLLISION_RIGHT#0 play_collision::@6/(const byte) COLLISION_PLAYFIELD#0 play_collision::@17/(const byte) COLLISION_NONE#0 play_collision::@8/(const byte) COLLISION_BOTTOM#0 )
[115] return
to:@return
collision::@4: scope:[collision] from collision::@8
[116] (byte~) collision::$7 ← (byte) collision::col#2 & (byte/word/signed word/dword/signed dword) 128
[117] if((byte~) collision::$7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto collision::@5
to:collision::@return
collision::@5: scope:[collision] from collision::@4
[118] if((byte) collision::col#2<(const byte) PLAYFIELD_COLS#0) goto collision::@6
to:collision::@return
collision::@6: scope:[collision] from collision::@5
[119] if(*((byte*) collision::playfield_line#0 + (byte) collision::col#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto collision::@3
to:collision::@return
collision::@3: scope:[collision] from collision::@2 collision::@6
[120] (byte) collision::col#1 ← ++ (byte) collision::col#2
[121] (byte) collision::c#1 ← ++ (byte) collision::c#2
[122] if((byte) collision::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto collision::@21
to:collision::@17
collision::@17: scope:[collision] from collision::@3
[123] (byte) collision::ypos2#1 ← (byte) collision::ypos2#2 + (byte/signed byte/word/signed word/dword/signed dword) 2
[124] (byte) collision::l#1 ← ++ (byte) collision::l#6
[125] if((byte) collision::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto collision::@20
to:collision::@return
collision::@20: scope:[collision] from collision::@17
[126] (byte~) collision::i#11 ← (byte) collision::i#1
to:collision::@1
collision::@21: scope:[collision] from collision::@3
[127] (byte~) collision::i#13 ← (byte) collision::i#1
to:collision::@2
play_collision::@4: scope:[play_collision] from play_collision::@8
[116] (byte~) play_collision::$7 ← (byte) play_collision::col#2 & (byte/word/signed word/dword/signed dword) 128
[117] if((byte~) play_collision::$7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_collision::@5
to:play_collision::@return
play_collision::@5: scope:[play_collision] from play_collision::@4
[118] if((byte) play_collision::col#2<(const byte) PLAYFIELD_COLS#0) goto play_collision::@6
to:play_collision::@return
play_collision::@6: scope:[play_collision] from play_collision::@5
[119] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::col#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_collision::@3
to:play_collision::@return
play_collision::@3: scope:[play_collision] from play_collision::@2 play_collision::@6
[120] (byte) play_collision::col#1 ← ++ (byte) play_collision::col#2
[121] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2
[122] if((byte) play_collision::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto play_collision::@21
to:play_collision::@17
play_collision::@17: scope:[play_collision] from play_collision::@3
[123] (byte) play_collision::ypos2#1 ← (byte) play_collision::ypos2#2 + (byte/signed byte/word/signed word/dword/signed dword) 2
[124] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6
[125] if((byte) play_collision::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto play_collision::@20
to:play_collision::@return
play_collision::@20: scope:[play_collision] from play_collision::@17
[126] (byte~) play_collision::i#11 ← (byte) play_collision::i#1
to:play_collision::@1
play_collision::@21: scope:[play_collision] from play_collision::@3
[127] (byte~) play_collision::i#13 ← (byte) play_collision::i#1
to:play_collision::@2
play_move_leftright: scope:[play_move_leftright] from main::@29
[128] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA#0) goto play_move_leftright::@1
to:play_move_leftright::@6
@ -274,42 +274,42 @@ play_move_leftright::@6: scope:[play_move_leftright] from play_move_leftright
[129] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT#0) goto play_move_leftright::@return
to:play_move_leftright::@7
play_move_leftright::@7: scope:[play_move_leftright] from play_move_leftright::@6
[130] (byte) collision::xpos#2 ← (byte) current_xpos#19 + (byte/signed byte/word/signed word/dword/signed dword) 1
[131] (byte) collision::ypos#2 ← (byte) current_ypos#16
[132] (byte) collision::orientation#2 ← (byte) current_orientation#18
[133] (byte*~) current_piece#74 ← (byte*) current_piece#13
[134] call collision
[135] (byte) collision::return#12 ← (byte) collision::return#14
[130] (byte) play_collision::xpos#2 ← (byte) current_xpos#16 + (byte/signed byte/word/signed word/dword/signed dword) 1
[131] (byte) play_collision::ypos#2 ← (byte) current_ypos#14
[132] (byte) play_collision::orientation#2 ← (byte) current_orientation#14
[133] (byte*~) current_piece#73 ← (byte*) current_piece#10
[134] call play_collision
[135] (byte) play_collision::return#12 ← (byte) play_collision::return#14
to:play_move_leftright::@15
play_move_leftright::@15: scope:[play_move_leftright] from play_move_leftright::@7
[136] (byte~) play_move_leftright::$4 ← (byte) collision::return#12
[136] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#12
[137] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE#0) goto play_move_leftright::@return
to:play_move_leftright::@8
play_move_leftright::@8: scope:[play_move_leftright] from play_move_leftright::@15
[138] (byte) current_xpos#7 ← ++ (byte) current_xpos#19
[138] (byte) current_xpos#3 ← ++ (byte) current_xpos#16
to:play_move_leftright::@return
play_move_leftright::@return: scope:[play_move_leftright] from play_move_leftright::@11 play_move_leftright::@14 play_move_leftright::@15 play_move_leftright::@6 play_move_leftright::@8
[139] (byte) current_xpos#23 ← phi( play_move_leftright::@11/(byte) current_xpos#9 play_move_leftright::@15/(byte) current_xpos#19 play_move_leftright::@8/(byte) current_xpos#7 play_move_leftright::@14/(byte) current_xpos#19 play_move_leftright::@6/(byte) current_xpos#19 )
[139] (byte) play_move_leftright::return#2 ← phi( play_move_leftright::@11/(byte/signed byte/word/signed word/dword/signed dword) 1 play_move_leftright::@15/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_leftright::@8/(byte/signed byte/word/signed word/dword/signed dword) 1 play_move_leftright::@14/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_leftright::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[139] (byte) current_xpos#20 ← phi( play_move_leftright::@11/(byte) current_xpos#5 play_move_leftright::@15/(byte) current_xpos#16 play_move_leftright::@8/(byte) current_xpos#3 play_move_leftright::@14/(byte) current_xpos#16 play_move_leftright::@6/(byte) current_xpos#16 )
[139] (byte) play_move_leftright::return#1 ← phi( play_move_leftright::@11/(byte/signed byte/word/signed word/dword/signed dword) 1 play_move_leftright::@15/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_leftright::@8/(byte/signed byte/word/signed word/dword/signed dword) 1 play_move_leftright::@14/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_leftright::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[140] return
to:@return
play_move_leftright::@1: scope:[play_move_leftright] from play_move_leftright
[141] (byte) collision::xpos#1 ← (byte) current_xpos#19 - (byte/signed byte/word/signed word/dword/signed dword) 1
[142] (byte) collision::ypos#1 ← (byte) current_ypos#16
[143] (byte) collision::orientation#1 ← (byte) current_orientation#18
[144] (byte*~) current_piece#73 ← (byte*) current_piece#13
[145] call collision
[146] (byte) collision::return#1 ← (byte) collision::return#14
[141] (byte) play_collision::xpos#1 ← (byte) current_xpos#16 - (byte/signed byte/word/signed word/dword/signed dword) 1
[142] (byte) play_collision::ypos#1 ← (byte) current_ypos#14
[143] (byte) play_collision::orientation#1 ← (byte) current_orientation#14
[144] (byte*~) current_piece#72 ← (byte*) current_piece#10
[145] call play_collision
[146] (byte) play_collision::return#1 ← (byte) play_collision::return#14
to:play_move_leftright::@14
play_move_leftright::@14: scope:[play_move_leftright] from play_move_leftright::@1
[147] (byte~) play_move_leftright::$8 ← (byte) collision::return#1
[147] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1
[148] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE#0) goto play_move_leftright::@return
to:play_move_leftright::@11
play_move_leftright::@11: scope:[play_move_leftright] from play_move_leftright::@14
[149] (byte) current_xpos#9 ← -- (byte) current_xpos#19
[149] (byte) current_xpos#5 ← -- (byte) current_xpos#16
to:play_move_leftright::@return
play_move_down: scope:[play_move_down] from main::@28
[150] (byte) current_movedown_counter#10 ← ++ (byte) current_movedown_counter#15
[150] (byte) current_movedown_counter#1 ← ++ (byte) current_movedown_counter#12
[151] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE#0) goto play_move_down::@1
to:play_move_down::@8
play_move_down::@8: scope:[play_move_down] from play_move_down
@ -325,14 +325,14 @@ play_move_down::@17: scope:[play_move_down] from play_move_down::@1
[157] if((byte~) play_move_down::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_move_down::@2
to:play_move_down::@9
play_move_down::@9: scope:[play_move_down] from play_move_down::@17
[158] if((byte) current_movedown_counter#10<(const byte) current_movedown_fast#0) goto play_move_down::@2
[158] if((byte) current_movedown_counter#1<(const byte) current_movedown_fast#0) goto play_move_down::@2
to:play_move_down::@10
play_move_down::@10: scope:[play_move_down] from play_move_down::@9
[159] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10
to:play_move_down::@2
play_move_down::@2: scope:[play_move_down] from play_move_down::@10 play_move_down::@17 play_move_down::@9
[160] (byte) play_move_down::movedown#7 ← phi( play_move_down::@10/(byte) play_move_down::movedown#2 play_move_down::@17/(byte) play_move_down::movedown#10 play_move_down::@9/(byte) play_move_down::movedown#10 )
[161] if((byte) current_movedown_counter#10<(const byte) current_movedown_slow#0) goto play_move_down::@4
[161] if((byte) current_movedown_counter#1<(const byte) current_movedown_slow#0) goto play_move_down::@4
to:play_move_down::@11
play_move_down::@11: scope:[play_move_down] from play_move_down::@2
[162] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7
@ -342,170 +342,170 @@ play_move_down::@4: scope:[play_move_down] from play_move_down::@11 play_move_d
[164] if((byte) play_move_down::movedown#6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_move_down::@return
to:play_move_down::@12
play_move_down::@12: scope:[play_move_down] from play_move_down::@4
[165] (byte) collision::ypos#0 ← (byte) current_ypos#12 + (byte/signed byte/word/signed word/dword/signed dword) 1
[166] (byte) collision::xpos#0 ← (byte) current_xpos#16
[167] (byte) collision::orientation#0 ← (byte) current_orientation#15
[168] (byte*~) current_piece#72 ← (byte*) current_piece#11
[169] call collision
[170] (byte) collision::return#0 ← (byte) collision::return#14
[165] (byte) play_collision::ypos#0 ← (byte) current_ypos#22 + (byte/signed byte/word/signed word/dword/signed dword) 1
[166] (byte) play_collision::xpos#0 ← (byte) current_xpos#11
[167] (byte) play_collision::orientation#0 ← (byte) current_orientation#10
[168] (byte*~) current_piece#71 ← (byte*) current_piece#16
[169] call play_collision
[170] (byte) play_collision::return#0 ← (byte) play_collision::return#14
to:play_move_down::@18
play_move_down::@18: scope:[play_move_down] from play_move_down::@12
[171] (byte~) play_move_down::$12 ← (byte) collision::return#0
[171] (byte~) play_move_down::$12 ← (byte) play_collision::return#0
[172] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE#0) goto play_move_down::@6
to:play_move_down::@13
play_move_down::@13: scope:[play_move_down] from play_move_down::@18
[173] phi()
[174] call lock_current
[174] call play_lock_current
to:play_move_down::@19
play_move_down::@19: scope:[play_move_down] from play_move_down::@13
[175] phi()
[176] call remove_lines
[176] call play_remove_lines
to:play_move_down::@20
play_move_down::@20: scope:[play_move_down] from play_move_down::@19
[177] phi()
[178] call spawn_current
[179] (byte*~) current_piece#76 ← (byte*)*((const word[]) PIECES#0 + (byte~) spawn_current::$3)
[178] call play_spawn_current
[179] (byte*~) current_piece#75 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$3)
to:play_move_down::@7
play_move_down::@7: scope:[play_move_down] from play_move_down::@20 play_move_down::@6
[180] (byte) current_piece_color#23 ← phi( play_move_down::@20/(byte) current_piece_color#15 play_move_down::@6/(byte) current_piece_color#11 )
[180] (byte) current_xpos#36 ← phi( play_move_down::@20/(byte/signed byte/word/signed word/dword/signed dword) 3 play_move_down::@6/(byte) current_xpos#16 )
[180] (byte*) current_piece_gfx#29 ← phi( play_move_down::@20/(byte*) current_piece_gfx#10 play_move_down::@6/(byte*) current_piece_gfx#15 )
[180] (byte) current_orientation#33 ← phi( play_move_down::@20/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_down::@6/(byte) current_orientation#15 )
[180] (byte*) current_piece#23 ← phi( play_move_down::@20/(byte*~) current_piece#76 play_move_down::@6/(byte*) current_piece#11 )
[180] (byte) current_ypos#31 ← phi( play_move_down::@20/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_down::@6/(byte) current_ypos#4 )
[180] (byte) current_piece_color#21 ← phi( play_move_down::@20/(byte) current_piece_color#13 play_move_down::@6/(byte) current_piece_color#16 )
[180] (byte) current_xpos#34 ← phi( play_move_down::@20/(byte/signed byte/word/signed word/dword/signed dword) 3 play_move_down::@6/(byte) current_xpos#11 )
[180] (byte*) current_piece_gfx#27 ← phi( play_move_down::@20/(byte*) current_piece_gfx#17 play_move_down::@6/(byte*) current_piece_gfx#10 )
[180] (byte) current_orientation#29 ← phi( play_move_down::@20/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_down::@6/(byte) current_orientation#10 )
[180] (byte*) current_piece#20 ← phi( play_move_down::@20/(byte*~) current_piece#75 play_move_down::@6/(byte*) current_piece#16 )
[180] (byte) current_ypos#30 ← phi( play_move_down::@20/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_down::@6/(byte) current_ypos#1 )
to:play_move_down::@return
play_move_down::@return: scope:[play_move_down] from play_move_down::@4 play_move_down::@7
[181] (byte) current_piece_color#13 ← phi( play_move_down::@4/(byte) current_piece_color#11 play_move_down::@7/(byte) current_piece_color#23 )
[181] (byte) current_xpos#19 ← phi( play_move_down::@4/(byte) current_xpos#16 play_move_down::@7/(byte) current_xpos#36 )
[181] (byte*) current_piece_gfx#17 ← phi( play_move_down::@4/(byte*) current_piece_gfx#15 play_move_down::@7/(byte*) current_piece_gfx#29 )
[181] (byte) current_orientation#18 ← phi( play_move_down::@4/(byte) current_orientation#15 play_move_down::@7/(byte) current_orientation#33 )
[181] (byte*) current_piece#13 ← phi( play_move_down::@4/(byte*) current_piece#11 play_move_down::@7/(byte*) current_piece#23 )
[181] (byte) current_ypos#16 ← phi( play_move_down::@4/(byte) current_ypos#12 play_move_down::@7/(byte) current_ypos#31 )
[181] (byte) current_movedown_counter#12 ← phi( play_move_down::@4/(byte) current_movedown_counter#10 play_move_down::@7/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[181] (byte) play_move_down::return#3 ← phi( play_move_down::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_down::@7/(byte/signed byte/word/signed word/dword/signed dword) 1 )
[181] (byte) current_piece_color#11 ← phi( play_move_down::@4/(byte) current_piece_color#16 play_move_down::@7/(byte) current_piece_color#21 )
[181] (byte) current_xpos#16 ← phi( play_move_down::@4/(byte) current_xpos#11 play_move_down::@7/(byte) current_xpos#34 )
[181] (byte*) current_piece_gfx#14 ← phi( play_move_down::@4/(byte*) current_piece_gfx#10 play_move_down::@7/(byte*) current_piece_gfx#27 )
[181] (byte) current_orientation#14 ← phi( play_move_down::@4/(byte) current_orientation#10 play_move_down::@7/(byte) current_orientation#29 )
[181] (byte*) current_piece#10 ← phi( play_move_down::@4/(byte*) current_piece#16 play_move_down::@7/(byte*) current_piece#20 )
[181] (byte) current_ypos#14 ← phi( play_move_down::@4/(byte) current_ypos#22 play_move_down::@7/(byte) current_ypos#30 )
[181] (byte) current_movedown_counter#10 ← phi( play_move_down::@4/(byte) current_movedown_counter#1 play_move_down::@7/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[181] (byte) play_move_down::return#2 ← phi( play_move_down::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 play_move_down::@7/(byte/signed byte/word/signed word/dword/signed dword) 1 )
[182] return
to:@return
play_move_down::@6: scope:[play_move_down] from play_move_down::@18
[183] (byte) current_ypos#4 ← ++ (byte) current_ypos#12
[183] (byte) current_ypos#1 ← ++ (byte) current_ypos#22
to:play_move_down::@7
spawn_current: scope:[spawn_current] from main::@23 play_move_down::@20
play_spawn_current: scope:[play_spawn_current] from main::@23 play_move_down::@20
[184] phi()
to:spawn_current::@1
spawn_current::@1: scope:[spawn_current] from spawn_current spawn_current::@7
[185] (byte) spawn_current::piece_idx#2 ← phi( spawn_current/(byte/signed byte/word/signed word/dword/signed dword) 7 spawn_current::@7/(byte) spawn_current::piece_idx#1 )
[186] if((byte) spawn_current::piece_idx#2==(byte/signed byte/word/signed word/dword/signed dword) 7) goto spawn_current::@2
to:spawn_current::@3
spawn_current::@3: scope:[spawn_current] from spawn_current::@1
[187] (byte~) spawn_current::$3 ← (byte) spawn_current::piece_idx#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
[188] (byte*) current_piece_gfx#10 ← (byte*)*((const word[]) PIECES#0 + (byte~) spawn_current::$3) + (byte/signed byte/word/signed word/dword/signed dword) 0
[189] (byte) current_piece_color#15 ← *((const byte[]) PIECES_COLORS#0 + (byte) spawn_current::piece_idx#2)
to:spawn_current::@return
spawn_current::@return: scope:[spawn_current] from spawn_current::@3
to:play_spawn_current::@1
play_spawn_current::@1: scope:[play_spawn_current] from play_spawn_current play_spawn_current::@7
[185] (byte) play_spawn_current::piece_idx#2 ← phi( play_spawn_current/(byte/signed byte/word/signed word/dword/signed dword) 7 play_spawn_current::@7/(byte) play_spawn_current::piece_idx#1 )
[186] if((byte) play_spawn_current::piece_idx#2==(byte/signed byte/word/signed word/dword/signed dword) 7) goto play_spawn_current::@2
to:play_spawn_current::@3
play_spawn_current::@3: scope:[play_spawn_current] from play_spawn_current::@1
[187] (byte~) play_spawn_current::$3 ← (byte) play_spawn_current::piece_idx#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
[188] (byte*) current_piece_gfx#17 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$3) + (byte/signed byte/word/signed word/dword/signed dword) 0
[189] (byte) current_piece_color#13 ← *((const byte[]) PIECES_COLORS#0 + (byte) play_spawn_current::piece_idx#2)
to:play_spawn_current::@return
play_spawn_current::@return: scope:[play_spawn_current] from play_spawn_current::@3
[190] return
to:@return
spawn_current::@2: scope:[spawn_current] from spawn_current::@1
play_spawn_current::@2: scope:[play_spawn_current] from play_spawn_current::@1
[191] phi()
[192] call sid_rnd
[193] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0
to:spawn_current::@7
spawn_current::@7: scope:[spawn_current] from spawn_current::@2
[194] (byte~) spawn_current::$1 ← (byte) sid_rnd::return#2
[195] (byte) spawn_current::piece_idx#1 ← (byte~) spawn_current::$1 & (byte/signed byte/word/signed word/dword/signed dword) 7
to:spawn_current::@1
sid_rnd: scope:[sid_rnd] from spawn_current::@2
to:play_spawn_current::@7
play_spawn_current::@7: scope:[play_spawn_current] from play_spawn_current::@2
[194] (byte~) play_spawn_current::$1 ← (byte) sid_rnd::return#2
[195] (byte) play_spawn_current::piece_idx#1 ← (byte~) play_spawn_current::$1 & (byte/signed byte/word/signed word/dword/signed dword) 7
to:play_spawn_current::@1
sid_rnd: scope:[sid_rnd] from play_spawn_current::@2
[196] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0)
to:sid_rnd::@return
sid_rnd::@return: scope:[sid_rnd] from sid_rnd
[197] return
to:@return
remove_lines: scope:[remove_lines] from play_move_down::@19
play_remove_lines: scope:[play_remove_lines] from play_move_down::@19
[198] phi()
to:remove_lines::@1
remove_lines::@1: scope:[remove_lines] from remove_lines remove_lines::@4
[199] (byte) remove_lines::y#8 ← phi( remove_lines/(byte/signed byte/word/signed word/dword/signed dword) 0 remove_lines::@4/(byte) remove_lines::y#1 )
[199] (byte) remove_lines::w#12 ← phi( remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte/signed byte/word/signed word/dword/signed dword) 1 remove_lines::@4/(byte) remove_lines::w#11 )
[199] (byte) remove_lines::r#3 ← phi( remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte/signed byte/word/signed word/dword/signed dword) 1 remove_lines::@4/(byte) remove_lines::r#1 )
to:remove_lines::@2
remove_lines::@2: scope:[remove_lines] from remove_lines::@1 remove_lines::@3
[200] (byte) remove_lines::full#4 ← phi( remove_lines::@1/(byte/signed byte/word/signed word/dword/signed dword) 1 remove_lines::@3/(byte) remove_lines::full#2 )
[200] (byte) remove_lines::x#2 ← phi( remove_lines::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 remove_lines::@3/(byte) remove_lines::x#1 )
[200] (byte) remove_lines::w#4 ← phi( remove_lines::@1/(byte) remove_lines::w#12 remove_lines::@3/(byte) remove_lines::w#1 )
[200] (byte) remove_lines::r#2 ← phi( remove_lines::@1/(byte) remove_lines::r#3 remove_lines::@3/(byte) remove_lines::r#1 )
[201] (byte) remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) remove_lines::r#2)
[202] (byte) remove_lines::r#1 ← -- (byte) remove_lines::r#2
[203] if((byte) remove_lines::c#0!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto remove_lines::@17
to:remove_lines::@3
remove_lines::@3: scope:[remove_lines] from remove_lines::@17 remove_lines::@2
[204] (byte) remove_lines::full#2 ← phi( remove_lines::@17/(byte) remove_lines::full#4 remove_lines::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[205] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) remove_lines::w#4) ← (byte) remove_lines::c#0
[206] (byte) remove_lines::w#1 ← -- (byte) remove_lines::w#4
[207] (byte) remove_lines::x#1 ← ++ (byte) remove_lines::x#2
[208] if((byte) remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1) goto remove_lines::@2
to:remove_lines::@9
remove_lines::@9: scope:[remove_lines] from remove_lines::@3
[209] if((byte) remove_lines::full#2!=(byte/signed byte/word/signed word/dword/signed dword) 1) goto remove_lines::@4
to:remove_lines::@10
remove_lines::@10: scope:[remove_lines] from remove_lines::@9
[210] (byte) remove_lines::w#2 ← (byte) remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0
to:remove_lines::@4
remove_lines::@4: scope:[remove_lines] from remove_lines::@10 remove_lines::@9
[211] (byte) remove_lines::w#11 ← phi( remove_lines::@10/(byte) remove_lines::w#2 remove_lines::@9/(byte) remove_lines::w#1 )
[212] (byte) remove_lines::y#1 ← ++ (byte) remove_lines::y#8
[213] if((byte) remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1) goto remove_lines::@1
to:remove_lines::@5
remove_lines::@5: scope:[remove_lines] from remove_lines::@4 remove_lines::@6
[214] (byte) remove_lines::w#6 ← phi( remove_lines::@4/(byte) remove_lines::w#11 remove_lines::@6/(byte) remove_lines::w#3 )
[215] if((byte) remove_lines::w#6!=(byte/word/signed word/dword/signed dword) 255) goto remove_lines::@6
to:remove_lines::@return
remove_lines::@return: scope:[remove_lines] from remove_lines::@5
to:play_remove_lines::@1
play_remove_lines::@1: scope:[play_remove_lines] from play_remove_lines play_remove_lines::@4
[199] (byte) play_remove_lines::y#8 ← phi( play_remove_lines/(byte/signed byte/word/signed word/dword/signed dword) 0 play_remove_lines::@4/(byte) play_remove_lines::y#1 )
[199] (byte) play_remove_lines::w#12 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte/signed byte/word/signed word/dword/signed dword) 1 play_remove_lines::@4/(byte) play_remove_lines::w#11 )
[199] (byte) play_remove_lines::r#3 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES#0*(const byte) PLAYFIELD_COLS#0-(byte/signed byte/word/signed word/dword/signed dword) 1 play_remove_lines::@4/(byte) play_remove_lines::r#1 )
to:play_remove_lines::@2
play_remove_lines::@2: scope:[play_remove_lines] from play_remove_lines::@1 play_remove_lines::@3
[200] (byte) play_remove_lines::full#4 ← phi( play_remove_lines::@1/(byte/signed byte/word/signed word/dword/signed dword) 1 play_remove_lines::@3/(byte) play_remove_lines::full#2 )
[200] (byte) play_remove_lines::x#2 ← phi( play_remove_lines::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 play_remove_lines::@3/(byte) play_remove_lines::x#1 )
[200] (byte) play_remove_lines::w#4 ← phi( play_remove_lines::@1/(byte) play_remove_lines::w#12 play_remove_lines::@3/(byte) play_remove_lines::w#1 )
[200] (byte) play_remove_lines::r#2 ← phi( play_remove_lines::@1/(byte) play_remove_lines::r#3 play_remove_lines::@3/(byte) play_remove_lines::r#1 )
[201] (byte) play_remove_lines::c#0 ← *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::r#2)
[202] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2
[203] if((byte) play_remove_lines::c#0!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_remove_lines::@17
to:play_remove_lines::@3
play_remove_lines::@3: scope:[play_remove_lines] from play_remove_lines::@17 play_remove_lines::@2
[204] (byte) play_remove_lines::full#2 ← phi( play_remove_lines::@17/(byte) play_remove_lines::full#4 play_remove_lines::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[205] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0
[206] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4
[207] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2
[208] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS#0-(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1) goto play_remove_lines::@2
to:play_remove_lines::@9
play_remove_lines::@9: scope:[play_remove_lines] from play_remove_lines::@3
[209] if((byte) play_remove_lines::full#2!=(byte/signed byte/word/signed word/dword/signed dword) 1) goto play_remove_lines::@4
to:play_remove_lines::@10
play_remove_lines::@10: scope:[play_remove_lines] from play_remove_lines::@9
[210] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS#0
to:play_remove_lines::@4
play_remove_lines::@4: scope:[play_remove_lines] from play_remove_lines::@10 play_remove_lines::@9
[211] (byte) play_remove_lines::w#11 ← phi( play_remove_lines::@10/(byte) play_remove_lines::w#2 play_remove_lines::@9/(byte) play_remove_lines::w#1 )
[212] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8
[213] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES#0-(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1) goto play_remove_lines::@1
to:play_remove_lines::@5
play_remove_lines::@5: scope:[play_remove_lines] from play_remove_lines::@4 play_remove_lines::@6
[214] (byte) play_remove_lines::w#6 ← phi( play_remove_lines::@4/(byte) play_remove_lines::w#11 play_remove_lines::@6/(byte) play_remove_lines::w#3 )
[215] if((byte) play_remove_lines::w#6!=(byte/word/signed word/dword/signed dword) 255) goto play_remove_lines::@6
to:play_remove_lines::@return
play_remove_lines::@return: scope:[play_remove_lines] from play_remove_lines::@5
[216] return
to:@return
remove_lines::@6: scope:[remove_lines] from remove_lines::@5
[217] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) remove_lines::w#6) ← (byte/signed byte/word/signed word/dword/signed dword) 0
[218] (byte) remove_lines::w#3 ← -- (byte) remove_lines::w#6
to:remove_lines::@5
remove_lines::@17: scope:[remove_lines] from remove_lines::@2
play_remove_lines::@6: scope:[play_remove_lines] from play_remove_lines::@5
[217] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte/signed byte/word/signed word/dword/signed dword) 0
[218] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6
to:play_remove_lines::@5
play_remove_lines::@17: scope:[play_remove_lines] from play_remove_lines::@2
[219] phi()
to:remove_lines::@3
lock_current: scope:[lock_current] from play_move_down::@13
[220] (byte) lock_current::ypos2#0 ← (byte) current_ypos#12 << (byte/signed byte/word/signed word/dword/signed dword) 1
to:lock_current::@1
lock_current::@1: scope:[lock_current] from lock_current lock_current::@7
[221] (byte) lock_current::l#6 ← phi( lock_current/(byte/signed byte/word/signed word/dword/signed dword) 0 lock_current::@7/(byte) lock_current::l#1 )
[221] (byte) lock_current::i#3 ← phi( lock_current/(byte/signed byte/word/signed word/dword/signed dword) 0 lock_current::@7/(byte~) lock_current::i#7 )
[221] (byte) lock_current::ypos2#2 ← phi( lock_current/(byte) lock_current::ypos2#0 lock_current::@7/(byte) lock_current::ypos2#1 )
[222] (byte*) lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte) lock_current::ypos2#2)
[223] (byte) lock_current::col#0 ← (byte) current_xpos#16
to:lock_current::@2
lock_current::@2: scope:[lock_current] from lock_current::@1 lock_current::@8
[224] (byte) lock_current::c#2 ← phi( lock_current::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 lock_current::@8/(byte) lock_current::c#1 )
[224] (byte) lock_current::col#2 ← phi( lock_current::@1/(byte) lock_current::col#0 lock_current::@8/(byte) lock_current::col#1 )
[224] (byte) lock_current::i#2 ← phi( lock_current::@1/(byte) lock_current::i#3 lock_current::@8/(byte~) lock_current::i#9 )
[225] (byte) lock_current::i#1 ← ++ (byte) lock_current::i#2
[226] if(*((byte*) current_piece_gfx#15 + (byte) lock_current::i#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto lock_current::@3
to:lock_current::@4
lock_current::@4: scope:[lock_current] from lock_current::@2
[227] *((byte*) lock_current::playfield_line#0 + (byte) lock_current::col#2) ← (byte) current_piece_color#11
to:lock_current::@3
lock_current::@3: scope:[lock_current] from lock_current::@2 lock_current::@4
[228] (byte) lock_current::col#1 ← ++ (byte) lock_current::col#2
[229] (byte) lock_current::c#1 ← ++ (byte) lock_current::c#2
[230] if((byte) lock_current::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto lock_current::@8
to:lock_current::@5
lock_current::@5: scope:[lock_current] from lock_current::@3
[231] (byte) lock_current::ypos2#1 ← (byte) lock_current::ypos2#2 + (byte/signed byte/word/signed word/dword/signed dword) 2
[232] (byte) lock_current::l#1 ← ++ (byte) lock_current::l#6
[233] if((byte) lock_current::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto lock_current::@7
to:lock_current::@return
lock_current::@return: scope:[lock_current] from lock_current::@5
to:play_remove_lines::@3
play_lock_current: scope:[play_lock_current] from play_move_down::@13
[220] (byte) play_lock_current::ypos2#0 ← (byte) current_ypos#22 << (byte/signed byte/word/signed word/dword/signed dword) 1
to:play_lock_current::@1
play_lock_current::@1: scope:[play_lock_current] from play_lock_current play_lock_current::@7
[221] (byte) play_lock_current::l#6 ← phi( play_lock_current/(byte/signed byte/word/signed word/dword/signed dword) 0 play_lock_current::@7/(byte) play_lock_current::l#1 )
[221] (byte) play_lock_current::i#3 ← phi( play_lock_current/(byte/signed byte/word/signed word/dword/signed dword) 0 play_lock_current::@7/(byte~) play_lock_current::i#7 )
[221] (byte) play_lock_current::ypos2#2 ← phi( play_lock_current/(byte) play_lock_current::ypos2#0 play_lock_current::@7/(byte) play_lock_current::ypos2#1 )
[222] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte) play_lock_current::ypos2#2)
[223] (byte) play_lock_current::col#0 ← (byte) current_xpos#11
to:play_lock_current::@2
play_lock_current::@2: scope:[play_lock_current] from play_lock_current::@1 play_lock_current::@8
[224] (byte) play_lock_current::c#2 ← phi( play_lock_current::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 play_lock_current::@8/(byte) play_lock_current::c#1 )
[224] (byte) play_lock_current::col#2 ← phi( play_lock_current::@1/(byte) play_lock_current::col#0 play_lock_current::@8/(byte) play_lock_current::col#1 )
[224] (byte) play_lock_current::i#2 ← phi( play_lock_current::@1/(byte) play_lock_current::i#3 play_lock_current::@8/(byte~) play_lock_current::i#9 )
[225] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2
[226] if(*((byte*) current_piece_gfx#10 + (byte) play_lock_current::i#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_lock_current::@3
to:play_lock_current::@4
play_lock_current::@4: scope:[play_lock_current] from play_lock_current::@2
[227] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::col#2) ← (byte) current_piece_color#16
to:play_lock_current::@3
play_lock_current::@3: scope:[play_lock_current] from play_lock_current::@2 play_lock_current::@4
[228] (byte) play_lock_current::col#1 ← ++ (byte) play_lock_current::col#2
[229] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2
[230] if((byte) play_lock_current::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto play_lock_current::@8
to:play_lock_current::@5
play_lock_current::@5: scope:[play_lock_current] from play_lock_current::@3
[231] (byte) play_lock_current::ypos2#1 ← (byte) play_lock_current::ypos2#2 + (byte/signed byte/word/signed word/dword/signed dword) 2
[232] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6
[233] if((byte) play_lock_current::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto play_lock_current::@7
to:play_lock_current::@return
play_lock_current::@return: scope:[play_lock_current] from play_lock_current::@5
[234] return
to:@return
lock_current::@7: scope:[lock_current] from lock_current::@5
[235] (byte~) lock_current::i#7 ← (byte) lock_current::i#1
to:lock_current::@1
lock_current::@8: scope:[lock_current] from lock_current::@3
[236] (byte~) lock_current::i#9 ← (byte) lock_current::i#1
to:lock_current::@2
play_lock_current::@7: scope:[play_lock_current] from play_lock_current::@5
[235] (byte~) play_lock_current::i#7 ← (byte) play_lock_current::i#1
to:play_lock_current::@1
play_lock_current::@8: scope:[play_lock_current] from play_lock_current::@3
[236] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1
to:play_lock_current::@2
keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@10 keyboard_event_scan::@11 keyboard_event_scan::@20 keyboard_event_scan::@9 play_move_down::@1
[237] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@10/(const byte) KEY_CTRL#0 keyboard_event_scan::@11/(const byte) KEY_COMMODORE#0 keyboard_event_scan::@20/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@9/(const byte) KEY_RSHIFT#0 play_move_down::@1/(const byte) KEY_SPACE#0 )
[238] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte/signed byte/word/signed word/dword/signed dword) 3
@ -643,25 +643,25 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@1
keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read
[303] return
to:@return
tables_init: scope:[tables_init] from main::@22
play_init: scope:[play_init] from main::@22
[304] phi()
to:tables_init::@1
tables_init::@1: scope:[tables_init] from tables_init tables_init::@1
[305] (byte) tables_init::idx#2 ← phi( tables_init/(byte/signed byte/word/signed word/dword/signed dword) 0 tables_init::@1/(byte) tables_init::idx#1 )
[305] (byte*) tables_init::pli#2 ← phi( tables_init/(const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 tables_init::@1/(byte*) tables_init::pli#1 )
[305] (byte) tables_init::j#2 ← phi( tables_init/(byte/signed byte/word/signed word/dword/signed dword) 0 tables_init::@1/(byte) tables_init::j#1 )
[306] (byte~) tables_init::$1 ← (byte) tables_init::j#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
[307] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) tables_init::$1) ← (byte*) tables_init::pli#2
[308] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) tables_init::j#2) ← (byte) tables_init::idx#2
[309] (byte*) tables_init::pli#1 ← (byte*) tables_init::pli#2 + (const byte) PLAYFIELD_COLS#0
[310] (byte) tables_init::idx#1 ← (byte) tables_init::idx#2 + (const byte) PLAYFIELD_COLS#0
[311] (byte) tables_init::j#1 ← ++ (byte) tables_init::j#2
[312] if((byte) tables_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1) goto tables_init::@1
to:tables_init::@2
tables_init::@2: scope:[tables_init] from tables_init::@1
to:play_init::@1
play_init::@1: scope:[play_init] from play_init play_init::@1
[305] (byte) play_init::idx#2 ← phi( play_init/(byte/signed byte/word/signed word/dword/signed dword) 0 play_init::@1/(byte) play_init::idx#1 )
[305] (byte*) play_init::pli#2 ← phi( play_init/(const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 play_init::@1/(byte*) play_init::pli#1 )
[305] (byte) play_init::j#2 ← phi( play_init/(byte/signed byte/word/signed word/dword/signed dword) 0 play_init::@1/(byte) play_init::j#1 )
[306] (byte~) play_init::$1 ← (byte) play_init::j#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
[307] *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte~) play_init::$1) ← (byte*) play_init::pli#2
[308] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 + (byte) play_init::j#2) ← (byte) play_init::idx#2
[309] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS#0
[310] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS#0
[311] (byte) play_init::j#1 ← ++ (byte) play_init::j#2
[312] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES#0-(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1) goto play_init::@1
to:play_init::@2
play_init::@2: scope:[play_init] from play_init::@1
[313] *((const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0+(const byte) PLAYFIELD_LINES#0) ← (const byte) PLAYFIELD_COLS#0*(const byte) PLAYFIELD_LINES#0
to:tables_init::@return
tables_init::@return: scope:[tables_init] from tables_init::@2
to:play_init::@return
play_init::@return: scope:[play_init] from play_init::@2
[314] return
to:@return
render_init: scope:[render_init] from main::@21
@ -702,7 +702,7 @@ render_init::@return: scope:[render_init] from render_init::@5
to:@return
fill: scope:[fill] from render_init render_init::@7
[335] (byte) fill::val#3 ← phi( render_init/(byte/word/signed word/dword/signed dword) 208 render_init::@7/(const byte) BLACK#0 )
[335] (byte*) fill::addr#0 ← phi( render_init/(const byte*) SCREEN#0 render_init::@7/(const byte*) COLS#0 )
[335] (byte*) fill::addr#0 ← phi( render_init/(const byte*) PLAYFIELD_SCREEN#0 render_init::@7/(const byte*) COLS#0 )
[336] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000
to:fill::@1
fill::@1: scope:[fill] from fill fill::@1

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
(label) @23
(label) @14
(label) @26
(label) @begin
(label) @end
@ -15,8 +15,6 @@
(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280
(byte) BROWN
(byte*) CHARGEN
(byte*) CHARSET
(const byte*) CHARSET#0 CHARSET = ((byte*))(word/signed word/dword/signed dword) 10240
(byte*) CIA1_INTERRUPT
(byte*) CIA1_PORT_A
(const byte*) CIA1_PORT_A#0 CIA1_PORT_A = ((byte*))(word/dword/signed dword) 56320
@ -167,10 +165,16 @@
(byte[4*4*4]) PIECE_Z
(const byte[4*4*4]) PIECE_Z#0 PIECE_Z = { (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) 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) 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) 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) 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) 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) 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) 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) 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) 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) PINK
(byte*) PLAYFIELD_CHARSET
(const byte*) PLAYFIELD_CHARSET#0 PLAYFIELD_CHARSET = ((byte*))(word/signed word/dword/signed dword) 10240
(byte) PLAYFIELD_COLS
(const byte) PLAYFIELD_COLS#0 PLAYFIELD_COLS = (byte/signed byte/word/signed word/dword/signed dword) 10
(byte) PLAYFIELD_LINES
(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_SPRITES
(byte*) PLAYFIELD_SPRITE_PTRS
(byte*) PROCPORT
(byte) PROCPORT_BASIC_KERNEL_IO
(byte*) PROCPORT_DDR
@ -183,8 +187,6 @@
(byte*) RASTER
(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266
(byte) RED
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(byte) SID_CONTROL_GATE
(byte) SID_CONTROL_NOISE
(const byte) SID_CONTROL_NOISE#0 SID_CONTROL_NOISE = (byte/word/signed word/dword/signed dword) 128
@ -227,125 +229,64 @@
(byte) WHITE
(const byte) WHITE#0 WHITE = (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) YELLOW
(byte()) collision((byte) collision::xpos , (byte) collision::ypos , (byte) collision::orientation)
(byte~) collision::$7 reg byte a 2002.0
(label) collision::@1
(label) collision::@17
(label) collision::@2
(label) collision::@20
(label) collision::@21
(label) collision::@3
(label) collision::@4
(label) collision::@5
(label) collision::@6
(label) collision::@8
(label) collision::@return
(byte) collision::c
(byte) collision::c#1 reg byte x 1001.0
(byte) collision::c#2 reg byte x 222.44444444444446
(byte) collision::col
(byte) collision::col#1 col zp ZP_BYTE:11 500.5
(byte) collision::col#2 col zp ZP_BYTE:11 638.25
(byte~) collision::col#9 col zp ZP_BYTE:11 202.0
(byte) collision::i
(byte) collision::i#1 i zp ZP_BYTE:24 161.76923076923077
(byte~) collision::i#11 i#11 zp ZP_BYTE:10 202.0
(byte~) collision::i#13 i#13 zp ZP_BYTE:10 2002.0
(byte) collision::i#2 i#2 zp ZP_BYTE:10 1552.0
(byte) collision::i#3 i#3 zp ZP_BYTE:10 67.33333333333333
(byte) collision::l
(byte) collision::l#1 l zp ZP_BYTE:9 101.0
(byte) collision::l#6 l zp ZP_BYTE:9 12.625
(byte) collision::orientation
(byte) collision::orientation#0 reg byte x 2.0
(byte) collision::orientation#1 reg byte x 2.0
(byte) collision::orientation#2 reg byte x 2.0
(byte) collision::orientation#3 reg byte x 2.0
(byte) collision::orientation#4 reg byte x 10.0
(byte*) collision::piece_gfx
(byte*) collision::piece_gfx#0 piece_gfx zp ZP_WORD:5 47.76190476190476
(byte*) collision::playfield_line
(byte*) collision::playfield_line#0 playfield_line zp ZP_WORD:22 78.71428571428571
(byte) collision::return
(byte) collision::return#0 reg byte a 4.0
(byte) collision::return#1 reg byte a 4.0
(byte) collision::return#12 reg byte a 4.0
(byte) collision::return#13 reg byte a 4.0
(byte) collision::return#14 reg byte a 1.3333333333333333
(byte) collision::xpos
(byte) collision::xpos#0 xpos zp ZP_BYTE:7 1.3333333333333333
(byte) collision::xpos#1 xpos zp ZP_BYTE:7 1.0
(byte) collision::xpos#2 xpos zp ZP_BYTE:7 1.0
(byte) collision::xpos#3 xpos zp ZP_BYTE:7 1.0
(byte) collision::xpos#5 xpos zp ZP_BYTE:7 4.954545454545454
(byte) collision::ypos
(byte) collision::ypos#0 reg byte y 1.0
(byte) collision::ypos#1 reg byte y 1.3333333333333333
(byte) collision::ypos#2 reg byte y 1.3333333333333333
(byte) collision::ypos#3 reg byte y 1.3333333333333333
(byte) collision::ypos#4 reg byte y 5.0
(byte) collision::ypos2
(byte) collision::ypos2#0 ypos2 zp ZP_BYTE:8 4.0
(byte) collision::ypos2#1 ypos2 zp ZP_BYTE:8 50.5
(byte) collision::ypos2#2 ypos2 zp ZP_BYTE:8 87.06666666666668
(byte) current_movedown_counter
(byte) current_movedown_counter#10 current_movedown_counter zp ZP_BYTE:3 0.5333333333333333
(byte) current_movedown_counter#12 current_movedown_counter zp ZP_BYTE:3 0.52
(byte) current_movedown_counter#15 current_movedown_counter zp ZP_BYTE:3 1.3
(byte) current_movedown_counter#1 current_movedown_counter zp ZP_BYTE:3 0.5333333333333333
(byte) current_movedown_counter#10 current_movedown_counter zp ZP_BYTE:3 0.52
(byte) current_movedown_counter#12 current_movedown_counter zp ZP_BYTE:3 1.3
(byte) current_movedown_fast
(const byte) current_movedown_fast#0 current_movedown_fast = (byte/signed byte/word/signed word/dword/signed dword) 5
(byte) current_movedown_slow
(const byte) current_movedown_slow#0 current_movedown_slow = (byte/signed byte/word/signed word/dword/signed dword) 50
(byte) current_orientation
(byte) current_orientation#15 current_orientation zp ZP_BYTE:14 0.5
(byte) current_orientation#18 current_orientation zp ZP_BYTE:14 0.32653061224489793
(byte) current_orientation#23 current_orientation zp ZP_BYTE:14 1.1333333333333333
(byte) current_orientation#33 current_orientation zp ZP_BYTE:14 4.0
(byte) current_orientation#8 current_orientation zp ZP_BYTE:14 3.0
(byte) current_orientation#10 current_orientation zp ZP_BYTE:14 0.5
(byte) current_orientation#14 current_orientation zp ZP_BYTE:14 0.32653061224489793
(byte) current_orientation#19 current_orientation zp ZP_BYTE:14 1.1333333333333333
(byte) current_orientation#29 current_orientation zp ZP_BYTE:14 4.0
(byte) current_orientation#4 current_orientation zp ZP_BYTE:14 3.0
(byte*) current_piece
(byte*) current_piece#11 current_piece zp ZP_WORD:12 0.5588235294117647
(byte*) current_piece#13 current_piece zp ZP_WORD:12 0.3484848484848484
(byte*) current_piece#15 current_piece#15 zp ZP_WORD:5 10.0
(byte*) current_piece#23 current_piece zp ZP_WORD:12 6.0
(byte*~) current_piece#71 current_piece zp ZP_WORD:12 4.0
(byte*) current_piece#10 current_piece zp ZP_WORD:12 0.3484848484848484
(byte*) current_piece#12 current_piece#12 zp ZP_WORD:5 10.0
(byte*) current_piece#16 current_piece zp ZP_WORD:12 0.5588235294117647
(byte*) current_piece#20 current_piece zp ZP_WORD:12 6.0
(byte*~) current_piece#70 current_piece zp ZP_WORD:12 4.0
(byte*~) current_piece#71 current_piece#71 zp ZP_WORD:5 4.0
(byte*~) current_piece#72 current_piece#72 zp ZP_WORD:5 4.0
(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#75 zp ZP_WORD:5 4.0
(byte*~) current_piece#76 current_piece zp ZP_WORD:12 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 19.96078431372549
(byte) current_piece_color#13 current_piece_color zp ZP_BYTE:18 1.04
(byte) current_piece_color#15 current_piece_color zp ZP_BYTE:18 0.7272727272727273
(byte) current_piece_color#23 current_piece_color zp ZP_BYTE:18 6.0
(byte) current_piece_color#67 current_piece_color#67 zp ZP_BYTE:7 53.368421052631575
(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_gfx
(byte*) current_piece_gfx#10 current_piece_gfx zp ZP_WORD:15 0.6666666666666666
(byte*) current_piece_gfx#15 current_piece_gfx zp ZP_WORD:15 19.96078431372549
(byte*) current_piece_gfx#17 current_piece_gfx zp ZP_WORD:15 0.2962962962962963
(byte*) current_piece_gfx#18 current_piece_gfx zp ZP_WORD:15 1.8666666666666665
(byte*) current_piece_gfx#29 current_piece_gfx zp ZP_WORD:15 6.0
(byte*) current_piece_gfx#64 current_piece_gfx#64 zp ZP_WORD:5 53.368421052631575
(byte*) current_piece_gfx#8 current_piece_gfx zp ZP_WORD:15 4.0
(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
(byte*) current_piece_gfx#15 current_piece_gfx zp ZP_WORD:15 1.8666666666666665
(byte*) current_piece_gfx#17 current_piece_gfx zp ZP_WORD:15 0.6666666666666666
(byte*) current_piece_gfx#27 current_piece_gfx zp ZP_WORD:15 6.0
(byte*) current_piece_gfx#4 current_piece_gfx zp ZP_WORD:15 4.0
(byte*) current_piece_gfx#53 current_piece_gfx#53 zp ZP_WORD:5 53.368421052631575
(byte*~) current_piece_gfx#87 current_piece_gfx#87 zp ZP_WORD:5 2.0
(byte*~) current_piece_gfx#88 current_piece_gfx#88 zp ZP_WORD:5 11.0
(byte) current_xpos
(byte) current_xpos#16 current_xpos zp ZP_BYTE:17 2.313725490196078
(byte) current_xpos#19 current_xpos zp ZP_BYTE:17 0.72
(byte) current_xpos#23 current_xpos zp ZP_BYTE:17 0.871794871794872
(byte) current_xpos#36 current_xpos zp ZP_BYTE:17 4.0
(byte) current_xpos#63 current_xpos#63 zp ZP_BYTE:4 5.894736842105264
(byte) current_xpos#7 current_xpos zp ZP_BYTE:17 4.0
(byte) current_xpos#9 current_xpos zp ZP_BYTE:17 4.0
(byte) current_xpos#11 current_xpos zp ZP_BYTE:17 2.313725490196078
(byte) current_xpos#16 current_xpos zp ZP_BYTE:17 0.72
(byte) current_xpos#20 current_xpos zp ZP_BYTE:17 0.871794871794872
(byte) current_xpos#3 current_xpos zp ZP_BYTE:17 4.0
(byte) current_xpos#34 current_xpos zp ZP_BYTE:17 4.0
(byte) current_xpos#48 current_xpos#48 zp ZP_BYTE:4 5.894736842105264
(byte) current_xpos#5 current_xpos zp ZP_BYTE:17 4.0
(byte~) current_xpos#96 current_xpos#96 zp ZP_BYTE:4 7.333333333333333
(byte) current_ypos
(byte) current_ypos#12 current_ypos zp ZP_BYTE:2 0.5588235294117647
(byte) current_ypos#16 current_ypos zp ZP_BYTE:2 0.48484848484848475
(byte) current_ypos#22 reg byte x 13.0
(byte) current_ypos#31 current_ypos zp ZP_BYTE:2 4.0
(byte) current_ypos#4 current_ypos zp ZP_BYTE:2 4.0
(byte) current_ypos#1 current_ypos zp ZP_BYTE:2 4.0
(byte) current_ypos#10 reg byte x 13.0
(byte) current_ypos#14 current_ypos zp ZP_BYTE:2 0.48484848484848475
(byte) current_ypos#22 current_ypos zp ZP_BYTE:2 0.5588235294117647
(byte) current_ypos#30 current_ypos zp ZP_BYTE:2 4.0
(byte~) current_ypos#71 reg byte x 5.5
(void()) fill((byte*) fill::start , (word) fill::size , (byte) fill::val)
(label) fill::@1
@ -464,37 +405,6 @@
(byte) keyboard_modifiers#5 reg byte a 20.0
(byte[8]) keyboard_scan_values
(const byte[8]) keyboard_scan_values#0 keyboard_scan_values = { fill( 8, 0) }
(void()) lock_current()
(label) lock_current::@1
(label) lock_current::@2
(label) lock_current::@3
(label) lock_current::@4
(label) lock_current::@5
(label) lock_current::@7
(label) lock_current::@8
(label) lock_current::@return
(byte) lock_current::c
(byte) lock_current::c#1 reg byte x 1001.0
(byte) lock_current::c#2 reg byte x 400.4
(byte) lock_current::col
(byte) lock_current::col#0 col zp ZP_BYTE:7 202.0
(byte) lock_current::col#1 col zp ZP_BYTE:7 500.5
(byte) lock_current::col#2 col zp ZP_BYTE:7 776.0
(byte) lock_current::i
(byte) lock_current::i#1 i zp ZP_BYTE:8 233.66666666666669
(byte) lock_current::i#2 i#2 zp ZP_BYTE:4 1552.0
(byte) lock_current::i#3 i#3 zp ZP_BYTE:4 67.33333333333333
(byte~) lock_current::i#7 i#7 zp ZP_BYTE:4 202.0
(byte~) lock_current::i#9 i#9 zp ZP_BYTE:4 2002.0
(byte) lock_current::l
(byte) lock_current::l#1 l zp ZP_BYTE:3 101.0
(byte) lock_current::l#6 l zp ZP_BYTE:3 16.833333333333332
(byte*) lock_current::playfield_line
(byte*) lock_current::playfield_line#0 playfield_line zp ZP_WORD:5 110.19999999999999
(byte) lock_current::ypos2
(byte) lock_current::ypos2#0 ypos2 zp ZP_BYTE:2 4.0
(byte) lock_current::ypos2#1 ypos2 zp ZP_BYTE:2 50.5
(byte) lock_current::ypos2#2 ypos2 zp ZP_BYTE:2 27.727272727272727
(void()) main()
(byte~) main::$10 reg byte a 22.0
(byte~) main::$11 reg byte a 22.0
@ -522,6 +432,112 @@
(byte) main::render#1 render zp ZP_BYTE:21 4.4
(byte) main::render#2 render zp ZP_BYTE:21 4.4
(byte) main::render#3 reg byte a 22.0
(byte()) play_collision((byte) play_collision::xpos , (byte) play_collision::ypos , (byte) play_collision::orientation)
(byte~) play_collision::$7 reg byte a 2002.0
(label) play_collision::@1
(label) play_collision::@17
(label) play_collision::@2
(label) play_collision::@20
(label) play_collision::@21
(label) play_collision::@3
(label) play_collision::@4
(label) play_collision::@5
(label) play_collision::@6
(label) play_collision::@8
(label) play_collision::@return
(byte) play_collision::c
(byte) play_collision::c#1 reg byte x 1001.0
(byte) play_collision::c#2 reg byte x 222.44444444444446
(byte) play_collision::col
(byte) play_collision::col#1 col zp ZP_BYTE:11 500.5
(byte) play_collision::col#2 col zp ZP_BYTE:11 638.25
(byte~) play_collision::col#9 col zp ZP_BYTE:11 202.0
(byte) play_collision::i
(byte) play_collision::i#1 i zp ZP_BYTE:24 161.76923076923077
(byte~) play_collision::i#11 i#11 zp ZP_BYTE:10 202.0
(byte~) play_collision::i#13 i#13 zp ZP_BYTE:10 2002.0
(byte) play_collision::i#2 i#2 zp ZP_BYTE:10 1552.0
(byte) play_collision::i#3 i#3 zp ZP_BYTE:10 67.33333333333333
(byte) play_collision::l
(byte) play_collision::l#1 l zp ZP_BYTE:9 101.0
(byte) play_collision::l#6 l zp ZP_BYTE:9 12.625
(byte) play_collision::orientation
(byte) play_collision::orientation#0 reg byte x 2.0
(byte) play_collision::orientation#1 reg byte x 2.0
(byte) play_collision::orientation#2 reg byte x 2.0
(byte) play_collision::orientation#3 reg byte x 2.0
(byte) play_collision::orientation#4 reg byte x 10.0
(byte*) play_collision::piece_gfx
(byte*) play_collision::piece_gfx#0 piece_gfx zp ZP_WORD:5 47.76190476190476
(byte*) play_collision::playfield_line
(byte*) play_collision::playfield_line#0 playfield_line zp ZP_WORD:22 78.71428571428571
(byte) play_collision::return
(byte) play_collision::return#0 reg byte a 4.0
(byte) play_collision::return#1 reg byte a 4.0
(byte) play_collision::return#12 reg byte a 4.0
(byte) play_collision::return#13 reg byte a 4.0
(byte) play_collision::return#14 reg byte a 1.3333333333333333
(byte) play_collision::xpos
(byte) play_collision::xpos#0 xpos zp ZP_BYTE:7 1.3333333333333333
(byte) play_collision::xpos#1 xpos zp ZP_BYTE:7 1.0
(byte) play_collision::xpos#2 xpos zp ZP_BYTE:7 1.0
(byte) play_collision::xpos#3 xpos zp ZP_BYTE:7 1.0
(byte) play_collision::xpos#5 xpos zp ZP_BYTE:7 4.954545454545454
(byte) play_collision::ypos
(byte) play_collision::ypos#0 reg byte y 1.0
(byte) play_collision::ypos#1 reg byte y 1.3333333333333333
(byte) play_collision::ypos#2 reg byte y 1.3333333333333333
(byte) play_collision::ypos#3 reg byte y 1.3333333333333333
(byte) play_collision::ypos#4 reg byte y 5.0
(byte) play_collision::ypos2
(byte) play_collision::ypos2#0 ypos2 zp ZP_BYTE:8 4.0
(byte) play_collision::ypos2#1 ypos2 zp ZP_BYTE:8 50.5
(byte) play_collision::ypos2#2 ypos2 zp ZP_BYTE:8 87.06666666666668
(void()) play_init()
(byte~) play_init::$1 reg byte a 22.0
(label) play_init::@1
(label) play_init::@2
(label) play_init::@return
(byte) play_init::idx
(byte) play_init::idx#1 idx zp ZP_BYTE:2 7.333333333333333
(byte) play_init::idx#2 idx zp ZP_BYTE:2 6.6000000000000005
(byte) play_init::j
(byte) play_init::j#1 reg byte x 16.5
(byte) play_init::j#2 reg byte x 7.333333333333333
(byte*) play_init::pli
(byte*) play_init::pli#1 pli zp ZP_WORD:5 5.5
(byte*) play_init::pli#2 pli zp ZP_WORD:5 8.25
(void()) play_lock_current()
(label) play_lock_current::@1
(label) play_lock_current::@2
(label) play_lock_current::@3
(label) play_lock_current::@4
(label) play_lock_current::@5
(label) play_lock_current::@7
(label) play_lock_current::@8
(label) play_lock_current::@return
(byte) play_lock_current::c
(byte) play_lock_current::c#1 reg byte x 1001.0
(byte) play_lock_current::c#2 reg byte x 400.4
(byte) play_lock_current::col
(byte) play_lock_current::col#0 col zp ZP_BYTE:7 202.0
(byte) play_lock_current::col#1 col zp ZP_BYTE:7 500.5
(byte) play_lock_current::col#2 col zp ZP_BYTE:7 776.0
(byte) play_lock_current::i
(byte) play_lock_current::i#1 i zp ZP_BYTE:8 233.66666666666669
(byte) play_lock_current::i#2 i#2 zp ZP_BYTE:4 1552.0
(byte) play_lock_current::i#3 i#3 zp ZP_BYTE:4 67.33333333333333
(byte~) play_lock_current::i#7 i#7 zp ZP_BYTE:4 202.0
(byte~) play_lock_current::i#9 i#9 zp ZP_BYTE:4 2002.0
(byte) play_lock_current::l
(byte) play_lock_current::l#1 l zp ZP_BYTE:3 101.0
(byte) play_lock_current::l#6 l zp ZP_BYTE:3 16.833333333333332
(byte*) play_lock_current::playfield_line
(byte*) play_lock_current::playfield_line#0 playfield_line zp ZP_WORD:5 110.19999999999999
(byte) play_lock_current::ypos2
(byte) play_lock_current::ypos2#0 ypos2 zp ZP_BYTE:2 4.0
(byte) play_lock_current::ypos2#1 ypos2 zp ZP_BYTE:2 50.5
(byte) play_lock_current::ypos2#2 ypos2 zp ZP_BYTE:2 27.727272727272727
(byte()) play_move_down((byte) play_move_down::key_event)
(byte~) play_move_down::$12 reg byte a 4.0
(byte~) play_move_down::$2 reg byte a 4.0
@ -550,8 +566,8 @@
(byte) play_move_down::movedown#6 reg byte x 6.0
(byte) play_move_down::movedown#7 reg byte x 5.0
(byte) play_move_down::return
(byte) play_move_down::return#0 reg byte a 22.0
(byte) play_move_down::return#3 reg byte x 3.6666666666666665
(byte) play_move_down::return#2 reg byte x 3.6666666666666665
(byte) play_move_down::return#3 reg byte a 22.0
(byte()) play_move_leftright((byte) play_move_leftright::key_event)
(byte~) play_move_leftright::$4 reg byte a 4.0
(byte~) play_move_leftright::$8 reg byte a 4.0
@ -566,8 +582,8 @@
(byte) play_move_leftright::key_event
(byte) play_move_leftright::key_event#0 reg byte a 7.5
(byte) play_move_leftright::return
(byte) play_move_leftright::return#0 reg byte a 22.0
(byte) play_move_leftright::return#2 reg byte a 3.6666666666666665
(byte) play_move_leftright::return#1 reg byte a 3.6666666666666665
(byte) play_move_leftright::return#4 reg byte a 22.0
(byte()) play_move_rotate((byte) play_move_rotate::key_event)
(byte/signed word/word/dword/signed dword~) play_move_rotate::$2 reg byte a 4.0
(byte/signed word/word/dword/signed dword~) play_move_rotate::$4 reg byte a 4.0
@ -586,48 +602,59 @@
(byte) play_move_rotate::orientation#2 orientation zp ZP_BYTE:4 4.0
(byte) play_move_rotate::orientation#3 orientation zp ZP_BYTE:4 0.8888888888888888
(byte) play_move_rotate::return
(byte) play_move_rotate::return#0 reg byte a 22.0
(byte) play_move_rotate::return#2 reg byte a 3.6666666666666665
(byte) play_move_rotate::return#1 reg byte a 3.6666666666666665
(byte) play_move_rotate::return#4 reg byte a 22.0
(void()) play_remove_lines()
(label) play_remove_lines::@1
(label) play_remove_lines::@10
(label) play_remove_lines::@17
(label) play_remove_lines::@2
(label) play_remove_lines::@3
(label) play_remove_lines::@4
(label) play_remove_lines::@5
(label) play_remove_lines::@6
(label) play_remove_lines::@9
(label) play_remove_lines::@return
(byte) play_remove_lines::c
(byte) play_remove_lines::c#0 c zp ZP_BYTE:7 600.5999999999999
(byte) play_remove_lines::full
(byte) play_remove_lines::full#2 full zp ZP_BYTE:4 420.59999999999997
(byte) play_remove_lines::full#4 full zp ZP_BYTE:4 400.4
(byte) play_remove_lines::r
(byte) play_remove_lines::r#1 reg byte y 161.76923076923077
(byte) play_remove_lines::r#2 reg byte y 1552.0
(byte) play_remove_lines::r#3 reg byte y 202.0
(byte) play_remove_lines::w
(byte) play_remove_lines::w#1 reg byte x 551.0
(byte) play_remove_lines::w#11 reg byte x 134.66666666666666
(byte) play_remove_lines::w#12 reg byte x 202.0
(byte) play_remove_lines::w#2 reg byte x 202.0
(byte) play_remove_lines::w#3 reg byte x 202.0
(byte) play_remove_lines::w#4 reg byte x 443.42857142857144
(byte) play_remove_lines::w#6 reg byte x 168.33333333333331
(byte) play_remove_lines::x
(byte) play_remove_lines::x#1 x zp ZP_BYTE:3 1501.5
(byte) play_remove_lines::x#2 x zp ZP_BYTE:3 250.25
(byte) play_remove_lines::y
(byte) play_remove_lines::y#1 y zp ZP_BYTE:2 151.5
(byte) play_remove_lines::y#8 y zp ZP_BYTE:2 14.428571428571429
(void()) play_spawn_current()
(byte~) play_spawn_current::$1 reg byte a 202.0
(byte~) play_spawn_current::$3 $3 zp ZP_BYTE:2 0.18181818181818182
(label) play_spawn_current::@1
(label) play_spawn_current::@2
(label) play_spawn_current::@3
(label) play_spawn_current::@7
(label) play_spawn_current::@return
(byte) play_spawn_current::piece_idx
(byte) play_spawn_current::piece_idx#1 reg byte x 202.0
(byte) play_spawn_current::piece_idx#2 reg byte x 51.5
(byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield
(const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 playfield = { fill( PLAYFIELD_LINES#0*PLAYFIELD_COLS#0, 0) }
(byte*[PLAYFIELD_LINES#0]) playfield_lines
(const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 playfield_lines = { fill( PLAYFIELD_LINES#0, 0) }
(byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx
(const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 playfield_lines_idx = { fill( PLAYFIELD_LINES#0+1, 0) }
(void()) remove_lines()
(label) remove_lines::@1
(label) remove_lines::@10
(label) remove_lines::@17
(label) remove_lines::@2
(label) remove_lines::@3
(label) remove_lines::@4
(label) remove_lines::@5
(label) remove_lines::@6
(label) remove_lines::@9
(label) remove_lines::@return
(byte) remove_lines::c
(byte) remove_lines::c#0 c zp ZP_BYTE:7 600.5999999999999
(byte) remove_lines::full
(byte) remove_lines::full#2 full zp ZP_BYTE:4 420.59999999999997
(byte) remove_lines::full#4 full zp ZP_BYTE:4 400.4
(byte) remove_lines::r
(byte) remove_lines::r#1 reg byte y 161.76923076923077
(byte) remove_lines::r#2 reg byte y 1552.0
(byte) remove_lines::r#3 reg byte y 202.0
(byte) remove_lines::w
(byte) remove_lines::w#1 reg byte x 551.0
(byte) remove_lines::w#11 reg byte x 134.66666666666666
(byte) remove_lines::w#12 reg byte x 202.0
(byte) remove_lines::w#2 reg byte x 202.0
(byte) remove_lines::w#3 reg byte x 202.0
(byte) remove_lines::w#4 reg byte x 443.42857142857144
(byte) remove_lines::w#6 reg byte x 168.33333333333331
(byte) remove_lines::x
(byte) remove_lines::x#1 x zp ZP_BYTE:3 1501.5
(byte) remove_lines::x#2 x zp ZP_BYTE:3 250.25
(byte) remove_lines::y
(byte) remove_lines::y#1 y zp ZP_BYTE:2 151.5
(byte) remove_lines::y#8 y zp ZP_BYTE:2 14.428571428571429
(void()) render_current()
(label) render_current::@1
(label) render_current::@2
@ -713,101 +740,76 @@
(byte) sid_rnd::return#2 reg byte a 202.0
(void()) sid_rnd_init()
(label) sid_rnd_init::@return
(void()) spawn_current()
(byte~) spawn_current::$1 reg byte a 202.0
(byte~) spawn_current::$3 $3 zp ZP_BYTE:2 0.18181818181818182
(label) spawn_current::@1
(label) spawn_current::@2
(label) spawn_current::@3
(label) spawn_current::@7
(label) spawn_current::@return
(byte) spawn_current::piece_idx
(byte) spawn_current::piece_idx#1 reg byte x 202.0
(byte) spawn_current::piece_idx#2 reg byte x 51.5
(void()) tables_init()
(byte~) tables_init::$1 reg byte a 22.0
(label) tables_init::@1
(label) tables_init::@2
(label) tables_init::@return
(byte) tables_init::idx
(byte) tables_init::idx#1 idx zp ZP_BYTE:2 7.333333333333333
(byte) tables_init::idx#2 idx zp ZP_BYTE:2 6.6000000000000005
(byte) tables_init::j
(byte) tables_init::j#1 reg byte x 16.5
(byte) tables_init::j#2 reg byte x 7.333333333333333
(byte*) tables_init::pli
(byte*) tables_init::pli#1 pli zp ZP_WORD:5 5.5
(byte*) tables_init::pli#2 pli zp ZP_WORD:5 8.25
zp ZP_BYTE:2 [ current_ypos#12 current_ypos#16 current_ypos#31 current_ypos#4 lock_current::ypos2#2 lock_current::ypos2#0 lock_current::ypos2#1 remove_lines::y#8 remove_lines::y#1 tables_init::idx#2 tables_init::idx#1 render_init::l#4 render_init::l#1 spawn_current::$3 ]
zp ZP_BYTE:3 [ current_movedown_counter#15 current_movedown_counter#12 current_movedown_counter#10 remove_lines::x#2 remove_lines::x#1 lock_current::l#6 lock_current::l#1 ]
reg byte x [ current_ypos#22 current_ypos#71 ]
zp ZP_BYTE:4 [ current_xpos#63 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 remove_lines::full#4 remove_lines::full#2 lock_current::i#2 lock_current::i#3 lock_current::i#7 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#64 current_piece_gfx#87 current_piece_gfx#88 render_playfield::line#2 render_playfield::line#0 render_playfield::line#1 current_piece#15 current_piece#72 current_piece#73 current_piece#74 current_piece#75 collision::piece_gfx#0 tables_init::pli#2 tables_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 lock_current::playfield_line#0 ]
zp ZP_BYTE:7 [ current_piece_color#67 current_piece_color#75 current_piece_color#76 render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 collision::xpos#5 collision::xpos#0 collision::xpos#1 collision::xpos#2 collision::xpos#3 lock_current::col#2 lock_current::col#0 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 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 collision::ypos2#2 collision::ypos2#0 collision::ypos2#1 lock_current::i#1 keyboard_event_scan::row_scan#0 ]
zp ZP_BYTE:9 [ render_current::l#3 render_current::l#1 collision::l#6 collision::l#1 ]
zp ZP_BYTE:10 [ render_current::i#2 render_current::i#1 render_current::i#4 render_current::i#8 collision::i#2 collision::i#3 collision::i#11 collision::i#13 ]
zp ZP_BYTE:11 [ render_current::xpos#2 render_current::xpos#1 render_current::xpos#0 collision::col#2 collision::col#9 collision::col#1 ]
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: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_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 ]
zp ZP_BYTE:11 [ render_current::xpos#2 render_current::xpos#1 render_current::xpos#0 play_collision::col#2 play_collision::col#9 play_collision::col#1 ]
reg byte x [ render_current::c#2 render_current::c#1 ]
reg byte x [ render_playfield::c#2 render_playfield::c#1 ]
reg byte a [ play_move_rotate::return#2 ]
reg byte x [ collision::orientation#4 collision::orientation#0 collision::orientation#1 collision::orientation#2 collision::orientation#3 ]
reg byte y [ collision::ypos#4 collision::ypos#0 collision::ypos#1 collision::ypos#2 collision::ypos#3 ]
reg byte x [ collision::c#2 collision::c#1 ]
reg byte a [ collision::return#14 ]
reg byte a [ play_move_leftright::return#2 ]
reg byte a [ play_move_rotate::return#1 ]
reg byte x [ play_collision::orientation#4 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ]
reg byte y [ play_collision::ypos#4 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 ]
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#23 current_piece#76 current_piece#11 current_piece#13 current_piece#71 render_init::$10 fill::end#0 ]
zp ZP_BYTE:14 [ current_orientation#33 current_orientation#15 current_orientation#23 current_orientation#8 current_orientation#18 ]
zp ZP_WORD:15 [ current_piece_gfx#29 current_piece_gfx#15 current_piece_gfx#18 current_piece_gfx#10 current_piece_gfx#8 current_piece_gfx#17 ]
zp ZP_BYTE:17 [ current_xpos#36 current_xpos#16 current_xpos#23 current_xpos#9 current_xpos#19 current_xpos#7 ]
zp ZP_BYTE:18 [ current_piece_color#23 current_piece_color#11 current_piece_color#13 current_piece_color#15 ]
reg byte x [ play_move_down::return#3 ]
reg byte x [ spawn_current::piece_idx#2 spawn_current::piece_idx#1 ]
reg byte y [ remove_lines::r#2 remove_lines::r#3 remove_lines::r#1 ]
reg byte x [ remove_lines::w#6 remove_lines::w#4 remove_lines::w#12 remove_lines::w#11 remove_lines::w#1 remove_lines::w#2 remove_lines::w#3 ]
reg byte x [ lock_current::c#2 lock_current::c#1 ]
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_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 ]
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 ]
reg byte x [ play_remove_lines::w#6 play_remove_lines::w#4 play_remove_lines::w#12 play_remove_lines::w#11 play_remove_lines::w#1 play_remove_lines::w#2 play_remove_lines::w#3 ]
reg byte x [ play_lock_current::c#2 play_lock_current::c#1 ]
reg byte a [ keyboard_event_get::return#2 keyboard_event_get::return#1 ]
reg byte x [ keyboard_modifiers#13 keyboard_modifiers#4 keyboard_modifiers#12 keyboard_modifiers#3 keyboard_modifiers#11 ]
reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ]
zp ZP_BYTE:19 [ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#30 keyboard_events_size#2 keyboard_events_size#1 ]
reg byte x [ tables_init::j#2 tables_init::j#1 ]
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 a [ keyboard_event_get::return#3 ]
zp ZP_BYTE:20 [ main::key_event#0 ]
reg byte a [ play_move_down::key_event#0 ]
reg byte a [ play_move_down::return#0 ]
reg byte a [ play_move_down::return#3 ]
reg byte a [ main::$10 ]
zp ZP_BYTE:21 [ main::render#1 main::render#2 ]
reg byte a [ play_move_leftright::key_event#0 ]
reg byte a [ play_move_leftright::return#0 ]
reg byte a [ play_move_leftright::return#4 ]
reg byte a [ main::$11 ]
reg byte a [ play_move_rotate::key_event#0 ]
reg byte a [ play_move_rotate::return#0 ]
reg byte a [ play_move_rotate::return#4 ]
reg byte a [ main::$12 ]
reg byte a [ main::render#3 ]
zp ZP_WORD:22 [ render_current::screen_line#0 collision::playfield_line#0 ]
zp ZP_WORD:22 [ render_current::screen_line#0 play_collision::playfield_line#0 ]
reg byte a [ render_current::current_cell#0 ]
reg byte a [ render_playfield::$1 ]
reg byte a [ play_move_rotate::$2 ]
reg byte a [ collision::return#13 ]
reg byte a [ play_collision::return#13 ]
reg byte a [ play_move_rotate::$6 ]
reg byte a [ play_move_rotate::$4 ]
zp ZP_BYTE:24 [ collision::i#1 ]
reg byte a [ collision::$7 ]
reg byte a [ collision::return#12 ]
zp ZP_BYTE:24 [ play_collision::i#1 ]
reg byte a [ play_collision::$7 ]
reg byte a [ play_collision::return#12 ]
reg byte a [ play_move_leftright::$4 ]
reg byte a [ collision::return#1 ]
reg byte a [ play_collision::return#1 ]
reg byte a [ play_move_leftright::$8 ]
reg byte a [ keyboard_event_pressed::return#12 ]
reg byte a [ play_move_down::$2 ]
reg byte a [ collision::return#0 ]
reg byte a [ play_collision::return#0 ]
reg byte a [ play_move_down::$12 ]
reg byte a [ sid_rnd::return#2 ]
reg byte a [ spawn_current::$1 ]
reg byte a [ play_spawn_current::$1 ]
reg byte a [ sid_rnd::return#0 ]
reg byte a [ keyboard_event_pressed::$0 ]
reg byte a [ keyboard_event_pressed::$1 ]
@ -828,5 +830,5 @@ reg byte a [ keyboard_event_scan::$4 ]
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 [ tables_init::$1 ]
reg byte a [ play_init::$1 ]
reg byte a [ render_init::$5 ]