Rev 214 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 214 | Rev 227 | ||
---|---|---|---|
Line 26... | Line 26... | ||
26 | new_app_base equ 0x60400000; 0x01000000 |
26 | new_app_base equ 0x60400000; 0x01000000 |
27 | PROC_BASE equ OS_BASE+0x0080000 |
27 | PROC_BASE equ OS_BASE+0x0080000 |
Line 28... | Line 28... | ||
28 | 28 | ||
29 | public START |
29 | public START |
- | 30 | public service_proc |
|
Line 30... | Line 31... | ||
30 | public service_proc |
31 | public version |
31 | 32 | ||
32 | extrn AttachIntHandler |
33 | extrn AttachIntHandler |
33 | extrn SysMsgBoardStr |
34 | extrn SysMsgBoardStr |
Line 44... | Line 45... | ||
44 | extrn GetCurrentTask |
45 | extrn GetCurrentTask |
45 | extrn GetService |
46 | extrn GetService |
46 | extrn ServiceHandler |
47 | extrn ServiceHandler |
47 | extrn FpuSave |
48 | extrn FpuSave |
48 | extrn FpuRestore |
49 | extrn FpuRestore |
- | 50 | extrn SendEvent |
|
Line 49... | Line 51... | ||
49 | 51 | ||
50 | SND_CREATE_BUFF equ 2 |
52 | SND_CREATE_BUFF equ 2 |
51 | SND_PLAY equ 3 |
53 | SND_PLAY equ 3 |
52 | SND_STOP equ 4 |
54 | SND_STOP equ 4 |
Line 72... | Line 74... | ||
72 | 74 | ||
Line 73... | Line 75... | ||
73 | section '.flat' code readable align 16 |
75 | section '.flat' code readable align 16 |
Line 74... | Line -... | ||
74 | - | ||
75 | proc START stdcall, state:dword |
76 | |
76 | - | ||
77 | mov eax, [state] |
77 | proc START stdcall, state:dword |
78 | cmp eax, 1 |
78 | |
79 | je .entry |
79 | cmp [state], 1 |
80 | jmp .exit |
80 | jne .exit |
81 | .entry: |
81 | |
82 | stdcall GetService, szSound |
82 | stdcall GetService, szSound |
Line 399... | Line 399... | ||
399 | ; mov esi, msgPlay |
399 | ; mov esi, msgPlay |
400 | ; call [SysMsgBoardStr] |
400 | ; call [SysMsgBoardStr] |
401 | ; end if |
401 | ; end if |
Line 402... | Line 402... | ||
402 | 402 | ||
403 | stdcall dev_play, [hSound] |
- | |
404 | 403 | stdcall dev_play, [hSound] |
|
405 | xor eax, eax |
404 | xor eax, eax |
406 | inc eax |
405 | inc eax |
407 | ret |
- | |
408 | 406 | ret |
|
409 | .fail: |
407 | .fail: |
410 | xor eax, eax |
408 | xor eax, eax |
411 | ret |
- | |
412 | 409 | ret |
|
Line 413... | Line 410... | ||
413 | endp |
410 | endp |
414 | 411 | ||
Line 428... | Line 425... | ||
428 | ; stdcall [ServiceHandler], [hSound], dword DEV_STOP, 0 |
425 | ; stdcall [ServiceHandler], [hSound], dword DEV_STOP, 0 |
Line 429... | Line 426... | ||
429 | 426 | ||
430 | xor eax, eax |
427 | xor eax, eax |
431 | inc eax |
428 | inc eax |
432 | ret |
- | |
433 | 429 | ret |
|
434 | .fail: |
430 | .fail: |
435 | xor eax, eax |
431 | xor eax, eax |
436 | ret |
- | |
437 | 432 | ret |
|
Line 438... | Line 433... | ||
438 | endp |
433 | endp |
439 | 434 | ||
Line 497... | Line 492... | ||
497 | bsf eax, [esi] |
492 | bsf eax, [esi] |
498 | jnz .find |
493 | jnz .find |
499 | popf |
494 | popf |
500 | xor eax, eax |
495 | xor eax, eax |
501 | ret |
496 | ret |
502 | 497 | .find: |
|
503 | .find: btr [esi], eax |
498 | btr [esi], eax |
504 | popf |
499 | popf |
505 | mov ebx, STREAM_SIZE |
500 | mov ebx, STREAM_SIZE |
506 | mul ebx |
501 | mul ebx |
507 | add eax, stream |
502 | add eax, stream |
508 | ret |
503 | ret |
Line 517... | Line 512... | ||
517 | 512 | ||
518 | and edx, edx |
513 | and edx, edx |
Line 519... | Line 514... | ||
519 | jnz .err |
514 | jnz .err |
520 | - | ||
521 | bts [stream_map], eax |
515 | |
522 | 516 | bts [stream_map], eax |
|
523 | ret |
517 | ret |
524 | .err: |
518 | .err: |
525 | xor eax, eax |
519 | xor eax, eax |
Line 536... | Line 530... | ||
536 | 530 | ||
537 | mov eax, [esi+STR.curr_seg] |
531 | mov eax, [esi+STR.curr_seg] |
538 | cmp eax, [esi+STR.limit] |
532 | cmp eax, [esi+STR.limit] |
Line -... | Line 533... | ||
- | 533 | jb .next |
|
539 | jb .next |
534 | |
540 | 535 | .m1: |
|
541 | .m1: mov eax,[esi+STR.base] |
536 | mov eax,[esi+STR.base] |
542 | mov [esi+STR.curr_seg], eax |
537 | mov [esi+STR.curr_seg], eax |
543 | .next: |
538 | .next: |
544 | add edx, 4 |
539 | add edx, 4 |
Line 736... | Line 731... | ||
736 | m7 dw 0x8000,0x8000,0x8000,0x8000 |
731 | m7 dw 0x8000,0x8000,0x8000,0x8000 |
737 | mm80 dq 0x8080808080808080 |
732 | mm80 dq 0x8080808080808080 |
738 | mm_mask dq 0xFF00FF00FF00FF00 |
733 | mm_mask dq 0xFF00FF00FF00FF00 |
Line 739... | Line 734... | ||
739 | 734 | ||
- | 735 | stream_map dd 0xFFFF ; 16 |
|
Line 740... | Line 736... | ||
740 | stream_map dd 0xFFFF ; 16 |
736 | version dd 0x00010001 |
741 | 737 | ||
Line 742... | Line 738... | ||
742 | szInfinity db 'INFINITY',0 |
738 | szInfinity db 'INFINITY',0 |