[name] Tetris [puzzle] SzSandbox [traces] ...................... ...955555554.......... ...A95555554.14954954. .94AA..........A.9694. .A.A34......9556.A968. .A.A94......A..956A.A. .34AA9555554A.9694A.A. .94A36..9554A1696.A.2. .A.35C..A...A15614A94. .A.14A..A...A14.156A8. .A.14A14A...A.9554.A2. .A...3556...356954.34. .3555554.14.155614.14. ...................... [chip] [type] UC4X [x] 7 [y] 1 [code] slx x2 mov x2 acc loop: add 2 mov acc x1 add 10 mov acc x1 tlt acc x1 + jmp loop mov 69 x2 [chip] [type] UC4X [x] 10 [y] 1 [code] mov 1 x3 mov 65 x3 mov acc x3 slx x2 mov 47 x1 mov x2 acc tgt acc x1 + sub 31 dgt 1 [chip] [type] RNG [x] 15 [y] 1 [chip] [type] UC6 [x] 17 [y] 1 [code] slx x3 mov -1 x0 mov x0 acc mov x0 dat add x3 mov acc x2 mov dat x2 teq x2 999 + mov 0 x0 + mov p0 x1 - mov 1 x0 - mov acc x0 - mov dat x0 [chip] [type] BRIDGE [x] 20 [y] 1 [chip] [type] BANKXL [x] 1 [y] 2 [rom] 184,312,120,408,240,216,568,178,150,402,180,153,216,773,464,456,480,408,240,216,568,154,210,147,180,153,216,773,0,0,0,0,0 [chip] [type] UC6 [x] 4 [y] 2 [code] # piece decoder slx x2 mov x2 x1 mov x0 acc loop: mov x3 dat tlt acc dat - sub dat - mov x3 x2 + teq x3 -999 + mov x3 x2 - jmp loop [chip] [type] BANKXL [x] 7 [y] 3 [rom] 700,14,512,-9,256,0,128,1,64,2,32,-12,16,-11,8,-10,4,-24,2,-23,1,-22,999,999,999,999,999,999,999,999,999,-999,-999 [chip] [type] PAD2 [x] 11 [y] 3 [chip] [type] UC6 [x] 14 [y] 3 [code] slp 1 mov x1 acc teq acc 3 + mov 100 p1 teq acc -3 + mov 0 p1 teq acc 2 + mov -1 x0 teq acc 4 + mov 1 x0 teq acc 6 + mov 21 x3 teq acc 7 + mov 7 x3 [chip] [type] BRIDGE [x] 20 [y] 4 [chip] [type] UC6 [x] 2 [y] 5 [code] # line checker slx x1 mov x1 dat mov x1 acc loop: mov acc x3 teq x3 0 + jmp end sub 1 teq acc dat + mov dat x0 + mov x0 null - jmp loop end: mov 277 x1 [chip] [type] UC6 [x] 11 [y] 5 [code] # piece checker wait: slx x3 mov x3 dat mov x3 x1 loop: mov x1 acc teq acc -999 + mov dat x3 + jmp wait add dat mov acc x0 teq x0 1 + mov 999 dat jmp loop [chip] [type] UC6 [x] 17 [y] 5 [code] slp 1 mov 100 acc busy: sub 1 teq acc 0 - jmp busy mov dat acc add 1 mov acc dat teq p0 100 + mov 999 dat tgt dat 10 + mov 12 x2 + mov 0 dat [chip] [type] LCDC2 [x] 5 [y] 6 [custom-screen] tetris [chip] [type] UC6 [x] 14 [y] 7 [code] slx x2 mov -1 x0 mov x0 acc mov x0 dat add x2 mov acc x3 mov dat x3 teq x3 999 + mov 0 x0 - mov 1 x0 - mov acc x0 - mov dat x0 [chip] [type] UC6 [x] 2 [y] 8 [code] # line clearer tlt acc 49 + slx x0 + mov x0 acc sub 1 mov acc x2 teq x2 1 add 12 - mul -1 mov acc x3 - mul -1 sub 12 tlt acc 49 + mov 0 x0 [chip] [type] BRIDGE [x] 20 [y] 9 [chip] [type] UC6 [x] 11 [y] 10 [code] # piece drawer wait: slx x3 mov x3 dat mov x3 x0 loop: mov x0 acc teq acc -999 + mov -1 x3 + jmp wait tcp dat 0 - mul -1 add dat teq dat 0 - mov acc x1 jmp loop [chip] [type] UC6 [x] 14 [y] 10 [code] wait: slx x3 tcp x3 0 - mul -1 + mov x3 acc + mov x3 dat mov acc x1 mov dat x1 mov x1 null - mul -1 - mov acc x3 - mov dat x3 [chip] [type] UC6 [x] 17 [y] 10 [code] slx x2 mov -1 x1 mov x1 dat mov x1 acc add x2 tgt acc 27 + sub 28 mov dat x3 mov acc x3 teq x3 999 + mov 0 x1 - mov 1 x1 - mov dat x1 - mov acc x1 [chip] [type] UC4X [x] 2 [y] 11 [code] @ mov 36 acc tlt acc 300 + add 1 + mov acc x2 - slp 999 + tgt acc 48 + tlt acc 289 + add 11 + mov acc x2