ds: missing now cycle counted more or less

This commit is contained in:
Vince Weaver 2019-11-14 22:45:51 -05:00
parent b9c2ee68a5
commit 3c833a769b
3 changed files with 19 additions and 6 deletions

View File

@ -46,6 +46,7 @@ k_low: .byte $28 ; ysize=48
.byte $01,$01, $A4,$00, $50, $A3,$55, $A0,$1E,$00, $01,$01, $A4,$00
.byte $55,$55, $05, $AB,$00
.byte $A1
; cycles=1970
k_high: .byte $28 ; ysize=48
.byte $A0,$1A,$00, $C0, $A7,$CC, $22,$22, $CC,$CC, $C2, $2C
.byte $A0,$19,$00, $20, $CC,$CC, $A0,$01,$AC, $A0,$01,$AA, $0A,$0A, $A0,$01,$AA
@ -110,3 +111,4 @@ k_high: .byte $28 ; ysize=48
.byte $A0,$1D,$00, $C2,$C2, $CC,$CC, $00,$00, $90, $A3,$99, $A0,$1E,$00
.byte $C2,$C2, $CC, $0C, $00,$00, $99,$99, $09, $AB,$00
.byte $A1
; cycles=2135

View File

@ -74,12 +74,12 @@ missing_intro:
lda #>k_low
sta GBASH
lda #$c ; load to $c00
jsr load_rle_gr
jsr load_rle_gr ; 2000
lda #4
sta DRAW_PAGE
jsr gr_copy_to_current ; copy to page1
jsr gr_copy_to_current ; copy to page1 ; 9292
; GR part
bit PAGE1
@ -89,6 +89,7 @@ missing_intro:
; jsr wait_until_keypressed
jsr play_frame_compressed
;=============================
; Load graphic page1
@ -100,12 +101,12 @@ missing_intro:
lda #$c
jsr load_rle_gr
jsr load_rle_gr ; 2000
lda #0
sta DRAW_PAGE
jsr gr_copy_to_current
jsr gr_copy_to_current ; 9292
; GR part
bit PAGE0
@ -113,6 +114,8 @@ missing_intro:
; jsr wait_until_keypressed
jsr play_frame_compressed
;==============================
; setup graphics for vapor lock
;==============================
@ -297,5 +300,3 @@ bar_colors_bottom:
.byte $00,$08,$0d,$0f,$0d,$80,$00,$00
.byte $00,$0c,$0e,$0f,$0e,$c0,$00,$00
.byte $00,$09,$0d,$0f,$0d,$90,$00,$00,$00,$00,$00

View File

@ -14,6 +14,7 @@
/* Converts a PNG to RLE compressed data */
/*****************************************/
static int cycles=0;
static int print_run(int count, int out_type, int run, int last) {
@ -47,6 +48,7 @@ static int print_run(int count, int out_type, int run, int last) {
printf("%c%c%c",0xa0,1,last);
}
size+=3;
cycles+=38+7+ 27+ 27*1 +5+2;
}
else {
if (out_type==OUTPUT_C) {
@ -59,6 +61,7 @@ static int print_run(int count, int out_type, int run, int last) {
printf("%c",last);
}
size++;
cycles+=38+6+ 19*1 +5+2;
}
}
if (run==2) {
@ -73,6 +76,7 @@ static int print_run(int count, int out_type, int run, int last) {
printf("%c%c%c",0xa0,2,last);
}
size+=3;
cycles+=38+7+ 27+ 27*2 +5+2;
}
else {
@ -87,6 +91,8 @@ static int print_run(int count, int out_type, int run, int last) {
printf("%c",last);
}
size+=2;
cycles+=38+7+ 27+ 27*1 +5+2;
cycles+=38+7+ 27+ 27*1 +5+2;
}
}
@ -102,6 +108,7 @@ static int print_run(int count, int out_type, int run, int last) {
printf("%c",last);
}
size+=2;
cycles+=38+7+ 27+ 27*run +5+2;
}
if (run>=16) {
@ -117,6 +124,8 @@ static int print_run(int count, int out_type, int run, int last) {
printf("%c",last);
}
size+=3;
cycles=38+7+24+27+ 27*run +5+2;
}
return size;
@ -200,6 +209,7 @@ int rle_smaller(int out_type, char *varname,
fprintf(stdout,"\t};\n");
} else if (out_type==OUTPUT_ASM) {
fprintf(stdout,"\n\t.byte $A1\n");
fprintf(stdout,"; cycles=%d\n",cycles);
} else {
fprintf(stdout,"%c",0xA1);
}