Posted October 5, 201113 yr Here is a DLL I have been working on. I intended this for my keygens and patchers,but figured I make it public.Calling conventions are _cdecl, iirc.Included is a example in C.Basically, this is a Nintendo Entertainment system music playback dll, for NSF/NSFE files.Due to the emulator used, the file size is quite big, but UPX does help somewhat.The emulator emulates all extension chips used for NES audio, including Sunsoft's expansion chips, as well as the VRC6/7 and Namco N-106 chips.EDIT:Also did a SNES SPC-700 emulator DLL.Same parameters as the NSF dll, same calling convention. Uses a much more accurate (cycle-exact) emulator then the dll "SNESAPU.DLL" thats floating around....Plays back SPC files only. Edited October 5, 201113 yr by mudlord
October 5, 201113 yr I liked the music in game one of my collection but I had no tools to rip it, I've tried looking on google but I did not find, how to rip music from *. nes or *. bin? ... maybe you can help me. thx b4.
October 6, 201113 yr Author Ripping music from NES games is complex.You need knowledge of 2a03 assembly language to create the rips.To ease things, some collections of NSF files are here:/>http://www.zophar.net/music/nsf.html/>http://2a03.free.fr//>http://midr2.under.jp/compo/top.htmlsnesmusic.org has plenty of soundtracks from SNES games, including Killer Instinct, Donkey Kong Country 2, etc. Because the SPC files contain a capture of SPC700 APU RAM, they all are 64KB, making them suitable for small patchers/keygens. The RSN files on snesmusic.org are just renamed RARs, so it should be no problem getting the files you need.
October 12, 201113 yr Author ported to dup2:Source code: http://svn.mudlord.info/dup2plugins/NSF plugin: http://mudlord.info/crap/re/tools/nsf_player_dup.rarSPC plugin: http://mudlord.info/crap/re/tools/spc_player_dup.rar
October 18, 201113 yr Author Those files should play back fine. If you are suggesting ZIP reading to be added, thats not gonna happen at all.Started work on a BASS.DLL based player DLL too, some reason BASS_Init fails, not sure why. Edited October 18, 201113 yr by mudlord
October 19, 201113 yr Hi Mudlord, I want the intro of the game Chiptune San Guo Zhi - Ying Jie Zhan (Chinese Version), I've search on google but I only met her a while there are some Chiptunes of the game, can you help me? thank you! ... Edited October 20, 201113 yr by Ondskapen
November 1, 201113 yr Author hi,any news about mp3/mid support plugin?I already got the code in the SVN for the MP3/OGG plugin, just needs to be bugfixed.MIDI support will get done when I feel like, or when I find a need to include it somewhere into my stuff.
November 4, 201113 yr hi, the dll is very good i used the dll for a delphi program and is very good i used the code: to declare the functions: function DLL_Play(HWND:hwnd;Data:Pointer;len,subsong:integer): byte; cdecl; external 'nsf_player.dll'; function DLL_Stop(): byte; cdecl; external 'nsf_player.dll'; to load the file: var FileBuffer:file; MusicFileBuffer:array of byte; //load the nsf file AssignFile(FileBuffer,'Castlevania.nsf'); ReSet(FileBuffer,1); SetLength(MusicFileBuffer,FileSize(FileBuffer)); BlockRead(FileBuffer,MusicFileBuffer[0],FileSize(FileBuffer)); CloseFile(FileBuffer); to play the music: //the first argument is the handle of the window DLL_Play(Form1.Handle,@MusicFileBuffer[0],Length(MusicFileBuffer),0); to stop the music: DLL_Stop();
November 4, 201113 yr also i was trying to use the dll in Game Maker, a program made in Delphi. Game Maker uses two type of data, double and string. It doesnt use pointers, so it was not possible to use the dll because i can't use the pointer to the music buffer. Do you think it's possible to make a dll that can use a string data type for the buffer? also i wanted to ask if it's possible to load more nsf file, so the game can use sound and music
November 5, 201113 yr hi, yes load the nsf file is also good. Thanks for the help in game maker i was using: //open file nsf_file=file_bin_open('Castlevania.nsf',0) nsf_filesize=file_bin_size(nsf_file) //the string nsf_filebuffer has the data of the file nsf_filebuffer='' a=0 while a<nsf_filesize { nsf_filebuffer=nsf_filebuffer+chr(file_bin_read_byte(nsf_file)) a=a+1 } file_bin_close(nsf_file) call the dll function, the second argument is the string with the data of the file, but the code doesnt work because the argument of the dll is a pointer, not a string. I hope it's clear. external_call(DLLPlayCall,window_handle(),nsf_filebuffer,nsf_filesize,0)
March 7, 201213 yr Author Got a odd error with the MP3 plugin when linking to the most recent SDK, other plugins work. http://www.sendspace.com/file/o3qfzo Edited March 7, 201213 yr by mudlord
March 7, 201213 yr Got a odd error with the MP3 plugin when linking to the most recent SDK, other plugins work. http://www.sendspace.com/file/o3qfzo seems you are using the old PDK. the new one tries to load dup2patcher.dll instead of dup2patcher.exe. thats the reason why the old plugins must be recompiled with the new PDK to get them work in v2.26. be sure you are using the latest dup2patcher.lib when building your plugin. Edited March 7, 201213 yr by diablo2oo2
March 7, 201213 yr Author Oh weird...will retry :SI was using the libs from the "c" directory of your archive. I take it they weren't updated? Edited March 7, 201213 yr by mudlord
March 7, 201213 yr i have another advice: add option called "loop x time(s)", some times user maybe only play 1 time, 2 times... or forever...regards
Create an account or sign in to comment