[irixxxx's fork](https://github.com/irixxxx/picodrive);
[notaz's repo](https://github.com/notaz/picodrive) is updated less frequently.
+### Using MSU, MD+/32X+, and Mode 1 on Sega/Mega CD
+
+PicoDrive supports using CD audio enhanced cartridge games in all 3 formats.
+To start an enhanced cartridge, the "cue" or "chd" file of the audio CD must be
+selected. Further instructions can be found in `platform/base_readme.txt`.
+
### Sega Pico and Storyware Pages
PicoDrive can use Storyware pages and pad overlays in png format in the same
{
if (!Pico_mcd) {
Pico_mcd = plat_mmap(0x05000000, sizeof(mcd_state), 0, 0);
- memset(Pico_mcd, 0, sizeof(mcd_state));
+ if (Pico_mcd == NULL) {
+ elprintf(EL_STATUS, "OOM");
+ return;
+ }
}
+ memset(Pico_mcd, 0, sizeof(mcd_state));
+
if (bios_data && bios_size > 0) {
if (bios_size > sizeof(Pico_mcd->bios))
bios_size = sizeof(Pico_mcd->bios);
goto out;
}
- ret = PicoCartLoad(rom_file, NULL, 0, &rom_data, &rom_size, 0);
- if (ret != 0) {
- lprintf("reading BIOS failed\n");
- media_type = PM_ERROR;
- goto out;
+ if (rom_file != NULL) {
+ ret = PicoCartLoad(rom_file, NULL, 0, &rom_data, &rom_size, 0);
+ if (ret != 0) {
+ lprintf("reading BIOS failed\n");
+ media_type = PM_ERROR;
+ goto out;
+ }
+
+ // copy BIOS and close file
+ PicoCreateMCD(rom_data, rom_size);
+
+ PicoCartUnload();
+ pm_close(rom_file);
+ rom_file = NULL;
+ rom_size = 0;
}
- // copy BIOS and close file
- PicoCreateMCD(rom_data, rom_size);
-
- PicoCartUnload();
- pm_close(rom_file);
- rom_file = NULL;
- rom_size = 0;
-
// if there is an MSU ROM, it's name is now in rom_fname for loading
PicoIn.AHW |= PAHW_MCD;
}
Then load a ROM and enjoy! Cartridge ROMs can be in various common formats and\r
can be zipped, one ROM file per zip. Certain extensions are used to detect the\r
console the ROM is for (.sg, .sc, .sms, .gg, .smd, .md, .gen, .32x, .pco).\r
-For MSU games, load the .cue file and make sure the cartridge ROM has the same\r
-name and is in the same directory.\r
+For MSU or MD+ games, load the .cue file and make sure the cartridge ROM has the\r
+same name and is in the same directory. MD+ use extensions in the .cue file,\r
+hence don't try to convert it to any other format.\r
Sega/Mega CD images can be in CHD, CUE+BIN/ISO or ISO/CSO+MP3/WAV format (read\r
below for more details).\r
\r
How to run Sega/Mega CD games\r
-----------------------------\r
\r
-To play any non-MSU CD game you need BIOS files. These files must be copied to\r
+To play any non-MSU/MD+ CD game you need BIOS files. These must be copied to\r
#ifdef PANDORA\r
<sd card>/pandora/appdata/picodrive/ directory\r
(if you run PicoDrive once it will create that directory for you).\r