+ if (SRam.data) free(SRam.data); SRam.data=0;\r
+}\r
+\r
+void PicoPower(void)\r
+{\r
+ unsigned char sram_reg=Pico.m.sram_reg; // must be preserved\r
+\r
+ // clear all memory of the emulated machine\r
+ memset(&Pico.ram,0,(unsigned int)&Pico.rom-(unsigned int)&Pico.ram);\r
+\r
+ memset(&Pico.video,0,sizeof(Pico.video));\r
+ memset(&Pico.m,0,sizeof(Pico.m));\r
+\r
+ Pico.video.pending_ints=0;\r
+ z80_reset();\r
+\r
+ // default VDP register values (based on Fusion)\r
+ Pico.video.reg[0] = Pico.video.reg[1] = 0x04;\r
+ Pico.video.reg[0xc] = 0x81;\r
+ Pico.video.reg[0xf] = 0x02;\r
+\r
+ if (PicoAHW & PAHW_MCD)\r
+ PicoPowerMCD();\r
+\r
+ Pico.m.sram_reg=sram_reg;\r
+ PicoReset();\r