CPCWiki forum

General Category => Programming => Topic started by: funkheld on 16:53, 21 July 20

Title: when do you set: cpct_disableFirmware();
Post by: funkheld on 16:53, 21 July 20

Hi good afternoon.

when do you set:
  cpct_disableFirmware ();

I don't think so:
  cpct_enableFirmware ();
don't you need that?

thank you.
Title: Re: when do you set: cpct_disableFirmware();
Post by: ervin on 23:38, 21 July 20
I use it at the start of my main() function.


#include <cpctelera.h>

u8 const g_palette[16]={
    0x00, // black
    0x1a, // brightWhite
    0x0d, // white
    0x12, // brightGreen
    0x06, // brightRed
    0x02, // brightBlue
    0x18, // brightYellow
    0x0f, // orange
    0x10, // pink
    0x11, // pastel magenta
    0x05, // mauve
    0x01, // blue
    0x00, // black
    0x00, // black
    0x00, // black
    0x00, // black
};

void main(){
   cpct_disableFirmware();
   cpct_clearScreen_f64(0);
   cpct_setVideoMode(0);
   cpct_fw2hw(g_palette,16);
   cpct_setPalette(g_palette,16);
   cpct_setBorder(g_palette[2]);
   while(1){}
}
Title: Re: when do you set: cpct_disableFirmware();
Post by: funkheld on 17:44, 22 July 20
hello, thanks for the info.


greeting
Powered by SMFPacks Menu Editor Mod