Guest badboy Posted July 7, 2006 Posted July 7, 2006 http://rapidshare.de/files/25159045/bass_src.zip.htmlsuported files MO3 / IT / XM / S3M / MTM / MOD / UMX/ MP3/WAV/MIDI AND MOREenjoy-Fudo
Guest Buzifer Posted July 8, 2006 Posted July 8, 2006 Oh.But it need bass.dll too.http://www.dll-files.com/dllindex/download.php?bassdownload0UHeRAWJgV
human Posted July 9, 2006 Posted July 9, 2006 bass suxx for intros keygensbetter use ufmod now on sourceforge, examples of use for masm,vb, even now tasm,vc,fasmhttp://sourceforge.net/projects/ufmod
Guest Firebreath Posted July 9, 2006 Posted July 9, 2006 im wondering if i use, ufmod, bassmod, etc. in a keygen. would i have to include the dll file?
human Posted July 9, 2006 Posted July 9, 2006 with ufmod you dont have to, but it only plays xm files and most effects, not all. with bass you need dll. so 5kb ufmod vs 100kb dll of bassmod
Ziggy Posted July 9, 2006 Posted July 9, 2006 with ufmod you dont have to, but it only plays xm files and most effects, not all. with bass you need dll. so 5kb ufmod vs 100kb dll of bassmodBASSMOD.dll is 34kb (unpacked) and can play XM, IT, S3M, MOD, MTM, UMX with very good results. But you do need to package the dll up with the keygen. PEBundle can do the job or the dll can be included as a resource. Z
Ehtyar Posted July 10, 2006 Posted July 10, 2006 (edited) ufmod also dramatically increases the size of the tune, easily making up for the size of the dll, just might have to put a little more work into your code with bass/bassmod If anyone is actually interested in a version that creates the dll from resources at runtime (masm of course), leave a reply. Edited July 10, 2006 by Ehtyar
Ziggy Posted July 10, 2006 Posted July 10, 2006 A couple of months ago in2k posted a nice masm example of bassmod.dll loaded from a resource. I've attached a copy as the rapidshare link is dead.Another example would be probably be useful.Ziggybmd.zip
Guest Firebreath Posted July 10, 2006 Posted July 10, 2006 ufmod also dramatically increases the size of the tune, easily making up for the size of the dll, just might have to put a little more work into your code with bass/bassmod If anyone is actually interested in a version that creates the dll from resources at runtime (masm of course), leave a reply. that seems interesting; is it the same as what ziggy just posted?
Ehtyar Posted July 10, 2006 Posted July 10, 2006 yep, he beat me to it. started working on a c example last night. i prefer asm myself, but i need to learn c so i figured it was as good occasion as any to try. got everything working cept the play function fails and i have no idea why. anyway, if anyone's interested in a c version, leave a reply.
Guest badboy Posted July 11, 2006 Posted July 11, 2006 bass.dll suport more music formats.486.model flat, stdcalloption casemap:noneinclude \masm32\include\windows.incinclude \masm32\include\kernel32.incinclude \masm32\include\user32.incinclude bass.incinclude \masm32\macros\macros.asmincludelib \masm32\lib\kernel32.libincludelib \masm32\lib\user32.libdialogproc proto :DWORD,:DWORD,:DWORD,:DWORD.datableh db "mod",0; change this to whatever prefix you wantsyntax db "%d",0rsrctype db "DLL",0err db "can't read/write bass.dll",0pathbuf db MAX_PATH dup(?)buf db MAX_PATH dup(?); BASSMOD function names, add any others you'll need herefunc1 db "BASS_Init",0func2 db "BASS_Start",0func3 db "BASS_MusicLoad",0func4 db "BASS_StreamCreateFile",0func5 db "BASS_ChannelPlay",0func6 db "BASS_ChannelPause",0func7 db "BASS_ChannelStop",0func8 db "BASS_MusicFree",0func9 db "BASS_StreamFree",0func10 db "BASS_Free",0.data?hInstance dd ?h dd ?; module handlefh dd ?; file handlew dd ?; receives the number of written bytess dd ?; size of resource (bass.dll)buffer dd ?resh dd ?module dd ?PlayOn dd ?; BASS function addresses, add any others you'll need hereBASS_Init_addr dd ?BASS_Start_addr dd ?BASS_MusicLoad_addr dd ?BASS_StreamCreateFile_addr dd ?BASS_ChannelPlay_addr dd ?BASS_ChannelPause_addr dd ?BASS_ChannelStop_addr dd ?BASS_MusicFree_addr dd ?BASS_StreamFree_addr dd ?BASS_Free_addr dd ?.codestart: invoke GetModuleHandle,0 mov hInstance, eax invoke DialogBoxParam,hInstance,1000,0,addr dialogproc,0 invoke ExitProcess,0InitBASSMOD proc invoke FindResource,hInstance,1101,addr rsrctype test eax,eax jz bail_out mov resh,eax invoke LoadResource,hInstance,resh invoke LockResource,eax test eax,eax jz bail_out mov buffer,eax invoke SizeofResource,hInstance,resh mov s,eax invoke GetTempPath,sizeof buf,addr buf test eax,eax jz bail_out invoke GetTempFileName,addr buf,addr bleh,0,addr buf test eax,eax jz bail_out invoke CreateFile,addr buf,GENERIC_WRITE,0,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,0 cmp eax,-1 je bail_out mov fh,eax invoke WriteFile,fh,buffer,s,addr w,0 invoke CloseHandle,fh invoke LoadLibrary,addr buf test eax,eax jz bail_out mov h,eax; start retrieving addresses, add any other calls for addresses you want to retrieve here invoke GetProcAddress,h,addr func1 mov BASS_Init_addr,eax invoke GetProcAddress,h,addr func2 mov BASS_Start_addr,eax invoke GetProcAddress,h,addr func3 mov BASS_MusicLoad_addr,eax invoke GetProcAddress,h,addr func4 mov BASS_StreamCreateFile_addr,eax invoke GetProcAddress,h,addr func5 mov BASS_ChannelPlay_addr,eax invoke GetProcAddress,h,addr func6 mov BASS_ChannelPause_addr,eax invoke GetProcAddress,h,addr func7 mov BASS_ChannelStop_addr,eax invoke GetProcAddress,h,addr func8 mov BASS_MusicFree_addr,eax invoke GetProcAddress,h,addr func9 mov BASS_StreamFree_addr,eax invoke GetProcAddress,h,addr func10 mov BASS_Free_addr,eax mov eax,1 retbail_out: xor eax,eax retInitBASSMOD endpdialogproc proc hwnd:DWORD,m:DWORD,wp:DWORD,l:DWORD LOCAL msg[5]:BYTE LOCAL hResInfo:DWORD LOCAL nMusicSize:DWORD LOCAL pMusic:DWORD .if m==WM_INITDIALOG invoke InitBASSMOD .if !eax invoke MessageBox,hwnd,addr err,addr err,MB_OK invoke ExitProcess,0 .endif push 0 push hwnd push 0 push 44100 push -1 call BASS_Init_addr call BASS_Start_addr .if eax!=NULL invoke FindResource,hInstance,1100,addr rsrctype mov hResInfo,eax invoke LoadResource,hInstance,hResInfo invoke LockResource,eax mov pMusic,eax invoke SizeofResource, hInstance, hResInfo mov nMusicSize, eax .if eax!=NULL push 0 push BASS_SAMPLE_LOOP or BASS_MUSIC_POSRESET or BASS_MUSIC_RAMPS push nMusicSize push 0 push pMusic push 1 call BASS_MusicLoad_addr .if !eax push BASS_SAMPLE_LOOP or BASS_MUSIC_POSRESET or BASS_MUSIC_RAMPS push nMusicSize push 0 push pMusic push 1 call BASS_StreamCreateFile_addr .endif mov module, eax .endif .else invoke wsprintf,addr msg,addr syntax,FUNC(GetLastError) invoke MessageBox,hwnd,addr msg,addr msg,MB_OK .endif mov PlayOn, FALSE mov eax,1 ret .elseif m==WM_COMMAND mov eax,wp .if ax==30 invoke DestroyWindow,hwnd .elseif ax==10 .if PlayOn == FALSE push 0 push module call BASS_ChannelPlay_addr mov PlayOn, TRUE .else push module call BASS_ChannelPause_addr mov PlayOn, FALSE .endif .endif .elseif m==WM_LBUTTONDOWN invoke ReleaseCapture invoke SendMessage,hwnd,WM_SYSCOMMAND,0F012h,0 .elseif m==WM_DESTROY call BASS_Free_addr invoke FreeLibrary,h invoke DeleteFile,addr buf .endif xor eax,eax retdialogproc endpend start
Ehtyar Posted July 11, 2006 Posted July 11, 2006 Code from the un4seen forum ported to bass, nice job. Anyway, remind me never to copy/paste typedefs *slaps self with tuna blablabla*. The c code is finnished and up for grabs for those who want
Guest jn2k Posted July 13, 2006 Posted July 13, 2006 (edited) It's pretty good,Badboy!But I can't get a point of calling SizeofResource and LockResource (in case of BASS_MusicLoad). Edited July 13, 2006 by jn2k
Ehtyar Posted July 13, 2006 Posted July 13, 2006 SizeOfResource is passed to bass to specify the length of the tune, and LockResource prevents windows from swapping the data out of memory.
Guest jn2k Posted July 13, 2006 Posted July 13, 2006 Thanks for an answer, Ehtyar!I exactly know what these functions for.I just would like to say what in case of calling BASS_MusicLoad it is not necessary.You can check it in the help file.
Ehtyar Posted July 13, 2006 Posted July 13, 2006 Whoever said they were necessary? Since there is a space for the arguement in BASS, there is obviously some reason for it, so you might aswell use it. And as for LockResource, well i wouldn't really want a resource that's in constant use to be swapped out of memory...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now