X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPico.c;h=a594ce363eef2140c57daba3f90c1b357b7021a0;hb=48e8482fc2d74c9b96e581241390bade986acb22;hp=3cee0c27238abd0398eae985f295df63474385b1;hpb=7a93adeb29f01f5867ff36606cd73a382b6ee0e3;p=picodrive.git diff --git a/Pico/Pico.c b/Pico/Pico.c index 3cee0c2..a594ce3 100644 --- a/Pico/Pico.c +++ b/Pico/Pico.c @@ -77,6 +77,7 @@ int PicoReset(int hard) // reset VDP state, VRAM and PicoMisc //memset(&Pico.video,0,sizeof(Pico.video)); //memset(&Pico.vram,0,sizeof(Pico.vram)); + memset(Pico.ioports,0,sizeof(Pico.ioports)); // needed for MCD to reset properly memset(&Pico.m,0,sizeof(Pico.m)); Pico.video.pending_ints=0; emustatus = 0; @@ -636,19 +637,8 @@ int PicoFrame(void) return 0; } -static int DefaultCram(int cram) -{ - int high=0x0841; - // Convert 0000bbbb ggggrrrr - // to rrrr1ggg g10bbbb1 - high|=(cram&0x00f)<<12; // Red - high|=(cram&0x0f0)<< 3; // Green - high|=(cram&0xf00)>> 7; // Blue - return high; -} - -// Function to convert Megadrive Cram into a native colour: -int (*PicoCram)(int cram)=DefaultCram; +// callback to output message from emu +void (*PicoMessage)(const char *msg)=NULL; #if defined(__DEBUG_PRINT) || defined(WIN32) // tmp debug: dump some stuff