Skip to content

Basic disk control and M3U support#211

Open
dszakallas wants to merge 1 commit into
libretro:masterfrom
dszakallas:naive-disk-control
Open

Basic disk control and M3U support#211
dszakallas wants to merge 1 commit into
libretro:masterfrom
dszakallas:naive-disk-control

Conversation

@dszakallas
Copy link
Copy Markdown

This PR upgrades libretro header to a newer version that has extended disk tray interface and implements the disk tray control callbacks required for swapping disks.

Eject does nothing, insert saves the nvram, resets the emulation, loads the image and finally the nvram.

The purpose of this PR is to provide convenience functionality of swapping disks from inside retroarch, and m3u support, not faithful emulation of disk control of the hardware.

@dszakallas
Copy link
Copy Markdown
Author

#14 #209

@trapexit
Copy link
Copy Markdown
Collaborator

Will take a look. Thanks.

Comment thread libretro.c
Copy link
Copy Markdown
Collaborator

@trapexit trapexit Mar 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fan of the change in style in a feature change.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean the brace style, and the return value and static qualifier being on a separate line?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you check again please?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you just squash all the commits you've made?

Comment thread libretro.c Outdated
static struct retro_disk_control_callback retro_disk_control_cb;
static struct retro_disk_control_ext_callback retro_disk_control_ext_cb;

static bool read_m3u(const char *file)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't a generic m3u reader that could be used? Is this code picked up from another core?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find one.

Comment thread libretro.c Outdated
{
char line[PATH_MAX];
char name[PATH_MAX];
FILE *f = fopen(file, "r");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread libretro.c Outdated
// disk swapping
#define M3U_MAX_FILE 4

static char disk_paths[M3U_MAX_FILE][PATH_MAX_LENGTH];
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CD stuff needs to be moved over but the g_CAPS syntax is generally used for globals.

Comment thread libretro.c
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you just squash all the commits you've made?

@dszakallas dszakallas force-pushed the naive-disk-control branch 3 times, most recently from e1ae1e1 to ca9473d Compare May 1, 2024 11:57
Comment thread libretro.c
int rv;

game_info_path_save(info_);
extract_basename(g_GAME_NAME, info_->path, sizeof(g_GAME_NAME));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name here is misleading? It's the path. Also... can't info be NULL? Opera allows starting without a game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants