forked from KolibriOS/kolibrios
Krn: Removed outdated MIDI interface
Delete sysfn 20, 21.1, 26.1 git-svn-id: svn://kolibrios.org@10010 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3c309b14e1
commit
566428b0cc
@ -118,8 +118,8 @@ iglobal
|
|||||||
dd sys_getbutton ; 17-GetButton
|
dd sys_getbutton ; 17-GetButton
|
||||||
dd sys_system ; 18-System Services
|
dd sys_system ; 18-System Services
|
||||||
dd undefined_syscall ; 19-reserved
|
dd undefined_syscall ; 19-reserved
|
||||||
dd sys_midi ; 20-ResetMidi and OutputMidi
|
dd undefined_syscall ; 20- deprecated ResetMidi and OutputMidi
|
||||||
dd sys_setup ; 21-SetMidiBase,SetKeymap,SetShiftKeymap,.
|
dd sys_setup ; 21-SetKeymap,SetShiftKeymap,.
|
||||||
dd sys_settime ; 22-setting date,time,clock and alarm-clock
|
dd sys_settime ; 22-setting date,time,clock and alarm-clock
|
||||||
dd sys_wait_event_timeout ; 23-TimeOutWaitForEvent
|
dd sys_wait_event_timeout ; 23-TimeOutWaitForEvent
|
||||||
dd syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist
|
dd syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist
|
||||||
|
@ -429,9 +429,6 @@ current_slot_idx dd ? ; index of current thread slot
|
|||||||
thread_count dd ?
|
thread_count dd ?
|
||||||
|
|
||||||
; device addresses
|
; device addresses
|
||||||
mididp dd ?
|
|
||||||
midisp dd ?
|
|
||||||
|
|
||||||
;cdbase dd ?
|
;cdbase dd ?
|
||||||
;cdid dd ?
|
;cdid dd ?
|
||||||
|
|
||||||
|
@ -1285,54 +1285,6 @@ dd 1675
|
|||||||
ebx - SSF_WINDOW_BEHAVIOR (25)
|
ebx - SSF_WINDOW_BEHAVIOR (25)
|
||||||
ecx - SSSF_GET_WB (1), SSSF_SET_WB (2)
|
ecx - SSSF_GET_WB (1), SSSF_SET_WB (2)
|
||||||
======================================================================
|
======================================================================
|
||||||
==================== Функция 20 - интерфейс MIDI. ====================
|
|
||||||
======================================================================
|
|
||||||
|
|
||||||
!!! ВНИМАНИЕ. Данный интерфейс устарел и не должен использоваться !!!
|
|
||||||
|
|
||||||
------------------------ Подфункция 1 - сброс ------------------------
|
|
||||||
Параметры:
|
|
||||||
* eax = 20 - номер функции
|
|
||||||
* ebx = 1 - номер подфункции
|
|
||||||
|
|
||||||
-------------------- Подфункция 2 - вывести байт ---------------------
|
|
||||||
Параметры:
|
|
||||||
* eax = 20 - номер функции
|
|
||||||
* ebx = 2 - номер подфункции
|
|
||||||
* cl = байт для вывода
|
|
||||||
Возвращаемое значение (одинаково для обеих подфункций):
|
|
||||||
* eax = 0 - успешно
|
|
||||||
* eax = 1 - не определён базовый порт
|
|
||||||
Замечания:
|
|
||||||
* Предварительно должен быть определён базовый порт вызовом
|
|
||||||
подфункции 1 функции 21.
|
|
||||||
|
|
||||||
---------------------- Константы для регистров: ----------------------
|
|
||||||
eax - SF_MIDI (20)
|
|
||||||
ebx - SSF_RESET (1), SSF_OUTPUT (2)
|
|
||||||
======================================================================
|
|
||||||
==== Функция 21, подфункция 1 - установить базовый порт MPU MIDI. ====
|
|
||||||
======================================================================
|
|
||||||
|
|
||||||
!!! ВНИМАНИЕ. Данный интерфейс устарел и не должен использоваться !!!
|
|
||||||
|
|
||||||
Параметры:
|
|
||||||
* eax = 21 - номер функции
|
|
||||||
* ebx = 1 - номер подфункции
|
|
||||||
* ecx = номер базового порта
|
|
||||||
Возвращаемое значение:
|
|
||||||
* eax = 0 - успешно
|
|
||||||
* eax = -1 - ошибочный номер порта
|
|
||||||
Замечания:
|
|
||||||
* Номер порта должен удовлетворять условиям 0x100<=ecx<=0xFFFF.
|
|
||||||
* Установка базы нужна для работы функции 20.
|
|
||||||
* Получить установленный базовый порт можно вызовом
|
|
||||||
подфункции 1 функции 26.
|
|
||||||
|
|
||||||
---------------------- Константы для регистров: ----------------------
|
|
||||||
eax - SF_SYSTEM_SET (21)
|
|
||||||
ebx - SSF_MPU_MIDI_BASE (1)
|
|
||||||
======================================================================
|
|
||||||
===== Функция 21, подфункция 2 - установить раскладку клавиатуры. ====
|
===== Функция 21, подфункция 2 - установить раскладку клавиатуры. ====
|
||||||
======================================================================
|
======================================================================
|
||||||
Раскладка клавиатуры используется для преобразования сканкодов,
|
Раскладка клавиатуры используется для преобразования сканкодов,
|
||||||
@ -1562,24 +1514,6 @@ dd 1675
|
|||||||
---------------------- Константы для регистров: ----------------------
|
---------------------- Константы для регистров: ----------------------
|
||||||
eax - SF_SCREEN_PUT_IMAGE (25)
|
eax - SF_SCREEN_PUT_IMAGE (25)
|
||||||
======================================================================
|
======================================================================
|
||||||
===== Функция 26, подфункция 1 - получить базовый порт MPU MIDI. =====
|
|
||||||
======================================================================
|
|
||||||
|
|
||||||
!!! ВНИМАНИЕ. Данный интерфейс устарел и не должен использоваться !!!
|
|
||||||
|
|
||||||
Параметры:
|
|
||||||
* eax = 26 - номер функции
|
|
||||||
* ebx = 1 - номер подфункции
|
|
||||||
Возвращаемое значение:
|
|
||||||
* eax = номер порта
|
|
||||||
Замечания:
|
|
||||||
* Установить базовый порт можно вызовом
|
|
||||||
подфункции 1 функции 21.
|
|
||||||
|
|
||||||
---------------------- Константы для регистров: ----------------------
|
|
||||||
eax - SF_SYSTEM_GET (26)
|
|
||||||
ebx - SSF_MPU_MIDI_BASE (1)
|
|
||||||
======================================================================
|
|
||||||
====== Функция 26, подфункция 2 - получить раскладку клавиатуры. =====
|
====== Функция 26, подфункция 2 - получить раскладку клавиатуры. =====
|
||||||
======================================================================
|
======================================================================
|
||||||
Раскладка клавиатуры используется для преобразования сканкодов,
|
Раскладка клавиатуры используется для преобразования сканкодов,
|
||||||
|
@ -1277,53 +1277,6 @@ Constant position of the window relative to other windows:
|
|||||||
ebx - SSF_WINDOW_BEHAVIOR (25)
|
ebx - SSF_WINDOW_BEHAVIOR (25)
|
||||||
ecx - SSSF_GET_WB (1), SSSF_SET_WB (2)
|
ecx - SSSF_GET_WB (1), SSSF_SET_WB (2)
|
||||||
======================================================================
|
======================================================================
|
||||||
==================== Function 20 - MIDI interface. ===================
|
|
||||||
======================================================================
|
|
||||||
|
|
||||||
!!! WARNING. This interface is outdated and should not be used !!!
|
|
||||||
|
|
||||||
----------------------- Subfunction 1 - reset ------------------------
|
|
||||||
Parameters:
|
|
||||||
* eax = 20 - function number
|
|
||||||
* ebx = 1 - subfunction number
|
|
||||||
|
|
||||||
-------------------- Subfunction 2 - output byte ---------------------
|
|
||||||
Parameters:
|
|
||||||
* eax = 20 - function number
|
|
||||||
* ebx = 2 - subfunction number
|
|
||||||
* cl = byte for output
|
|
||||||
Returned value (is the same for both subfunctions):
|
|
||||||
* eax = 0 - success
|
|
||||||
* eax = 1 - base port is not defined
|
|
||||||
Remarks:
|
|
||||||
* Previously the base port must be defined by
|
|
||||||
subfunction 1 of function 21.
|
|
||||||
|
|
||||||
---------------------- Constants for registers: ----------------------
|
|
||||||
eax - SF_MIDI (20)
|
|
||||||
ebx - SSF_RESET (1), SSF_OUTPUT (2)
|
|
||||||
======================================================================
|
|
||||||
======== Function 21, subfunction 1 - set MPU MIDI base port. ========
|
|
||||||
======================================================================
|
|
||||||
|
|
||||||
!!! WARNING. This interface is outdated and should not be used !!!
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
* eax = 21 - function number
|
|
||||||
* ebx = 1 - subfunction number
|
|
||||||
* ecx = number of base port
|
|
||||||
Returned value
|
|
||||||
* eax = 0 - success
|
|
||||||
* eax = -1 - erratic number of a port
|
|
||||||
Remarks:
|
|
||||||
* Number of a port must satisfy to conditions 0x100<=ecx<=0xFFFF.
|
|
||||||
* The installation of base is necessary for function 20.
|
|
||||||
* To get base port use subfunction 1 of function 26.
|
|
||||||
|
|
||||||
---------------------- Constants for registers: ----------------------
|
|
||||||
eax - SF_SYSTEM_SET (21)
|
|
||||||
ebx - SSF_MPU_MIDI_BASE (1)
|
|
||||||
======================================================================
|
|
||||||
========== Function 21, subfunction 2 - set keyboard layout. =========
|
========== Function 21, subfunction 2 - set keyboard layout. =========
|
||||||
======================================================================
|
======================================================================
|
||||||
Keyboard layout is used to convert keyboard scancodes to ASCII-codes,
|
Keyboard layout is used to convert keyboard scancodes to ASCII-codes,
|
||||||
@ -1551,23 +1504,6 @@ Remarks:
|
|||||||
---------------------- Constants for registers: ----------------------
|
---------------------- Constants for registers: ----------------------
|
||||||
eax - SF_SCREEN_PUT_IMAGE (25)
|
eax - SF_SCREEN_PUT_IMAGE (25)
|
||||||
======================================================================
|
======================================================================
|
||||||
======== Function 26, subfunction 1 - get MPU MIDI base port. ========
|
|
||||||
======================================================================
|
|
||||||
|
|
||||||
!!! WARNING. This interface is outdated and should not be used !!!
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
* eax = 26 - function number
|
|
||||||
* ebx = 1 - subfunction number
|
|
||||||
Returned value:
|
|
||||||
* eax = port number
|
|
||||||
Parameters:
|
|
||||||
* To set base port use subfunction 1 of function 21.
|
|
||||||
|
|
||||||
---------------------- Constants for registers: ----------------------
|
|
||||||
eax - SF_SYSTEM_GET (26)
|
|
||||||
ebx - SSF_MPU_MIDI_BASE (1)
|
|
||||||
======================================================================
|
|
||||||
========== Function 26, subfunction 2 - get keyboard layout. =========
|
========== Function 26, subfunction 2 - get keyboard layout. =========
|
||||||
======================================================================
|
======================================================================
|
||||||
The keyboard layout is used to convert keyboard scancodes to
|
The keyboard layout is used to convert keyboard scancodes to
|
||||||
|
@ -1511,7 +1511,7 @@ draw_num_text:
|
|||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
sys_setup:
|
sys_setup:
|
||||||
; 1 = roland mpu midi base , base io address
|
; 1 = not used
|
||||||
; 2 = keyboard 1, base kaybap 2, shift keymap, 9 country 1eng 2fi 3ger 4rus
|
; 2 = keyboard 1, base kaybap 2, shift keymap, 9 country 1eng 2fi 3ger 4rus
|
||||||
; 3 = not used
|
; 3 = not used
|
||||||
; 4 = not used
|
; 4 = not used
|
||||||
@ -1525,26 +1525,8 @@ sys_setup:
|
|||||||
; 12 = enable pci access
|
; 12 = enable pci access
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
and [esp + SYSCALL_STACK.eax], 0
|
and [esp + SYSCALL_STACK.eax], 0
|
||||||
; F.21.1 - set MPU MIDI base port
|
|
||||||
dec ebx
|
|
||||||
jnz @f
|
|
||||||
|
|
||||||
cmp ecx, 0x100
|
|
||||||
jb @f
|
|
||||||
|
|
||||||
mov esi, 65535
|
|
||||||
cmp esi, ecx
|
|
||||||
jb @f
|
|
||||||
|
|
||||||
mov [midi_base], cx
|
|
||||||
mov word [mididp], cx
|
|
||||||
inc cx
|
|
||||||
mov word [midisp], cx
|
|
||||||
ret
|
|
||||||
;--------------------------------------
|
|
||||||
@@:
|
|
||||||
; F.21.2 - set keyboard layout
|
; F.21.2 - set keyboard layout
|
||||||
dec ebx
|
sub ebx, 2
|
||||||
jnz @f
|
jnz @f
|
||||||
|
|
||||||
mov eax, edx
|
mov eax, edx
|
||||||
@ -1616,7 +1598,7 @@ sys_setup:
|
|||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
sys_getsetup:
|
sys_getsetup:
|
||||||
; 1 = roland mpu midi base , base io address
|
; 1 = not used
|
||||||
; 2 = keyboard 1, base kaybap 2, shift keymap, 9 country 1eng 2fi 3ger 4rus
|
; 2 = keyboard 1, base kaybap 2, shift keymap, 9 country 1eng 2fi 3ger 4rus
|
||||||
; 3 = not used
|
; 3 = not used
|
||||||
; 4 = not used
|
; 4 = not used
|
||||||
@ -1629,17 +1611,8 @@ sys_getsetup:
|
|||||||
; 11 = get the state "lba read"
|
; 11 = get the state "lba read"
|
||||||
; 12 = get the state "pci access"
|
; 12 = get the state "pci access"
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; F.26.1 - get MPU MIDI base port
|
|
||||||
dec ebx
|
|
||||||
jnz @f
|
|
||||||
|
|
||||||
movzx eax, [midi_base]
|
|
||||||
mov [esp + SYSCALL_STACK.eax], eax
|
|
||||||
ret
|
|
||||||
;--------------------------------------
|
|
||||||
@@:
|
|
||||||
; F.26.2 - get keyboard layout
|
; F.26.2 - get keyboard layout
|
||||||
dec ebx
|
sub ebx, 2
|
||||||
jnz @f
|
jnz @f
|
||||||
|
|
||||||
mov ebx, edx
|
mov ebx, edx
|
||||||
@ -1742,90 +1715,6 @@ get_timer_ticks:
|
|||||||
mov eax, [timer_ticks]
|
mov eax, [timer_ticks]
|
||||||
ret
|
ret
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
iglobal
|
|
||||||
midi_base dw 0
|
|
||||||
endg
|
|
||||||
|
|
||||||
align 4
|
|
||||||
sys_midi:
|
|
||||||
cmp word [mididp], 0
|
|
||||||
jnz @f
|
|
||||||
mov [esp + SYSCALL_STACK.eax], 1
|
|
||||||
ret
|
|
||||||
@@:
|
|
||||||
and [esp + SYSCALL_STACK.eax], 0
|
|
||||||
dec ebx
|
|
||||||
jnz .smn1
|
|
||||||
; call setuart
|
|
||||||
@@:
|
|
||||||
call .is_output
|
|
||||||
test al, al
|
|
||||||
jnz @b
|
|
||||||
mov dx, word [midisp]
|
|
||||||
mov al, 0xff
|
|
||||||
out dx, al
|
|
||||||
@@:
|
|
||||||
mov dx, word [midisp]
|
|
||||||
mov al, 0xff
|
|
||||||
out dx, al
|
|
||||||
call .is_input
|
|
||||||
test al, al
|
|
||||||
jnz @b
|
|
||||||
call .get_mpu_in
|
|
||||||
cmp al, 0xfe
|
|
||||||
jnz @b
|
|
||||||
@@:
|
|
||||||
call .is_output
|
|
||||||
test al, al
|
|
||||||
jnz @b
|
|
||||||
mov dx, word [midisp]
|
|
||||||
mov al, 0x3f
|
|
||||||
out dx, al
|
|
||||||
ret
|
|
||||||
.smn1:
|
|
||||||
dec ebx
|
|
||||||
jnz .ret
|
|
||||||
@@:
|
|
||||||
call .get_mpu_in
|
|
||||||
call .is_output
|
|
||||||
test al, al
|
|
||||||
jnz @b
|
|
||||||
mov al, bl
|
|
||||||
call .put_mpu_out
|
|
||||||
.ret:
|
|
||||||
ret
|
|
||||||
|
|
||||||
.is_input:
|
|
||||||
push edx
|
|
||||||
mov dx, word [midisp]
|
|
||||||
in al, dx
|
|
||||||
and al, 0x80
|
|
||||||
pop edx
|
|
||||||
ret
|
|
||||||
|
|
||||||
.is_output:
|
|
||||||
push edx
|
|
||||||
mov dx, word [midisp]
|
|
||||||
in al, dx
|
|
||||||
and al, 0x40
|
|
||||||
pop edx
|
|
||||||
ret
|
|
||||||
|
|
||||||
.get_mpu_in:
|
|
||||||
push edx
|
|
||||||
mov dx, word [mididp]
|
|
||||||
in al, dx
|
|
||||||
pop edx
|
|
||||||
ret
|
|
||||||
|
|
||||||
.put_mpu_out:
|
|
||||||
push edx
|
|
||||||
mov dx, word [mididp]
|
|
||||||
out dx, al
|
|
||||||
pop edx
|
|
||||||
ret
|
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
|
||||||
sys_end:
|
sys_end:
|
||||||
; restore default cursor before killing
|
; restore default cursor before killing
|
||||||
pusha
|
pusha
|
||||||
|
Loading…
Reference in New Issue
Block a user