X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2Fcd%2FPico.c;h=a0f288084e922cd91b89d50857178afa55f355ca;hb=1c88b865ceb1e1801bcf20010088fd62cdf2cc06;hp=b1d7c5d721ab17afda0788762a3daf746f070a2d;hpb=4696954094ca11200b8b08e8a9bfb231cf21fb86;p=picodrive.git diff --git a/Pico/cd/Pico.c b/Pico/cd/Pico.c index b1d7c5d..a0f2880 100644 --- a/Pico/cd/Pico.c +++ b/Pico/cd/Pico.c @@ -1,10 +1,4 @@ -// This is part of Pico Library - -// (c) Copyright 2004 Dave, All rights reserved. // (c) Copyright 2007 notaz, All rights reserved. -// Free for non-commercial use. - -// For commercial use, separate licencing terms must be obtained. #include "../PicoInt.h" @@ -81,6 +75,12 @@ int PicoResetMCD(int hard) //PicoMemResetCDdecode(1); // don't have to call this in 2M mode #endif + // use SRam.data for RAM cart + if (SRam.data) free(SRam.data); + SRam.data = NULL; + if (PicoOpt&0x8000) + SRam.data = calloc(1, 0x12000); + return 0; }