From 8beb273f453f0444d93e396788502988f5c7cbf3 Mon Sep 17 00:00:00 2001 From: Yogev Ezra Date: Sat, 29 Jan 2011 19:26:09 +0000 Subject: [PATCH] Add sources of 'listplay' and 'startmus' to SVN; remove pre-compiled versions; force compile from sources. git-svn-id: svn://kolibrios.org@1794 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/eng/Makefile | 3 +- data/eng/media/listplay | Bin 1563 -> 0 bytes data/eng/media/startmus | Bin 156 -> 0 bytes data/rus/Makefile | 3 +- data/rus/media/listplay | Bin 1563 -> 0 bytes data/rus/media/startmus | Bin 156 -> 0 bytes programs/build_all.bat | 2 +- programs/media/listplay/trunk/listplay.asm | 844 +++++++++++++++++++++ programs/media/startmus/trunk/STARTMUS.ASM | 73 ++ programs/media/startmus/trunk/build.bat | 1 + 10 files changed, 923 insertions(+), 3 deletions(-) delete mode 100644 data/eng/media/listplay delete mode 100644 data/eng/media/startmus delete mode 100644 data/rus/media/listplay delete mode 100644 data/rus/media/startmus create mode 100644 programs/media/listplay/trunk/listplay.asm create mode 100644 programs/media/startmus/trunk/STARTMUS.ASM create mode 100644 programs/media/startmus/trunk/build.bat diff --git a/data/eng/Makefile b/data/eng/Makefile index 8b8d2259d6..927d0189dd 100644 --- a/data/eng/Makefile +++ b/data/eng/Makefile @@ -148,6 +148,8 @@ FASM_PROGRAMS:=\ media/cdp:MEDIA/CDP:$(PROGS)/media/cdp/trunk/cdp.asm \ media/kiv:MEDIA/KIV:$(PROGS)/media/kiv/trunk/kiv.asm \ media/midamp:MEDIA/MIDAMP:$(PROGS)/media/midamp/trunk/midamp.asm \ + media/listplay:MEDIA/LISTPLAY:$(PROGS)/media/listplay/trunk/listplay.asm \ + media/startmus:MEDIA/STARTMUS:$(PROGS)/media/startmus/trunk/STARTMUS.ASM \ network/airc:NETWORK/AIRC:$(PROGS)/network/airc/trunk/airc.asm \ network/arpstat:NETWORK/ARPSTAT:$(PROGS)/network/arpstat/trunk/arpstat.asm \ network/chess:NETWORK/CHESS:$(PROGS)/network/chess/trunk/chess.asm \ @@ -246,7 +248,6 @@ OTHER_FILES:=asciivju:ASCIIVJU autorun.dat:AUTORUN.DAT \ lib/cnv_png.obj:LIB/CNV_PNG.OBJ lib/msgbox.obj:LIB/MSGBOX.OBJ \ lib/pixlib.obj:LIB/PIXLIB.OBJ lib/sort.obj:LIB/SORT.OBJ \ media/ac97snd:MEDIA/AC97SND media/kiv.ini:MEDIA/KIV.INI \ - media/listplay:MEDIA/LISTPLAY media/startmus:MEDIA/STARTMUS \ network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \ #end of list #3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT diff --git a/data/eng/media/listplay b/data/eng/media/listplay deleted file mode 100644 index 422e7a2b0f8affcae9cf721bd7212fe7980dbe7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1563 zcmV+$2ITomP(w@T4*&px00001Mv*2LLXK;4&&M{gp_ZS%qWb6G2$VPghLTDiSuVqt zc_;{+sXdO}B&=U(e6I?tBaz&!Ykk`8C7<*)CN*9&>!a0{5LhvWH5&22>HxqC)|?uD z)e~VP73r;o$b22wiQF4vi~ww6i)N{}WMT3V!dgdgU;sVyzLt(fB-}PvbGP z|D>!?m;7mwC$##I-7d%-9gHz9%7K8K0_#E1Kum`GvM5UE&rVvIwy`0M{Dv!b{bc+dn^C25E>CWNyI{ zD9}_w;9kcr@1m$>+PKr5uSRAiy2y93b;%57Aq74?D;{+GB{#QSGJa7kG14ZEvO_3` z7uN{*a@W4`1hN5A!_-lK$7E~S|Cv@dB!3OtK&6)~egu|dibasZk&klo1+}_TSw%l2 z7m;{{kQ$NI`gmCmoakneKGLB)$S^o#aWlS%&ir8QxHTtEyp?2vZrQIg24F+H1eq4G zYH>xEY&}vMKS<*K*^y@#XrzhJjIvAIFN0?A#hJP$YL|F`@{TiECaC$fzIZ$%33S;+ zq)3Bv46KR2nJ)yV$5t`Ea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@ FASM_PROGRAMS:=\ media/cdp:MEDIA/CDP:$(PROGS)/media/cdp/trunk/cdp.asm \ media/kiv:MEDIA/KIV:$(PROGS)/media/kiv/trunk/kiv.asm \ media/midamp:MEDIA/MIDAMP:$(PROGS)/media/midamp/trunk/midamp.asm \ + media/listplay:MEDIA/LISTPLAY:$(PROGS)/media/listplay/trunk/listplay.asm \ + media/startmus:MEDIA/STARTMUS:$(PROGS)/media/startmus/trunk/STARTMUS.ASM \ network/airc:NETWORK/AIRC:$(PROGS)/network/airc/trunk/airc.asm \ network/arpstat:NETWORK/ARPSTAT:$(PROGS)/network/arpstat/trunk/arpstat.asm \ network/chess:NETWORK/CHESS:$(PROGS)/network/chess/trunk/chess.asm \ @@ -247,7 +249,6 @@ OTHER_FILES:=asciivju:ASCIIVJU autorun.dat:AUTORUN.DAT \ lib/cnv_png.obj:LIB/CNV_PNG.OBJ lib/msgbox.obj:LIB/MSGBOX.OBJ \ lib/pixlib.obj:LIB/PIXLIB.OBJ lib/sort.obj:LIB/SORT.OBJ \ media/ac97snd:MEDIA/AC97SND media/kiv.ini:MEDIA/KIV.INI \ - media/listplay:MEDIA/LISTPLAY media/startmus:MEDIA/STARTMUS \ network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \ #end of list #3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT diff --git a/data/rus/media/listplay b/data/rus/media/listplay deleted file mode 100644 index 422e7a2b0f8affcae9cf721bd7212fe7980dbe7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1563 zcmV+$2ITomP(w@T4*&px00001Mv*2LLXK;4&&M{gp_ZS%qWb6G2$VPghLTDiSuVqt zc_;{+sXdO}B&=U(e6I?tBaz&!Ykk`8C7<*)CN*9&>!a0{5LhvWH5&22>HxqC)|?uD z)e~VP73r;o$b22wiQF4vi~ww6i)N{}WMT3V!dgdgU;sVyzLt(fB-}PvbGP z|D>!?m;7mwC$##I-7d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;CMIW#5Vn*qQ??AD15QjqkyD*CE=gFV z>}l2KXqQH7p=HGDBIQ;FAE?Q^$xmH=H3?^0Jemd(9M z13b`rOnBOy$7d3#G(aTbJi{{_9J3*MRVE>iM~DGQO5yrwcQ>xGy}Sn9%J{y#^34Sc ND5#iJXa)9a@k<2DVyZU7G-v~|*ns%6_13>hV zOPuPdb;L*?sbV@HgTFp@7c<42{p5`Why#4qE{JY>4Faj=yLTX^eAMJeQjIU)6v;hS KDx|9#^8f(q$3|NK diff --git a/programs/build_all.bat b/programs/build_all.bat index 6b88a3a1f4..7a5832006a 100644 --- a/programs/build_all.bat +++ b/programs/build_all.bat @@ -207,7 +207,7 @@ fasm demos\3dtcub10\trunk\3dtcub10.asm %BIN%\3d\3dtcub10 cd demos\aclock\trunk\ nasmw -t -f bin -o ..\..\..\%BIN%\demos\aclock aclock.asm cd ..\..\.. -fasm demos\bcdclk\bcdclk\bcdclk.asm %BIN%\demos\bcdclk +fasm demos\bcdclk\trunk\bcdclk.asm %BIN%\demos\bcdclk fasm demos\bgitest\trunk\bgitest.asm %BIN%\fonts\bgitest fasm demos\colorref\trunk\colorref.asm %BIN%\demos\colorref fasm demos\crownscr\trunk\crownscr.asm %BIN%\3d\crownscr diff --git a/programs/media/listplay/trunk/listplay.asm b/programs/media/listplay/trunk/listplay.asm new file mode 100644 index 0000000000..38f3042b4e --- /dev/null +++ b/programs/media/listplay/trunk/listplay.asm @@ -0,0 +1,844 @@ + +; +; Compile with flat assembler +; Программка позволяющая проигрывать плейлист +; Разработал: ДедОк :) + +use32 + + org 0x0 + + db 'MENUET01' ; 8 byte id + dd 0x01 ; header version + dd START ; start of code + dd I_END ; size of image + dd 0x25000 ; memory for app + dd 0x20000 ; esp + dd playlist, 0x0 + +include '..\..\macros.inc' + +START: ; start of execution +or [trig_sys],40h +call scandr +jmp mmm.seach +still: + not [trig_sys] + or [trig_sys],400h + not [trig_sys] + or [trig_sys],200h + call enproc + call delproc + mov eax,23 ; wait here for event + mov ebx,20 + mcall + cmp eax,1 ; redraw request ? + je red + cmp eax,3 ; button in buffer ? + je button + test [trig_sys],200h + jz next_song + jmp still +next_song: + add [poz_butt],1 + movzx eax,[poz_song] + add eax,1 + mov [poz_song],al + mov dx,255 + mul dx + mov [song_poz], eax + movzx eax,[poz_song] + sub eax,1 + cmp [song_count],eax + ja .dgo + mov [poz_song],1 + mov [song_poz],255 + mov [poz_butt],6 +.dgo: + call load_song + call procskan + call start + or [trig_sys],200h + call draw_window + jmp still +red: + call draw_window + jmp still +button: ; button + mov eax,17 + mcall + cmp ah,1 + je close + cmp ah,2 + je mmm + cmp ah,3 + je mma + cmp ah,4 + je mmd + cmp ah,5 + je mmf + cmp ah,38 + jb mma + ret +close: + mov eax,-1 + mcall +mma: + mov [poz_butt],ah + mov [poz_song],ah + sub [poz_song],5 + movzx eax,[poz_song] + add eax,[sme] + mov [poz_song],al + mov dx,255 + mul dx + mov [song_poz], eax + call load_song + call procskan + call start + or [trig_sys],200h + call draw_window + jmp still +mmw: + mov ebx,file_info2 + mov ecx,[razm_str] + add dword [ebx+4],ecx + or [trig_sys],40h + jmp mmm.seach + ret +mmm: +.seach: + call getstring + call get_drive + call put_db + call draw_window + test [trig_sys],04h + jz mmw + jmp still +mmd: + cmp [poz_db3],510 + jb .emd + sub [poz_db3],255 + add [poz_butt],1 + sub [sme],1 +.emd: + call draw_window + jmp still +mmf: + add [poz_db3],255 + sub [poz_butt],1 + add [sme],1 + call draw_window + jmp still +procskan: + mov [num_proc],255 +qqqqq: + mov eax,9 + mov ebx,pib + mov ecx, [num_proc] + mcall + cld + lea si,[pib.process_name] + lea di,[minus] + mov cx,7 + rep cmps byte [si],[di] + jcxz mat + sub [num_proc],1 + cmp [num_proc],1 + jne qqqqq + ret +mat: + mov eax,18 + mov ebx,2 + mov ecx,[num_proc] + mcall + jmp procskan +scandr: + mov eax,18 + mov ebx,11 + mov ecx,1 + mov edx,scan_rez + mcall + ret +mountpl: + mov cx,255 + cld + lea di,[fl] + mov al,00h + repne stos byte [di] + cld + mov cx,6 + lea si,[play_list] + lea di,[fl] + rep movs byte [di],[si] + mov cx,0 + ret +get_drive: + mov al,byte[scan_rez+1] + mov [my_draw],al + mov [ns],48 + cmp [my_draw],0 + jne .c0 + or [trig_sys],01h +.c0: + cmp [my_draw],0x80 + jb .h0 + sub [my_draw],0x80 + mov [n_razd],1 + mov [nd],49 + mov al,[cd_0] + mov [td],al + call folscan +.h0: + cmp [trig_scan],1 + je ex1 + cmp [my_draw],0x40 + jb .c1 + sub [my_draw],0x40 + mov al,byte[scan_rez+2] + mov [n_razd],al + add al,48 + mov [nd],al + mov al,[hd_0] + mov [td],al + call folscan +.c1: + cmp [trig_scan],1 + je ex1 + cmp [my_draw],0x20 + jb .h1 + sub [my_draw],0x20 + mov [n_razd],1 + mov [nd],49 + mov al,[cd_0] + mov [ns],19 + call folscan +.h1: + cmp [trig_scan],1 + je ex1 + cmp [my_draw],0x10 + jb .c2 + sub [my_draw],0x10 + mov al,byte[scan_rez+3] + mov [n_razd],al + add al,48 + mov [nd],al + mov al,[hd_0] + mov [td],al + mov [ns],49 + call folscan +.c2: + cmp [trig_scan],1 + je ex1 + cmp [my_draw],0x08 + jb .h2 + sub [my_draw],0x08 + mov [n_razd],1 + mov [nd],49 + mov al,[cd_0] + mov [td],al + mov [ns],50 + call folscan +.h2: + cmp [trig_scan],1 + je ex1 + cmp [my_draw],0x04 + jb .c3 + sub [my_draw],0x04 + mov al,byte[scan_rez+4] + mov [n_razd],al + add al,48 + mov [nd],al + mov al,[hd_0] + mov [td],al + mov [ns],50 + call folscan +.c3: + cmp [trig_scan],1 + je ex1 + cmp [my_draw],0x02 + jb .h3 + sub [my_draw],0x02 + mov [n_razd],1 + mov [nd],49 + mov al,[cd_0] + mov [td],al + mov [ns],51 + call folscan +.h3: + cmp [trig_scan],1 + je ex1 + cmp [my_draw],0x01 + jb ex1 + sub [my_draw],0x01 + mov al,byte[scan_rez+5] + mov [n_razd],al + add al,48 + mov [nd],al + mov al,[hd_0] + mov [td],al + mov [ns],51 + call folscan +ex1: + cmp [fold],05h + jne ext2 + or [trig_sys],04h +ext2: + cmp [fold],0Ah + jne ext3 + or [trig_sys],08h + jmp eext +ext3: + mov [trig_scan],0 + not [trig_sys] + or [trig_sys],0Eh + not [trig_sys] +eext: + ret +folscan: + cmp [trig_scan],1 + je .out2 + mov eax,70 + mov ebx,file_info + mcall + mov [fold],eax + cmp [fold],0 + jne .out + mov al,1 + mov [trig_scan],al + jmp .out2 +.out: + mov al,1 + sub [n_razd],al + mov al,1 + sub [nd],al + cmp [n_razd],0 + jne folscan +.out2: + ret +get_play: + mov cx,255 + lea si,[floc] + lea di,[playlist] + rep movs byte [di],[si] + mov cx,0 +ret +getstring: + mov eax,70 + mov ebx,file_info2 + mov dword [ebx+12], 255 + mov dword [ebx+16],string1 + mov dword [ebx+21],playlist + mcall + cmp eax,6 + jne .pro + or [trig_sys],04h + call draw_window + jmp still +.pro: + + cmp ebx,0xFFFFFFFF + je .exit + call rus_m + cld + lea di,[string1] + mov cx,255 + mov al,0ah + repne scas byte [es:di] + je .calc + mov [razm_str],0 + mov ebx,file_info2 + add dword [ebx+4], 255 + or [trig_sys],40h + jmp mmm.seach +.calc: + mov [razm_str],255 + sub [razm_str],ecx +.kon: + mov [razm_path],0 + cld + lea di,[string1] + mov ecx,0 +.ppr: + cmp byte [es:di],70h + je .s1 + cmp byte [es:di],50h + je .s1 + add ecx,1 + add di,1 + cmp ecx,[razm_str] + jb .ppr + jmp .next +.s1: + add di,1 + cmp byte [es:di],33h + je .s2 + sub di,1 + jmp .next + ret +.s2: + + or [trig_sys],80h + mov [razm_path],ecx + add [razm_path],2 + +; mov [ss2],0 + cld + lea di,[string1] + mov cx,0 + mov [zzz],cx +.ppre: + cmp byte [es:di],3Ah + je .se1 + add cx,1 + add di,1 + cmp ecx,[razm_path] + jne .ppre + jmp .mount +.se1: + add di,1 + cmp byte [es:di],5Ch + je .se2 + sub di,1 + jmp .mount +.se2: + cmp ecx,250 + jb .se3 + mov ecx,0 +.se3: + add cx,2 +; mov [ss2],cx + mov [zzz],cx +.mount: + movzx ecx,[zzz] + cmp ecx, [razm_path] + jb .mount1 + or [trig_sys],04h + jmp still +.mount1: + mov ecx,255 + cld + lea di,[fl] + mov al,00h + repne stos byte [di] + cld + mov ecx,[razm_path] + sub cx,[zzz] + lea si,[string1] + add si,[zzz] + lea di,[fl] + rep movs byte [di],[si] + mov ecx,0 +.sl_m: + mov ecx,0 + lea di,[fl] +.cikl_mx: + mov al,byte[di] + mov [char_con],al + cmp al,5Ch + je .con_sl + jmp .ext6 +.con_sl: + mov al,2Fh +.ext6: + stos byte [di] + add ecx,1 + cmp ecx,[razm_path] + jb .cikl_mx + +.exit: + ret +.next: + not [trig_sys] + or [trig_sys],80h + not [trig_sys] + mov ebx,file_info2 + mov ecx,[razm_str] + add dword [ebx+4],ecx + or [trig_sys],40h + jmp mmm.seach +rus_m: + test [trig_sys],40h + jnz ddff + ret +ddff: + mov ecx,0 + lea di,[string1] +cicl_m: + mov al,byte[di] + mov [char_con],al + shr al,4 + cmp al,0Eh + je min_sor + cmp al,0Ch + je min_sor + cmp al,0Dh + je min_sor + cmp al,0Fh + je min_des + shl al,4 + mov al,0 + jmp ext5 +min_sor: + sub [char_con],40h + jmp ext5 +min_des: + sub [char_con],10h + jmp ext5 +ext5: + mov al,[char_con] + stos byte [di] + add ecx,1 + cmp ecx,255 + jb cicl_m + not [trig_sys] + or [trig_sys],40h + not [trig_sys] + ret + +put_db: + test [trig_sys],80h + jz .exit + add [song_count],1 + add [poz_db],255 + mov ecx,255 + cld + mov ebx,[poz_db] + lea di,[memlist+ebx] + mov al,00h + repne stos byte [di] + cld + mov ecx,255 + lea si,[floc] + mov ebx,[poz_db] + lea di,[memlist+ebx] + rep movs byte [di],[si] + mov ecx,0 +.exit: + ret +load_song: + cld + mov ecx,255 + lea di,[song_path] + mov ebx,[song_poz] + lea si,[memlist+ebx] + rep movs byte [di],[si] + mov ecx,0 + ret +start: + mov eax,70 + mov ebx,folder_inf + mcall + ret +delproc: + test [trig_sys],400h + jnz .sdf + ret +.sdf: + mov [num_proc],255 +.fgf: + mov eax,9 + mov ebx,pib + mov ecx, [num_proc] + mcall + cld + lea si,[pib.process_name] + lea di,[minus] + mov cx,7 + rep cmps byte [si],[di] + jcxz .qwer + sub [num_proc],1 + cmp [num_proc],1 + jne .fgf + test [trig_sys],200h + ret +.qwer: + mov eax,[pib+process_information.cpu_usage] + mov [q_takt],eax + cmp [q_takt],200000 + jb .asdf + ret +.asdf: + add [count_err],1 + cmp [count_err],6 + ja .djbn + ret +.djbn: + mov [count_err],0 + not [trig_sys] + or [trig_sys],200h + not [trig_sys] + ret +enproc: + mov [num_proc],255 +.fgf: + mov eax,9 + mov ebx,pib + mov ecx, [num_proc] + mcall + cld + lea si,[pib.process_name] + lea di,[minus] + mov cx,7 + rep cmps byte [si],[di] + jcxz .qwer + sub [num_proc],1 + cmp [num_proc],1 + jne .fgf + ret +.qwer: + or [trig_sys],400h + ret + +; ********************************************* +; ******* WINDOW DEFINITIONS AND DRAW ******** +; ********************************************* + +draw_window: + mov eax,48 + mov ebx,3 + mov ecx,sc + mov edx,sizeof.system_colors + mcall + mov eax,12 ; function 12:tell os about windowdraw + mov ebx,1 ; 1, start of draw + mcall + ; DRAW WINDOW + xor eax,eax ; function 0 : define and draw window + mov ebx,100*65536+550 ; [x start] *65536 + [x size] + mov ecx,100*65536+420 ; [y start] *65536 + [y size] + mov edx,[sc.work] ; color of work area RRGGBB,8->color gl + or edx,0x33000000 + mov edi,title + mcall + mov eax,4 + mov ebx,5*65536+5 + mov ecx,0xC0000000 + mov edx,label1 + mov edi,[sc.work] + mcall + mov eax,4 + mov ebx,300*65536+5 + mov ecx,0xC0000000 + mov edx,label5 + mov edi,[sc.work] + mcall + mov eax,4 + mov ebx,300*65536+15 + mov ecx,0xC0000000 + mov edx,label6 + mov edi,[sc.work] + mcall + mov eax,4 + mov ebx,25*65536+35 + mov ecx,0xC00000dd + mov edx,song_path + mov edi,[sc.work] + mcall + mov eax,4 + mov ebx,100*65536+5 + mov ecx,0xC0000000 + mov edx,playlist + mov edi,[sc.work] + mcall + test [trig_sys],4h + jnz .zam1 + mov eax,4 + mov ebx,5*65536+15 + mov ecx,0xC0000000 + mov edx,label3 + mov edi,[sc.work] + mcall + jmp .zam2 +.zam1: + mov eax,4 + mov ebx,5*65536+15 + mov ecx,0xC0000000 + mov edx,label2 + mov edi,[sc.work] + mcall + mov eax,4 + mov ebx,5*65536+25 + mov ecx,0xC0000000 + mov edx,label4 + mov edi,[sc.work] + mcall +.zam2: + +; mov eax,47 +; mov esi,0x50000000 +; mov ecx, [trig_sys] +; mov edi,[sc.work] +; mov ebx,0x00080100 +; mov edx,385*65536+25 +; mcall + mov eax,47 + mov esi,0x50000000 + mov ecx, [song_count] + mov edi,[sc.work] + mov ebx,0x00030000 + mov edx,500*65536+5 + mcall + mov eax,47 + mov esi,0x50000000 + movzx ecx, [poz_song] + mov edi,[sc.work] + mov ebx,0x00030000 + mov edx,500*65536+15 + mcall + mov [bbut],32 + mov [poz_but],48*65536+10 + mov edx,6 +butt1: + mov ebx,0*65536+20 + mov ecx,[poz_but] + mov esi,[color1] + movzx eax,[poz_butt] + cmp edx,eax + jne .uuu + mov esi,[color2] +.uuu: + mov eax,8 + mcall + add edx,1 + add [poz_but],10*65536 + sub [bbut],1 + cmp [bbut],0 + jne butt1 + mov eax,8 + mov ebx,525*65536+15 + mov ecx,45*65536+15 + mov esi,0x00aaaadd + mov edx,4 + mcall + mov eax,8 + mov ebx,525*65536+15 + mov ecx,365*65536+15 + mov esi,0x00aaaadd + mov edx,5 + mcall + mov [ai],32 + mov [list_poz],25*65536+50 + mov ebx,[poz_db3] + mov [poz_db2],ebx +list: + mov eax,4 + mov ecx,0xC0000000 + mov ebx,[poz_db2] + lea edx,[memlist+ebx] + mov ebx, [list_poz] + mov edi,[sc.work] + mcall + add [list_poz],10 + add [poz_db2],255 + sub [ai],1 + cmp [ai],0 + ja list + mov eax,12 ; function 12:tell os about windowdraw + mov ebx,2 ; 2, end of draw + mcall + ret + + + +; DATA AREA + + +title: db 'Проигрываем плейлист v 0.19 :)',0 +play_list: db '1.kpl',0 +cd_0: db 'c',0 +hd_0: db 'h',0 +label1: db 'Файл плейлиста:',0 +label2: db 'сканирование закончено... :) ',0 +label3: db 'Подождите, пожалуйста, идёт сканирование',0 +label4: db 'Воспроизводимый файл:',0 +label5: db 'Всего файлов в плейлисте найдено:',0 +label6: db 'Номер воспроизводимого файла:',0 +minus: db 'ac97snd',0 +player: db '/rd/1/ac97snd' ,0 +my_draw db 0 +n_razd db 0 +trig_scan db 0 +char_con db 0 +poz_butt db 0 +poz_song db 0 +count_err dd 0 +num_proc dd 0 +q_takt dd 0 +razm_str dd 0 +fold dd 0 +razm_path dd 0 +trig_sys dd 0 +poz_db dd 0 +poz_db2 dd 0 +poz_db3 dd 255 +song_poz dd 0 +list_poz dd 5*65536+50 +song_count dd 0 +ai dd 0 +st_r dd 0 +bbut dd 0 +poz_but dd 0 +sme dd 0 +color1 dd 0x006666dd +color2 dd 0x00dddddd +ss2 dd 0 +zzz dw 22 +scan_rez: + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 +floc: +pc: db '/' +td: db 'h' +dr: db 'd' +ns db 48 +vc: db '/' +nd db 48 +ks: db '/' +fl: + rb 255 +playlist rb 255 +song_path rb 255 +folder_inf: + dd 7 + dd 0 + dd song_path + dd 0 + dd 0 + db 0 + dd player +file_info: + dd 0 + dd 0 + dd 0 + dd 0 + dd 0 + db 0 + dd floc +file_info2: + dd 0 + dd 0 + dd 0 + dd 0 + dd 0 + db 0 + dd 0 +string1 rb 255 + +I_END: + + + +temp dd ? +sc system_colors +pib process_information +memlist rb 65536 + diff --git a/programs/media/startmus/trunk/STARTMUS.ASM b/programs/media/startmus/trunk/STARTMUS.ASM new file mode 100644 index 0000000000..963034d61d --- /dev/null +++ b/programs/media/startmus/trunk/STARTMUS.ASM @@ -0,0 +1,73 @@ +use32 + db 'MENUET01' + dd 1 + dd start + dd i_end + dd 0x400 + dd 0x400 + dd 0,0 + +include '..\..\macros.inc' + +start: + mov eax, 55 + mov ebx, eax + mov esi, melody2 + int 0x40 + mov eax, 5 + mov ebx, 1000 + int 0x40 + mov eax, -1 + int 0x40 + +melody1: + db 0xE4, 0x35, 0x99, 0x33, 0x99, 0x31, 0x99, 0x33 + db 0xE4, 0x35, 0x99, 0x35, 0x99, 0x36, 0x99, 0x38, 0x99, 0x3A + db 0xE4, 0x36, 0xE4, 0x36 + db 0xB2, 0xFF + db 0xE4, 0x33, 0x99, 0x31, 0x99, 0x2C, 0x99, 0x31 + db 0xE4, 0x33, 0xB2, 0x33, 0x99, 0x35, 0x99, 0x36 + db 0xE4, 0x35, 0xE4, 0x35 + db 0xB2, 0xFF + db 0x99, 0x35, 0x99, 0x36 + db 0xE4, 0x33, 0x99, 0x35, 0x99, 0x36 + db 0xB2, 0x33, 0x99, 0x35, 0x99, 0x36 + db 0xB2, 0x33, 0x99, 0x35, 0x99, 0x36 + db 0xE4, 0x39, 0xE4, 0x39 + db 0xB2, 0xFF + db 0x99, 0x35, 0x99, 0x36 + db 0xE4, 0x33, 0x99, 0x35, 0x99, 0x36 + db 0xB2, 0x33, 0x99, 0x35, 0x99, 0x36 + db 0xB2, 0x33, 0x99, 0x35, 0x99, 0x36 + db 0xE4, 0x35, 0xE4, 0x35 + db 0 + +melody2: + db 0x90, 0x31, 0x90, 0x33, 0x90, 0x35, 0x90, 0x36 + db 0xA0, 0xFF + db 0xA0, 0x06 + db 0x90, 0xFF + db 0xA0, 0x06 + db 0x90, 0xFF + db 0x90, 0x33, 0x90, 0x35, 0x90, 0x37, 0x90, 0x38 + db 0xA0, 0xFF + db 0xA0, 0x18 + db 0x90, 0xFF + db 0xA0, 0x18 + db 0x90, 0xFF + db 0x90, 0x33, 0x90, 0x35, 0x90, 0x37, 0x90, 0x38 + db 0xA0, 0xFF + db 0x90, 0x33, 0x90, 0x35, 0x90, 0x37, 0x90, 0x38 + db 0xA0, 0xFF + db 0x90, 0x31, 0x90, 0x33, 0x90, 0x35, 0x90, 0x36 + db 0xA0, 0xFF + db 0xA0, 0x16 + db 0x90, 0xFF + db 0xA0, 0x16 + db 0 + +melody3: + db 0x99, 0x31, 0xB2, 0x36, 0x99, 0x3A, 0xB2, 0x36 + db 0x99, 0x33, 0xB2, 0x28, 0xBC, 0x38 + db 0 +i_end: diff --git a/programs/media/startmus/trunk/build.bat b/programs/media/startmus/trunk/build.bat new file mode 100644 index 0000000000..6f5353b961 --- /dev/null +++ b/programs/media/startmus/trunk/build.bat @@ -0,0 +1 @@ +fasm startmus.asm startmus \ No newline at end of file