Subversion Repositories Kolibri OS

Rev

Rev 4641 | Rev 4711 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4641 Rev 4700
Line 843... Line 843...
843
======================================================================
843
======================================================================
844
Parameters:
844
Parameters:
845
  * eax = 18 - function number
845
  * eax = 18 - function number
846
  * ebx = 11 - subfunction number
846
  * ebx = 11 - subfunction number
847
  * ecx = type of the table:
847
  * ecx = type of the table:
848
    * 1 = short version, 10 bytes
848
    * 1 = short version, 16 bytes
849
  * edx = pointer to the buffer (in the application) for the table
849
  * edx = pointer to the buffer (in the application) for the table
850
Returned value:
850
Returned value:
851
  * function does not return value
851
  * function does not return value
852
Format of the table: short version:
852
Format of the table: short version:
853
  * +0: byte: information about FDD's (drives for floppies),
853
  * +0: byte: information about FDD's (drives for floppies),
Line 860... Line 860...
860
    * 4 = 1.44Mb, 3.5''
860
    * 4 = 1.44Mb, 3.5''
861
    * 5 = 2.88Mb, 3.5'' (such drives are not used anymore)
861
    * 5 = 2.88Mb, 3.5'' (such drives are not used anymore)
862
    For example, for the standard configuration from one 1.44-drive
862
    For example, for the standard configuration from one 1.44-drive
863
    here will be 40h, and for the case 1.2Mb on A: and 1.44Mb on B:
863
    here will be 40h, and for the case 1.2Mb on A: and 1.44Mb on B:
864
    the value is 24h.
864
    the value is 24h.
-
 
865
    
-
 
866
  First IDE controller:
865
  * +1: byte: information about hard disks and CD-drives, AABBCCDD,
867
  * +1: byte: information about hard disks and CD-drives, AABBCCDD,
866
    where AA corresponds to the controller IDE0, ..., DD - IDE3:
868
    where AA corresponds to the controller IDE0, ..., DD - IDE3:
867
    * 0 = device is absent
869
    * 0 = device not found
868
    * 1 = hard drive
870
    * 1 = hard drive
869
    * 2 = CD-drive
871
    * 2 = CD-drive
870
    For example, in the case HD on IDE0 and CD on IDE2
872
    For example, in the case HD on IDE0 and CD on IDE2
871
    this field contains 48h.
873
    this field contains 48h.
872
  * +2: 4 db: number of the retrieved partitions on hard disks
874
  * +2: 4 db: number of the retrieved partitions on hard disks
873
    at accordingly IDE0,...,IDE3.
875
    at accordingly IDE0,...,IDE3.
-
 
876
    
-
 
877
  Second IDE controller:
-
 
878
  * +6: byte: information about hard disks and CD-drives, AABBCCDD,
-
 
879
    where AA corresponds to the controller IDE4, ..., DD - IDE7:
-
 
880
    * 0 = device not found
-
 
881
    * 1 = hard drive
-
 
882
    * 2 = CD-drive
-
 
883
    For example, in the case HD on IDE4 and CD on IDE6
-
 
884
    this field contains 48h.
-
 
885
  * +7: 4 db: number of the retrieved partitions on hard disks
-
 
886
    at accordingly IDE4,...,IDE7.
-
 
887
 
-
 
888
  Third IDE controller:
-
 
889
  * +11: byte: information about hard disks and CD-drives, AABBCCDD,
-
 
890
    where AA corresponds to the controller IDE8, ..., DD - IDE11:
-
 
891
    * 0 = device not found
-
 
892
    * 1 = hard drive
-
 
893
    * 2 = CD-drive
-
 
894
    For example, in the case HD on IDE8 and CD on IDE10
-
 
895
    this field contains 48h.
-
 
896
  * +12: 4 db: number of the retrieved partitions on hard disks
-
 
897
    at accordingly IDE8,...,IDE11.   
-
 
898
    
874
    If the hard disk on IDEx is absent, appropriate byte is zero,
899
    If the hard disk on IDEx is absent, appropriate byte is zero,
875
    otherwise it shows number of the recognized partitions, which
900
    otherwise it shows number of the recognized partitions, which
876
    can be not presented (if the drive is not formatted or if
901
    can be not presented (if the drive is not formatted or if
877
    the file system is not supported). Current version of the kernel
902
    the file system is not supported). Current version of the kernel
878
    supports only FAT16, FAT32 and NTFS for hard disks.
903
    supports only FAT12/16/32, NTFS, ext2/3/4 and XFS for hard disks.
879
  * +6: 4 db: reserved
-
 
Line 880... Line 904...
880
 
904
 
881
Remarks:
905
Remarks:
882
  * The short table can be used for obtaining the information about
906
  * The table can be used for obtaining the information about
Line 883... Line 907...
883
    available devices.
907
    available devices.
884
 
908
 
885
======================================================================
909
======================================================================
Line 1192... Line 1216...
1192
    by the kernel itself; however the application '@panel' displays
1216
    by the kernel itself; however the application '@panel' displays
1193
    the corresponding icon.
1217
    the corresponding icon.
1194
  * The application @panel switches layouts on user request.
1218
  * The application @panel switches layouts on user request.
Line 1195... Line 1219...
1195
 
1219
 
1196
======================================================================
-
 
1197
============== Function 21, subfunction 3 - set CD base. =============
-
 
1198
======================================================================
-
 
1199
Parameters:
-
 
1200
  * eax = 21 - function number
-
 
1201
  * ebx = 3 - subfunction number
-
 
1202
  * ecx = CD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3
-
 
1203
Returned value:
-
 
1204
  * eax = 0
-
 
1205
Remarks:
-
 
1206
  * CD base is used by function 24.
-
 
1207
  * To get CD base use subfunction 3 of function 26.
-
 
1208
 
-
 
1209
======================================================================
1220
======================================================================
1210
========== Function 21, subfunction 5 - set system language. =========
1221
========== Function 21, subfunction 5 - set system language. =========
1211
======================================================================
1222
======================================================================
1212
Parameters:
1223
Parameters:
1213
  * eax = 21 - function number
1224
  * eax = 21 - function number
Line 1250... Line 1261...
1250
  * Is used in operations with PCI bus (function 62).
1261
  * Is used in operations with PCI bus (function 62).
1251
  * The current implementation uses only low bit of ecx.
1262
  * The current implementation uses only low bit of ecx.
1252
  * To get current status use subfunction 12 of function 26.
1263
  * To get current status use subfunction 12 of function 26.
Line 1253... Line 1264...
1253
 
1264
 
1254
======================================================================
-
 
1255
============ Function 21, subfunction 13, subsubfunction 1 ===========
-
 
1256
======== Initialize + get information on the driver vmode.mdr. =======
-
 
1257
======================================================================
-
 
1258
Parameters:
-
 
1259
  * eax = 21 - function number
-
 
1260
  * ebx = 13 - subfunction number
-
 
1261
  * ecx = 1 - number of the driver function
-
 
1262
  * edx = pointer to 512-bytes buffer
-
 
1263
Returned value:
-
 
1264
  * if driver is not loaded
-
 
1265
    (never happens in the current implementation):
-
 
1266
    * eax = -1
-
 
1267
    * ebx, ecx destroyed
-
 
1268
  * if driver is loaded:
-
 
1269
    * eax = 'MDAZ' (in fasm style, that is 'M' - low byte, 'Z' - high)
-
 
1270
      - signature
-
 
1271
    * ebx = current frequency of the scanning (in Hz)
-
 
1272
    * ecx destroyed
-
 
1273
    * buffer pointed to by edx is filled
-
 
1274
Format of the buffer:
-
 
1275
  * +0: 32*byte: driver name, "Trans VideoDriver"
-
 
1276
    (without quotes, supplemented by spaces)
-
 
1277
  * +32 = +0x20: dword: driver version (version x.y is encoded as
-
 
1278
    y*65536+x), for the current implementation is 1 (1.0)
-
 
1279
  * +36 = +0x24: 7*dword: reserved (0 in the current implementation)
-
 
1280
  * +64 = +0x40: 32*word: list of supported videomodes (each word
-
 
1281
    is number of a videomode, after list itself there are zeroes)
-
 
1282
  * +128 = +0x80: 32*(5*word): list of supported frequences of the
-
 
1283
    scannings for videomodes: for each videomode listed in the
-
 
1284
    previous field up to 5 supported frequences are given
-
 
1285
    (unused positions contain zeroes)
-
 
1286
Remarks:
-
 
1287
  * Function initializes the driver (if it is not initialized yet)
-
 
1288
    and must be called first, before others (otherwise they will do
-
 
1289
    nothing and return -1).
-
 
1290
  * The current implementation supports only one frequency
-
 
1291
    of the scanning on videomode.
-
 
1292
 
-
 
1293
======================================================================
-
 
1294
============ Function 21, subfunction 13, subsubfunction 2 ===========
-
 
1295
================ Get information on current videomode. ===============
-
 
1296
======================================================================
-
 
1297
Parameters:
-
 
1298
  * eax = 21 - function number
-
 
1299
  * ebx = 13 - subfunction number
-
 
1300
  * ecx = 2 - number of the driver function
-
 
1301
Returned value:
-
 
1302
  * eax = -1 - driver is not loaded or not initialized;
-
 
1303
    ebx,ecx are destroyed
-
 
1304
  * eax = [width]*65536 + [height]
-
 
1305
  * ebx = frequency of the vertical scanning (in Hz)
-
 
1306
  * ecx = number of current videomode
-
 
1307
Remarks:
-
 
1308
  * Driver must be initialized by call to
-
 
1309
    driver function 1.
-
 
1310
  * If only screen sizes are required, it is more expedient to use
-
 
1311
    function 14 taking into account that it
-
 
1312
    returns sizes on 1 less.
-
 
1313
 
-
 
1314
======================================================================
-
 
1315
=== Function 21, subfunction 13, subsubfunction 3 - set videomode. ===
-
 
1316
======================================================================
-
 
1317
Parameters:
-
 
1318
  * eax = 21 - function number
-
 
1319
  * ebx = 13 - subfunction number
-
 
1320
  * ecx = 3 - number of the driver function
-
 
1321
  * edx = [scanning frequency]*65536 + [videomode number]
-
 
1322
Returned value:
-
 
1323
  * eax = -1 - driver is not loaded, not initialized or
-
 
1324
    an error has occured
-
 
1325
  * eax = 0 - success
-
 
1326
  * ebx, ecx destroyed
-
 
1327
Remarks:
-
 
1328
  * Driver must be initialized by driver function 1.
-
 
1329
  * The videomode number and frequency must be in the table
-
 
1330
    returned by driver function 1.
-
 
1331
 
-
 
1332
======================================================================
-
 
1333
============ Function 21, subfunction 13, subsubfunction 4 ===========
-
 
1334
================== Return to the initial videomode. ==================
-
 
1335
======================================================================
-
 
1336
Returns the screen to the videomode set at system boot.
-
 
1337
Parameters:
-
 
1338
  * eax = 21 - function number
-
 
1339
  * ebx = 13 - subfunction number
-
 
1340
  * ecx = 4 - number of the driver function
-
 
1341
Returned value:
-
 
1342
  * eax = -1 - driver is not loaded or not initialized
-
 
1343
  * eax = 0 - success
-
 
1344
  * ebx, ecx destroyed
-
 
1345
Remarks:
-
 
1346
  * Driver must be initialized by call to driver function 1.
-
 
1347
 
-
 
1348
======================================================================
-
 
1349
============ Function 21, subfunction 13, subsubfunction 5 ===========
-
 
1350
===== Increase/decrease the size of the visible area of monitor. =====
-
 
1351
======================================================================
-
 
1352
Parameters:
-
 
1353
  * eax = 21 - function number
-
 
1354
  * ebx = 13 - subfunction number
-
 
1355
  * ecx = 5 - number of the driver function
-
 
1356
  * edx = 0/1 - decrease/increase horizontal size on 1 position
-
 
1357
  * edx = 2/3 - is not supported in the current implementation;
-
 
1358
    is planned as decrease/increase vertical size on 1 position
-
 
1359
Returned value:
-
 
1360
  * eax = -1 - driver is not loaded or not initialized
-
 
1361
  * eax = 0 - success
-
 
1362
  * ebx, ecx destroyed
-
 
1363
Remarks:
-
 
1364
  * Driver must be initialized by call to driver function 1.
-
 
1365
  * Function influences only the physical size of the screen image;
-
 
1366
    the logical size (number of pixels) does not change.
-
 
1367
 
-
 
1368
======================================================================
1265
======================================================================
1369
================= Function 22 - set system date/time. ================
1266
================= Function 22 - set system date/time. ================
1370
======================================================================
1267
======================================================================
1371
Parameters:
1268
Parameters:
1372
  * eax = 22 - function number
1269
  * eax = 22 - function number
Line 1425... Line 1322...
1425
  * Current implementation returns immediately with eax=0,
1322
  * Current implementation returns immediately with eax=0,
1426
    if the addition of ebx with the current value of time counter
1323
    if the addition of ebx with the current value of time counter
1427
    makes 32-bit overflow.
1324
    makes 32-bit overflow.
Line 1428... Line 1325...
1428
 
1325
 
1429
======================================================================
-
 
1430
======== Function 24, subfunction 1 - begin to play CD-audio. ========
-
 
1431
======================================================================
-
 
1432
Parameters:
-
 
1433
  * eax = 24 - function number
-
 
1434
  * ebx = 1 - subfunction number
-
 
1435
  * ecx = 0x00FRSSMM, where
-
 
1436
    * MM = starting minute
-
 
1437
    * SS = starting second
-
 
1438
    * FR = starting frame
-
 
1439
Returned value:
-
 
1440
  * eax = 0 - success
-
 
1441
  * eax = 1 - CD base is not defined
-
 
1442
Remarks:
-
 
1443
  * Previously CD base must be defined by the call to
-
 
1444
    subfunction 3 of function 21.
-
 
1445
  * One second includes 75 frames, one minute includes 60 seconds.
-
 
1446
  * The function is asynchronous (returns control, when play begins).
-
 
1447
 
-
 
1448
======================================================================
-
 
1449
======= Function 24, subfunction 2 - get information on tracks. ======
-
 
1450
======================================================================
-
 
1451
Parameters:
-
 
1452
  * eax = 24 - function number
-
 
1453
  * ebx = 2 - subfunction number
-
 
1454
  * ecx = pointer to the buffer for the table
-
 
1455
    (maximum 8*64h+4 bytes=100 tracks)
-
 
1456
Returned value:
-
 
1457
  * eax = 0 - success
-
 
1458
  * eax = 1 - CD base is not defined
-
 
1459
Remarks:
-
 
1460
  * The format of the table with tracks information is the same as
-
 
1461
    for ATAPI-CD command 43h (READ TOC), usual table (subcommand 00h).
-
 
1462
    Function returns addresses in MSF.
-
 
1463
  * Previously CD base port must be set by call to
-
 
1464
    subfunction 3 of function 21.
-
 
1465
  * Function returns information only about no more than 100
-
 
1466
    first tracks. In most cases it is enough.
-
 
1467
 
-
 
1468
======================================================================
-
 
1469
========== Function 24, subfunction 3 - stop play CD-audio. ==========
-
 
1470
======================================================================
-
 
1471
Parameters:
-
 
1472
  * eax = 24 - function number
-
 
1473
  * ebx = 1 - subfunction number
-
 
1474
Returned value:
-
 
1475
  * eax = 0 - success
-
 
1476
  * eax = 1 - CD base is not defined
-
 
1477
Remarks:
-
 
1478
  * Previously CD base port must be defined by call to
-
 
1479
    subfunction 3 of function 21.
-
 
1480
 
-
 
1481
======================================================================
1326
======================================================================
1482
======= Function 24, subfunction 4 - eject tray of disk drive. =======
1327
======= Function 24, subfunction 4 - eject tray of disk drive. =======
1483
======================================================================
1328
======================================================================
1484
Parameters:
1329
Parameters:
1485
  * eax = 24 - function number
1330
  * eax = 24 - function number
Line 1576... Line 1421...
1576
    by the kernel itself; however the application '@panel' displays
1421
    by the kernel itself; however the application '@panel' displays
1577
    the corresponding icon (using this function).
1422
    the corresponding icon (using this function).
1578
  * The application @panel switches layouts on user request.
1423
  * The application @panel switches layouts on user request.
Line 1579... Line 1424...
1579
 
1424
 
1580
======================================================================
-
 
1581
============== Function 26, subfunction 3 - get CD base. =============
-
 
1582
======================================================================
-
 
1583
Parameters:
-
 
1584
  * eax = 26 - function number
-
 
1585
  * ebx = 3 - subfunction number
-
 
1586
Returned value:
-
 
1587
  * eax = CD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3
-
 
1588
Remarks:
-
 
1589
  * CD base is used by function 24.
-
 
1590
  * To set CD base use subfunction 3 of function 21.
-
 
1591
 
-
 
1592
======================================================================
1425
======================================================================
1593
========== Function 26, subfunction 5 - get system language. =========
1426
========== Function 26, subfunction 5 - get system language. =========
1594
======================================================================
1427
======================================================================
1595
Parameters:
1428
Parameters:
1596
  * eax = 26 - function number
1429
  * eax = 26 - function number