mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-09-29 03:56:15 +00:00
Improved bigscroll by inlining screen lines in array assignments.
This commit is contained in:
parent
30690b6306
commit
267d006752
@ -71,23 +71,15 @@ byte next_char() {
|
||||
|
||||
void scroll_hard() {
|
||||
// Hard scroll
|
||||
byte* line0 = SCREEN+40*0;
|
||||
byte* line1 = SCREEN+40*1;
|
||||
byte* line2 = SCREEN+40*2;
|
||||
byte* line3 = SCREEN+40*3;
|
||||
byte* line4 = SCREEN+40*4;
|
||||
byte* line5 = SCREEN+40*5;
|
||||
byte* line6 = SCREEN+40*6;
|
||||
byte* line7 = SCREEN+40*7;
|
||||
for(byte i=0;i!=39;i++) {
|
||||
line0[i]=line0[i+1];
|
||||
line1[i]=line1[i+1];
|
||||
line2[i]=line2[i+1];
|
||||
line3[i]=line3[i+1];
|
||||
line4[i]=line4[i+1];
|
||||
line5[i]=line5[i+1];
|
||||
line6[i]=line6[i+1];
|
||||
line7[i]=line7[i+1];
|
||||
(SCREEN+40*0)[i]=(SCREEN+40*0)[i+1];
|
||||
(SCREEN+40*1)[i]=(SCREEN+40*1)[i+1];
|
||||
(SCREEN+40*2)[i]=(SCREEN+40*2)[i+1];
|
||||
(SCREEN+40*3)[i]=(SCREEN+40*3)[i+1];
|
||||
(SCREEN+40*4)[i]=(SCREEN+40*4)[i+1];
|
||||
(SCREEN+40*5)[i]=(SCREEN+40*5)[i+1];
|
||||
(SCREEN+40*6)[i]=(SCREEN+40*6)[i+1];
|
||||
(SCREEN+40*7)[i]=(SCREEN+40*7)[i+1];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,32 +113,24 @@ scroll_bit: {
|
||||
rts
|
||||
}
|
||||
scroll_hard: {
|
||||
.const line0 = SCREEN+$28*0
|
||||
.const line1 = SCREEN+$28*1
|
||||
.const line2 = SCREEN+$28*2
|
||||
.const line3 = SCREEN+$28*3
|
||||
.const line4 = SCREEN+$28*4
|
||||
.const line5 = SCREEN+$28*5
|
||||
.const line6 = SCREEN+$28*6
|
||||
.const line7 = SCREEN+$28*7
|
||||
ldx #0
|
||||
b1:
|
||||
lda line0+1,x
|
||||
sta line0,x
|
||||
lda line1+1,x
|
||||
sta line1,x
|
||||
lda line2+1,x
|
||||
sta line2,x
|
||||
lda line3+1,x
|
||||
sta line3,x
|
||||
lda line4+1,x
|
||||
sta line4,x
|
||||
lda line5+1,x
|
||||
sta line5,x
|
||||
lda line6+1,x
|
||||
sta line6,x
|
||||
lda line7+1,x
|
||||
sta line7,x
|
||||
lda SCREEN+$28*0+1,x
|
||||
sta SCREEN+$28*0,x
|
||||
lda SCREEN+$28*1+1,x
|
||||
sta SCREEN+$28*1,x
|
||||
lda SCREEN+$28*2+1,x
|
||||
sta SCREEN+$28*2,x
|
||||
lda SCREEN+$28*3+1,x
|
||||
sta SCREEN+$28*3,x
|
||||
lda SCREEN+$28*4+1,x
|
||||
sta SCREEN+$28*4,x
|
||||
lda SCREEN+$28*5+1,x
|
||||
sta SCREEN+$28*5,x
|
||||
lda SCREEN+$28*6+1,x
|
||||
sta SCREEN+$28*6,x
|
||||
lda SCREEN+$28*7+1,x
|
||||
sta SCREEN+$28*7,x
|
||||
inx
|
||||
cpx #$27
|
||||
bne b1
|
||||
|
@ -104,14 +104,14 @@ scroll_hard: scope:[scroll_hard] from scroll_bit::@1
|
||||
to:scroll_hard::@1
|
||||
scroll_hard::@1: scope:[scroll_hard] from scroll_hard scroll_hard::@1
|
||||
[48] (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte/signed byte/word/signed word) 0 scroll_hard::@1/(byte) scroll_hard::i#1 ) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[49] *((const byte*) scroll_hard::line0#0 + (byte) scroll_hard::i#2) ← *((const byte*) scroll_hard::line0#0+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[50] *((const byte*) scroll_hard::line1#0 + (byte) scroll_hard::i#2) ← *((const byte*) scroll_hard::line1#0+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[51] *((const byte*) scroll_hard::line2#0 + (byte) scroll_hard::i#2) ← *((const byte*) scroll_hard::line2#0+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[52] *((const byte*) scroll_hard::line3#0 + (byte) scroll_hard::i#2) ← *((const byte*) scroll_hard::line3#0+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[53] *((const byte*) scroll_hard::line4#0 + (byte) scroll_hard::i#2) ← *((const byte*) scroll_hard::line4#0+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[54] *((const byte*) scroll_hard::line5#0 + (byte) scroll_hard::i#2) ← *((const byte*) scroll_hard::line5#0+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[55] *((const byte*) scroll_hard::line6#0 + (byte) scroll_hard::i#2) ← *((const byte*) scroll_hard::line6#0+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[56] *((const byte*) scroll_hard::line7#0 + (byte) scroll_hard::i#2) ← *((const byte*) scroll_hard::line7#0+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[49] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 0 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 0+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[50] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 1+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[51] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 2 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 2+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[52] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 3 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 3+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[53] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 4 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 4+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[54] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 5 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 5+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[55] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 6 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 6+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[56] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 7 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 7+(byte/signed byte/word/signed word) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] )
|
||||
[57] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 [ scroll_hard::i#1 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#1 ] )
|
||||
[58] if((byte) scroll_hard::i#1!=(byte/signed byte/word/signed word) 39) goto scroll_hard::@1 [ scroll_hard::i#1 ] ( main:2::scroll_soft:10::scroll_bit:17::scroll_hard:31 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#1 ] )
|
||||
to:scroll_hard::@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -91,22 +91,6 @@
|
||||
(byte) scroll_hard::i
|
||||
(byte) scroll_hard::i#1 reg byte x 151.5
|
||||
(byte) scroll_hard::i#2 reg byte x 202.00000000000006
|
||||
(byte*) scroll_hard::line0
|
||||
(const byte*) scroll_hard::line0#0 line0 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 0
|
||||
(byte*) scroll_hard::line1
|
||||
(const byte*) scroll_hard::line1#0 line1 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 1
|
||||
(byte*) scroll_hard::line2
|
||||
(const byte*) scroll_hard::line2#0 line2 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 2
|
||||
(byte*) scroll_hard::line3
|
||||
(const byte*) scroll_hard::line3#0 line3 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 3
|
||||
(byte*) scroll_hard::line4
|
||||
(const byte*) scroll_hard::line4#0 line4 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 4
|
||||
(byte*) scroll_hard::line5
|
||||
(const byte*) scroll_hard::line5#0 line5 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 5
|
||||
(byte*) scroll_hard::line6
|
||||
(const byte*) scroll_hard::line6#0 line6 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 6
|
||||
(byte*) scroll_hard::line7
|
||||
(const byte*) scroll_hard::line7#0 line7 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 7
|
||||
(void()) scroll_soft()
|
||||
(label) scroll_soft::@1
|
||||
(label) scroll_soft::@2
|
||||
|
Loading…
Reference in New Issue
Block a user