Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sdl3 #348

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open

feat: sdl3 #348

wants to merge 31 commits into from

Conversation

francisdb
Copy link
Contributor

@francisdb francisdb commented Oct 21, 2024

I ported the SDL code to SDL3. (continuation of #203)

Used the approach of building SDL3 in the project like is done on standalone / libdmdutil / libaltsound. SDL3 is currently not available in homebrew nor ubuntu apt repositories.

X11 is ancient tech that is going away.
xpinmame on linux now builds against SDL3 for graphics and sound.

Some light crackling on the sound, probably something to do with pinmame not coming up with audio data in time? Had the same issue with coreaudio.

SDL_AUDIODRIVER=pipewire SDL_VIDEODRIVER=wayland ./build/xpinmame -rompath ~/.pinmame/roms -nvram_directory ~/.pinmame/nvram  t2_l8

image

TODO

  • Multi platform builds (mac/linux)
  • Support for HiDPI (scale up window contents)? For now we use actual pixels on macOS. (tiny window, requires -scale 4 for example)
  • Sound not working on mac? (somehow main speakers don't work with coreaudio, switched to sdl3 for sound)
  • Probably needs the SDL3 lib in the archive
  • does the -md build still work and show the debug window, was this ever the case? (not in use for xpinmame)

@francisdb
Copy link
Contributor Author

If somebody could explain me why a Debug build fails on the link phase but the Release build succeeds that would be great.

[3/4] Linking CXX executable xpinmame-3.6
FAILED: xpinmame-3.6 
: && /usr/bin/c++ -g  CMakeFiles/xpinmame.dir/src/artwork.c.o CMakeFiles/xpinmame.dir/src/audit.c.o CMakeFiles/xpinmame.dir/src/cheat.c.o CMakeFiles/xpinmame.dir/src/common.c.o CMakeFiles/xpinmame.dir/src/config.c.o CMakeFiles/xpinmame.dir/src/cpu/adsp2100/2100dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/adsp2100/adsp2100.c.o CMakeFiles/xpinmame.dir/src/cpu/arm7/arm7.c.o CMakeFiles/xpinmame.dir/src/cpu/arm7/arm7dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/at91/at91.c.o CMakeFiles/xpinmame.dir/src/cpu/at91/at91dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/cdp1802/1802dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/cdp1802/cdp1802.c.o CMakeFiles/xpinmame.dir/src/cpu/cop400/410ops.c.o CMakeFiles/xpinmame.dir/src/cpu/cop400/420ops.c.o CMakeFiles/xpinmame.dir/src/cpu/cop400/cop420.c.o CMakeFiles/xpinmame.dir/src/cpu/cop400/cop420ds.c.o CMakeFiles/xpinmame.dir/src/cpu/i86/i86.c.o CMakeFiles/xpinmame.dir/src/cpu/i86/i86dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/i4004/4004dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/i4004/i4004.c.o CMakeFiles/xpinmame.dir/src/cpu/i8039/8039dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/i8039/i8039.c.o CMakeFiles/xpinmame.dir/src/cpu/i8051/8051dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/i8051/i8051.c.o CMakeFiles/xpinmame.dir/src/cpu/i8085/8085dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/i8085/i8085.c.o CMakeFiles/xpinmame.dir/src/cpu/m6502/6502dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/m6502/m6502.c.o CMakeFiles/xpinmame.dir/src/cpu/m6800/6800dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/m6800/m6800.c.o CMakeFiles/xpinmame.dir/src/cpu/m6809/6809dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/m6809/m6809.c.o CMakeFiles/xpinmame.dir/src/cpu/m68000/generated_by_m68kmake/m68kopac.c.o CMakeFiles/xpinmame.dir/src/cpu/m68000/generated_by_m68kmake/m68kops.c.o CMakeFiles/xpinmame.dir/src/cpu/m68000/generated_by_m68kmake/m68kopdm.c.o CMakeFiles/xpinmame.dir/src/cpu/m68000/generated_by_m68kmake/m68kopnz.c.o CMakeFiles/xpinmame.dir/src/cpu/m68000/m68kcpu.c.o CMakeFiles/xpinmame.dir/src/cpu/m68000/m68kdasm.c.o CMakeFiles/xpinmame.dir/src/cpu/m68000/m68kmame.c.o CMakeFiles/xpinmame.dir/src/cpu/pps4/pps4.c.o CMakeFiles/xpinmame.dir/src/cpu/pps4/pps4dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/s2650/2650dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/s2650/s2650.c.o CMakeFiles/xpinmame.dir/src/cpu/scamp/scamp.c.o CMakeFiles/xpinmame.dir/src/cpu/scamp/scampdsm.c.o CMakeFiles/xpinmame.dir/src/cpu/tms7000/7000dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/tms7000/tms7000.c.o CMakeFiles/xpinmame.dir/src/cpu/tms9900/9900dasm.c.o CMakeFiles/xpinmame.dir/src/cpu/tms9900/tms9900.c.o CMakeFiles/xpinmame.dir/src/cpu/tms9900/tms9980a.c.o CMakeFiles/xpinmame.dir/src/cpu/tms9900/tms9995.c.o CMakeFiles/xpinmame.dir/src/cpu/z80/z80.c.o CMakeFiles/xpinmame.dir/src/cpu/z80/z80dasm.c.o CMakeFiles/xpinmame.dir/src/cpuexec.c.o CMakeFiles/xpinmame.dir/src/cpuint.c.o CMakeFiles/xpinmame.dir/src/cpuintrf.c.o CMakeFiles/xpinmame.dir/src/datafile.c.o CMakeFiles/xpinmame.dir/src/drawgfx.c.o CMakeFiles/xpinmame.dir/src/fileio.c.o CMakeFiles/xpinmame.dir/src/harddisk.c.o CMakeFiles/xpinmame.dir/src/hash.c.o CMakeFiles/xpinmame.dir/src/hiscore.c.o CMakeFiles/xpinmame.dir/src/info.c.o CMakeFiles/xpinmame.dir/src/inptport.c.o CMakeFiles/xpinmame.dir/src/input.c.o CMakeFiles/xpinmame.dir/src/machine/4094.c.o CMakeFiles/xpinmame.dir/src/machine/6522via.c.o CMakeFiles/xpinmame.dir/src/machine/6530riot.c.o CMakeFiles/xpinmame.dir/src/machine/6532riot.c.o CMakeFiles/xpinmame.dir/src/machine/6821pia.c.o CMakeFiles/xpinmame.dir/src/machine/8255ppi.c.o CMakeFiles/xpinmame.dir/src/machine/eeprom.c.o CMakeFiles/xpinmame.dir/src/machine/i8155.c.o CMakeFiles/xpinmame.dir/src/machine/mathbox.c.o CMakeFiles/xpinmame.dir/src/machine/pic8259.c.o CMakeFiles/xpinmame.dir/src/machine/ticket.c.o CMakeFiles/xpinmame.dir/src/machine/z80fmly.c.o CMakeFiles/xpinmame.dir/src/mame.c.o CMakeFiles/xpinmame.dir/src/mamedbg.c.o CMakeFiles/xpinmame.dir/src/md5.c.o CMakeFiles/xpinmame.dir/src/memory.c.o CMakeFiles/xpinmame.dir/src/palette.c.o CMakeFiles/xpinmame.dir/src/png.c.o CMakeFiles/xpinmame.dir/src/profiler.c.o CMakeFiles/xpinmame.dir/src/sha1.c.o CMakeFiles/xpinmame.dir/src/sndintrf.c.o CMakeFiles/xpinmame.dir/src/sound/262intf.c.o CMakeFiles/xpinmame.dir/src/sound/2151intf.c.o CMakeFiles/xpinmame.dir/src/sound/2203intf.c.o CMakeFiles/xpinmame.dir/src/sound/3812intf.c.o CMakeFiles/xpinmame.dir/src/sound/5110intf.c.o CMakeFiles/xpinmame.dir/src/sound/5220intf.c.o CMakeFiles/xpinmame.dir/src/sound/adpcm.c.o CMakeFiles/xpinmame.dir/src/sound/astrocde.c.o CMakeFiles/xpinmame.dir/src/sound/ay8910.c.o CMakeFiles/xpinmame.dir/src/sound/bsmt2000.c.o CMakeFiles/xpinmame.dir/src/sound/dac.c.o CMakeFiles/xpinmame.dir/src/sound/discrete.c.o CMakeFiles/xpinmame.dir/src/sound/filter.c.o CMakeFiles/xpinmame.dir/src/sound/fm.c.o CMakeFiles/xpinmame.dir/src/sound/fmopl.c.o CMakeFiles/xpinmame.dir/src/sound/hc55516.c.o CMakeFiles/xpinmame.dir/src/sound/m114s.c.o CMakeFiles/xpinmame.dir/src/sound/mc3417.c.o CMakeFiles/xpinmame.dir/src/sound/mea8000.c.o CMakeFiles/xpinmame.dir/src/sound/mixer.c.o CMakeFiles/xpinmame.dir/src/sound/msm5205.c.o CMakeFiles/xpinmame.dir/src/sound/qsound.c.o CMakeFiles/xpinmame.dir/src/sound/s14001a.c.o CMakeFiles/xpinmame.dir/src/sound/saa1099.c.o CMakeFiles/xpinmame.dir/src/sound/samples.c.o CMakeFiles/xpinmame.dir/src/sound/sn76477.c.o CMakeFiles/xpinmame.dir/src/sound/sn76496.c.o CMakeFiles/xpinmame.dir/src/sound/sp0250.c.o CMakeFiles/xpinmame.dir/src/sound/sp0256.c.o CMakeFiles/xpinmame.dir/src/sound/streams.c.o CMakeFiles/xpinmame.dir/src/sound/tms320av120.c.o CMakeFiles/xpinmame.dir/src/sound/tms5110.c.o CMakeFiles/xpinmame.dir/src/sound/tms5220.c.o CMakeFiles/xpinmame.dir/src/sound/votrax.c.o CMakeFiles/xpinmame.dir/src/sound/ym2151.c.o CMakeFiles/xpinmame.dir/src/sound/ymdeltat.c.o CMakeFiles/xpinmame.dir/src/sound/ymf262.c.o CMakeFiles/xpinmame.dir/src/state.c.o CMakeFiles/xpinmame.dir/src/tilemap.c.o CMakeFiles/xpinmame.dir/src/timer.c.o CMakeFiles/xpinmame.dir/src/ui_text.c.o CMakeFiles/xpinmame.dir/src/unzip.c.o CMakeFiles/xpinmame.dir/src/usrintrf.c.o CMakeFiles/xpinmame.dir/src/version.c.o CMakeFiles/xpinmame.dir/src/vidhrdw/avgdvg.c.o CMakeFiles/xpinmame.dir/src/vidhrdw/crtc6845.c.o CMakeFiles/xpinmame.dir/src/vidhrdw/generic.c.o CMakeFiles/xpinmame.dir/src/vidhrdw/tms9928a.c.o CMakeFiles/xpinmame.dir/src/vidhrdw/vector.c.o CMakeFiles/xpinmame.dir/src/window.c.o CMakeFiles/xpinmame.dir/src/wpc/allied.c.o CMakeFiles/xpinmame.dir/src/wpc/alvg.c.o CMakeFiles/xpinmame.dir/src/wpc/alvgdmd.c.o CMakeFiles/xpinmame.dir/src/wpc/alvggames.c.o CMakeFiles/xpinmame.dir/src/wpc/alvgs.c.o CMakeFiles/xpinmame.dir/src/wpc/atari.c.o CMakeFiles/xpinmame.dir/src/wpc/atarigames.c.o CMakeFiles/xpinmame.dir/src/wpc/atarisnd.c.o CMakeFiles/xpinmame.dir/src/wpc/barni.c.o CMakeFiles/xpinmame.dir/src/wpc/bingo.c.o CMakeFiles/xpinmame.dir/src/wpc/boomerang.c.o CMakeFiles/xpinmame.dir/src/wpc/bowarrow.c.o CMakeFiles/xpinmame.dir/src/wpc/bowlgames.c.o CMakeFiles/xpinmame.dir/src/wpc/bulb.c.o CMakeFiles/xpinmame.dir/src/wpc/by35.c.o CMakeFiles/xpinmame.dir/src/wpc/by35games.c.o CMakeFiles/xpinmame.dir/src/wpc/by35snd.c.o CMakeFiles/xpinmame.dir/src/wpc/by6803.c.o CMakeFiles/xpinmame.dir/src/wpc/by6803games.c.o CMakeFiles/xpinmame.dir/src/wpc/by68701.c.o CMakeFiles/xpinmame.dir/src/wpc/byvidgames.c.o CMakeFiles/xpinmame.dir/src/wpc/byvidpin.c.o CMakeFiles/xpinmame.dir/src/wpc/capcom.c.o CMakeFiles/xpinmame.dir/src/wpc/capcoms.c.o CMakeFiles/xpinmame.dir/src/wpc/capgames.c.o CMakeFiles/xpinmame.dir/src/wpc/core.c.o CMakeFiles/xpinmame.dir/src/wpc/dedmd.c.o CMakeFiles/xpinmame.dir/src/wpc/degames.c.o CMakeFiles/xpinmame.dir/src/wpc/desound.c.o CMakeFiles/xpinmame.dir/src/wpc/dmddevice.cpp.o CMakeFiles/xpinmame.dir/src/wpc/driver.c.o CMakeFiles/xpinmame.dir/src/wpc/efo.c.o CMakeFiles/xpinmame.dir/src/wpc/efosnd.c.o CMakeFiles/xpinmame.dir/src/wpc/flicker.c.o CMakeFiles/xpinmame.dir/src/wpc/gp.c.o CMakeFiles/xpinmame.dir/src/wpc/gpgames.c.o CMakeFiles/xpinmame.dir/src/wpc/gpsnd.c.o CMakeFiles/xpinmame.dir/src/wpc/gts1.c.o CMakeFiles/xpinmame.dir/src/wpc/gts1games.c.o CMakeFiles/xpinmame.dir/src/wpc/gts3.c.o CMakeFiles/xpinmame.dir/src/wpc/gts3dmd.c.o CMakeFiles/xpinmame.dir/src/wpc/gts3games.c.o CMakeFiles/xpinmame.dir/src/wpc/gts80.c.o CMakeFiles/xpinmame.dir/src/wpc/gts80games.c.o CMakeFiles/xpinmame.dir/src/wpc/gts80s.c.o CMakeFiles/xpinmame.dir/src/wpc/hnkgames.c.o CMakeFiles/xpinmame.dir/src/wpc/hnks.c.o CMakeFiles/xpinmame.dir/src/wpc/icecoldbeer.c.o CMakeFiles/xpinmame.dir/src/wpc/idsa.c.o CMakeFiles/xpinmame.dir/src/wpc/inder.c.o CMakeFiles/xpinmame.dir/src/wpc/indergames.c.o CMakeFiles/xpinmame.dir/src/wpc/inderp.c.o CMakeFiles/xpinmame.dir/src/wpc/jeutel.c.o CMakeFiles/xpinmame.dir/src/wpc/joctronic.c.o CMakeFiles/xpinmame.dir/src/wpc/jp.c.o CMakeFiles/xpinmame.dir/src/wpc/jpgames.c.o CMakeFiles/xpinmame.dir/src/wpc/jvh.c.o CMakeFiles/xpinmame.dir/src/wpc/kissproto.c.o CMakeFiles/xpinmame.dir/src/wpc/lancelot.c.o CMakeFiles/xpinmame.dir/src/wpc/ltd.c.o CMakeFiles/xpinmame.dir/src/wpc/ltdgames.c.o CMakeFiles/xpinmame.dir/src/wpc/luckydraw.c.o CMakeFiles/xpinmame.dir/src/wpc/mac.c.o CMakeFiles/xpinmame.dir/src/wpc/mech.c.o CMakeFiles/xpinmame.dir/src/wpc/mephisto.c.o CMakeFiles/xpinmame.dir/src/wpc/micropin.c.o CMakeFiles/xpinmame.dir/src/wpc/mrgame.c.o CMakeFiles/xpinmame.dir/src/wpc/mrgamegames.c.o CMakeFiles/xpinmame.dir/src/wpc/nsm.c.o CMakeFiles/xpinmame.dir/src/wpc/nuova.c.o CMakeFiles/xpinmame.dir/src/wpc/peyper.c.o CMakeFiles/xpinmame.dir/src/wpc/peypergames.c.o CMakeFiles/xpinmame.dir/src/wpc/play.c.o CMakeFiles/xpinmame.dir/src/wpc/playgames.c.o CMakeFiles/xpinmame.dir/src/wpc/playsnd.c.o CMakeFiles/xpinmame.dir/src/wpc/regama.c.o CMakeFiles/xpinmame.dir/src/wpc/rotation.c.o CMakeFiles/xpinmame.dir/src/wpc/rowamet.c.o CMakeFiles/xpinmame.dir/src/wpc/s3games.c.o CMakeFiles/xpinmame.dir/src/wpc/s4.c.o CMakeFiles/xpinmame.dir/src/wpc/s4games.c.o CMakeFiles/xpinmame.dir/src/wpc/s6.c.o CMakeFiles/xpinmame.dir/src/wpc/s6games.c.o CMakeFiles/xpinmame.dir/src/wpc/s7.c.o CMakeFiles/xpinmame.dir/src/wpc/s7games.c.o CMakeFiles/xpinmame.dir/src/wpc/s11.c.o CMakeFiles/xpinmame.dir/src/wpc/s11games.c.o CMakeFiles/xpinmame.dir/src/wpc/se.c.o CMakeFiles/xpinmame.dir/src/wpc/segames.c.o CMakeFiles/xpinmame.dir/src/wpc/sim.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/sttng.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/fh.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/jd.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/bop.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/ft.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/gw.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/afm.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/tz.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/taf.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/pz.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/t2.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/ngg.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/dd_wpc.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/cftbl.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/mm.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/br.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/wcs.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/hd.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/drac.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/ss.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/ww.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/ij.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/tom.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/rs.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/hurr.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/gi.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/dm.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/cp.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/ts.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/pop.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/wd.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/jm.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/i500.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/full/nbaf.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/corv.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/fs.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/sc.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/mb.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/totan.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/congo.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/nf.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/jb.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/cv.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/dw.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/dh.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/cc.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/wpc/prelim/jy.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/se/prelim/monopoly.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/se/prelim/elvis.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/se/prelim/harley.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/s11/full/dd.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/s11/full/milln.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/s11/prelim/eatpm.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/s7/full/bk.c.o CMakeFiles/xpinmame.dir/src/wpc/sims/s7/full/tmfnt.c.o CMakeFiles/xpinmame.dir/src/wpc/slalom.c.o CMakeFiles/xpinmame.dir/src/wpc/sleic.c.o CMakeFiles/xpinmame.dir/src/wpc/sleicgames.c.o CMakeFiles/xpinmame.dir/src/wpc/snd_cmd.c.o CMakeFiles/xpinmame.dir/src/wpc/sndbrd.c.o CMakeFiles/xpinmame.dir/src/wpc/spectra.c.o CMakeFiles/xpinmame.dir/src/wpc/spinb.c.o CMakeFiles/xpinmame.dir/src/wpc/spinbgames.c.o CMakeFiles/xpinmame.dir/src/wpc/spiritof76.c.o CMakeFiles/xpinmame.dir/src/wpc/stargame.c.o CMakeFiles/xpinmame.dir/src/wpc/stgames.c.o CMakeFiles/xpinmame.dir/src/wpc/stsnd.c.o CMakeFiles/xpinmame.dir/src/wpc/tabart.c.o CMakeFiles/xpinmame.dir/src/wpc/taito.c.o CMakeFiles/xpinmame.dir/src/wpc/taitogames.c.o CMakeFiles/xpinmame.dir/src/wpc/taitos.c.o CMakeFiles/xpinmame.dir/src/wpc/techno.c.o CMakeFiles/xpinmame.dir/src/wpc/uart_16c450.c.o CMakeFiles/xpinmame.dir/src/wpc/uart_8251.c.o CMakeFiles/xpinmame.dir/src/wpc/vd.c.o CMakeFiles/xpinmame.dir/src/wpc/vpintf.c.o CMakeFiles/xpinmame.dir/src/wpc/wico.c.o CMakeFiles/xpinmame.dir/src/wpc/wmssnd.c.o CMakeFiles/xpinmame.dir/src/wpc/wpc.c.o CMakeFiles/xpinmame.dir/src/wpc/wpcgames.c.o CMakeFiles/xpinmame.dir/src/wpc/wpcsam.c.o CMakeFiles/xpinmame.dir/src/wpc/zac.c.o CMakeFiles/xpinmame.dir/src/wpc/zacgames.c.o CMakeFiles/xpinmame.dir/src/wpc/zacproto.c.o CMakeFiles/xpinmame.dir/src/wpc/zacsnd.c.o CMakeFiles/xpinmame.dir/ext/vgm/vgmwrite.c.o CMakeFiles/xpinmame.dir/ext/ymfm/ymfm_opm.cpp.o CMakeFiles/xpinmame.dir/src/unix/main.c.o CMakeFiles/xpinmame.dir/src/unix/sound.c.o CMakeFiles/xpinmame.dir/src/unix/keyboard.c.o CMakeFiles/xpinmame.dir/src/unix/devices.c.o CMakeFiles/xpinmame.dir/src/unix/video.c.o CMakeFiles/xpinmame.dir/src/unix/mode.c.o CMakeFiles/xpinmame.dir/src/unix/fileio.c.o CMakeFiles/xpinmame.dir/src/unix/dirio.c.o CMakeFiles/xpinmame.dir/src/unix/config.c.o CMakeFiles/xpinmame.dir/src/unix/fronthlp.c.o CMakeFiles/xpinmame.dir/src/unix/ident.c.o CMakeFiles/xpinmame.dir/src/unix/network.c.o CMakeFiles/xpinmame.dir/src/unix/snprintf.c.o CMakeFiles/xpinmame.dir/src/unix/nec765_dummy.c.o CMakeFiles/xpinmame.dir/src/unix/effect.c.o CMakeFiles/xpinmame.dir/src/unix/ticker.c.o CMakeFiles/xpinmame.dir/src/unix/parallel.c.o CMakeFiles/xpinmame.dir/src/unix/serial.c.o CMakeFiles/xpinmame.dir/src/unix/sysdep/rc.c.o CMakeFiles/xpinmame.dir/src/unix/sysdep/misc.c.o CMakeFiles/xpinmame.dir/src/unix/sysdep/plugin_manager.c.o CMakeFiles/xpinmame.dir/src/unix/sysdep/sound_stream.c.o CMakeFiles/xpinmame.dir/src/unix/sysdep/sysdep_palette.c.o CMakeFiles/xpinmame.dir/src/unix/sysdep/sysdep_dsp.c.o CMakeFiles/xpinmame.dir/src/unix/sysdep/sysdep_mixer.c.o CMakeFiles/xpinmame.dir/src/unix/sysdep/dsp-drivers/sdl.c.o CMakeFiles/xpinmame.dir/src/unix/video-drivers/sdl.c.o CMakeFiles/xpinmame.dir/src/unix/joystick-drivers/joy_i386.c.o CMakeFiles/xpinmame.dir/src/unix/joystick-drivers/joy_pad.c.o CMakeFiles/xpinmame.dir/src/unix/joystick-drivers/joy_x11.c.o CMakeFiles/xpinmame.dir/src/unix/joystick-drivers/joy_usb.c.o CMakeFiles/xpinmame.dir/src/unix/frameskip-drivers/dos.c.o CMakeFiles/xpinmame.dir/src/unix/frameskip-drivers/barath.c.o -o xpinmame-3.6 -L/home/francisdb/workspace/somatik/pinmame/platforms/linux/x64/external/lib -Wl,-rpath,/home/francisdb/workspace/somatik/pinmame/platforms/linux/x64/external/lib  /usr/lib/x86_64-linux-gnu/libz.so  /usr/lib/x86_64-linux-gnu/libasound.so  -lSDL3 && :
/usr/bin/ld: CMakeFiles/xpinmame.dir/src/wpc/dmddevice.cpp.o: in function `core_update_pwm_gis()':
/home/francisdb/workspace/somatik/pinmame/src/wpc/core.h:590:(.text+0x713): undefined reference to `core_update_pwm_outputs(int, int)'
/usr/bin/ld: CMakeFiles/xpinmame.dir/src/wpc/dmddevice.cpp.o: in function `core_update_pwm_solenoids()':
/home/francisdb/workspace/somatik/pinmame/src/wpc/core.h:591:(.text+0x73f): undefined reference to `core_update_pwm_outputs(int, int)'
/usr/bin/ld: CMakeFiles/xpinmame.dir/src/wpc/dmddevice.cpp.o: in function `core_update_pwm_segments()':
/home/francisdb/workspace/somatik/pinmame/src/wpc/core.h:592:(.text+0x76b): undefined reference to `core_update_pwm_outputs(int, int)'
/usr/bin/ld: CMakeFiles/xpinmame.dir/src/wpc/dmddevice.cpp.o: in function `core_update_pwm_lamps()':
/home/francisdb/workspace/somatik/pinmame/src/wpc/core.h:593:(.text+0x797): undefined reference to `core_update_pwm_outputs(int, int)'
collect2: error: ld returned 1 exit status

@francisdb francisdb marked this pull request as draft October 21, 2024 22:22
@francisdb
Copy link
Contributor Author

@toxieainc should I care about the xpinmame_lisy build failing? Don't think the current errors are related to this PR?

@francisdb francisdb marked this pull request as ready for review October 29, 2024 13:59
@francisdb
Copy link
Contributor Author

francisdb commented Oct 29, 2024

@toxieainc What is the expected way this should be packaged as SDL3 should be provided or statically compiled and rpath adjusted?

With the current setup on macOS for example:

> otool -l xpinmame-3.6
...
Load command 16
          cmd LC_LOAD_DYLIB
      cmdsize 48
         name @rpath/libSDL3.0.dylib (offset 24)
...
Load command 19
          cmd LC_RPATH
      cmdsize 80
         path /Users/me/workspace/pinmame/build/_deps/sdl3-build (offset 12)

@francisdb
Copy link
Contributor Author

For my part this is ready for review.

@toxieainc
Copy link
Member

@toxieainc should I care about the xpinmame_lisy build failing? Don't think the current errors are related to this PR?

Don't know, at least there is

sysdep/dsp-drivers/sdl.c:45:10: fatal error: SDL3/SDL.h: No such file or directory
   45 | #include <SDL3/SDL.h>

@toxieainc
Copy link
Member

As for how SDL is used, that is something up to @jsm174 to decide, please.

@jsm174
Copy link
Contributor

jsm174 commented Oct 29, 2024

for a standalone command line app like this, I almost think a static lib would be better as it doesn't force the user to have the right version installed or you having to provide it etc.

In vpx standalone for the mac, I know we do include dylibs, however it's a macos app bundle, so we can package all our dylibs in the frameworks folder.

If you decide to use the shared lib, than you can play around with the rpath options in cmake, see here.

btw, you can also alter rpaths after the build using install_name_tool.

@francisdb
Copy link
Contributor Author

@toxieainc should I care about the xpinmame_lisy build failing? Don't think the current errors are related to this PR?

Don't know, at least there is

sysdep/dsp-drivers/sdl.c:45:10: fatal error: SDL3/SDL.h: No such file or directory
   45 | #include <SDL3/SDL.h>

Oh, looks like that has changed, used to fail on some conflict in deb dependencies. Let me fix it then.

@francisdb
Copy link
Contributor Author

Looks like the lisy cmake is delegating to make.lisy. I guess this will have to wait until sdl3 is available on that platform?

Also makefile.unix, makefile.unixdsl, makefile.unixdsl_debug might be broken but there is no CI for that and I guess there is no reason to keep those as there are cmake builds?

In how far is pinmame still getting upstream mame updates?

@gnulnulf
Copy link
Contributor

gnulnulf commented Nov 12, 2024

Also makefile.unix, makefile.unixdsl, makefile.unixdsl_debug might be broken but there is no CI for that and I guess there is no reason to keep those as there are cmake builds?

If it's possible to create the mame_debugger versions with cmake cleaning up is probably a good idea. I used the makefiles for sdl tests and mame_debuger versions.

In how far is pinmame still getting upstream mame updates?

While looking into where to start with sdl3 for windows. I tried to understand why there is a unix src and a windows src side and why they are so different. Mame is now cpp and has a complete different structure now.

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.

4 participants