From: kub Date: Sat, 29 Mar 2025 17:06:28 +0000 (+0000) Subject: mcd, fix 32x regression X-Git-Tag: v2.04~7 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb6affd5cff297f5093279c8fa283feeaf694181;p=picodrive.git mcd, fix 32x regression --- diff --git a/pico/cd/gfx.c b/pico/cd/gfx.c index 4df1c34f..50338827 100644 --- a/pico/cd/gfx.c +++ b/pico/cd/gfx.c @@ -148,6 +148,7 @@ int gfx_context_save(uint8 *state) save_param(&tmp32, 4); save_param(&gfx.y_step, sizeof(gfx.y_step)); + save_param(&gfx.stampMask, sizeof(gfx.stampMask)); return bufferptr; } @@ -172,6 +173,7 @@ int gfx_context_load(const uint8 *state) gfx.mapPtr = (uint16 *)(Pico_mcd->word_ram2M + tmp32); load_param(&gfx.y_step, sizeof(gfx.y_step)); + load_param(&gfx.stampMask, sizeof(gfx.stampMask)); return bufferptr; } diff --git a/pico/media.c b/pico/media.c index e0c25b24..ff7a338a 100644 --- a/pico/media.c +++ b/pico/media.c @@ -412,6 +412,12 @@ enum media_type_e PicoLoadMedia(const char *filename, lprintf("detected SMS ROM\n"); } + if (PicoCartInsert(rom_data, rom_size, carthw_cfg_fname)) { + media_type = PM_ERROR; + goto out; + } + rom_data = NULL; // now belongs to PicoCart + // insert CD if it was detected Pico.m.ncart_in = 0; if (cd_img_type != CT_UNKNOWN) { @@ -425,12 +431,6 @@ enum media_type_e PicoLoadMedia(const char *filename, Pico.m.ncart_in = 1; } - if (PicoCartInsert(rom_data, rom_size, carthw_cfg_fname)) { - media_type = PM_ERROR; - goto out; - } - rom_data = NULL; // now belongs to PicoCart - if (PicoIn.quirks & PQUIRK_FORCE_6BTN) PicoSetInputDevice(0, PICO_INPUT_PAD_6BTN);