Touchscreen being stretched over multiple windows, as of most recent Mac OS update. Unable to link external touchscreen/display with correct touchscreen mapping
(This is a lot so apologies in advance.)
App Version: 0.9.13 ARM64 NEON-A64 (LLVM-Clang v13.1.6) Operating System: macOS v14.2.1 (23C71) Model Identifier: MacBookPro17,1 ROM Name: ALL ROM Serial: ALL
Emulation Speed: 1.00x Auto Frame Skip: YES SLOT-1 Device Type: Retail (Auto) SLOT-2 Device Type: Auto Advanced Bus-Level Timing: NO Rigorous 3D Rendering Timing: YES CPU Emulation Engine: Interpreter Use Game-Specific Hacks: YES External BIOS: NO External Firmware: NO GPU - Scaling Factor: 5x GPU - Color Depth: 18-bit 3D Renderer - Engine: OpenGL (MSAA=Off, SmoothTextures=NO) 3D Renderer - Enable Textures: YES 3D Renderer - Texture Deposterize: NO 3D Renderer - Texture Scaling Factor: 2x 3D Renderer - Edge Marking: YES 3D Renderer - Fog: YES Video - Output Engine: macOS Metal GPUFamily2_v1 (Apple M1) Audio - Output Engine: macOS Core Audio Sound Interface Audio - Advanced SPU Logic: YES Audio - Sound Interpolation Method: Cosine Audio - Sound Synchronization Method: "P" Sync Method
Cheats: NO
ISSUES: I’ve been using my MacBook with DeSmuME for a few years now, and my usual set up consists of: - The MacBook being closed - Top screen of the emulator running through HDMI to a TV - Touch screen of the emulator being displayed on an iPad Pro, via USB C
This way, I essentially have a large-scale ds to use, with the iPad and Apple Pencil acting as my touch screen. It was pretty plug-and-play. I launch the emulator with a window for the main display, one for the touch display, drag the window down to the iPad, run the rom, and go fullscreen on both windows. This still works visually however the touch compatibility is no longer usable.
Upon trying to run a game, it appears that the touch input is being stretched over both displays. I.e. If I tap the top left corner of the touch window, it will touch the middle left edge of it in-game. Furthermore, if I have a single window opened to display both top AND bottom, I can interact with the touchscreen by clicking or tapping overtop of the main display.
Doesn't look like this has been touched but figured I'd note the fix I used. Turns out I just needed to link the ARM and firmware files to the emulator, and actually go into the DS menu and calibrate the touch screen from there. Seems to be working now.
Firmware touch screen calibration should never be required (unless you do use the firmware, in which case the calibration data needs to be valid, but there is little reason to use firmware) and the calibration data has nothing to do with how the emulator organizes or stretches its windows. The NDS doesn't know anything about your windows, nor does the firmware. The emulator frontend adapts its sense of the windows to a rigid 256x192 schema before the firmware ever sees it. Your solution here is a mistake and something else solved it coincidentally.
Yup, I may have spoken too soon. You're correct, it was just a coincidence. I was able to calibrate it from the firmware but once closed and relaunched, it reset to what it was. Still not sure what changed that made this sort of layout unusable, given that I had been using it for a couple years prior to having sent the original report.
Pretty sure that commit 1091e69 fixes this issue.
Most likely, the touch display bug you're experiencing is happening because you are dragging the window from a non-Retina screen to your iPad, which has a Retina screen. All previous DeSmuME versions for Mac have a bug where touch screen coordinates are messed up when dragging display windows across different screen types.
Follow these steps for a workaround when running v0.9.13 and earlier:
- Connect your iPad in extended display mode.
- Start DeSmuME.
- Create your display windows with File > New Display Windows.
- Drag the display window you want to use for touch input to the iPad screen.
- Set up your touch screen display window however you like.
- Quit DeSmuME without closing any display windows.
- Start DeSmuME. This will recreate any display windows that were present when you previously quit DeSmuME.
- Your touch display window should now work correctly, sending the correct touch coordinates to the NDS.
The most important thing here is to initially create the touch display window on the iPad screen, removing the need to drag it across screens. To do this, you must allow DeSmuME to create the display windows on launch, which also requires that your iPad is already connected in extended display mode before DeSmuME is launched.
Of course, commit 1091e69 fixes issues when dragging display windows from non-Retina displays to Retina display (and vice-versa), so the next DeSmuME version will make this workaround a moot point.