Skip to content

Comments

allow changing disks with libretro controller#312

Open
Jamiras wants to merge 3 commits intoaudetto:masterfrom
Jamiras:feature/controller_disk_change
Open

allow changing disks with libretro controller#312
Jamiras wants to merge 3 commits intoaudetto:masterfrom
Jamiras:feature/controller_disk_change

Conversation

@Jamiras
Copy link

@Jamiras Jamiras commented Sep 28, 2025

Hold L1 to eject disk, release L1 to insert disk.
While holding L1 use dpad left/right to change inserted disk.

Onscreen messages help guide the user

  • Hold L1 -> Ejected Disk 1
  • Press right -> Readied Disk 2
  • Press right -> Readied Disk 3
  • Release L1 -> Inserted Disk 3

@audetto
Copy link
Owner

audetto commented Oct 5, 2025

Some question:

  1. I find using the left hand for both actions uncomfortable. I'd rather use RETRO_DEVICE_ID_JOYPAD_R
  2. RETRO_DEVICE_ID_JOYPAD_L: (or R) is currently already mapped to Space (forgot who asked me to add mapping between joypad and keyboard). At minimum this has to be changed.
  3. There is already a retroarch UI for this. why do we need this?
  4. Let's say I insert a new disk, how do I use it?

@Jamiras
Copy link
Author

Jamiras commented Oct 5, 2025

There is already a retroarch UI for this. why do we need this?

The frontend doesn't provide any way to change the disk in drive 2. We could probably just assume whatever disk is the last disk in the m3u should go into drive 2 and be fine.

Some games (like Black Cauldron) can be played entirely with the joystick, but still require switching disks. For that particular game, it says "and press enter", so leaving that mapped to something is probably good.

Other games require switching disks somewhat frequently, so providing a shortcut to do so without having to navigate the RetroArch menu system would be beneficial. It doesn't have to be on the controller. Given that many of the multi-disk games require keyboard input, it might actually be best to have it as hotkeys. Maybe both for convienence?

Let's say I insert a new disk, how do I use it?

However the game instructs you to. Many say press any key or a specific key after changing the disk.

As you've pointed out, this feature is essentially redundant with the RetroArch UI.

I find using the left hand for both actions uncomfortable. I'd rather use RETRO_DEVICE_ID_JOYPAD_R

RETRO_DEVICE_ID_JOYPAD_R will be used for drive 2. I wanted this approved before I went any further. This mimicks the behavior provided by Quasi88, and I found it fairly natural to use.

RETRO_DEVICE_ID_JOYPAD_L: (or R) is currently already mapped to Space (forgot who asked me to add mapping between joypad and keyboard). At minimum this has to be changed.

Because disk swaps inputs prevent other input processing, they currently take priority.

I tracked the changes to support keypresses from the controller to #256, but it doesn't explain why those keys should be used, or why they're mapped the way they are.

Enter seems like something that should probably be mapped to Start. I'd probably put ESC on Select (both of which appear to currently be unused). Spacebar does seem like it would be frequently used as a jump button in conjuction with movement keys, so I'd put it as a face button (X and Y are both available). Arrow keys should be mapped to the dpad (although those don't seem to be standardized across games - some use arrow keys, some use ASDF, others use IJKL, and some use other combinations). The paddle controls would work best on L2/R2 or the analog sticks to provide inputs other than 0 and 255. I'm not sure what I'd put on the other buttons. In most cases, if the game supports using the joystick, that's the best way to play it.

@audetto
Copy link
Owner

audetto commented Oct 5, 2025

At minimum R and L here `https://github.com/audetto/AppleWin/blob/master/source/frontends/libretro/retroregistry.cpp#L429 need to be removed since they can be used for anything else. Or maybe reassign their values to other ones.

But it is going to be much easier to evaluate the proposal if I can see everything you are suggesting to change control-wise.

You could comment on #256 listing all the changes you think would improve the game experience.

@Jamiras
Copy link
Author

Jamiras commented Oct 7, 2025

I've moved Space from L to Y and Enter from R to Start. I've added a proposed full mapping to #256.

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