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

Closer to real tetris

This commit is contained in:
jespergravgaard 2018-12-28 23:55:29 +01:00
parent 22aa93e802
commit 7d70b371ba
12 changed files with 9175 additions and 6591 deletions

View File

@ -1,8 +1,10 @@
import "tetris-sprites" import "tetris-sprites"
void main() { void main() {
init_sprites(); vicSelectGfxBank(PLAYFIELD_SCREEN);
init_irq(); *D018 = toD018(PLAYFIELD_SCREEN, PLAYFIELD_CHARSET);
sprites_init();
sprites_irq_init();
while(true) { while(true) {
(*PLAYFIELD_SCREEN)++; (*PLAYFIELD_SCREEN)++;
} }

View File

@ -12,8 +12,9 @@ kickasm(pc PLAYFIELD_SCREEN_ORIGINAL, resource "nes-screen.iscr") {{
.import binary "nes-screen.iscr" .import binary "nes-screen.iscr"
}} }}
// Pointers to the screen address for rendering each playfield line // Pointers to the screen address for rendering each playfield line
byte*[PLAYFIELD_LINES+3] screen_lines; byte*[PLAYFIELD_LINES] screen_lines;
// Initialize rendering // Initialize rendering
void render_init() { void render_init() {
@ -29,15 +30,16 @@ void render_init() {
render_screen_original(PLAYFIELD_SCREEN); render_screen_original(PLAYFIELD_SCREEN);
// Initialize the screen line pointers; // Initialize the screen line pointers;
byte* li = PLAYFIELD_SCREEN + 40 + 16;
for(byte i:0..PLAYFIELD_LINES+2) { byte* li = PLAYFIELD_SCREEN + 2*40 + 16;
for(byte i:0..PLAYFIELD_LINES-1) {
screen_lines[i<<1] = li; screen_lines[i<<1] = li;
li += 40; li += 40;
} }
// Prepare the playfield frame // Fill the playfield frame with the white background color
byte* line = COLS + 15; byte* line = COLS + 4*40 + 16;
for(byte l:0..PLAYFIELD_LINES+1) { for(byte l:2..PLAYFIELD_LINES-1) {
for(byte c:0..PLAYFIELD_COLS+1) { for(byte c:0..PLAYFIELD_COLS-1) {
*(line+c) = WHITE; *(line+c) = WHITE;
} }
line +=40; line +=40;
@ -65,11 +67,12 @@ void render_screen_original(byte* screen) {
// Render the static playfield on the screen // Render the static playfield on the screen
void render_playfield() { void render_playfield() {
byte i = 0; // Do not render the top 2 lines.
for(byte l:0..PLAYFIELD_LINES-1) { byte i = PLAYFIELD_COLS*2;
byte* line = screen_lines[l<<1]; for(byte l:2..PLAYFIELD_LINES-1) {
byte* screen_line = screen_lines[l<<1];
for(byte c:0..PLAYFIELD_COLS-1) { for(byte c:0..PLAYFIELD_COLS-1) {
*(line++) = playfield[i++]; *(screen_line++) = playfield[i++];
} }
} }
} }
@ -79,7 +82,7 @@ void render_current() {
byte i = 0; byte i = 0;
byte ypos2 = current_ypos<<1; byte ypos2 = current_ypos<<1;
for(byte l:0..3) { for(byte l:0..3) {
if(ypos2<2*PLAYFIELD_LINES) { if(ypos2>2 && ypos2<2*PLAYFIELD_LINES) {
byte* screen_line = screen_lines[ypos2]; byte* screen_line = screen_lines[ypos2];
byte xpos = current_xpos; byte xpos = current_xpos;
for(byte c:0..3) { for(byte c:0..3) {
@ -91,6 +94,8 @@ void render_current() {
} }
xpos++; xpos++;
} }
} else {
i += 4;
} }
ypos2 += 2; ypos2 += 2;
} }

View File

@ -17,12 +17,10 @@ kickasm(pc PLAYFIELD_SPRITES, resource "nes-playfield.png") {{
}} }}
// Setup the sprites // Setup the sprites
void init_sprites() { void sprites_init() {
vicSelectGfxBank(PLAYFIELD_SCREEN);
*D018 = toD018(PLAYFIELD_SCREEN, PLAYFIELD_CHARSET);
*SPRITES_ENABLE = %00001111; *SPRITES_ENABLE = %00001111;
*SPRITES_EXPAND_X = *SPRITES_EXPAND_Y = *SPRITES_MC = 0; *SPRITES_EXPAND_X = *SPRITES_EXPAND_Y = *SPRITES_MC = 0;
byte xpos = 24+14*8; byte xpos = 24+15*8;
for(byte s:0..3) { for(byte s:0..3) {
byte s2 = s<<1; byte s2 = s<<1;
SPRITES_XPOS[s2] = xpos; SPRITES_XPOS[s2] = xpos;
@ -43,7 +41,7 @@ volatile byte irq_sprite_ptr = toSpritePtr(PLAYFIELD_SPRITES);
volatile byte irq_cnt = 0; volatile byte irq_cnt = 0;
// Setup the IRQ // Setup the IRQ
void init_irq() { void sprites_irq_init() {
asm { sei } asm { sei }
// Acknowledge any IRQ and setup the next one // Acknowledge any IRQ and setup the next one
*IRQ_STATUS = IRQ_RASTER; *IRQ_STATUS = IRQ_RASTER;

View File

@ -5,12 +5,15 @@ import "keyboard"
import "sid" import "sid"
import "tetris-data" import "tetris-data"
import "tetris-render" import "tetris-render"
import "tetris-sprites"
import "tetris-play" import "tetris-play"
void main() { void main() {
sid_rnd_init(); sid_rnd_init();
asm { sei } asm { sei }
render_init(); render_init();
sprites_init();
sprites_irq_init();
play_init(); play_init();
play_spawn_current(); play_spawn_current();
render_playfield(); render_playfield();

View File

@ -50,13 +50,21 @@ bbegin:
sta irq_cnt sta irq_cnt
jsr main jsr main
main: { main: {
jsr init_sprites .const vicSelectGfxBank1_toDd001_return = 3^(>PLAYFIELD_SCREEN)>>6
jsr init_irq .const toD0181_return = (>(PLAYFIELD_SCREEN&$3fff)<<2)|(>PLAYFIELD_CHARSET)>>2&$f
lda #3
sta CIA2_PORT_A_DDR
lda #vicSelectGfxBank1_toDd001_return
sta CIA2_PORT_A
lda #toD0181_return
sta D018
jsr sprites_init
jsr sprites_irq_init
b2: b2:
inc PLAYFIELD_SCREEN inc PLAYFIELD_SCREEN
jmp b2 jmp b2
} }
init_irq: { sprites_irq_init: {
sei sei
lda #IRQ_RASTER lda #IRQ_RASTER
sta IRQ_STATUS sta IRQ_STATUS
@ -81,23 +89,15 @@ init_irq: {
cli cli
rts rts
} }
init_sprites: { sprites_init: {
.const vicSelectGfxBank1_toDd001_return = 3^(>PLAYFIELD_SCREEN)>>6
.const toD0181_return = (>(PLAYFIELD_SCREEN&$3fff)<<2)|(>PLAYFIELD_CHARSET)>>2&$f
.label xpos = 2 .label xpos = 2
lda #3
sta CIA2_PORT_A_DDR
lda #vicSelectGfxBank1_toDd001_return
sta CIA2_PORT_A
lda #toD0181_return
sta D018
lda #$f lda #$f
sta SPRITES_ENABLE sta SPRITES_ENABLE
lda #0 lda #0
sta SPRITES_MC sta SPRITES_MC
sta SPRITES_EXPAND_Y sta SPRITES_EXPAND_Y
sta SPRITES_EXPAND_X sta SPRITES_EXPAND_X
lda #$18+$e*8 lda #$18+$f*8
sta xpos sta xpos
ldx #0 ldx #0
b1: b1:

View File

@ -34,119 +34,118 @@ toSpritePtr1: scope:[] from @5
[9] phi() [9] phi()
main: scope:[main] from @8 main: scope:[main] from @8
[10] phi() [10] phi()
[11] call init_sprites to:main::vicSelectGfxBank1
to:main::@7 main::vicSelectGfxBank1: scope:[main] from main
main::@7: scope:[main] from main [11] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3
to:main::vicSelectGfxBank1_toDd001
main::vicSelectGfxBank1_toDd001: scope:[main] from main::vicSelectGfxBank1
[12] phi() [12] phi()
[13] call init_irq to:main::vicSelectGfxBank1_@1
main::vicSelectGfxBank1_@1: scope:[main] from main::vicSelectGfxBank1_toDd001
[13] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0
to:main::toD0181
main::toD0181: scope:[main] from main::vicSelectGfxBank1_@1
[14] phi()
to:main::@8
main::@8: scope:[main] from main::toD0181
[15] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
[16] call sprites_init
to:main::@9
main::@9: scope:[main] from main::@8
[17] phi()
[18] call sprites_irq_init
to:main::@2 to:main::@2
main::@2: scope:[main] from main::@2 main::@7 main::@2: scope:[main] from main::@2 main::@9
[14] *((const byte*) PLAYFIELD_SCREEN#0) ← ++ *((const byte*) PLAYFIELD_SCREEN#0) [19] *((const byte*) PLAYFIELD_SCREEN#0) ← ++ *((const byte*) PLAYFIELD_SCREEN#0)
to:main::@2 to:main::@2
init_irq: scope:[init_irq] from main::@7 sprites_irq_init: scope:[sprites_irq_init] from main::@9
asm { sei } asm { sei }
[16] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [21] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
asm { ldaCIA1_INTERRUPT } asm { ldaCIA1_INTERRUPT }
[18] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [23] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
[19] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [24] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
[20] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [25] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
[21] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte/signed byte/word/signed word/dword/signed dword) 127 [26] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte/signed byte/word/signed word/dword/signed dword) 127
[22] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0 [27] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0
[23] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [28] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
[24] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [29] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq()
asm { cli } asm { cli }
to:init_irq::@return to:sprites_irq_init::@return
init_irq::@return: scope:[init_irq] from init_irq sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init
[26] return [31] return
to:@return to:@return
init_sprites: scope:[init_sprites] from main sprites_init: scope:[sprites_init] from main::@8
[27] phi() [32] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 15
to:init_sprites::vicSelectGfxBank1 [33] *((const byte*) SPRITES_MC#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
init_sprites::vicSelectGfxBank1: scope:[init_sprites] from init_sprites [34] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0)
[28] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [35] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0)
to:init_sprites::vicSelectGfxBank1_toDd001 to:sprites_init::@1
init_sprites::vicSelectGfxBank1_toDd001: scope:[init_sprites] from init_sprites::vicSelectGfxBank1 sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1
[29] phi() [36] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte/signed byte/word/signed word/dword/signed dword) 24+(byte/signed byte/word/signed word/dword/signed dword) 15*(byte/signed byte/word/signed word/dword/signed dword) 8 sprites_init::@1/(byte) sprites_init::xpos#1 )
to:init_sprites::vicSelectGfxBank1_@1 [36] (byte) sprites_init::s#2 ← phi( sprites_init/(byte/signed byte/word/signed word/dword/signed dword) 0 sprites_init::@1/(byte) sprites_init::s#1 )
init_sprites::vicSelectGfxBank1_@1: scope:[init_sprites] from init_sprites::vicSelectGfxBank1_toDd001 [37] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
[30] *((const byte*) CIA2_PORT_A#0) ← (const byte) init_sprites::vicSelectGfxBank1_toDd001_return#0 [38] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2
to:init_sprites::toD0181 [39] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0
init_sprites::toD0181: scope:[init_sprites] from init_sprites::vicSelectGfxBank1_@1 [40] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24
[31] phi() [41] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2
to:init_sprites::@4 [42] if((byte) sprites_init::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto sprites_init::@1
init_sprites::@4: scope:[init_sprites] from init_sprites::toD0181 to:sprites_init::@return
[32] *((const byte*) D018#0) ← (const byte) init_sprites::toD0181_return#0 sprites_init::@return: scope:[sprites_init] from sprites_init::@1
[33] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) 15 [43] return
[34] *((const byte*) SPRITES_MC#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
[35] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0)
[36] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0)
to:init_sprites::@1
init_sprites::@1: scope:[init_sprites] from init_sprites::@1 init_sprites::@4
[37] (byte) init_sprites::xpos#2 ← phi( init_sprites::@1/(byte) init_sprites::xpos#1 init_sprites::@4/(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 )
[37] (byte) init_sprites::s#2 ← phi( init_sprites::@1/(byte) init_sprites::s#1 init_sprites::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 )
[38] (byte) init_sprites::s2#0 ← (byte) init_sprites::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
[39] *((const byte*) SPRITES_XPOS#0 + (byte) init_sprites::s2#0) ← (byte) init_sprites::xpos#2
[40] *((const byte*) SPRITES_COLS#0 + (byte) init_sprites::s#2) ← (const byte) BLACK#0
[41] (byte) init_sprites::xpos#1 ← (byte) init_sprites::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24
[42] (byte) init_sprites::s#1 ← ++ (byte) init_sprites::s#2
[43] if((byte) init_sprites::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto init_sprites::@1
to:init_sprites::@return
init_sprites::@return: scope:[init_sprites] from init_sprites::@1
[44] return
to:@return to:@return
irq: scope:[irq] from irq: scope:[irq] from
[45] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0 [44] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0
[46] (byte) irq::ypos#0 ← (byte) irq_sprite_ypos#0 [45] (byte) irq::ypos#0 ← (byte) irq_sprite_ypos#0
[47] *((const byte*) SPRITES_YPOS#0) ← (byte) irq::ypos#0 [46] *((const byte*) SPRITES_YPOS#0) ← (byte) irq::ypos#0
[48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ypos#0 [47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ypos#0
[49] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq::ypos#0 [48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq::ypos#0
[50] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq::ypos#0 [49] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq::ypos#0
to:irq::@1 to:irq::@1
irq::@1: scope:[irq] from irq irq::@1 irq::@1: scope:[irq] from irq irq::@1
[51] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1 [50] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1
to:irq::@5 to:irq::@5
irq::@5: scope:[irq] from irq::@1 irq::@5: scope:[irq] from irq::@1
[52] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0 [51] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0
[53] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0 [52] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0
[54] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0 [53] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0
[55] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1 [54] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1
[56] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1 [55] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1
[57] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1 [56] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1
[58] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2 [57] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2
[59] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 [58] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0
[60] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2 [59] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2
to:irq::@6 to:irq::@6
irq::@6: scope:[irq] from irq::@5 irq::@6: scope:[irq] from irq::@5
[61] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [60] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
[62] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [61] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
[63] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 [62] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3
to:irq::@3 to:irq::@3
irq::@3: scope:[irq] from irq::@6 irq::@9 irq::@3: scope:[irq] from irq::@6 irq::@9
[64] (byte) irq_raster_next#12 ← phi( irq::@6/(byte) irq_raster_next#2 irq::@9/(byte) irq_raster_next#1 ) [63] (byte) irq_raster_next#12 ← phi( irq::@6/(byte) irq_raster_next#2 irq::@9/(byte) irq_raster_next#1 )
[65] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12 [64] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12
[66] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 [65] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7
[67] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4 [66] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4
to:irq::@8 to:irq::@8
irq::@8: scope:[irq] from irq::@3 irq::@8: scope:[irq] from irq::@3
[68] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1 [67] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1
to:irq::@4 to:irq::@4
irq::@4: scope:[irq] from irq::@3 irq::@8 irq::@4: scope:[irq] from irq::@3 irq::@8
[69] (byte) irq::raster_next#2 ← phi( irq::@3/(byte) irq::raster_next#0 irq::@8/(byte) irq::raster_next#1 ) [68] (byte) irq::raster_next#2 ← phi( irq::@3/(byte) irq::raster_next#0 irq::@8/(byte) irq::raster_next#1 )
[70] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2 [69] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2
[71] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [70] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[72] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [71] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0
to:irq::@return to:irq::@return
irq::@return: scope:[irq] from irq::@4 irq::@return: scope:[irq] from irq::@4
[73] return [72] return
to:@return to:@return
irq::@2: scope:[irq] from irq::@5 irq::@2: scope:[irq] from irq::@5
[74] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [73] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0
[75] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 [74] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0
[76] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 [75] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50
to:irq::toSpritePtr2 to:irq::toSpritePtr2
irq::toSpritePtr2: scope:[irq] from irq::@2 irq::toSpritePtr2: scope:[irq] from irq::@2
[77] phi() [76] phi()
to:irq::@9 to:irq::@9
irq::@9: scope:[irq] from irq::toSpritePtr2 irq::@9: scope:[irq] from irq::toSpritePtr2
[78] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 [77] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0
to:irq::@3 to:irq::@3

File diff suppressed because it is too large Load Diff

View File

@ -123,50 +123,10 @@
(byte) VIC_RST8 (byte) VIC_RST8
(byte) WHITE (byte) WHITE
(byte) YELLOW (byte) YELLOW
(byte) current_piece_color (byte) current_piece_char
(byte*) current_piece_gfx (byte*) current_piece_gfx
(byte) current_xpos (byte) current_xpos
(byte) current_ypos (byte) current_ypos
(void()) init_irq()
(label) init_irq::@return
(void()) init_sprites()
(label) init_sprites::@1
(label) init_sprites::@4
(label) init_sprites::@return
(byte) init_sprites::s
(byte) init_sprites::s#1 reg byte x 16.5
(byte) init_sprites::s#2 reg byte x 8.8
(byte) init_sprites::s2
(byte) init_sprites::s2#0 reg byte a 22.0
(label) init_sprites::toD0181
(word~) init_sprites::toD0181_$0
(word~) init_sprites::toD0181_$1
(word~) init_sprites::toD0181_$2
(byte~) init_sprites::toD0181_$3
(word~) init_sprites::toD0181_$4
(byte~) init_sprites::toD0181_$5
(byte~) init_sprites::toD0181_$6
(byte~) init_sprites::toD0181_$7
(byte~) init_sprites::toD0181_$8
(byte*) init_sprites::toD0181_gfx
(byte) init_sprites::toD0181_return
(const byte) init_sprites::toD0181_return#0 toD0181_return = >((word))(const byte*) PLAYFIELD_SCREEN#0&(word/signed word/dword/signed dword) 16383<<(byte/signed byte/word/signed word/dword/signed dword) 2|>((word))(const byte*) PLAYFIELD_CHARSET#0>>(byte/signed byte/word/signed word/dword/signed dword) 2&(byte/signed byte/word/signed word/dword/signed dword) 15
(byte*) init_sprites::toD0181_screen
(label) init_sprites::vicSelectGfxBank1
(byte~) init_sprites::vicSelectGfxBank1_$0
(label) init_sprites::vicSelectGfxBank1_@1
(byte*) init_sprites::vicSelectGfxBank1_gfx
(label) init_sprites::vicSelectGfxBank1_toDd001
(word~) init_sprites::vicSelectGfxBank1_toDd001_$0
(byte~) init_sprites::vicSelectGfxBank1_toDd001_$1
(byte~) init_sprites::vicSelectGfxBank1_toDd001_$2
(byte/word/dword~) init_sprites::vicSelectGfxBank1_toDd001_$3
(byte*) init_sprites::vicSelectGfxBank1_toDd001_gfx
(byte) init_sprites::vicSelectGfxBank1_toDd001_return
(const byte) init_sprites::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte/signed byte/word/signed word/dword/signed dword) 3^>((word))(const byte*) PLAYFIELD_SCREEN#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(byte) init_sprites::xpos
(byte) init_sprites::xpos#1 xpos zp ZP_BYTE:2 7.333333333333333
(byte) init_sprites::xpos#2 xpos zp ZP_BYTE:2 8.25
interrupt(HARDWARE_CLOBBER)(void()) irq() interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte~) irq::$3 reg byte a 4.0 (byte~) irq::$3 reg byte a 4.0
(label) irq::@1 (label) irq::@1
@ -214,8 +174,48 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte) irq_sprite_ypos#2 irq_sprite_ypos zp ZP_BYTE:4 20.0 (byte) irq_sprite_ypos#2 irq_sprite_ypos zp ZP_BYTE:4 20.0
(void()) main() (void()) main()
(label) main::@2 (label) main::@2
(label) main::@7 (label) main::@8
(label) main::@9
(label) main::toD0181
(word~) main::toD0181_$0
(word~) main::toD0181_$1
(word~) main::toD0181_$2
(byte~) main::toD0181_$3
(word~) main::toD0181_$4
(byte~) main::toD0181_$5
(byte~) main::toD0181_$6
(byte~) main::toD0181_$7
(byte~) main::toD0181_$8
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >((word))(const byte*) PLAYFIELD_SCREEN#0&(word/signed word/dword/signed dword) 16383<<(byte/signed byte/word/signed word/dword/signed dword) 2|>((word))(const byte*) PLAYFIELD_CHARSET#0>>(byte/signed byte/word/signed word/dword/signed dword) 2&(byte/signed byte/word/signed word/dword/signed dword) 15
(byte*) main::toD0181_screen
(label) main::vicSelectGfxBank1
(byte~) main::vicSelectGfxBank1_$0
(label) main::vicSelectGfxBank1_@1
(byte*) main::vicSelectGfxBank1_gfx
(label) main::vicSelectGfxBank1_toDd001
(word~) main::vicSelectGfxBank1_toDd001_$0
(byte~) main::vicSelectGfxBank1_toDd001_$1
(byte~) main::vicSelectGfxBank1_toDd001_$2
(byte/word/dword~) main::vicSelectGfxBank1_toDd001_$3
(byte*) main::vicSelectGfxBank1_toDd001_gfx
(byte) main::vicSelectGfxBank1_toDd001_return
(const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte/signed byte/word/signed word/dword/signed dword) 3^>((word))(const byte*) PLAYFIELD_SCREEN#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield (byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield
(void()) sprites_init()
(label) sprites_init::@1
(label) sprites_init::@return
(byte) sprites_init::s
(byte) sprites_init::s#1 reg byte x 16.5
(byte) sprites_init::s#2 reg byte x 8.8
(byte) sprites_init::s2
(byte) sprites_init::s2#0 reg byte a 22.0
(byte) sprites_init::xpos
(byte) sprites_init::xpos#1 xpos zp ZP_BYTE:2 7.333333333333333
(byte) sprites_init::xpos#2 xpos zp ZP_BYTE:2 8.25
(void()) sprites_irq_init()
(label) sprites_irq_init::@return
(label) toSpritePtr1 (label) toSpritePtr1
(word~) toSpritePtr1_$0 (word~) toSpritePtr1_$0
(word~) toSpritePtr1_$1 (word~) toSpritePtr1_$1
@ -224,14 +224,14 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(const byte) toSpritePtr1_return#0 toSpritePtr1_return = ((byte))((word))(const byte*) PLAYFIELD_SPRITES#0>>(byte/signed byte/word/signed word/dword/signed dword) 6 (const byte) toSpritePtr1_return#0 toSpritePtr1_return = ((byte))((word))(const byte*) PLAYFIELD_SPRITES#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(byte*) toSpritePtr1_sprite (byte*) toSpritePtr1_sprite
reg byte x [ init_sprites::s#2 init_sprites::s#1 ] reg byte x [ sprites_init::s#2 sprites_init::s#1 ]
zp ZP_BYTE:2 [ init_sprites::xpos#2 init_sprites::xpos#1 ] zp ZP_BYTE:2 [ sprites_init::xpos#2 sprites_init::xpos#1 ]
zp ZP_BYTE:3 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 irq_raster_next#0 ] zp ZP_BYTE:3 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 irq_raster_next#0 ]
reg byte x [ irq::raster_next#2 irq::raster_next#0 irq::raster_next#1 ] reg byte x [ irq::raster_next#2 irq::raster_next#0 irq::raster_next#1 ]
zp ZP_BYTE:4 [ irq_sprite_ypos#0 irq_sprite_ypos#2 irq_sprite_ypos#1 ] zp ZP_BYTE:4 [ irq_sprite_ypos#0 irq_sprite_ypos#2 irq_sprite_ypos#1 ]
zp ZP_BYTE:5 [ irq_sprite_ptr#0 irq_sprite_ptr#2 irq_sprite_ptr#1 ] zp ZP_BYTE:5 [ irq_sprite_ptr#0 irq_sprite_ptr#2 irq_sprite_ptr#1 ]
zp ZP_BYTE:6 [ irq_cnt#0 irq_cnt#1 irq_cnt#13 ] zp ZP_BYTE:6 [ irq_cnt#0 irq_cnt#1 irq_cnt#13 ]
reg byte a [ init_sprites::s2#0 ] reg byte a [ sprites_init::s2#0 ]
reg byte a [ irq::ypos#0 ] reg byte a [ irq::ypos#0 ]
reg byte a [ irq::ptr#0 ] reg byte a [ irq::ptr#0 ]
reg byte x [ irq::ptr#1 ] reg byte x [ irq::ptr#1 ]

View File

@ -1,22 +1,41 @@
.pc = $801 "Basic" .pc = $801 "Basic"
:BasicUpstart(main) :BasicUpstart(bbegin)
.pc = $80d "Program" .pc = $80d "Program"
.label PROCPORT_DDR = 0
.const PROCPORT_DDR_MEMORY_MASK = 7
.label PROCPORT = 1
.const PROCPORT_RAM_IO = $35
.const SPRITE_PTRS = $3f8
.label SPRITES_XPOS = $d000
.label SPRITES_YPOS = $d001
.label RASTER = $d012 .label RASTER = $d012
.label SPRITES_ENABLE = $d015
.label SPRITES_EXPAND_Y = $d017
.label SPRITES_MC = $d01c
.label SPRITES_EXPAND_X = $d01d
.label BORDERCOL = $d020 .label BORDERCOL = $d020
.label BGCOL1 = $d021 .label BGCOL1 = $d021
.label BGCOL2 = $d022 .label BGCOL2 = $d022
.label BGCOL3 = $d023 .label BGCOL3 = $d023
.label BGCOL4 = $d024 .label BGCOL4 = $d024
.label SPRITES_COLS = $d027
.label VIC_CONTROL = $d011
.label D011 = $d011 .label D011 = $d011
.const VIC_ECM = $40 .const VIC_ECM = $40
.const VIC_DEN = $10 .const VIC_DEN = $10
.const VIC_RSEL = 8 .const VIC_RSEL = 8
.label D018 = $d018 .label D018 = $d018
.label IRQ_STATUS = $d019
.label IRQ_ENABLE = $d01a
.const IRQ_RASTER = 1
.label COLS = $d800 .label COLS = $d800
.label CIA1_PORT_A = $dc00 .label CIA1_PORT_A = $dc00
.label CIA1_PORT_B = $dc01 .label CIA1_PORT_B = $dc01
.label CIA1_INTERRUPT = $dc0d
.const CIA_INTERRUPT_CLEAR = $7f
.label CIA2_PORT_A = $dd00 .label CIA2_PORT_A = $dd00
.label CIA2_PORT_A_DDR = $dd02 .label CIA2_PORT_A_DDR = $dd02
.label HARDWARE_IRQ = $fffe
.const BLACK = 0 .const BLACK = 0
.const WHITE = 1 .const WHITE = 1
.const CYAN = 3 .const CYAN = 3
@ -41,10 +60,12 @@
.const SID_CONTROL_NOISE = $80 .const SID_CONTROL_NOISE = $80
.label SID_VOICE3_OSC = $d41b .label SID_VOICE3_OSC = $d41b
.label PLAYFIELD_SCREEN = $400 .label PLAYFIELD_SCREEN = $400
.label PLAYFIELD_SPRITES = $2000
.label PLAYFIELD_CHARSET = $2800 .label PLAYFIELD_CHARSET = $2800
.const PLAYFIELD_LINES = $16 .const PLAYFIELD_LINES = $16
.const PLAYFIELD_COLS = $a .const PLAYFIELD_COLS = $a
.label PLAYFIELD_SCREEN_ORIGINAL = $2c00 .label PLAYFIELD_SCREEN_ORIGINAL = $2c00
.const IRQ_RASTER_FIRST = $31
.const current_movedown_slow = $32 .const current_movedown_slow = $32
.const current_movedown_fast = 5 .const current_movedown_fast = 5
.const COLLISION_NONE = 0 .const COLLISION_NONE = 0
@ -52,7 +73,13 @@
.const COLLISION_BOTTOM = 2 .const COLLISION_BOTTOM = 2
.const COLLISION_LEFT = 4 .const COLLISION_LEFT = 4
.const COLLISION_RIGHT = 8 .const COLLISION_RIGHT = 8
.label PLAYFIELD_SPRITE_PTRS = PLAYFIELD_SCREEN+SPRITE_PTRS
.const toSpritePtr1_return = PLAYFIELD_SPRITES>>6
.label keyboard_events_size = $13 .label keyboard_events_size = $13
.label irq_raster_next = $14
.label irq_sprite_ypos = $15
.label irq_sprite_ptr = $16
.label irq_cnt = $17
.label current_movedown_counter = 3 .label current_movedown_counter = 3
.label current_ypos = 2 .label current_ypos = 2
.label current_xpos = $11 .label current_xpos = $11
@ -63,31 +90,43 @@
.label current_piece_12 = 5 .label current_piece_12 = 5
.label current_xpos_48 = 4 .label current_xpos_48 = 4
.label current_piece_gfx_53 = 5 .label current_piece_gfx_53 = 5
.label current_piece_char_62 = 7 .label current_piece_char_63 = 7
.label current_xpos_96 = 4 .label current_xpos_104 = 4
.label current_piece_gfx_87 = 5 .label current_piece_gfx_95 = 5
.label current_piece_gfx_88 = 5 .label current_piece_gfx_96 = 5
.label current_piece_char_75 = 7 .label current_piece_char_83 = 7
.label current_piece_char_76 = 7 .label current_piece_char_84 = 7
.label current_piece_71 = 5
.label current_piece_72 = 5
.label current_piece_73 = 5 .label current_piece_73 = 5
.label current_piece_74 = 5 .label current_piece_74 = 5
.label current_piece_75 = 5
.label current_piece_76 = 5
bbegin:
lda #IRQ_RASTER_FIRST
sta irq_raster_next
lda #$32
sta irq_sprite_ypos
lda #toSpritePtr1_return
sta irq_sprite_ptr
lda #0
sta irq_cnt
jsr main
main: { main: {
.label key_event = $14 .label key_event = $18
.label render = $15 .label render = $19
jsr sid_rnd_init jsr sid_rnd_init
sei sei
jsr render_init jsr render_init
jsr sprites_init
jsr sprites_irq_init
jsr play_init jsr play_init
jsr play_spawn_current jsr play_spawn_current
jsr render_playfield jsr render_playfield
lda current_piece_gfx lda current_piece_gfx
sta current_piece_gfx_87 sta current_piece_gfx_95
lda current_piece_gfx+1 lda current_piece_gfx+1
sta current_piece_gfx_87+1 sta current_piece_gfx_95+1
lda current_piece_char lda current_piece_char
sta current_piece_char_75 sta current_piece_char_83
lda #3 lda #3
sta current_xpos_48 sta current_xpos_48
ldx #0 ldx #0
@ -136,13 +175,13 @@ main: {
jsr render_playfield jsr render_playfield
ldx current_ypos ldx current_ypos
lda current_xpos lda current_xpos
sta current_xpos_96 sta current_xpos_104
lda current_piece_gfx lda current_piece_gfx
sta current_piece_gfx_88 sta current_piece_gfx_96
lda current_piece_gfx+1 lda current_piece_gfx+1
sta current_piece_gfx_88+1 sta current_piece_gfx_96+1
lda current_piece_char lda current_piece_char
sta current_piece_char_76 sta current_piece_char_84
jsr render_current jsr render_current
b10: b10:
dec BORDERCOL dec BORDERCOL
@ -150,46 +189,28 @@ main: {
} }
render_current: { render_current: {
.label ypos2 = 8 .label ypos2 = 8
.label l = 9 .label screen_line = $1a
.label screen_line = $16
.label xpos = $b .label xpos = $b
.label i = $a .label i = $a
.label l = 9
txa txa
asl asl
sta ypos2 sta ypos2
lda #0 lda #0
sta i
sta l sta l
sta i
b1: b1:
lda ypos2 lda ypos2
cmp #2*PLAYFIELD_LINES cmp #2
bcs b2 beq !+
tay bcs b13
lda screen_lines,y !:
sta screen_line b7:
lda screen_lines+1,y lda #4
sta screen_line+1 clc
lda current_xpos_48 adc i
sta xpos sta i
ldx #0
b3: b3:
ldy i
lda (current_piece_gfx_53),y
inc i
cmp #0
beq b4
lda xpos
cmp #PLAYFIELD_COLS
bcs b4
lda current_piece_char_62
ldy xpos
sta (screen_line),y
b4:
inc xpos
inx
cpx #4
bne b3
b2:
lda ypos2 lda ypos2
clc clc
adc #2 adc #2
@ -199,31 +220,64 @@ render_current: {
cmp #4 cmp #4
bne b1 bne b1
rts rts
b13:
lda ypos2
cmp #2*PLAYFIELD_LINES
bcc b2
jmp b7
b2:
ldy ypos2
lda screen_lines,y
sta screen_line
lda screen_lines+1,y
sta screen_line+1
lda current_xpos_48
sta xpos
ldx #0
b4:
ldy i
lda (current_piece_gfx_53),y
inc i
cmp #0
beq b5
lda xpos
cmp #PLAYFIELD_COLS
bcs b5
lda current_piece_char_63
ldy xpos
sta (screen_line),y
b5:
inc xpos
inx
cpx #4
bne b4
jmp b3
} }
render_playfield: { render_playfield: {
.label line = 5 .label screen_line = 5
.label i = 7 .label i = 7
.label l = 4 .label l = 4
lda #0 lda #PLAYFIELD_COLS*2
sta i sta i
lda #2
sta l sta l
b1: b1:
lda l lda l
asl asl
tay tay
lda screen_lines,y lda screen_lines,y
sta line sta screen_line
lda screen_lines+1,y lda screen_lines+1,y
sta line+1 sta screen_line+1
ldx #0 ldx #0
b2: b2:
ldy i ldy i
lda playfield,y lda playfield,y
ldy #0 ldy #0
sta (line),y sta (screen_line),y
inc line inc screen_line
bne !+ bne !+
inc line+1 inc screen_line+1
!: !:
inc i inc i
inx inx
@ -257,9 +311,9 @@ play_move_rotate: {
ldy current_ypos ldy current_ypos
ldx orientation ldx orientation
lda current_piece lda current_piece
sta current_piece_74 sta current_piece_76
lda current_piece+1 lda current_piece+1
sta current_piece_74+1 sta current_piece_76+1
jsr play_collision jsr play_collision
cmp #COLLISION_NONE cmp #COLLISION_NONE
bne b3 bne b3
@ -285,8 +339,8 @@ play_collision: {
.label xpos = 7 .label xpos = 7
.label piece_gfx = 5 .label piece_gfx = 5
.label ypos2 = 8 .label ypos2 = 8
.label playfield_line = $16 .label playfield_line = $1a
.label i = $18 .label i = $1c
.label col = $b .label col = $b
.label l = 9 .label l = 9
.label i_2 = $a .label i_2 = $a
@ -384,9 +438,9 @@ play_move_leftright: {
ldy current_ypos ldy current_ypos
ldx current_orientation ldx current_orientation
lda current_piece lda current_piece
sta current_piece_73 sta current_piece_75
lda current_piece+1 lda current_piece+1
sta current_piece_73+1 sta current_piece_75+1
jsr play_collision jsr play_collision
cmp #COLLISION_NONE cmp #COLLISION_NONE
bne b3 bne b3
@ -405,9 +459,9 @@ play_move_leftright: {
ldy current_ypos ldy current_ypos
ldx current_orientation ldx current_orientation
lda current_piece lda current_piece
sta current_piece_72 sta current_piece_74
lda current_piece+1 lda current_piece+1
sta current_piece_72+1 sta current_piece_74+1
jsr play_collision jsr play_collision
cmp #COLLISION_NONE cmp #COLLISION_NONE
bne b3 bne b3
@ -446,9 +500,9 @@ play_move_down: {
sta play_collision.xpos sta play_collision.xpos
ldx current_orientation ldx current_orientation
lda current_piece lda current_piece
sta current_piece_71 sta current_piece_73
lda current_piece+1 lda current_piece+1
sta current_piece_71+1 sta current_piece_73+1
jsr play_collision jsr play_collision
cmp #COLLISION_NONE cmp #COLLISION_NONE
beq b6 beq b6
@ -786,10 +840,63 @@ play_init: {
sta playfield_lines_idx+PLAYFIELD_LINES sta playfield_lines_idx+PLAYFIELD_LINES
rts rts
} }
sprites_irq_init: {
sei
lda #IRQ_RASTER
sta IRQ_STATUS
lda CIA1_INTERRUPT
lda #PROCPORT_DDR_MEMORY_MASK
sta PROCPORT_DDR
lda #PROCPORT_RAM_IO
sta PROCPORT
lda #CIA_INTERRUPT_CLEAR
sta CIA1_INTERRUPT
lda VIC_CONTROL
and #$7f
sta VIC_CONTROL
lda #IRQ_RASTER_FIRST
sta RASTER
lda #IRQ_RASTER
sta IRQ_ENABLE
lda #<irq
sta HARDWARE_IRQ
lda #>irq
sta HARDWARE_IRQ+1
cli
rts
}
sprites_init: {
.label xpos = 2
lda #$f
sta SPRITES_ENABLE
lda #0
sta SPRITES_MC
sta SPRITES_EXPAND_Y
sta SPRITES_EXPAND_X
lda #$18+$f*8
sta xpos
ldx #0
b1:
txa
asl
tay
lda xpos
sta SPRITES_XPOS,y
lda #BLACK
sta SPRITES_COLS,x
lda #$18
clc
adc xpos
sta xpos
inx
cpx #4
bne b1
rts
}
render_init: { render_init: {
.const vicSelectGfxBank1_toDd001_return = 3^(>PLAYFIELD_SCREEN)>>6 .const vicSelectGfxBank1_toDd001_return = 3^(>PLAYFIELD_SCREEN)>>6
.const toD0181_return = (>(PLAYFIELD_SCREEN&$3fff)<<2)|(>PLAYFIELD_CHARSET)>>2&$f .const toD0181_return = (>(PLAYFIELD_SCREEN&$3fff)<<2)|(>PLAYFIELD_CHARSET)>>2&$f
.label _15 = $c .label _18 = $c
.label li = 5 .label li = 5
.label line = 5 .label line = 5
.label l = 2 .label l = 2
@ -811,9 +918,9 @@ render_init: {
sta BGCOL4 sta BGCOL4
jsr fill jsr fill
jsr render_screen_original jsr render_screen_original
lda #<PLAYFIELD_SCREEN+$28+$10 lda #<PLAYFIELD_SCREEN+2*$28+$10
sta li sta li
lda #>PLAYFIELD_SCREEN+$28+$10 lda #>PLAYFIELD_SCREEN+2*$28+$10
sta li+1 sta li+1
ldx #0 ldx #0
b1: b1:
@ -832,13 +939,13 @@ render_init: {
inc li+1 inc li+1
!: !:
inx inx
cpx #PLAYFIELD_LINES+2+1 cpx #PLAYFIELD_LINES-1+1
bne b1 bne b1
lda #0 lda #2
sta l sta l
lda #<COLS+$f lda #<COLS+4*$28+$10
sta line sta line
lda #>COLS+$f lda #>COLS+4*$28+$10
sta line+1 sta line+1
b2: b2:
ldx #0 ldx #0
@ -846,15 +953,15 @@ render_init: {
txa txa
clc clc
adc line adc line
sta _15 sta _18
lda #0 lda #0
adc line+1 adc line+1
sta _15+1 sta _18+1
lda #WHITE lda #WHITE
ldy #0 ldy #0
sta (_15),y sta (_18),y
inx inx
cpx #PLAYFIELD_COLS+1+1 cpx #PLAYFIELD_COLS-1+1
bne b3 bne b3
lda line lda line
clc clc
@ -865,7 +972,7 @@ render_init: {
!: !:
inc l inc l
lda l lda l
cmp #PLAYFIELD_LINES+1+1 cmp #PLAYFIELD_LINES-1+1
bne b2 bne b2
rts rts
} }
@ -963,6 +1070,74 @@ sid_rnd_init: {
lda #SID_CONTROL_NOISE lda #SID_CONTROL_NOISE
sta SID_VOICE3_CONTROL sta SID_VOICE3_CONTROL
rts rts
}
irq: {
.const toSpritePtr2_return = PLAYFIELD_SPRITES>>6
sta rega+1
stx regx+1
lda #DARK_GREY
sta BORDERCOL
lda irq_sprite_ypos
sta SPRITES_YPOS
sta SPRITES_YPOS+2
sta SPRITES_YPOS+4
sta SPRITES_YPOS+6
b1:
lda RASTER
cmp irq_sprite_ypos
bne b1
lda irq_sprite_ptr
sta PLAYFIELD_SPRITE_PTRS
tax
inx
stx PLAYFIELD_SPRITE_PTRS+1
stx PLAYFIELD_SPRITE_PTRS+2
inx
stx PLAYFIELD_SPRITE_PTRS+3
inc irq_cnt
lda irq_cnt
cmp #$a
beq b2
lda #$15
clc
adc irq_raster_next
sta irq_raster_next
lda #$15
clc
adc irq_sprite_ypos
sta irq_sprite_ypos
lda #3
clc
adc irq_sprite_ptr
sta irq_sprite_ptr
b3:
ldx irq_raster_next
txa
and #7
cmp #3
bne b4
dex
b4:
stx RASTER
lda #IRQ_RASTER
sta IRQ_STATUS
lda #BLACK
sta BORDERCOL
rega:
lda #00
regx:
ldx #00
rti
b2:
lda #0
sta irq_cnt
lda #IRQ_RASTER_FIRST
sta irq_raster_next
lda #$32
sta irq_sprite_ypos
lda #toSpritePtr2_return
sta irq_sprite_ptr
jmp b3
} }
keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f
keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80 keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80
@ -983,9 +1158,9 @@ sid_rnd_init: {
.align $40 .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 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 $57, $58, $98, $58, $57, $57, $98
screen_lines: .fill 2*PLAYFIELD_LINES, 0
playfield_lines: .fill 2*PLAYFIELD_LINES, 0 playfield_lines: .fill 2*PLAYFIELD_LINES, 0
playfield: .fill PLAYFIELD_LINES*PLAYFIELD_COLS, 0 playfield: .fill PLAYFIELD_LINES*PLAYFIELD_COLS, 0
screen_lines: .fill 2*(PLAYFIELD_LINES+3), 0
PIECES: .word PIECE_T, PIECE_S, PIECE_Z, PIECE_J, PIECE_O, PIECE_I, PIECE_L PIECES: .word PIECE_T, PIECE_S, PIECE_Z, PIECE_J, PIECE_O, PIECE_I, PIECE_L
playfield_lines_idx: .fill PLAYFIELD_LINES+1, 0 playfield_lines_idx: .fill PLAYFIELD_LINES+1, 0
.pc = PLAYFIELD_CHARSET "Inline" .pc = PLAYFIELD_CHARSET "Inline"
@ -995,3 +1170,16 @@ sid_rnd_init: {
.pc = PLAYFIELD_SCREEN_ORIGINAL "Inline" .pc = PLAYFIELD_SCREEN_ORIGINAL "Inline"
.import binary "nes-screen.iscr" .import binary "nes-screen.iscr"
.pc = PLAYFIELD_SPRITES "Inline"
.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
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,8 @@
(label) @14 (label) @14
(label) @27 (label) @18
(label) @19
(label) @30
(label) @31
(label) @begin (label) @begin
(label) @end (label) @end
(byte*) BGCOL (byte*) BGCOL
@ -20,6 +23,7 @@
(byte) BROWN (byte) BROWN
(byte*) CHARGEN (byte*) CHARGEN
(byte*) CIA1_INTERRUPT (byte*) CIA1_INTERRUPT
(const byte*) CIA1_INTERRUPT#0 CIA1_INTERRUPT = ((byte*))(word/dword/signed dword) 56333
(byte*) CIA1_PORT_A (byte*) CIA1_PORT_A
(const byte*) CIA1_PORT_A#0 CIA1_PORT_A = ((byte*))(word/dword/signed dword) 56320 (const byte*) CIA1_PORT_A#0 CIA1_PORT_A = ((byte*))(word/dword/signed dword) 56320
(byte*) CIA1_PORT_A_DDR (byte*) CIA1_PORT_A_DDR
@ -34,6 +38,7 @@
(byte*) CIA2_PORT_B (byte*) CIA2_PORT_B
(byte*) CIA2_PORT_B_DDR (byte*) CIA2_PORT_B_DDR
(byte) CIA_INTERRUPT_CLEAR (byte) CIA_INTERRUPT_CLEAR
(const byte) CIA_INTERRUPT_CLEAR#0 CIA_INTERRUPT_CLEAR = (byte/signed byte/word/signed word/dword/signed dword) 127
(byte) COLLISION_BOTTOM (byte) COLLISION_BOTTOM
(const byte) COLLISION_BOTTOM#0 COLLISION_BOTTOM = (byte/signed byte/word/signed word/dword/signed dword) 2 (const byte) COLLISION_BOTTOM#0 COLLISION_BOTTOM = (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) COLLISION_LEFT (byte) COLLISION_LEFT
@ -59,12 +64,18 @@
(byte) GREY (byte) GREY
(const byte) GREY#0 GREY = (byte/signed byte/word/signed word/dword/signed dword) 12 (const byte) GREY#0 GREY = (byte/signed byte/word/signed word/dword/signed dword) 12
(void()**) HARDWARE_IRQ (void()**) HARDWARE_IRQ
(const void()**) HARDWARE_IRQ#0 HARDWARE_IRQ = ((void()**))(word/dword/signed dword) 65534
(byte) IRQ_COLLISION_BG (byte) IRQ_COLLISION_BG
(byte) IRQ_COLLISION_SPRITE (byte) IRQ_COLLISION_SPRITE
(byte*) IRQ_ENABLE (byte*) IRQ_ENABLE
(const byte*) IRQ_ENABLE#0 IRQ_ENABLE = ((byte*))(word/dword/signed dword) 53274
(byte) IRQ_LIGHTPEN (byte) IRQ_LIGHTPEN
(byte) IRQ_RASTER (byte) IRQ_RASTER
(const byte) IRQ_RASTER#0 IRQ_RASTER = (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) IRQ_RASTER_FIRST
(const byte) IRQ_RASTER_FIRST#0 IRQ_RASTER_FIRST = (byte/signed byte/word/signed word/dword/signed dword) 49
(byte*) IRQ_STATUS (byte*) IRQ_STATUS
(const byte*) IRQ_STATUS#0 IRQ_STATUS = ((byte*))(word/dword/signed dword) 53273
(void()**) KERNEL_IRQ (void()**) KERNEL_IRQ
(byte) KEY_0 (byte) KEY_0
(byte) KEY_1 (byte) KEY_1
@ -185,15 +196,21 @@
(const byte*) PLAYFIELD_SCREEN_ORIGINAL#0 PLAYFIELD_SCREEN_ORIGINAL = ((byte*))(word/signed word/dword/signed dword) 11264 (const byte*) PLAYFIELD_SCREEN_ORIGINAL#0 PLAYFIELD_SCREEN_ORIGINAL = ((byte*))(word/signed word/dword/signed dword) 11264
(byte) PLAYFIELD_SCREEN_ORIGINAL_WIDTH (byte) PLAYFIELD_SCREEN_ORIGINAL_WIDTH
(byte*) PLAYFIELD_SPRITES (byte*) PLAYFIELD_SPRITES
(const byte*) PLAYFIELD_SPRITES#0 PLAYFIELD_SPRITES = ((byte*))(word/signed word/dword/signed dword) 8192
(byte*) PLAYFIELD_SPRITE_PTRS (byte*) PLAYFIELD_SPRITE_PTRS
(const byte*) PLAYFIELD_SPRITE_PTRS#0 PLAYFIELD_SPRITE_PTRS = (const byte*) PLAYFIELD_SCREEN#0+(const word) SPRITE_PTRS#0
(byte*) PROCPORT (byte*) PROCPORT
(const byte*) PROCPORT#0 PROCPORT = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 1
(byte) PROCPORT_BASIC_KERNEL_IO (byte) PROCPORT_BASIC_KERNEL_IO
(byte*) PROCPORT_DDR (byte*) PROCPORT_DDR
(const byte*) PROCPORT_DDR#0 PROCPORT_DDR = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0
(byte) PROCPORT_DDR_MEMORY_MASK (byte) PROCPORT_DDR_MEMORY_MASK
(const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte/signed byte/word/signed word/dword/signed dword) 7
(byte) PROCPORT_KERNEL_IO (byte) PROCPORT_KERNEL_IO
(byte) PROCPORT_RAM_ALL (byte) PROCPORT_RAM_ALL
(byte) PROCPORT_RAM_CHARROM (byte) PROCPORT_RAM_CHARROM
(byte) PROCPORT_RAM_IO (byte) PROCPORT_RAM_IO
(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte/signed byte/word/signed word/dword/signed dword) 53
(byte) PURPLE (byte) PURPLE
(byte*) RASTER (byte*) RASTER
(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266 (const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266
@ -216,19 +233,28 @@
(byte*) SID_VOICE3_OSC (byte*) SID_VOICE3_OSC
(const byte*) SID_VOICE3_OSC#0 SID_VOICE3_OSC = ((byte*))(word/dword/signed dword) 54299 (const byte*) SID_VOICE3_OSC#0 SID_VOICE3_OSC = ((byte*))(word/dword/signed dword) 54299
(byte*) SPRITES_COLS (byte*) SPRITES_COLS
(const byte*) SPRITES_COLS#0 SPRITES_COLS = ((byte*))(word/dword/signed dword) 53287
(byte*) SPRITES_ENABLE (byte*) SPRITES_ENABLE
(const byte*) SPRITES_ENABLE#0 SPRITES_ENABLE = ((byte*))(word/dword/signed dword) 53269
(byte*) SPRITES_EXPAND_X (byte*) SPRITES_EXPAND_X
(const byte*) SPRITES_EXPAND_X#0 SPRITES_EXPAND_X = ((byte*))(word/dword/signed dword) 53277
(byte*) SPRITES_EXPAND_Y (byte*) SPRITES_EXPAND_Y
(const byte*) SPRITES_EXPAND_Y#0 SPRITES_EXPAND_Y = ((byte*))(word/dword/signed dword) 53271
(byte*) SPRITES_MC (byte*) SPRITES_MC
(const byte*) SPRITES_MC#0 SPRITES_MC = ((byte*))(word/dword/signed dword) 53276
(byte*) SPRITES_MC1 (byte*) SPRITES_MC1
(byte*) SPRITES_MC2 (byte*) SPRITES_MC2
(byte*) SPRITES_PRIORITY (byte*) SPRITES_PRIORITY
(byte*) SPRITES_XMSB (byte*) SPRITES_XMSB
(byte*) SPRITES_XPOS (byte*) SPRITES_XPOS
(const byte*) SPRITES_XPOS#0 SPRITES_XPOS = ((byte*))(word/dword/signed dword) 53248
(byte*) SPRITES_YPOS (byte*) SPRITES_YPOS
(const byte*) SPRITES_YPOS#0 SPRITES_YPOS = ((byte*))(word/dword/signed dword) 53249
(word) SPRITE_PTRS (word) SPRITE_PTRS
(const word) SPRITE_PTRS#0 SPRITE_PTRS = (word/signed word/dword/signed dword) 1016
(byte) VIC_BMM (byte) VIC_BMM
(byte*) VIC_CONTROL (byte*) VIC_CONTROL
(const byte*) VIC_CONTROL#0 VIC_CONTROL = ((byte*))(word/dword/signed dword) 53265
(byte*) VIC_CONTROL2 (byte*) VIC_CONTROL2
(byte) VIC_CSEL (byte) VIC_CSEL
(byte) VIC_DEN (byte) VIC_DEN
@ -262,20 +288,20 @@
(byte*) current_piece#12 current_piece#12 zp ZP_WORD:5 10.0 (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#16 current_piece zp ZP_WORD:12 0.5588235294117647
(byte*) current_piece#20 current_piece zp ZP_WORD:12 6.0 (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#72 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#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#74 current_piece#74 zp ZP_WORD:5 4.0
(byte*~) current_piece#75 current_piece zp ZP_WORD:12 4.0 (byte*~) current_piece#75 current_piece#75 zp ZP_WORD:5 4.0
(byte*~) current_piece#76 current_piece#76 zp ZP_WORD:5 4.0
(byte*~) current_piece#77 current_piece zp ZP_WORD:12 4.0
(byte) current_piece_char (byte) current_piece_char
(byte) current_piece_char#11 current_piece_char zp ZP_BYTE:18 1.04 (byte) current_piece_char#11 current_piece_char zp ZP_BYTE:18 1.04
(byte) current_piece_char#13 current_piece_char zp ZP_BYTE:18 0.7272727272727273 (byte) current_piece_char#13 current_piece_char zp ZP_BYTE:18 0.7272727272727273
(byte) current_piece_char#16 current_piece_char zp ZP_BYTE:18 19.96078431372549 (byte) current_piece_char#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#21 current_piece_char zp ZP_BYTE:18 6.0
(byte) current_piece_char#62 current_piece_char#62 zp ZP_BYTE:7 53.368421052631575 (byte) current_piece_char#63 current_piece_char#63 zp ZP_BYTE:7 48.285714285714285
(byte~) current_piece_char#75 current_piece_char#75 zp ZP_BYTE:7 4.0 (byte~) current_piece_char#83 current_piece_char#83 zp ZP_BYTE:7 4.0
(byte~) current_piece_char#76 current_piece_char#76 zp ZP_BYTE:7 22.0 (byte~) current_piece_char#84 current_piece_char#84 zp ZP_BYTE:7 22.0
(byte*) current_piece_gfx (byte*) current_piece_gfx
(byte*) current_piece_gfx#10 current_piece_gfx zp ZP_WORD:15 19.96078431372549 (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#14 current_piece_gfx zp ZP_WORD:15 0.2962962962962963
@ -283,25 +309,25 @@
(byte*) current_piece_gfx#17 current_piece_gfx zp ZP_WORD:15 0.6666666666666666 (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#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#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#53 current_piece_gfx#53 zp ZP_WORD:5 48.285714285714285
(byte*~) current_piece_gfx#87 current_piece_gfx#87 zp ZP_WORD:5 2.0 (byte*~) current_piece_gfx#95 current_piece_gfx#95 zp ZP_WORD:5 2.0
(byte*~) current_piece_gfx#88 current_piece_gfx#88 zp ZP_WORD:5 11.0 (byte*~) current_piece_gfx#96 current_piece_gfx#96 zp ZP_WORD:5 11.0
(byte) current_xpos (byte) current_xpos
(byte~) current_xpos#104 current_xpos#104 zp ZP_BYTE:4 7.333333333333333
(byte) current_xpos#11 current_xpos zp ZP_BYTE:17 2.313725490196078 (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#16 current_xpos zp ZP_BYTE:17 0.72
(byte) current_xpos#20 current_xpos zp ZP_BYTE:17 0.871794871794872 (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#3 current_xpos zp ZP_BYTE:17 4.0
(byte) current_xpos#34 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#48 current_xpos#48 zp ZP_BYTE:4 5.333333333333333
(byte) current_xpos#5 current_xpos zp ZP_BYTE:17 4.0 (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
(byte) current_ypos#1 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#10 reg byte x 13.0
(byte) current_ypos#14 current_ypos zp ZP_BYTE:2 0.48484848484848475 (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#22 current_ypos zp ZP_BYTE:2 0.5588235294117647
(byte) current_ypos#30 current_ypos zp ZP_BYTE:2 4.0 (byte) current_ypos#30 current_ypos zp ZP_BYTE:2 4.0
(byte~) current_ypos#71 reg byte x 5.5 (byte~) current_ypos#78 reg byte x 5.5
(void()) fill((byte*) fill::start , (word) fill::size , (byte) fill::val) (void()) fill((byte*) fill::start , (word) fill::size , (byte) fill::val)
(label) fill::@1 (label) fill::@1
(label) fill::@return (label) fill::@return
@ -314,6 +340,51 @@
(const word) fill::size#0 size = (word/signed word/dword/signed dword) 1000 (const word) fill::size#0 size = (word/signed word/dword/signed dword) 1000
(byte*) fill::start (byte*) fill::start
(byte) fill::val (byte) fill::val
interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte~) irq::$3 reg byte a 4.0
(label) irq::@1
(label) irq::@2
(label) irq::@3
(label) irq::@4
(label) irq::@5
(label) irq::@6
(label) irq::@8
(label) irq::@9
(label) irq::@return
(byte) irq::ptr
(byte) irq::ptr#0 reg byte a 3.0
(byte) irq::ptr#1 reg byte x 2.6666666666666665
(byte) irq::ptr#2 reg byte x 4.0
(byte) irq::raster_next
(byte) irq::raster_next#0 reg byte x 2.6666666666666665
(byte) irq::raster_next#1 reg byte x 4.0
(byte) irq::raster_next#2 reg byte x 6.0
(label) irq::toSpritePtr2
(word~) irq::toSpritePtr2_$0
(word~) irq::toSpritePtr2_$1
(byte~) irq::toSpritePtr2_$2
(byte) irq::toSpritePtr2_return
(const byte) irq::toSpritePtr2_return#0 toSpritePtr2_return = ((byte))((word))(const byte*) PLAYFIELD_SPRITES#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(byte*) irq::toSpritePtr2_sprite
(byte) irq::ypos
(byte) irq::ypos#0 reg byte a 2.5
(byte) irq_cnt
(byte) irq_cnt#0 irq_cnt zp ZP_BYTE:23 0.2857142857142857
(byte) irq_cnt#1 irq_cnt zp ZP_BYTE:23 4.0
(byte) irq_cnt#13 irq_cnt zp ZP_BYTE:23 20.0
(byte) irq_raster_next
(byte) irq_raster_next#0 irq_raster_next zp ZP_BYTE:20 0.25
(byte) irq_raster_next#1 irq_raster_next zp ZP_BYTE:20 1.0
(byte) irq_raster_next#12 irq_raster_next zp ZP_BYTE:20 6.0
(byte) irq_raster_next#2 irq_raster_next zp ZP_BYTE:20 1.3333333333333333
(byte) irq_sprite_ptr
(byte) irq_sprite_ptr#0 irq_sprite_ptr zp ZP_BYTE:22 0.3333333333333333
(byte) irq_sprite_ptr#1 irq_sprite_ptr zp ZP_BYTE:22 20.0
(byte) irq_sprite_ptr#2 irq_sprite_ptr zp ZP_BYTE:22 20.0
(byte) irq_sprite_ypos
(byte) irq_sprite_ypos#0 irq_sprite_ypos zp ZP_BYTE:21 1.0
(byte) irq_sprite_ypos#1 irq_sprite_ypos zp ZP_BYTE:21 20.0
(byte) irq_sprite_ypos#2 irq_sprite_ypos zp ZP_BYTE:21 20.0
(byte[]) keyboard_char_keycodes (byte[]) keyboard_char_keycodes
(byte()) keyboard_event_get() (byte()) keyboard_event_get()
(label) keyboard_event_get::@3 (label) keyboard_event_get::@3
@ -419,9 +490,9 @@
(byte[8]) keyboard_scan_values (byte[8]) keyboard_scan_values
(const byte[8]) keyboard_scan_values#0 keyboard_scan_values = { fill( 8, 0) } (const byte[8]) keyboard_scan_values#0 keyboard_scan_values = { fill( 8, 0) }
(void()) main() (void()) main()
(byte~) main::$10 reg byte a 22.0
(byte~) main::$11 reg byte a 22.0
(byte~) main::$12 reg byte a 22.0 (byte~) main::$12 reg byte a 22.0
(byte~) main::$13 reg byte a 22.0
(byte~) main::$14 reg byte a 22.0
(label) main::@1 (label) main::@1
(label) main::@10 (label) main::@10
(label) main::@19 (label) main::@19
@ -430,20 +501,22 @@
(label) main::@23 (label) main::@23
(label) main::@24 (label) main::@24
(label) main::@25 (label) main::@25
(label) main::@26
(label) main::@27 (label) main::@27
(label) main::@28
(label) main::@29 (label) main::@29
(label) main::@30 (label) main::@30
(label) main::@31 (label) main::@31
(label) main::@32 (label) main::@32
(label) main::@33
(label) main::@34
(label) main::@4 (label) main::@4
(label) main::@7 (label) main::@7
(label) main::@9 (label) main::@9
(byte) main::key_event (byte) main::key_event
(byte) main::key_event#0 key_event zp ZP_BYTE:20 4.0 (byte) main::key_event#0 key_event zp ZP_BYTE:24 4.0
(byte) main::render (byte) main::render
(byte) main::render#1 render zp ZP_BYTE:21 4.4 (byte) main::render#1 render zp ZP_BYTE:25 4.4
(byte) main::render#2 render zp ZP_BYTE:21 4.4 (byte) main::render#2 render zp ZP_BYTE:25 4.4
(byte) main::render#3 reg byte a 22.0 (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((byte) play_collision::xpos , (byte) play_collision::ypos , (byte) play_collision::orientation)
(byte~) play_collision::$7 reg byte a 2002.0 (byte~) play_collision::$7 reg byte a 2002.0
@ -466,7 +539,7 @@
(byte) play_collision::col#2 col zp ZP_BYTE:11 638.25 (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::col#9 col zp ZP_BYTE:11 202.0
(byte) play_collision::i (byte) play_collision::i
(byte) play_collision::i#1 i zp ZP_BYTE:24 161.76923076923077 (byte) play_collision::i#1 i zp ZP_BYTE:28 161.76923076923077
(byte~) play_collision::i#11 i#11 zp ZP_BYTE:10 202.0 (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#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#2 i#2 zp ZP_BYTE:10 1552.0
@ -483,7 +556,7 @@
(byte*) play_collision::piece_gfx (byte*) play_collision::piece_gfx
(byte*) play_collision::piece_gfx#0 piece_gfx zp ZP_WORD:5 47.76190476190476 (byte*) play_collision::piece_gfx#0 piece_gfx zp ZP_WORD:5 47.76190476190476
(byte*) play_collision::playfield_line (byte*) play_collision::playfield_line
(byte*) play_collision::playfield_line#0 playfield_line zp ZP_WORD:22 78.71428571428571 (byte*) play_collision::playfield_line#0 playfield_line zp ZP_WORD:26 78.71428571428571
(byte) play_collision::return (byte) play_collision::return
(byte) play_collision::return#0 reg byte a 4.0 (byte) play_collision::return#0 reg byte a 4.0
(byte) play_collision::return#1 reg byte a 4.0 (byte) play_collision::return#1 reg byte a 4.0
@ -670,12 +743,14 @@
(const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 playfield_lines_idx = { fill( PLAYFIELD_LINES#0+1, 0) } (const byte[PLAYFIELD_LINES#0+1]) playfield_lines_idx#0 playfield_lines_idx = { fill( PLAYFIELD_LINES#0+1, 0) }
(void()) render_current() (void()) render_current()
(label) render_current::@1 (label) render_current::@1
(label) render_current::@10
(label) render_current::@13
(label) render_current::@2 (label) render_current::@2
(label) render_current::@3 (label) render_current::@3
(label) render_current::@4 (label) render_current::@4
(label) render_current::@6 (label) render_current::@5
(label) render_current::@7 (label) render_current::@7
(label) render_current::@8 (label) render_current::@9
(label) render_current::@return (label) render_current::@return
(byte) render_current::c (byte) render_current::c
(byte) render_current::c#1 reg byte x 1501.5 (byte) render_current::c#1 reg byte x 1501.5
@ -683,15 +758,16 @@
(byte) render_current::current_cell (byte) render_current::current_cell
(byte) render_current::current_cell#0 reg byte a 1001.0 (byte) render_current::current_cell#0 reg byte a 1001.0
(byte) render_current::i (byte) render_current::i
(byte) render_current::i#1 i zp ZP_BYTE:10 429.0 (byte) render_current::i#1 i zp ZP_BYTE:10 202.0
(byte) render_current::i#2 i zp ZP_BYTE:10 1552.0 (byte) render_current::i#10 i zp ZP_BYTE:10 429.0
(byte) render_current::i#4 i zp ZP_BYTE:10 75.75 (byte) render_current::i#3 i zp ZP_BYTE:10 60.599999999999994
(byte) render_current::i#4 i zp ZP_BYTE:10 1552.0
(byte) render_current::i#8 i zp ZP_BYTE:10 300.75 (byte) render_current::i#8 i zp ZP_BYTE:10 300.75
(byte) render_current::l (byte) render_current::l
(byte) render_current::l#1 l zp ZP_BYTE:9 151.5 (byte) render_current::l#1 l zp ZP_BYTE:9 151.5
(byte) render_current::l#3 l zp ZP_BYTE:9 13.466666666666667 (byte) render_current::l#4 l zp ZP_BYTE:9 11.882352941176471
(byte*) render_current::screen_line (byte*) render_current::screen_line
(byte*) render_current::screen_line#0 screen_line zp ZP_WORD:22 100.18181818181819 (byte*) render_current::screen_line#0 screen_line zp ZP_WORD:26 100.18181818181819
(byte) render_current::xpos (byte) render_current::xpos
(byte) render_current::xpos#0 xpos zp ZP_BYTE:11 202.0 (byte) render_current::xpos#0 xpos zp ZP_BYTE:11 202.0
(byte) render_current::xpos#1 xpos zp ZP_BYTE:11 667.3333333333334 (byte) render_current::xpos#1 xpos zp ZP_BYTE:11 667.3333333333334
@ -699,10 +775,10 @@
(byte) render_current::ypos2 (byte) render_current::ypos2
(byte) render_current::ypos2#0 ypos2 zp ZP_BYTE:8 4.0 (byte) render_current::ypos2#0 ypos2 zp ZP_BYTE:8 4.0
(byte) render_current::ypos2#1 ypos2 zp ZP_BYTE:8 67.33333333333333 (byte) render_current::ypos2#1 ypos2 zp ZP_BYTE:8 67.33333333333333
(byte) render_current::ypos2#2 ypos2 zp ZP_BYTE:8 29.000000000000004 (byte) render_current::ypos2#2 ypos2 zp ZP_BYTE:8 31.6875
(void()) render_init() (void()) render_init()
(byte~) render_init::$10 reg byte a 22.0 (byte~) render_init::$11 reg byte a 22.0
(byte*~) render_init::$15 $15 zp ZP_WORD:12 202.0 (byte*~) render_init::$18 $18 zp ZP_WORD:12 202.0
(label) render_init::@1 (label) render_init::@1
(label) render_init::@2 (label) render_init::@2
(label) render_init::@3 (label) render_init::@3
@ -752,7 +828,7 @@
(byte) render_init::vicSelectGfxBank1_toDd001_return (byte) render_init::vicSelectGfxBank1_toDd001_return
(const byte) render_init::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte/signed byte/word/signed word/dword/signed dword) 3^>((word))(const byte*) PLAYFIELD_SCREEN#0>>(byte/signed byte/word/signed word/dword/signed dword) 6 (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte/signed byte/word/signed word/dword/signed dword) 3^>((word))(const byte*) PLAYFIELD_SCREEN#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(void()) render_playfield() (void()) render_playfield()
(byte~) render_playfield::$1 reg byte a 202.0 (byte~) render_playfield::$2 reg byte a 202.0
(label) render_playfield::@1 (label) render_playfield::@1
(label) render_playfield::@2 (label) render_playfield::@2
(label) render_playfield::@3 (label) render_playfield::@3
@ -767,10 +843,10 @@
(byte) render_playfield::l (byte) render_playfield::l
(byte) render_playfield::l#1 l zp ZP_BYTE:4 151.5 (byte) render_playfield::l#1 l zp ZP_BYTE:4 151.5
(byte) render_playfield::l#2 l zp ZP_BYTE:4 33.666666666666664 (byte) render_playfield::l#2 l zp ZP_BYTE:4 33.666666666666664
(byte*) render_playfield::line (byte*) render_playfield::screen_line
(byte*) render_playfield::line#0 line zp ZP_WORD:5 202.0 (byte*) render_playfield::screen_line#0 screen_line zp ZP_WORD:5 202.0
(byte*) render_playfield::line#1 line zp ZP_WORD:5 500.5 (byte*) render_playfield::screen_line#1 screen_line zp ZP_WORD:5 500.5
(byte*) render_playfield::line#2 line zp ZP_WORD:5 1552.0 (byte*) render_playfield::screen_line#2 screen_line zp ZP_WORD:5 1552.0
(void()) render_screen_original((byte*) render_screen_original::screen) (void()) render_screen_original((byte*) render_screen_original::screen)
(byte/signed word/word/dword/signed dword~) render_screen_original::$3 reg byte a 202.0 (byte/signed word/word/dword/signed dword~) render_screen_original::$3 reg byte a 202.0
(label) render_screen_original::@1 (label) render_screen_original::@1
@ -803,8 +879,8 @@
(byte) render_screen_original::y (byte) render_screen_original::y
(byte) render_screen_original::y#1 y zp ZP_BYTE:2 16.5 (byte) render_screen_original::y#1 y zp ZP_BYTE:2 16.5
(byte) render_screen_original::y#6 y zp ZP_BYTE:2 1.2222222222222223 (byte) render_screen_original::y#6 y zp ZP_BYTE:2 1.2222222222222223
(byte*[PLAYFIELD_LINES#0+3]) screen_lines (byte*[PLAYFIELD_LINES#0]) screen_lines
(const byte*[PLAYFIELD_LINES#0+3]) screen_lines#0 screen_lines = { fill( PLAYFIELD_LINES#0+3, 0) } (const byte*[PLAYFIELD_LINES#0]) screen_lines#0 screen_lines = { fill( PLAYFIELD_LINES#0, 0) }
(byte()) sid_rnd() (byte()) sid_rnd()
(label) sid_rnd::@return (label) sid_rnd::@return
(byte) sid_rnd::return (byte) sid_rnd::return
@ -812,17 +888,37 @@
(byte) sid_rnd::return#2 reg byte a 202.0 (byte) sid_rnd::return#2 reg byte a 202.0
(void()) sid_rnd_init() (void()) sid_rnd_init()
(label) sid_rnd_init::@return (label) sid_rnd_init::@return
(void()) sprites_init()
(label) sprites_init::@1
(label) sprites_init::@return
(byte) sprites_init::s
(byte) sprites_init::s#1 reg byte x 16.5
(byte) sprites_init::s#2 reg byte x 8.8
(byte) sprites_init::s2
(byte) sprites_init::s2#0 reg byte a 22.0
(byte) sprites_init::xpos
(byte) sprites_init::xpos#1 xpos zp ZP_BYTE:2 7.333333333333333
(byte) sprites_init::xpos#2 xpos zp ZP_BYTE:2 8.25
(void()) sprites_irq_init()
(label) sprites_irq_init::@return
(label) toSpritePtr1
(word~) toSpritePtr1_$0
(word~) toSpritePtr1_$1
(byte~) toSpritePtr1_$2
(byte) toSpritePtr1_return
(const byte) toSpritePtr1_return#0 toSpritePtr1_return = ((byte))((word))(const byte*) PLAYFIELD_SPRITES#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(byte*) toSpritePtr1_sprite
zp ZP_BYTE:2 [ current_ypos#22 current_ypos#14 current_ypos#30 current_ypos#1 play_lock_current::ypos2#2 play_lock_current::ypos2#0 play_lock_current::ypos2#1 play_remove_lines::y#8 play_remove_lines::y#1 play_init::idx#2 play_init::idx#1 render_init::l#4 render_init::l#1 render_screen_original::y#6 render_screen_original::y#1 play_spawn_current::$3 ] zp ZP_BYTE: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 sprites_init::xpos#2 sprites_init::xpos#1 render_init::l#4 render_init::l#1 render_screen_original::y#6 render_screen_original::y#1 play_spawn_current::$3 ]
zp ZP_BYTE:3 [ current_movedown_counter#12 current_movedown_counter#10 current_movedown_counter#1 play_remove_lines::x#2 play_remove_lines::x#1 play_lock_current::l#6 play_lock_current::l#1 ] 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 ] reg byte x [ current_ypos#10 current_ypos#78 ]
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_BYTE:4 [ current_xpos#48 current_xpos#104 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 render_screen_original::orig#2 render_screen_original::orig#4 render_screen_original::orig#1 fill::addr#2 fill::addr#1 play_lock_current::playfield_line#0 ] zp ZP_WORD:5 [ 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#4 render_screen_original::orig#1 fill::addr#2 fill::addr#1 play_lock_current::playfield_line#0 ]
zp ZP_BYTE:7 [ current_piece_char#62 current_piece_char#75 current_piece_char#76 render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 play_collision::xpos#5 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_lock_current::col#2 play_lock_current::col#0 play_lock_current::col#1 keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 play_remove_lines::c#0 keyboard_event_pressed::row_bits#0 ] zp ZP_BYTE:7 [ 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_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: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:9 [ render_current::l#4 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:10 [ 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 ]
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 ] zp ZP_BYTE:11 [ render_current::xpos#2 render_current::xpos#0 render_current::xpos#1 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_current::c#2 render_current::c#1 ]
reg byte x [ render_playfield::c#2 render_playfield::c#1 ] reg byte x [ render_playfield::c#2 render_playfield::c#1 ]
reg byte a [ play_move_rotate::return#1 ] reg byte a [ play_move_rotate::return#1 ]
@ -832,7 +928,7 @@ reg byte x [ play_collision::c#2 play_collision::c#1 ]
reg byte a [ play_collision::return#14 ] reg byte a [ play_collision::return#14 ]
reg byte a [ play_move_leftright::return#1 ] 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 ] reg byte x [ play_move_down::movedown#6 play_move_down::movedown#3 play_move_down::movedown#7 play_move_down::movedown#2 play_move_down::movedown#10 ]
zp ZP_WORD:12 [ current_piece#20 current_piece#75 current_piece#16 current_piece#10 current_piece#70 render_screen_original::screen#6 render_screen_original::screen#5 render_screen_original::screen#4 render_screen_original::screen#7 render_screen_original::screen#3 render_screen_original::screen#1 render_screen_original::screen#2 render_init::$15 ] zp ZP_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#3 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_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_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:17 [ current_xpos#34 current_xpos#11 current_xpos#20 current_xpos#5 current_xpos#16 current_xpos#3 ]
@ -847,30 +943,36 @@ reg byte x [ keyboard_modifiers#13 keyboard_modifiers#4 keyboard_modifiers#12 ke
reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] 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 ] 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 [ play_init::j#2 play_init::j#1 ] reg byte x [ play_init::j#2 play_init::j#1 ]
reg byte x [ sprites_init::s#2 sprites_init::s#1 ]
reg byte x [ render_init::i#2 render_init::i#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 [ render_init::c#2 render_init::c#1 ]
reg byte x [ render_screen_original::x#6 render_screen_original::x#5 render_screen_original::x#4 render_screen_original::x#1 render_screen_original::x#2 render_screen_original::x#3 ] reg byte x [ render_screen_original::x#6 render_screen_original::x#5 render_screen_original::x#4 render_screen_original::x#1 render_screen_original::x#2 render_screen_original::x#3 ]
zp ZP_BYTE:20 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 irq_raster_next#0 ]
reg byte x [ irq::raster_next#2 irq::raster_next#0 irq::raster_next#1 ]
zp ZP_BYTE:21 [ irq_sprite_ypos#0 irq_sprite_ypos#2 irq_sprite_ypos#1 ]
zp ZP_BYTE:22 [ irq_sprite_ptr#0 irq_sprite_ptr#2 irq_sprite_ptr#1 ]
zp ZP_BYTE:23 [ irq_cnt#0 irq_cnt#1 irq_cnt#13 ]
reg byte a [ keyboard_event_get::return#3 ] reg byte a [ keyboard_event_get::return#3 ]
zp ZP_BYTE:20 [ main::key_event#0 ] zp ZP_BYTE:24 [ main::key_event#0 ]
reg byte a [ play_move_down::key_event#0 ] reg byte a [ play_move_down::key_event#0 ]
reg byte a [ play_move_down::return#3 ] reg byte a [ play_move_down::return#3 ]
reg byte a [ main::$10 ] reg byte a [ main::$12 ]
zp ZP_BYTE:21 [ main::render#1 main::render#2 ] zp ZP_BYTE:25 [ main::render#1 main::render#2 ]
reg byte a [ play_move_leftright::key_event#0 ] reg byte a [ play_move_leftright::key_event#0 ]
reg byte a [ play_move_leftright::return#4 ] reg byte a [ play_move_leftright::return#4 ]
reg byte a [ main::$11 ] reg byte a [ main::$13 ]
reg byte a [ play_move_rotate::key_event#0 ] reg byte a [ play_move_rotate::key_event#0 ]
reg byte a [ play_move_rotate::return#4 ] reg byte a [ play_move_rotate::return#4 ]
reg byte a [ main::$12 ] reg byte a [ main::$14 ]
reg byte a [ main::render#3 ] reg byte a [ main::render#3 ]
zp ZP_WORD:22 [ render_current::screen_line#0 play_collision::playfield_line#0 ] zp ZP_WORD:26 [ render_current::screen_line#0 play_collision::playfield_line#0 ]
reg byte a [ render_current::current_cell#0 ] reg byte a [ render_current::current_cell#0 ]
reg byte a [ render_playfield::$1 ] reg byte a [ render_playfield::$2 ]
reg byte a [ play_move_rotate::$2 ] reg byte a [ play_move_rotate::$2 ]
reg byte a [ play_collision::return#13 ] reg byte a [ play_collision::return#13 ]
reg byte a [ play_move_rotate::$6 ] reg byte a [ play_move_rotate::$6 ]
reg byte a [ play_move_rotate::$4 ] reg byte a [ play_move_rotate::$4 ]
zp ZP_BYTE:24 [ play_collision::i#1 ] zp ZP_BYTE:28 [ play_collision::i#1 ]
reg byte a [ play_collision::$7 ] reg byte a [ play_collision::$7 ]
reg byte a [ play_collision::return#12 ] reg byte a [ play_collision::return#12 ]
reg byte a [ play_move_leftright::$4 ] reg byte a [ play_move_leftright::$4 ]
@ -903,5 +1005,11 @@ reg byte a [ keyboard_event_scan::event_type#0 ]
reg byte a [ keyboard_event_scan::$11 ] reg byte a [ keyboard_event_scan::$11 ]
reg byte a [ keyboard_matrix_read::return#0 ] reg byte a [ keyboard_matrix_read::return#0 ]
reg byte a [ play_init::$1 ] reg byte a [ play_init::$1 ]
reg byte a [ render_init::$10 ] reg byte a [ sprites_init::s2#0 ]
reg byte a [ render_init::$11 ]
reg byte a [ render_screen_original::$3 ] reg byte a [ render_screen_original::$3 ]
reg byte a [ irq::ypos#0 ]
reg byte a [ irq::ptr#0 ]
reg byte x [ irq::ptr#1 ]
reg byte x [ irq::ptr#2 ]
reg byte a [ irq::$3 ]