valleybell / smpsplay Goto Github PK
View Code? Open in Web Editor NEWA player for SMPS files, a format commonly used in Sega MegaDrive games.
A player for SMPS files, a format commonly used in Sega MegaDrive games.
I feel like this might be an issue that Windows somehow introduced because I tried a previous version as well and had the same issues, but maybe you can help me troubleshoot anyway. The controls in the program seem pretty broken for some reason. For example, pressing down while a song is playing results in the program switching to PAL mode, and after any command is inputted, the whole program stops accepting any input and appears to freeze (music will continue to play, but the timer will stop). The only way out of this that I have found is hitting left or right. Can you reproduce this? I'm on the latest update for Windows 10.
Please add a volume option to prevent clipping (like, at least half). Without it, this player is useless for enjoyment.
I see this: a108ed3
But a month too late! You don't expect me to build this, do you? :(
Oh yeah, that build I was talking about? Doesn't work. Requires https://github.com/ValleyBell/libvgm , and that build doesn't work either. Rabbit hole++!
Let's qualify this: "Doesn't work" as in if you don't want to screw around with Microsoft and Visual Studio/MSBuild/today's greatest Microsoft idea. (I did, and it still didn't work.)
Shouldn't requiring CMake suggest that an MSYS or MinGW build will work? They don't. <dsound.h>
I love building.
A lot of players still don't support VGM 1.60, and I'd like an option to log as VGM 1.50.
Sure, it's outdated, but I'd like to be able to play it on other devices which only have players that don't support VGM 1.60.
Currently, building SMPSPlay requires some odd shenanigans with having to build libvgm separately, and having to pass in the include directory into the main CMake command. Since the SMPSPlay libvgm is a fork, it should be reworked so that libvgm is compiled as a CMake library, that way it can be compiled, included, and linked via the main CMakeLists.txt, rather than the current system in place. Unless there is some other reason as to why the system should be like this, this should be something to be looked into, as the current system is both difficult to use and implement for other projects.
Using the latest version of both smpsplay and libvgm
See:
Compiling src/Engine/dac.c ...
Compiling src/Engine/necpcm.c ...
Compiling src/Engine/smps.c ...
Compiling src/Engine/smps_commands.c ...
Compiling src/Engine/smps_drums.c ...
Compiling src/Engine/smps_extra.c ...
Compiling src/ini_lib.c ...
Compiling src/loader_data.c ...
Compiling src/loader_def.c ...
Compiling src/loader_ini.c ...
Compiling src/loader_smps.c ...
Compiling src/main.c ...
Compiling src/Sound.c ...
src/Sound.c: In function ‘StartAudioOutput’:
src/Sound.c:390:31: warning: passing argument 2 of ‘AudioDrv_SetCallback’ from incompatible pointer type [-Wincompatible-pointer-types]
390 | AudioDrv_SetCallback(audDrv, FillBuffer);
| ^~~~~~~~~~
| |
| UINT32 (*)(void *, UINT32, void *) {aka unsigned int (*)(void *, unsigned int, void *)}
In file included from src/Sound.c:16:
/usr/local/include/audio/AudioStream.h:141:61: note: expected ‘AUDFUNC_FILLBUF’ {aka ‘unsigned int (*)(void *, void *, unsigned int, void *)’} but argument is of type ‘UINT32 (*)(void *, UINT32, void*)’ {aka ‘unsigned int (*)(void *, unsigned int, void *)’}
141 | UINT8 AudioDrv_SetCallback(void* drvStruct, AUDFUNC_FILLBUF FillBufCallback, void* userParam);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
src/Sound.c:390:2: error: too few arguments to function ‘AudioDrv_SetCallback’
390 | AudioDrv_SetCallback(audDrv, FillBuffer);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/Sound.c:16:
/usr/local/include/audio/AudioStream.h:141:7: note: declared here
141 | UINT8 AudioDrv_SetCallback(void* drvStruct, AUDFUNC_FILLBUF FillBufCallback, void* userParam);
| ^~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:129: obj/Sound.o] Error 1
When building on Linux, I get this
Linking smpsplay ...
gcc obj/Engine/dac.o obj/Engine/necpcm.o obj/Engine/smps.o obj/Engine/smps_commands.o obj/Engine/smps_drums.o obj/Engine/smps_extra.o obj/ini_lib.o obj/loader_data.o obj/loader_def.o obj/loader_ini.o obj/loader_smps.o obj/main.o obj/Sound.o obj/vgmwrite.o libs/install/lib/libvgm-audio.a libs/install/lib/libvgm-emu.a -lm -lrt -pthread -lasound -lao -o smpsplay
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudioStream.c.o): in function `DoDataForwarding':
AudioStream.c:(.text+0x18): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudioStream.c:(.text+0x6f): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudioStream.c.o): in function `AudioDrv_Init':
AudioStream.c:(.text+0x4e5): undefined reference to `OSMutex_Init'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudioStream.c.o): in function `AudioDrv_Deinit':
AudioStream.c:(.text+0x5ce): undefined reference to `OSMutex_Deinit'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudioStream.c.o): in function `AudioDrv_SetCallback':
AudioStream.c:(.text+0x6ec): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudioStream.c:(.text+0x72f): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudioStream.c.o): in function `AudioDrv_DataForward_Add':
AudioStream.c:(.text+0x764): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudioStream.c:(.text+0x7b5): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudioStream.c.o): in function `AudioDrv_DataForward_Remove':
AudioStream.c:(.text+0x83a): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudioStream.c:(.text+0x87e): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: AudioStream.c:(.text+0x8d5): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudioStream.c.o): in function `AudioDrv_DataForward_RemoveAll':
AudioStream.c:(.text+0x8fe): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudioStream.c:(.text+0x946): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudioStream.c.o): in function `AudioDrv_WriteData':
AudioStream.c:(.text+0x9c6): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudioStream.c:(.text+0xa06): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_OSS.c.o): in function `OSS_Start':
AudDrv_OSS.c:(.text+0x2ec): undefined reference to `OSSignal_Reset'
/usr/bin/ld: AudDrv_OSS.c:(.text+0x2ff): undefined reference to `OSThread_Init'
/usr/bin/ld: AudDrv_OSS.c:(.text+0x327): undefined reference to `OSSignal_Signal'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_OSS.c.o): in function `OSS_SetCallback':
AudDrv_OSS.c:(.text+0x43c): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudDrv_OSS.c:(.text+0x457): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_OSS.c.o): in function `OssThread':
AudDrv_OSS.c:(.text+0x479): undefined reference to `OSSignal_Wait'
/usr/bin/ld: AudDrv_OSS.c:(.text+0x491): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudDrv_OSS.c:(.text+0x4c9): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: AudDrv_OSS.c:(.text+0x4f5): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_OSS.c.o): in function `OSS_Stop':
AudDrv_OSS.c:(.text+0x5dd): undefined reference to `OSThread_Join'
/usr/bin/ld: AudDrv_OSS.c:(.text+0x5e6): undefined reference to `OSThread_Deinit'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_OSS.c.o): in function `OSS_Destroy':
AudDrv_OSS.c:(.text+0x646): undefined reference to `OSThread_Cancel'
/usr/bin/ld: AudDrv_OSS.c:(.text+0x64f): undefined reference to `OSThread_Deinit'
/usr/bin/ld: AudDrv_OSS.c:(.text+0x65d): undefined reference to `OSSignal_Deinit'
/usr/bin/ld: AudDrv_OSS.c:(.text+0x66b): undefined reference to `OSMutex_Deinit'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_OSS.c.o): in function `OSS_Create':
AudDrv_OSS.c:(.text+0x6dd): undefined reference to `OSSignal_Init'
/usr/bin/ld: AudDrv_OSS.c:(.text+0x6ea): undefined reference to `OSMutex_Init'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_ALSA.c.o): in function `ALSA_Start':
AudDrv_ALSA.c:(.text+0x2ba): undefined reference to `OSSignal_Reset'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x2cd): undefined reference to `OSThread_Init'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x2f9): undefined reference to `OSSignal_Signal'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_ALSA.c.o): in function `ALSA_SetCallback':
AudDrv_ALSA.c:(.text+0x38c): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x3a7): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_ALSA.c.o): in function `AlsaThread':
AudDrv_ALSA.c:(.text+0x3cc): undefined reference to `OSSignal_Wait'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x3f9): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x465): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_ALSA.c.o): in function `ALSA_Stop':
AudDrv_ALSA.c:(.text+0x67d): undefined reference to `OSThread_Join'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x686): undefined reference to `OSThread_Deinit'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_ALSA.c.o): in function `ALSA_Destroy':
AudDrv_ALSA.c:(.text+0x706): undefined reference to `OSThread_Cancel'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x70f): undefined reference to `OSThread_Deinit'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x71d): undefined reference to `OSSignal_Deinit'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x72b): undefined reference to `OSMutex_Deinit'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_ALSA.c.o): in function `ALSA_Create':
AudDrv_ALSA.c:(.text+0x792): undefined reference to `OSSignal_Init'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x79f): undefined reference to `OSMutex_Init'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_ALSA.c.o): in function `ALSA_WriteData':
AudDrv_ALSA.c:(.text+0x81a): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x84d): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: AudDrv_ALSA.c:(.text+0x88a): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `Pulse_Start':
AudDrv_Pulse.c:(.text+0x18e): undefined reference to `pa_simple_new'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x1a4): undefined reference to `OSSignal_Reset'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x1b7): undefined reference to `OSThread_Init'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x1db): undefined reference to `OSSignal_Signal'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x223): undefined reference to `pa_simple_free'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `Pulse_SetCallback':
AudDrv_Pulse.c:(.text+0x26c): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x287): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `PulseThread':
AudDrv_Pulse.c:(.text+0x2a9): undefined reference to `OSSignal_Wait'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x2c1): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x2f3): undefined reference to `pa_simple_write'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x2fc): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x325): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `Pulse_GetLatency':
AudDrv_Pulse.c:(.text+0x34b): undefined reference to `pa_simple_get_latency'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `Pulse_WriteData':
AudDrv_Pulse.c:(.text+0x3f8): undefined reference to `pa_simple_write'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `Pulse_Stop':
AudDrv_Pulse.c:(.text+0x43d): undefined reference to `OSThread_Join'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x446): undefined reference to `OSThread_Deinit'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x468): undefined reference to `pa_simple_free'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `Pulse_Destroy':
AudDrv_Pulse.c:(.text+0x496): undefined reference to `OSThread_Cancel'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x49f): undefined reference to `OSThread_Deinit'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x4ad): undefined reference to `OSSignal_Deinit'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x4bb): undefined reference to `OSMutex_Deinit'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_Pulse.c.o): in function `Pulse_Create':
AudDrv_Pulse.c:(.text+0x542): undefined reference to `OSSignal_Init'
/usr/bin/ld: AudDrv_Pulse.c:(.text+0x54f): undefined reference to `OSMutex_Init'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_libao.c.o): in function `LibAO_Start':
AudDrv_libao.c:(.text+0x182): undefined reference to `OSSignal_Reset'
/usr/bin/ld: AudDrv_libao.c:(.text+0x195): undefined reference to `OSThread_Init'
/usr/bin/ld: AudDrv_libao.c:(.text+0x1b9): undefined reference to `OSSignal_Signal'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_libao.c.o): in function `LibAO_SetCallback':
AudDrv_libao.c:(.text+0x22c): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudDrv_libao.c:(.text+0x247): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_libao.c.o): in function `AoThread':
AudDrv_libao.c:(.text+0x269): undefined reference to `OSSignal_Wait'
/usr/bin/ld: AudDrv_libao.c:(.text+0x281): undefined reference to `OSMutex_Lock'
/usr/bin/ld: AudDrv_libao.c:(.text+0x2ba): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: AudDrv_libao.c:(.text+0x2e5): undefined reference to `OSMutex_Unlock'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_libao.c.o): in function `LibAO_Stop':
AudDrv_libao.c:(.text+0x42d): undefined reference to `OSThread_Join'
/usr/bin/ld: AudDrv_libao.c:(.text+0x436): undefined reference to `OSThread_Deinit'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_libao.c.o): in function `LibAO_Destroy':
AudDrv_libao.c:(.text+0x496): undefined reference to `OSThread_Cancel'
/usr/bin/ld: AudDrv_libao.c:(.text+0x49f): undefined reference to `OSThread_Deinit'
/usr/bin/ld: AudDrv_libao.c:(.text+0x4ad): undefined reference to `OSSignal_Deinit'
/usr/bin/ld: AudDrv_libao.c:(.text+0x4bb): undefined reference to `OSMutex_Deinit'
/usr/bin/ld: libs/install/lib/libvgm-audio.a(AudDrv_libao.c.o): in function `LibAO_Create':
AudDrv_libao.c:(.text+0x522): undefined reference to `OSSignal_Init'
/usr/bin/ld: AudDrv_libao.c:(.text+0x52f): undefined reference to `OSMutex_Init'
collect2: error: ld returned 1 exit status
make: *** [Makefile:121: smpsplay] Error 1
The dirent reimplementation has issues compiling without io.h, which seems to be some strange header provided by Microsoft, and is not at all available when compiling outside of Windows.
I've noticed that Ice Cap Zone (both acts) have an instrument that only plays once, and is way too loud, and another time with songs that I converted to Michael Jackson's Moonwalker usually play random notes at the start and end (and not when played in the actual game)
Can you port this player to the real hardware(Genesis/Megadrive)?
We need to sound psz files on the real hardware(Genesis/Megadrive) for our development game.
Could you please help?
VGM/XGM file size is too big to sound on the reak hardware...
I know this isn't the place to ask this, and I'm really sorry, but I don't know where else to find you. I just wanted to ask if you were planning on releasing SMPS rips of the S3 prototype that recently surfaced, given that you added the commands to SMPSPlay, and where I should look for it if/when you do.
Is there any way to change the tempo of the currently playing song? It's possible in Game Emu Player, so I figure it should be possible here, but I'm not sure. The end-goal of this is that I'd like to record an "in-game" version of the Blue Spheres theme from S3K that speeds up accordingly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.