diff --git a/c64/basic/basic_cold_start.s b/c64/basic/basic_cold_start.s index cab62ebd..07a0b90b 100644 --- a/c64/basic/basic_cold_start.s +++ b/c64/basic/basic_cold_start.s @@ -7,11 +7,30 @@ basic_cold_start: ;; Print start up message ;; Print coloured part of the message - ldy #>startup_message - lda #startup_message + ;; lda # + +#include "basic005.c" + +unsigned char bytes[65536]; +int len=0; + +unsigned char colour_codes[16]={ + 144,5,28,159,156,30,31,158, + 129,149,150,151,152,153,154,155 +}; + +int main(int argc,char **argv) +{ + int reverse=0; + int last_colour=-1; + for(int y=0;y<24;y++) { + unsigned char *line=&frame0000[43+y*40]; + unsigned char *colour=&frame0000[43+1000+y*40]; + int w=39; + while(w&&line[w-1]==' ') w--; + for(int x=0;x=0x40&&line[x]<0x60) bytes[len++]=line[x]+0x20; + else if (line[x]>=0xe0) + bytes[len++]=(line[x]&0x7f)+0x40; + else if (line[x]>=0x80) + bytes[len++]=line[x]; + else + bytes[len++]=line[x]; + } + + // Add end of line marker if required + if (w<40) bytes[len++]=13; + } + + // Skip blank lines at the end + while(bytes[len-1]==0x0d) len--; + + bytes[len++]=0; + + printf("; Used %d bytes\n",len); + printf("startup_banner:"); + for(int i=0;i