1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-10 20:23:47 +00:00

Fixed pixel error

This commit is contained in:
jespergravgaard 2018-12-29 14:46:51 +01:00
parent bba1f52d56
commit 84eb93b21e
9 changed files with 1353 additions and 1321 deletions

View File

@ -18,11 +18,11 @@ const byte PLAYFIELD_COLS = 10;
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;
byte* current_piece_gfx;
// The char of the current piece
byte current_piece_char = 0;
byte current_piece_char;
// Position of top left corner of current moving piece on the playfield
byte current_xpos = 3;
byte current_ypos = 0;
byte current_xpos;
byte current_ypos;

View File

@ -171,7 +171,7 @@ align($40) byte[4*4*4] PIECE_I = {
word[] PIECES = { (word)PIECE_T, (word)PIECE_S, (word)PIECE_Z, (word)PIECE_J, (word)PIECE_O, (word)PIECE_I, (word)PIECE_L };
// The chars to use for the different pieces
byte[] PIECES_CHARS = { $57, $58, $98, $58, $57, $57, $98 };
byte[] PIECES_CHARS = { $58, $59, $99, $59, $58, $58, $99 };
// The initial X/Y for each piece
byte[] PIECES_START_X = { 4, 4, 4, 4, 4, 3, 4};
byte[] PIECES_START_Y = { 2, 1, 1, 1, 2, 0, 1};

View File

@ -82,21 +82,21 @@
.label irq_cnt = $17
.label current_movedown_counter = 2
.label current_ypos = $b
.label current_xpos = $11
.label current_orientation = $e
.label current_piece_gfx = $f
.label current_piece = $c
.label current_xpos = $11
.label current_piece_char = $12
.label current_orientation = $e
.label current_piece = $c
.label current_piece_12 = 4
.label current_xpos_48 = 3
.label current_piece_gfx_53 = 4
.label current_piece_char_63 = 6
.label current_xpos_105 = 3
.label current_xpos_106 = 3
.label current_piece_gfx_95 = 4
.label current_piece_gfx_96 = 4
.label current_piece_char_83 = 6
.label current_piece_char_84 = 6
.label current_xpos_47 = 3
.label current_piece_gfx_52 = 4
.label current_piece_char_62 = 6
.label current_xpos_109 = 3
.label current_xpos_110 = 3
.label current_piece_gfx_99 = 4
.label current_piece_gfx_100 = 4
.label current_piece_char_87 = 6
.label current_piece_char_88 = 6
.label current_piece_73 = 4
.label current_piece_74 = 4
.label current_piece_75 = 4
@ -124,13 +124,13 @@ main: {
jsr render_playfield
ldx current_ypos
lda current_xpos
sta current_xpos_105
sta current_xpos_109
lda current_piece_gfx
sta current_piece_gfx_95
sta current_piece_gfx_99
lda current_piece_gfx+1
sta current_piece_gfx_95+1
sta current_piece_gfx_99+1
lda current_piece_char
sta current_piece_char_83
sta current_piece_char_87
jsr render_current
ldy play_spawn_current._3
lda PIECES,y
@ -172,13 +172,13 @@ main: {
jsr render_playfield
ldx current_ypos
lda current_xpos
sta current_xpos_106
sta current_xpos_110
lda current_piece_gfx
sta current_piece_gfx_96
sta current_piece_gfx_100
lda current_piece_gfx+1
sta current_piece_gfx_96+1
sta current_piece_gfx_100+1
lda current_piece_char
sta current_piece_char_84
sta current_piece_char_88
jsr render_current
b10:
dec BORDERCOL
@ -228,19 +228,19 @@ render_current: {
sta screen_line
lda screen_lines+1,y
sta screen_line+1
lda current_xpos_48
lda current_xpos_47
sta xpos
ldx #0
b4:
ldy i
lda (current_piece_gfx_53),y
lda (current_piece_gfx_52),y
inc i
cmp #0
beq b5
lda xpos
cmp #PLAYFIELD_COLS
bcs b5
lda current_piece_char_63
lda current_piece_char_62
ldy xpos
sta (screen_line),y
b5:
@ -1172,7 +1172,7 @@ irq: {
PIECE_O: .byte 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.align $40
PIECE_I: .byte 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0
PIECES_CHARS: .byte $57, $58, $98, $58, $57, $57, $98
PIECES_CHARS: .byte $58, $59, $99, $59, $58, $58, $99
PIECES_START_X: .byte 4, 4, 4, 4, 4, 3, 4
PIECES_START_Y: .byte 2, 1, 1, 1, 2, 0, 1
screen_lines: .fill 2*PLAYFIELD_LINES, 0

View File

@ -68,20 +68,20 @@ main::@26: scope:[main] from main::@25
[25] call render_playfield
to:main::@27
main::@27: scope:[main] from main::@26
[26] (byte~) current_ypos#79 ← (byte) current_ypos#19
[27] (byte~) current_xpos#105 ← (byte) current_xpos#24
[28] (byte*~) current_piece_gfx#95 ← (byte*) current_piece_gfx#17
[29] (byte~) current_piece_char#83 ← (byte) current_piece_char#13
[26] (byte~) current_ypos#83 ← (byte) current_ypos#18
[27] (byte~) current_xpos#109 ← (byte) current_xpos#23
[28] (byte*~) current_piece_gfx#99 ← (byte*) current_piece_gfx#16
[29] (byte~) current_piece_char#87 ← (byte) current_piece_char#12
[30] call render_current
[31] (byte*~) current_piece#72 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$3)
to:main::@1
main::@1: scope:[main] from main::@10 main::@27
[32] (byte) current_movedown_counter#12 ← phi( main::@10/(byte) current_movedown_counter#10 main::@27/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[32] (byte) keyboard_events_size#19 ← phi( main::@10/(byte) keyboard_events_size#16 main::@27/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[32] (byte) current_piece_char#16 ← phi( main::@10/(byte) current_piece_char#11 main::@27/(byte) current_piece_char#13 )
[32] (byte) current_ypos#22 ← phi( main::@10/(byte) current_ypos#14 main::@27/(byte) current_ypos#19 )
[32] (byte) current_xpos#11 ← phi( main::@10/(byte) current_xpos#20 main::@27/(byte) current_xpos#24 )
[32] (byte*) current_piece_gfx#10 ← phi( main::@10/(byte*) current_piece_gfx#15 main::@27/(byte*) current_piece_gfx#17 )
[32] (byte) current_piece_char#15 ← phi( main::@10/(byte) current_piece_char#1 main::@27/(byte) current_piece_char#12 )
[32] (byte) current_ypos#21 ← phi( main::@10/(byte) current_ypos#13 main::@27/(byte) current_ypos#18 )
[32] (byte) current_xpos#10 ← phi( main::@10/(byte) current_xpos#19 main::@27/(byte) current_xpos#23 )
[32] (byte*) current_piece_gfx#20 ← phi( main::@10/(byte*) current_piece_gfx#14 main::@27/(byte*) current_piece_gfx#16 )
[32] (byte) current_orientation#10 ← phi( main::@10/(byte) current_orientation#19 main::@27/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[32] (byte*) current_piece#16 ← phi( main::@10/(byte*) current_piece#10 main::@27/(byte*~) current_piece#72 )
to:main::@4
@ -130,21 +130,21 @@ main::@19: scope:[main] from main::@33
[58] call render_playfield
to:main::@34
main::@34: scope:[main] from main::@19
[59] (byte~) current_ypos#80 ← (byte) current_ypos#14
[60] (byte~) current_xpos#106 ← (byte) current_xpos#20
[61] (byte*~) current_piece_gfx#96 ← (byte*) current_piece_gfx#15
[62] (byte~) current_piece_char#84 ← (byte) current_piece_char#11
[59] (byte~) current_ypos#84 ← (byte) current_ypos#13
[60] (byte~) current_xpos#110 ← (byte) current_xpos#19
[61] (byte*~) current_piece_gfx#100 ← (byte*) current_piece_gfx#14
[62] (byte~) current_piece_char#88 ← (byte) current_piece_char#1
[63] call render_current
to:main::@10
main::@10: scope:[main] from main::@33 main::@34
[64] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0)
to:main::@1
render_current: scope:[render_current] from main::@27 main::@34
[65] (byte) current_piece_char#63 ← phi( main::@27/(byte~) current_piece_char#83 main::@34/(byte~) current_piece_char#84 )
[65] (byte*) current_piece_gfx#53 ← phi( main::@27/(byte*~) current_piece_gfx#95 main::@34/(byte*~) current_piece_gfx#96 )
[65] (byte) current_xpos#48 ← phi( main::@27/(byte~) current_xpos#105 main::@34/(byte~) current_xpos#106 )
[65] (byte) current_ypos#10 ← phi( main::@27/(byte~) current_ypos#79 main::@34/(byte~) current_ypos#80 )
[66] (byte) render_current::ypos2#0 ← (byte) current_ypos#10 << (byte/signed byte/word/signed word/dword/signed dword) 1
[65] (byte) current_piece_char#62 ← phi( main::@27/(byte~) current_piece_char#87 main::@34/(byte~) current_piece_char#88 )
[65] (byte*) current_piece_gfx#52 ← phi( main::@27/(byte*~) current_piece_gfx#99 main::@34/(byte*~) current_piece_gfx#100 )
[65] (byte) current_xpos#47 ← phi( main::@27/(byte~) current_xpos#109 main::@34/(byte~) current_xpos#110 )
[65] (byte) current_ypos#9 ← phi( main::@27/(byte~) current_ypos#83 main::@34/(byte~) current_ypos#84 )
[66] (byte) render_current::ypos2#0 ← (byte) current_ypos#9 << (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::@3
[67] (byte) render_current::l#4 ← phi( render_current/(byte/signed byte/word/signed word/dword/signed dword) 0 render_current::@3/(byte) render_current::l#1 )
@ -169,13 +169,13 @@ render_current::@13: scope:[render_current] from render_current::@1
to:render_current::@7
render_current::@2: scope:[render_current] from render_current::@13
[76] (byte*) render_current::screen_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) screen_lines#0 + (byte) render_current::ypos2#2)
[77] (byte) render_current::xpos#0 ← (byte) current_xpos#48
[77] (byte) render_current::xpos#0 ← (byte) current_xpos#47
to:render_current::@4
render_current::@4: scope:[render_current] from render_current::@2 render_current::@5
[78] (byte) render_current::c#2 ← phi( render_current::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 render_current::@5/(byte) render_current::c#1 )
[78] (byte) render_current::xpos#2 ← phi( render_current::@2/(byte) render_current::xpos#0 render_current::@5/(byte) render_current::xpos#1 )
[78] (byte) render_current::i#4 ← phi( render_current::@2/(byte) render_current::i#3 render_current::@5/(byte) render_current::i#10 )
[79] (byte) render_current::current_cell#0 ← *((byte*) current_piece_gfx#53 + (byte) render_current::i#4)
[79] (byte) render_current::current_cell#0 ← *((byte*) current_piece_gfx#52 + (byte) render_current::i#4)
[80] (byte) render_current::i#10 ← ++ (byte) render_current::i#4
[81] if((byte) render_current::current_cell#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_current::@5
to:render_current::@9
@ -183,7 +183,7 @@ render_current::@9: scope:[render_current] from render_current::@4
[82] if((byte) render_current::xpos#2>=(const byte) PLAYFIELD_COLS#0) goto render_current::@5
to:render_current::@10
render_current::@10: scope:[render_current] from render_current::@9
[83] *((byte*) render_current::screen_line#0 + (byte) render_current::xpos#2) ← (byte) current_piece_char#63
[83] *((byte*) render_current::screen_line#0 + (byte) render_current::xpos#2) ← (byte) current_piece_char#62
to:render_current::@5
render_current::@5: scope:[render_current] from render_current::@10 render_current::@4 render_current::@9
[84] (byte) render_current::xpos#1 ← ++ (byte) render_current::xpos#2
@ -223,7 +223,7 @@ play_move_rotate::@6: scope:[play_move_rotate] from play_move_rotate
[101] 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
[102] (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 )
[102] (byte*) current_piece_gfx#14 ← phi( play_move_rotate::@11/(byte*) current_piece_gfx#3 play_move_rotate::@14/(byte*) current_piece_gfx#1 play_move_rotate::@6/(byte*) current_piece_gfx#1 )
[102] (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 )
[102] (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 )
[103] return
@ -234,8 +234,8 @@ play_move_rotate::@2: scope:[play_move_rotate] from play_move_rotate::@6
to:play_move_rotate::@4
play_move_rotate::@4: scope:[play_move_rotate] from play_move_rotate::@1 play_move_rotate::@2
[106] (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 )
[107] (byte) play_collision::xpos#3 ← (byte) current_xpos#20
[108] (byte) play_collision::ypos#3 ← (byte) current_ypos#14
[107] (byte) play_collision::xpos#3 ← (byte) current_xpos#19
[108] (byte) play_collision::ypos#3 ← (byte) current_ypos#13
[109] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3
[110] (byte*~) current_piece#76 ← (byte*) current_piece#10
[111] call play_collision
@ -247,7 +247,7 @@ play_move_rotate::@14: scope:[play_move_rotate] from play_move_rotate::@4
to:play_move_rotate::@11
play_move_rotate::@11: scope:[play_move_rotate] from play_move_rotate::@14
[115] (byte) current_orientation#4 ← (byte) play_move_rotate::orientation#3
[116] (byte*) current_piece_gfx#4 ← (byte*) current_piece#10 + (byte) current_orientation#4
[116] (byte*) current_piece_gfx#3 ← (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
[117] (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
@ -315,8 +315,8 @@ play_move_leftright::@6: scope:[play_move_leftright] from play_move_leftright
[144] 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
[145] (byte) play_collision::xpos#2 ← (byte) current_xpos#16 + (byte/signed byte/word/signed word/dword/signed dword) 1
[146] (byte) play_collision::ypos#2 ← (byte) current_ypos#14
[145] (byte) play_collision::xpos#2 ← (byte) current_xpos#1 + (byte/signed byte/word/signed word/dword/signed dword) 1
[146] (byte) play_collision::ypos#2 ← (byte) current_ypos#13
[147] (byte) play_collision::orientation#2 ← (byte) current_orientation#14
[148] (byte*~) current_piece#75 ← (byte*) current_piece#10
[149] call play_collision
@ -327,16 +327,16 @@ play_move_leftright::@15: scope:[play_move_leftright] from play_move_leftright:
[152] 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
[153] (byte) current_xpos#3 ← ++ (byte) current_xpos#16
[153] (byte) current_xpos#2 ← ++ (byte) current_xpos#1
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
[154] (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 )
[154] (byte) current_xpos#19 ← phi( play_move_leftright::@11/(byte) current_xpos#4 play_move_leftright::@15/(byte) current_xpos#1 play_move_leftright::@8/(byte) current_xpos#2 play_move_leftright::@14/(byte) current_xpos#1 play_move_leftright::@6/(byte) current_xpos#1 )
[154] (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 )
[155] return
to:@return
play_move_leftright::@1: scope:[play_move_leftright] from play_move_leftright
[156] (byte) play_collision::xpos#1 ← (byte) current_xpos#16 - (byte/signed byte/word/signed word/dword/signed dword) 1
[157] (byte) play_collision::ypos#1 ← (byte) current_ypos#14
[156] (byte) play_collision::xpos#1 ← (byte) current_xpos#1 - (byte/signed byte/word/signed word/dword/signed dword) 1
[157] (byte) play_collision::ypos#1 ← (byte) current_ypos#13
[158] (byte) play_collision::orientation#1 ← (byte) current_orientation#14
[159] (byte*~) current_piece#74 ← (byte*) current_piece#10
[160] call play_collision
@ -347,7 +347,7 @@ play_move_leftright::@14: scope:[play_move_leftright] from play_move_leftright:
[163] 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
[164] (byte) current_xpos#5 ← -- (byte) current_xpos#16
[164] (byte) current_xpos#4 ← -- (byte) current_xpos#1
to:play_move_leftright::@return
play_move_down: scope:[play_move_down] from main::@30
[165] (byte) current_movedown_counter#1 ← ++ (byte) current_movedown_counter#12
@ -383,8 +383,8 @@ play_move_down::@4: scope:[play_move_down] from play_move_down::@11 play_move_d
[179] 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
[180] (byte) play_collision::ypos#0 ← (byte) current_ypos#22 + (byte/signed byte/word/signed word/dword/signed dword) 1
[181] (byte) play_collision::xpos#0 ← (byte) current_xpos#11
[180] (byte) play_collision::ypos#0 ← (byte) current_ypos#21 + (byte/signed byte/word/signed word/dword/signed dword) 1
[181] (byte) play_collision::xpos#0 ← (byte) current_xpos#10
[182] (byte) play_collision::orientation#0 ← (byte) current_orientation#10
[183] (byte*~) current_piece#73 ← (byte*) current_piece#16
[184] call play_collision
@ -408,26 +408,26 @@ play_move_down::@20: scope:[play_move_down] from play_move_down::@19
[194] (byte*~) current_piece#77 ← (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
[195] (byte) current_piece_char#21 ← phi( play_move_down::@20/(byte) current_piece_char#13 play_move_down::@6/(byte) current_piece_char#16 )
[195] (byte) current_xpos#34 ← phi( play_move_down::@20/(byte) current_xpos#24 play_move_down::@6/(byte) current_xpos#11 )
[195] (byte*) current_piece_gfx#27 ← phi( play_move_down::@20/(byte*) current_piece_gfx#17 play_move_down::@6/(byte*) current_piece_gfx#10 )
[195] (byte) current_piece_char#20 ← phi( play_move_down::@20/(byte) current_piece_char#12 play_move_down::@6/(byte) current_piece_char#15 )
[195] (byte) current_xpos#33 ← phi( play_move_down::@20/(byte) current_xpos#23 play_move_down::@6/(byte) current_xpos#10 )
[195] (byte*) current_piece_gfx#26 ← phi( play_move_down::@20/(byte*) current_piece_gfx#16 play_move_down::@6/(byte*) current_piece_gfx#20 )
[195] (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 )
[195] (byte*) current_piece#20 ← phi( play_move_down::@20/(byte*~) current_piece#77 play_move_down::@6/(byte*) current_piece#16 )
[195] (byte) current_ypos#30 ← phi( play_move_down::@20/(byte) current_ypos#19 play_move_down::@6/(byte) current_ypos#1 )
[195] (byte) current_ypos#29 ← phi( play_move_down::@20/(byte) current_ypos#18 play_move_down::@6/(byte) current_ypos#0 )
to:play_move_down::@return
play_move_down::@return: scope:[play_move_down] from play_move_down::@4 play_move_down::@7
[196] (byte) current_piece_char#11 ← phi( play_move_down::@4/(byte) current_piece_char#16 play_move_down::@7/(byte) current_piece_char#21 )
[196] (byte) current_xpos#16 ← phi( play_move_down::@4/(byte) current_xpos#11 play_move_down::@7/(byte) current_xpos#34 )
[196] (byte*) current_piece_gfx#14 ← phi( play_move_down::@4/(byte*) current_piece_gfx#10 play_move_down::@7/(byte*) current_piece_gfx#27 )
[196] (byte) current_piece_char#1 ← phi( play_move_down::@4/(byte) current_piece_char#15 play_move_down::@7/(byte) current_piece_char#20 )
[196] (byte) current_xpos#1 ← phi( play_move_down::@4/(byte) current_xpos#10 play_move_down::@7/(byte) current_xpos#33 )
[196] (byte*) current_piece_gfx#1 ← phi( play_move_down::@4/(byte*) current_piece_gfx#20 play_move_down::@7/(byte*) current_piece_gfx#26 )
[196] (byte) current_orientation#14 ← phi( play_move_down::@4/(byte) current_orientation#10 play_move_down::@7/(byte) current_orientation#29 )
[196] (byte*) current_piece#10 ← phi( play_move_down::@4/(byte*) current_piece#16 play_move_down::@7/(byte*) current_piece#20 )
[196] (byte) current_ypos#14 ← phi( play_move_down::@4/(byte) current_ypos#22 play_move_down::@7/(byte) current_ypos#30 )
[196] (byte) current_ypos#13 ← phi( play_move_down::@4/(byte) current_ypos#21 play_move_down::@7/(byte) current_ypos#29 )
[196] (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 )
[196] (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 )
[197] return
to:@return
play_move_down::@6: scope:[play_move_down] from play_move_down::@18
[198] (byte) current_ypos#1 ← ++ (byte) current_ypos#22
[198] (byte) current_ypos#0 ← ++ (byte) current_ypos#21
to:play_move_down::@7
play_spawn_current: scope:[play_spawn_current] from main::@25 play_move_down::@20
[199] phi()
@ -438,10 +438,10 @@ play_spawn_current::@1: scope:[play_spawn_current] from play_spawn_current play
to:play_spawn_current::@3
play_spawn_current::@3: scope:[play_spawn_current] from play_spawn_current::@1
[202] (byte~) play_spawn_current::$3 ← (byte) play_spawn_current::piece_idx#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
[203] (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
[204] (byte) current_xpos#24 ← *((const byte[]) PIECES_START_X#0 + (byte) play_spawn_current::piece_idx#2)
[205] (byte) current_ypos#19 ← *((const byte[]) PIECES_START_Y#0 + (byte) play_spawn_current::piece_idx#2)
[206] (byte) current_piece_char#13 ← *((const byte[]) PIECES_CHARS#0 + (byte) play_spawn_current::piece_idx#2)
[203] (byte*) current_piece_gfx#16 ← (byte*)*((const word[]) PIECES#0 + (byte~) play_spawn_current::$3) + (byte/signed byte/word/signed word/dword/signed dword) 0
[204] (byte) current_xpos#23 ← *((const byte[]) PIECES_START_X#0 + (byte) play_spawn_current::piece_idx#2)
[205] (byte) current_ypos#18 ← *((const byte[]) PIECES_START_Y#0 + (byte) play_spawn_current::piece_idx#2)
[206] (byte) current_piece_char#12 ← *((const byte[]) PIECES_CHARS#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
[207] return
@ -511,24 +511,24 @@ play_remove_lines::@17: scope:[play_remove_lines] from play_remove_lines::@2
[236] phi()
to:play_remove_lines::@3
play_lock_current: scope:[play_lock_current] from play_move_down::@13
[237] (byte) play_lock_current::ypos2#0 ← (byte) current_ypos#22 << (byte/signed byte/word/signed word/dword/signed dword) 1
[237] (byte) play_lock_current::ypos2#0 ← (byte) current_ypos#21 << (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
[238] (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 )
[238] (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 )
[238] (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 )
[239] (byte*) play_lock_current::playfield_line#0 ← *((const byte*[PLAYFIELD_LINES#0]) playfield_lines#0 + (byte) play_lock_current::ypos2#2)
[240] (byte) play_lock_current::col#0 ← (byte) current_xpos#11
[240] (byte) play_lock_current::col#0 ← (byte) current_xpos#10
to:play_lock_current::@2
play_lock_current::@2: scope:[play_lock_current] from play_lock_current::@1 play_lock_current::@8
[241] (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 )
[241] (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 )
[241] (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 )
[242] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2
[243] 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
[243] if(*((byte*) current_piece_gfx#20 + (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
[244] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::col#2) ← (byte) current_piece_char#16
[244] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::col#2) ← (byte) current_piece_char#15
to:play_lock_current::@3
play_lock_current::@3: scope:[play_lock_current] from play_lock_current::@2 play_lock_current::@4
[245] (byte) play_lock_current::col#1 ← ++ (byte) play_lock_current::col#2

File diff suppressed because it is too large Load Diff

View File

@ -168,7 +168,7 @@
(word[]) PIECES
(const word[]) PIECES#0 PIECES = { ((word))(const byte[4*4*4]) PIECE_T#0, ((word))(const byte[4*4*4]) PIECE_S#0, ((word))(const byte[4*4*4]) PIECE_Z#0, ((word))(const byte[4*4*4]) PIECE_J#0, ((word))(const byte[4*4*4]) PIECE_O#0, ((word))(const byte[4*4*4]) PIECE_I#0, ((word))(const byte[4*4*4]) PIECE_L#0 }
(byte[]) PIECES_CHARS
(const byte[]) PIECES_CHARS#0 PIECES_CHARS = { (byte/signed byte/word/signed word/dword/signed dword) 87, (byte/signed byte/word/signed word/dword/signed dword) 88, (byte/word/signed word/dword/signed dword) 152, (byte/signed byte/word/signed word/dword/signed dword) 88, (byte/signed byte/word/signed word/dword/signed dword) 87, (byte/signed byte/word/signed word/dword/signed dword) 87, (byte/word/signed word/dword/signed dword) 152 }
(const byte[]) PIECES_CHARS#0 PIECES_CHARS = { (byte/signed byte/word/signed word/dword/signed dword) 88, (byte/signed byte/word/signed word/dword/signed dword) 89, (byte/word/signed word/dword/signed dword) 153, (byte/signed byte/word/signed word/dword/signed dword) 89, (byte/signed byte/word/signed word/dword/signed dword) 88, (byte/signed byte/word/signed word/dword/signed dword) 88, (byte/word/signed word/dword/signed dword) 153 }
(byte[]) PIECES_START_X
(const byte[]) PIECES_START_X#0 PIECES_START_X = { (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 4 }
(byte[]) PIECES_START_Y
@ -299,43 +299,43 @@
(byte*~) current_piece#76 current_piece#76 zp ZP_WORD:4 4.0
(byte*~) current_piece#77 current_piece zp ZP_WORD:12 4.0
(byte) current_piece_char
(byte) current_piece_char#11 current_piece_char zp ZP_BYTE:18 1.04
(byte) current_piece_char#13 current_piece_char zp ZP_BYTE:18 0.6153846153846154
(byte) current_piece_char#16 current_piece_char zp ZP_BYTE:18 19.96078431372549
(byte) current_piece_char#21 current_piece_char zp ZP_BYTE:18 6.0
(byte) current_piece_char#63 current_piece_char#63 zp ZP_BYTE:6 48.285714285714285
(byte~) current_piece_char#83 current_piece_char#83 zp ZP_BYTE:6 4.0
(byte~) current_piece_char#84 current_piece_char#84 zp ZP_BYTE:6 22.0
(byte) current_piece_char#1 current_piece_char zp ZP_BYTE:18 1.04
(byte) current_piece_char#12 current_piece_char zp ZP_BYTE:18 0.6153846153846154
(byte) current_piece_char#15 current_piece_char zp ZP_BYTE:18 19.96078431372549
(byte) current_piece_char#20 current_piece_char zp ZP_BYTE:18 6.0
(byte) current_piece_char#62 current_piece_char#62 zp ZP_BYTE:6 48.285714285714285
(byte~) current_piece_char#87 current_piece_char#87 zp ZP_BYTE:6 4.0
(byte~) current_piece_char#88 current_piece_char#88 zp ZP_BYTE:6 22.0
(byte*) current_piece_gfx
(byte*) current_piece_gfx#10 current_piece_gfx zp ZP_WORD:15 19.96078431372549
(byte*) current_piece_gfx#14 current_piece_gfx zp ZP_WORD:15 0.2962962962962963
(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.5
(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:4 48.285714285714285
(byte*~) current_piece_gfx#95 current_piece_gfx#95 zp ZP_WORD:4 2.0
(byte*~) current_piece_gfx#96 current_piece_gfx#96 zp ZP_WORD:4 11.0
(byte*) current_piece_gfx#1 current_piece_gfx zp ZP_WORD:15 0.2962962962962963
(byte*~) current_piece_gfx#100 current_piece_gfx#100 zp ZP_WORD:4 11.0
(byte*) current_piece_gfx#14 current_piece_gfx zp ZP_WORD:15 1.8666666666666665
(byte*) current_piece_gfx#16 current_piece_gfx zp ZP_WORD:15 0.5
(byte*) current_piece_gfx#20 current_piece_gfx zp ZP_WORD:15 19.96078431372549
(byte*) current_piece_gfx#26 current_piece_gfx zp ZP_WORD:15 6.0
(byte*) current_piece_gfx#3 current_piece_gfx zp ZP_WORD:15 4.0
(byte*) current_piece_gfx#52 current_piece_gfx#52 zp ZP_WORD:4 48.285714285714285
(byte*~) current_piece_gfx#99 current_piece_gfx#99 zp ZP_WORD:4 2.0
(byte) current_xpos
(byte~) current_xpos#105 current_xpos#105 zp ZP_BYTE:3 1.3333333333333333
(byte~) current_xpos#106 current_xpos#106 zp ZP_BYTE:3 7.333333333333333
(byte) current_xpos#11 current_xpos zp ZP_BYTE:17 2.3529411764705883
(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#24 current_xpos zp ZP_BYTE:17 0.5333333333333333
(byte) current_xpos#3 current_xpos zp ZP_BYTE:17 4.0
(byte) current_xpos#34 current_xpos zp ZP_BYTE:17 6.0
(byte) current_xpos#48 current_xpos#48 zp ZP_BYTE:3 5.428571428571429
(byte) current_xpos#5 current_xpos zp ZP_BYTE:17 4.0
(byte) current_xpos#1 current_xpos zp ZP_BYTE:17 0.72
(byte) current_xpos#10 current_xpos zp ZP_BYTE:17 2.3529411764705883
(byte~) current_xpos#109 current_xpos#109 zp ZP_BYTE:3 1.3333333333333333
(byte~) current_xpos#110 current_xpos#110 zp ZP_BYTE:3 7.333333333333333
(byte) current_xpos#19 current_xpos zp ZP_BYTE:17 0.871794871794872
(byte) current_xpos#2 current_xpos zp ZP_BYTE:17 4.0
(byte) current_xpos#23 current_xpos zp ZP_BYTE:17 0.5333333333333333
(byte) current_xpos#33 current_xpos zp ZP_BYTE:17 6.0
(byte) current_xpos#4 current_xpos zp ZP_BYTE:17 4.0
(byte) current_xpos#47 current_xpos#47 zp ZP_BYTE:3 5.428571428571429
(byte) current_ypos
(byte) current_ypos#1 current_ypos zp ZP_BYTE:11 4.0
(byte) current_ypos#10 reg byte x 15.0
(byte) current_ypos#14 current_ypos zp ZP_BYTE:11 0.48484848484848475
(byte) current_ypos#19 current_ypos zp ZP_BYTE:11 0.5714285714285714
(byte) current_ypos#22 current_ypos zp ZP_BYTE:11 0.6176470588235294
(byte) current_ypos#30 current_ypos zp ZP_BYTE:11 6.0
(byte~) current_ypos#79 reg byte x 1.0
(byte~) current_ypos#80 reg byte x 5.5
(byte) current_ypos#0 current_ypos zp ZP_BYTE:11 4.0
(byte) current_ypos#13 current_ypos zp ZP_BYTE:11 0.48484848484848475
(byte) current_ypos#18 current_ypos zp ZP_BYTE:11 0.5714285714285714
(byte) current_ypos#21 current_ypos zp ZP_BYTE:11 0.6176470588235294
(byte) current_ypos#29 current_ypos zp ZP_BYTE:11 6.0
(byte~) current_ypos#83 reg byte x 1.0
(byte~) current_ypos#84 reg byte x 5.5
(byte) current_ypos#9 reg byte x 15.0
(void()) fill((byte*) fill::start , (word) fill::size , (byte) fill::val)
(label) fill::@1
(label) fill::@return
@ -924,10 +924,10 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte*) toSpritePtr1_sprite
zp ZP_BYTE:2 [ current_movedown_counter#12 current_movedown_counter#10 current_movedown_counter#1 play_remove_lines::y#8 play_remove_lines::y#1 play_lock_current::l#6 play_lock_current::l#1 play_init::idx#2 play_init::idx#1 sprites_init::xpos#2 sprites_init::xpos#1 render_init::l#4 render_init::l#1 render_screen_original::y#8 render_screen_original::y#1 play_spawn_current::$3 ]
reg byte x [ current_ypos#10 current_ypos#79 current_ypos#80 ]
zp ZP_BYTE:3 [ current_xpos#48 current_xpos#105 current_xpos#106 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::x#2 play_remove_lines::x#1 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:4 [ current_piece_gfx#53 current_piece_gfx#95 current_piece_gfx#96 render_playfield::screen_line#2 render_playfield::screen_line#0 render_playfield::screen_line#1 current_piece#12 current_piece#73 current_piece#74 current_piece#75 current_piece#76 play_collision::piece_gfx#0 play_init::pli#2 play_init::pli#1 render_init::li#2 render_init::li#1 render_init::line#4 render_init::line#1 render_screen_original::orig#2 render_screen_original::orig#5 render_screen_original::orig#1 fill::addr#2 fill::addr#1 play_lock_current::playfield_line#0 ]
zp ZP_BYTE:6 [ current_piece_char#63 current_piece_char#83 current_piece_char#84 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_remove_lines::full#4 play_remove_lines::full#2 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 keyboard_event_pressed::row_bits#0 ]
reg byte x [ current_ypos#9 current_ypos#83 current_ypos#84 ]
zp ZP_BYTE:3 [ current_xpos#47 current_xpos#109 current_xpos#110 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::x#2 play_remove_lines::x#1 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:4 [ current_piece_gfx#52 current_piece_gfx#99 current_piece_gfx#100 render_playfield::screen_line#2 render_playfield::screen_line#0 render_playfield::screen_line#1 current_piece#12 current_piece#73 current_piece#74 current_piece#75 current_piece#76 play_collision::piece_gfx#0 play_init::pli#2 play_init::pli#1 render_init::li#2 render_init::li#1 render_init::line#4 render_init::line#1 render_screen_original::orig#2 render_screen_original::orig#5 render_screen_original::orig#1 fill::addr#2 fill::addr#1 play_lock_current::playfield_line#0 ]
zp ZP_BYTE:6 [ current_piece_char#62 current_piece_char#87 current_piece_char#88 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_remove_lines::full#4 play_remove_lines::full#2 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 keyboard_event_pressed::row_bits#0 ]
zp ZP_BYTE:7 [ 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_remove_lines::c#0 play_lock_current::i#1 keyboard_event_scan::row_scan#0 ]
zp ZP_BYTE:8 [ render_current::l#4 render_current::l#1 play_collision::l#6 play_collision::l#1 ]
zp ZP_BYTE:9 [ render_current::i#4 render_current::i#3 render_current::i#8 render_current::i#10 render_current::i#1 play_collision::i#2 play_collision::i#3 play_collision::i#11 play_collision::i#13 ]
@ -941,12 +941,12 @@ 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_BYTE:11 [ current_ypos#30 current_ypos#22 current_ypos#14 current_ypos#19 current_ypos#1 play_lock_current::ypos2#2 play_lock_current::ypos2#0 play_lock_current::ypos2#1 ]
zp ZP_BYTE:11 [ current_ypos#29 current_ypos#21 current_ypos#13 current_ypos#18 current_ypos#0 play_lock_current::ypos2#2 play_lock_current::ypos2#0 play_lock_current::ypos2#1 ]
zp ZP_WORD:12 [ current_piece#20 current_piece#77 current_piece#16 current_piece#10 current_piece#72 render_screen_original::screen#6 render_screen_original::screen#5 render_screen_original::screen#4 render_screen_original::screen#7 render_screen_original::screen#11 render_screen_original::screen#1 render_screen_original::screen#2 render_init::$18 ]
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#24 current_xpos#5 current_xpos#16 current_xpos#3 ]
zp ZP_BYTE:18 [ current_piece_char#21 current_piece_char#16 current_piece_char#11 current_piece_char#13 ]
zp ZP_WORD:15 [ current_piece_gfx#26 current_piece_gfx#20 current_piece_gfx#14 current_piece_gfx#16 current_piece_gfx#3 current_piece_gfx#1 ]
zp ZP_BYTE:17 [ current_xpos#33 current_xpos#10 current_xpos#19 current_xpos#23 current_xpos#4 current_xpos#1 current_xpos#2 ]
zp ZP_BYTE:18 [ current_piece_char#20 current_piece_char#15 current_piece_char#1 current_piece_char#12 ]
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 ]