/*-----------------------------------------------------------------------------------*/ void ctk_draw_init(void) { (void)bgcolor(SCREENCOLOR); (void)bordercolor(BORDERCOLOR); screensize(&sizex, &sizey); ctk_draw_clear(0, sizey); }
/*-----------------------------------------------------------------------------------*/ void ctk_draw_init(void) { (void)bgcolor(SCREENCOLOR); (void)bordercolor(BORDERCOLOR); (void)textcolor(WINDOWCOLOR_FOCUS); screensize(&sizex, &sizey); ctk_draw_clear(0, sizey); gotoxy(0, 0); }
void ctk_draw_init(void) { unsigned char i, *ptr1, *ptr2; setup_nmi(); /* Turn on hires mode, bank 0 ($c000 - $ffff) and $e000/$c000 for hires/colors. */ VIC.ctrl1 = 0x3b; /* $D011 */ VIC.addr = 0x78; /* $D018 */ VIC.ctrl2 = 0xc8; /* $D016 */ CIA2.pra = 0x00; /* $DD00 */ VIC.bordercolor = ctk_hires_theme.bordercolor; /* $D020 */ VIC.bgcolor0 = ctk_hires_theme.screencolor; /* $D021 */ /* Fill color memory. */ asm("sei"); asm("lda $01"); asm("pha"); asm("lda #$30"); asm("sta $01"); asm("ldx #0"); asm("lda #$c0"); asm("fillcolorloop:"); asm("sta $dc00,x"); asm("sta $dd00,x"); asm("sta $de00,x"); asm("sta $df00,x"); asm("inx"); asm("bne fillcolorloop"); /* Setup sprite pointers */ asm("ldx #$fd"); asm("stx $dff8"); asm("inx"); asm("stx $dff9"); asm("pla"); asm("sta $01"); asm("cli"); /* Fill hires memory with 0. */ asm("lda $fd"); asm("pha"); asm("lda $fe"); asm("pha"); asm("lda #0"); asm("sta $fd"); asm("lda #$e0"); asm("sta $fe"); asm("ldy #0"); asm("lda #0"); asm("clrscrnloop:"); asm("lda #$55"); asm("sta ($fd),y"); asm("iny"); asm("lda #$aa"); asm("sta ($fd),y"); asm("iny"); asm("bne clrscrnloop"); asm("inc $fe"); asm("lda $fe"); asm("cmp #$ff"); asm("bne clrscrnloop"); asm("ldy #$00"); asm("clrscrnloop2:"); asm("lda #$55"); asm("sta $ff00,y"); asm("iny"); asm("lda #$aa"); asm("sta $ff00,y"); asm("iny"); asm("cpy #$40"); asm("bne clrscrnloop2"); asm("pla"); asm("sta $fe"); asm("pla"); asm("sta $fd"); ctk_draw_clear(0, SCREEN_HEIGHT); /* Setup mouse pointer sprite. */ asm("lda %v+%w", ctk_hires_theme, offsetof(struct ctk_hires_theme, pointermaskcolor)); asm("sta $d027"); asm("lda %v+%w", ctk_hires_theme, offsetof(struct ctk_hires_theme, pointercolor)); asm("sta $d028"); ptr1 = ctk_hires_theme.pointer; ptr2 = (unsigned char *)0xff40; for(i = 0; i < 0x80; ++i) { *ptr2++ = *ptr1++; } return; }
/*---------------------------------------------------------------------------*/ void ctk_draw_init(void) { clip(0, SCREEN_HEIGHT); ctk_draw_clear(0, SCREEN_HEIGHT); }