NeoGeo: fix backup save/load. Move CD indexes to 1 and 2.

This commit is contained in:
sorgelig
2019-08-12 00:32:33 +08:00
parent d1baebf276
commit 9d8d6d1f18
3 changed files with 6 additions and 6 deletions

View File

@@ -1607,7 +1607,7 @@ void HandleUI(void)
// ElectronAsh.
strcpy(SelectedPath + strlen(SelectedPath) - 3, "CUE");
printf("Checking for presence of CUE file %s\n", SelectedPath);
if (user_io_file_mount(SelectedPath, 1))
if (user_io_file_mount(SelectedPath, 2))
{
printf("CUE file found and mounted.\n");
parse_cue_file();

View File

@@ -984,11 +984,11 @@ int neogeo_romset_tx(char* name)
printf("Enabled sprite gfx gap hack for kizuna\n");
set_config(3 << 28, 0xF << 28);
}
notify_conf();
FileGenerateSavePath((system_type & 2) ? "ngcd" : name, (char*)full_path);
user_io_file_mount((char*)full_path, 2, 1);
user_io_file_mount((char*)full_path, 0, 1);
notify_conf();
user_io_8bit_set_status(0, 1); // Release reset
return 1;

View File

@@ -1701,8 +1701,8 @@ int cue_pt = 0;
char cue_getch()
{
static uint8_t buf[512];
if (!(cue_pt & 0x1ff)) FileReadSec(&sd_image[1], buf);
if (cue_pt >= sd_image[1].size) return 0;
if (!(cue_pt & 0x1ff)) FileReadSec(&sd_image[2], buf);
if (cue_pt >= sd_image[2].size) return 0;
return buf[(cue_pt++) & 0x1ff];
}
@@ -2158,7 +2158,7 @@ void user_io_poll()
//printf("SD RD %d on %d, WIDE=%d\n", lba, disk, fio_size);
int done = 0;
if (is_neogeo_core())
if (disk && is_neogeo_core())
{
uint32_t offset = 0;