mirror of
https://github.com/WindowsNT351/CE-Collections.git
synced 2025-12-27 01:20:25 +08:00
201B103
This commit is contained in:
parent
15ce1d12c7
commit
aca0ac35ba
Binary file not shown.
BIN
DOS/LOADCEPC.exe/LOADCEPC.bsc
Normal file
BIN
DOS/LOADCEPC.exe/LOADCEPC.bsc
Normal file
Binary file not shown.
@ -611,7 +611,8 @@ main_error:
|
|||||||
XmsFreeExtendedMemory(usBlockHandle);
|
XmsFreeExtendedMemory(usBlockHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\n\n Press any key to cancel.\n");
|
//printf("\n\n Press any key to cancel.\n");
|
||||||
|
printf("\n\n ==============Press any key to cancel==============\n ");
|
||||||
__asm
|
__asm
|
||||||
{
|
{
|
||||||
push dx
|
push dx
|
||||||
@ -751,7 +752,7 @@ static void usage( char *pszProgramNameArg )
|
|||||||
" treated as the name of the file.\n"
|
" treated as the name of the file.\n"
|
||||||
" It is an error for <pattern> to match multiple files\n"
|
" It is an error for <pattern> to match multiple files\n"
|
||||||
" when <destination> specifies a file.\n"
|
" when <destination> specifies a file.\n"
|
||||||
"For CE Collections - Last built with ver.2.01-Beta1-02",
|
"For CE Collections - Last built with ver.2.01-Beta1-03",
|
||||||
|
|
||||||
pszProgram );
|
pszProgram );
|
||||||
}
|
}
|
||||||
@ -873,6 +874,8 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
long int bootType;
|
long int bootType;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
|
|
||||||
|
char cReturnStri[60]={0};
|
||||||
|
strcpy(cReturnStri,"\r \r\n ");
|
||||||
|
|
||||||
// Find the largest Extended Memory block and allocate it
|
// Find the largest Extended Memory block and allocate it
|
||||||
|
|
||||||
@ -900,8 +903,8 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
fprintf(stderr, " ");
|
fprintf(stderr, " ");
|
||||||
if( bVerbose )
|
if( bVerbose )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
// Print info about memory available
|
// Print info about memory available
|
||||||
|
|
||||||
printf( "Total free extended memory = %u, largest block = %u\n",
|
printf( "Total free extended memory = %u, largest block = %u\n",
|
||||||
usTotalFree, usLargestBlock);
|
usTotalFree, usLargestBlock);
|
||||||
}
|
}
|
||||||
@ -912,6 +915,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( xmsError != XMS_SUCCESS )
|
if( xmsError != XMS_SUCCESS )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
printf( "Error allocating extended memory - %s\n",
|
printf( "Error allocating extended memory - %s\n",
|
||||||
XmsErrorString(xmsError));
|
XmsErrorString(xmsError));
|
||||||
|
|
||||||
@ -932,7 +936,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( xmsError != XMS_SUCCESS )
|
if( xmsError != XMS_SUCCESS )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\r \r");
|
fprintf(stderr,cReturnStri);
|
||||||
printf("Error locking extended memory - %s\n", XmsErrorString(xmsError));
|
printf("Error locking extended memory - %s\n", XmsErrorString(xmsError));
|
||||||
|
|
||||||
XmsFreeExtendedMemory(usBlockHandle);
|
XmsFreeExtendedMemory(usBlockHandle);
|
||||||
@ -950,7 +954,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( bVerbose )
|
if( bVerbose )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\r \r");
|
fprintf(stderr,cReturnStri);
|
||||||
printf("Block allocated at 0x%lX\n", ulLinearAddress);
|
printf("Block allocated at 0x%lX\n", ulLinearAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -976,7 +980,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( xmsError != XMS_SUCCESS )
|
if( xmsError != XMS_SUCCESS )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\r \r");
|
fprintf(stderr,cReturnStri);
|
||||||
printf("Error zeroing extended memory - %s\n", XmsErrorString(xmsError));
|
printf("Error zeroing extended memory - %s\n", XmsErrorString(xmsError));
|
||||||
if( !bParallelDownload && !bSerialDownload )
|
if( !bParallelDownload && !bSerialDownload )
|
||||||
_close(hImage);
|
_close(hImage);
|
||||||
@ -1010,6 +1014,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( pszFileName )
|
if( pszFileName )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
if( bSerialDownload )
|
if( bSerialDownload )
|
||||||
printf("Loading image %s via serial port.\r\n",pszFileName);
|
printf("Loading image %s via serial port.\r\n",pszFileName);
|
||||||
else
|
else
|
||||||
@ -1027,6 +1032,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
if( bSerialDownload )
|
if( bSerialDownload )
|
||||||
printf("Loading host default image via serial port.\r\n");
|
printf("Loading host default image via serial port.\r\n");
|
||||||
else
|
else
|
||||||
@ -1071,7 +1077,11 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( bVerbose ) printf("Sending boot packet: ");
|
if( bVerbose )
|
||||||
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
|
printf("Sending boot packet: ");
|
||||||
|
}
|
||||||
|
|
||||||
usIndex=0;
|
usIndex=0;
|
||||||
|
|
||||||
@ -1082,7 +1092,11 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bVerbose ) printf("%x ",BootPacket[usIndex]);
|
if( bVerbose )
|
||||||
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
|
printf("%x ",BootPacket[usIndex]);
|
||||||
|
}
|
||||||
|
|
||||||
if( bSerialDownload )
|
if( bSerialDownload )
|
||||||
{
|
{
|
||||||
@ -1103,12 +1117,14 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( hImage == -1 )
|
if( hImage == -1 )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
printf("%s: Error opening file - %s\n", pszFileName, _strerror(NULL));
|
printf("%s: Error opening file - %s\n", pszFileName, _strerror(NULL));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (lImageSize = _filelength(hImage)) == -1 )
|
if( (lImageSize = _filelength(hImage)) == -1 )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
printf("%s: Error obtaining file size - %s\n", pszFileName, _strerror(NULL));
|
printf("%s: Error obtaining file size - %s\n", pszFileName, _strerror(NULL));
|
||||||
if( !bParallelDownload && !bSerialDownload )
|
if( !bParallelDownload && !bSerialDownload )
|
||||||
_close(hImage);
|
_close(hImage);
|
||||||
@ -1118,9 +1134,10 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( bVerbose )
|
if( bVerbose )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
printf("Loading %s, size = %ld\n", pszFileName, lImageSize);
|
printf("Loading %s, size = %ld\n", pszFileName, lImageSize);
|
||||||
DisplayCEOSVersion( pszFileName ); // Extract Version Number from image if available
|
DisplayCEOSVersion( pszFileName ); // Extract Version Number from image if available
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read initial signature and physical start and size
|
// Read initial signature and physical start and size
|
||||||
@ -1129,6 +1146,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( DownloadRead( hImage, ucBuffer, usReadSize, bParallelDownload) != usReadSize )
|
if( DownloadRead( hImage, ucBuffer, usReadSize, bParallelDownload) != usReadSize )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
printf("Error reading signature - %s\n", _strerror(NULL));
|
printf("Error reading signature - %s\n", _strerror(NULL));
|
||||||
if( !bParallelDownload && !bSerialDownload )
|
if( !bParallelDownload && !bSerialDownload )
|
||||||
_close(hImage);
|
_close(hImage);
|
||||||
@ -1138,6 +1156,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( memcmp(ucBuffer, ucSignature, sizeof(ucSignature)) != 0 )
|
if( memcmp(ucBuffer, ucSignature, sizeof(ucSignature)) != 0 )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
printf("Error invalid signature\nData: ");
|
printf("Error invalid signature\nData: ");
|
||||||
for( i = 0; i < (int)usReadSize; i++ )
|
for( i = 0; i < (int)usReadSize; i++ )
|
||||||
printf("%x ",ucBuffer[i]);
|
printf("%x ",ucBuffer[i]);
|
||||||
@ -1154,6 +1173,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( bVerbose )
|
if( bVerbose )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,cReturnStri);
|
||||||
printf( "Image physical start = 0x%8.8lX, size = %ld\n",
|
printf( "Image physical start = 0x%8.8lX, size = %ld\n",
|
||||||
*(PULONG)&ucBuffer[sizeof(ucSignature)],
|
*(PULONG)&ucBuffer[sizeof(ucSignature)],
|
||||||
*(PULONG)&ucBuffer[sizeof(ucSignature) + sizeof(ULONG)]);
|
*(PULONG)&ucBuffer[sizeof(ucSignature) + sizeof(ULONG)]);
|
||||||
@ -1172,7 +1192,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( usAmountRead != 3 * sizeof(ULONG) )
|
if( usAmountRead != 3 * sizeof(ULONG) )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\r \r");
|
fprintf(stderr,cReturnStri);
|
||||||
printf("Error reading header - %s\n", XmsErrorString(xmsError));
|
printf("Error reading header - %s\n", XmsErrorString(xmsError));
|
||||||
if( !bParallelDownload && !bSerialDownload )
|
if( !bParallelDownload && !bSerialDownload )
|
||||||
_close(hImage);
|
_close(hImage);
|
||||||
@ -1195,14 +1215,14 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
(ulSectionAddress + ulSectionSize) >
|
(ulSectionAddress + ulSectionSize) >
|
||||||
(ulLinearAddress + (ULONG)usLargestBlock * 1024) )
|
(ulLinearAddress + (ULONG)usLargestBlock * 1024) )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\r \r");
|
fprintf(stderr,cReturnStri);
|
||||||
printf(
|
printf(
|
||||||
"Error image section doesn't fit in allocated block\n"
|
"Error image section doesn't fit in allocated block\n"
|
||||||
"Block allocated at 0x%lX, size = %ld\n"
|
" Block allocated at 0x%lX, size = %ld\n"
|
||||||
"Section physical start = 0x%8.8lX, size = %ld\n"
|
" Section physical start = 0x%8.8lX, size = %ld\n"
|
||||||
"Memory too low in your VM might cause this.\n"
|
" Memory too low in your VM might cause this.\n"
|
||||||
"\n"
|
"\n"
|
||||||
">> Increase memory may fix this.\n",
|
" >> Increase memory may fix this.\n",
|
||||||
ulLinearAddress, (ULONG)usLargestBlock * 1024,
|
ulLinearAddress, (ULONG)usLargestBlock * 1024,
|
||||||
ulSectionAddress, ulSectionSize);
|
ulSectionAddress, ulSectionSize);
|
||||||
|
|
||||||
@ -1214,7 +1234,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( bVerbose )
|
if( bVerbose )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\r \r");
|
fprintf(stderr,cReturnStri);
|
||||||
printf(
|
printf(
|
||||||
"Section physical start = 0x%8.8lX, size = %ld\n",
|
"Section physical start = 0x%8.8lX, size = %ld\n",
|
||||||
ulSectionAddress, ulSectionSize);
|
ulSectionAddress, ulSectionSize);
|
||||||
@ -1236,7 +1256,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( usAmountRead != usReadSize )
|
if( usAmountRead != usReadSize )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\r \r");
|
fprintf(stderr,cReturnStri);
|
||||||
printf("Error reading section - %s\n", XmsErrorString(xmsError));
|
printf("Error reading section - %s\n", XmsErrorString(xmsError));
|
||||||
if( !bParallelDownload && !bSerialDownload )
|
if( !bParallelDownload && !bSerialDownload )
|
||||||
_close(hImage);
|
_close(hImage);
|
||||||
@ -1261,7 +1281,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
|
|
||||||
if( xmsError != XMS_SUCCESS )
|
if( xmsError != XMS_SUCCESS )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\r \r");
|
fprintf(stderr,cReturnStri);
|
||||||
printf("Error moving extended memory - %s\n", XmsErrorString(xmsError));
|
printf("Error moving extended memory - %s\n", XmsErrorString(xmsError));
|
||||||
if( !bParallelDownload && !bSerialDownload )
|
if( !bParallelDownload && !bSerialDownload )
|
||||||
_close(hImage);
|
_close(hImage);
|
||||||
@ -1274,7 +1294,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
#if 0
|
#if 0
|
||||||
if( ulChecksum != ulSectionChecksum )
|
if( ulChecksum != ulSectionChecksum )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\r \r");
|
fprintf(stderr,cReturnStri);
|
||||||
printf(
|
printf(
|
||||||
"Bad checksum 0x%8.8lX, expected 0x%8.8lX\n",
|
"Bad checksum 0x%8.8lX, expected 0x%8.8lX\n",
|
||||||
ulChecksum, ulSectionChecksum);
|
ulChecksum, ulSectionChecksum);
|
||||||
@ -1305,7 +1325,7 @@ static int LoadImage( BOOL bVerbose,
|
|||||||
out dx, al
|
out dx, al
|
||||||
pop dx
|
pop dx
|
||||||
}
|
}
|
||||||
fprintf(stderr, "\r \r");
|
fprintf(stderr,cReturnStri);
|
||||||
|
|
||||||
// Indicate success
|
// Indicate success
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
13
DOS/VESATEST.exe/bld.bat
Normal file
13
DOS/VESATEST.exe/bld.bat
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
@REM
|
||||||
|
@REM Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
@REM
|
||||||
|
@REM
|
||||||
|
@REM Use of this sample source code is subject to the terms of the Microsoft
|
||||||
|
@REM license agreement under which you licensed this sample source code. If
|
||||||
|
@REM you did not accept the terms of the license agreement, you are not
|
||||||
|
@REM authorized to use this sample source code. For the terms of the license,
|
||||||
|
@REM please see the license agreement between you and Microsoft or, if applicable,
|
||||||
|
@REM see the LICENSE.RTF on your install media or the root of your tools installation.
|
||||||
|
@REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
|
||||||
|
@REM
|
||||||
|
cl vesatest.c
|
||||||
59
DOS/VESATEST.exe/setupen2.bat
Normal file
59
DOS/VESATEST.exe/setupen2.bat
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
@REM
|
||||||
|
@REM Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
@REM
|
||||||
|
@REM
|
||||||
|
@REM Use of this sample source code is subject to the terms of the Microsoft
|
||||||
|
@REM license agreement under which you licensed this sample source code. If
|
||||||
|
@REM you did not accept the terms of the license agreement, you are not
|
||||||
|
@REM authorized to use this sample source code. For the terms of the license,
|
||||||
|
@REM please see the license agreement between you and Microsoft or, if applicable,
|
||||||
|
@REM see the LICENSE.RTF on your install media or the root of your tools installation.
|
||||||
|
@REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
|
||||||
|
@REM
|
||||||
|
|
||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
@REM Note: Please read the README.TXT in this directory for build instructions
|
||||||
|
@REM for loadcepc.
|
||||||
|
@REM
|
||||||
|
@REM The environment variable WINCEROOT must be set. The assembler
|
||||||
|
@REM "ml" used for TRANSFER.ASM requires this program.
|
||||||
|
|
||||||
|
if "%_WINCEROOT%"=="" goto ERROR2
|
||||||
|
|
||||||
|
PROMPT *** 16-bit dev mode - type exit to return to normal ***$_%prompt%
|
||||||
|
|
||||||
|
@REM Locate the 16 bit dev tools. Try local drive, then Windows CE tree
|
||||||
|
@REM and finally, the \\boneyard share.
|
||||||
|
|
||||||
|
if not exist %HOMEDRIVE%\msvc goto ENLIST_PATH
|
||||||
|
set __MSVCDIR=%HOMEDRIVE%\msvc
|
||||||
|
goto PATH_DONE
|
||||||
|
|
||||||
|
:ENLIST_PATH
|
||||||
|
if not exist %_WINCEROOT%\sdk\vc150.win goto SHARE_PATH
|
||||||
|
set __MSVCDIR=%_WINCEROOT%\sdk\vc150.win
|
||||||
|
goto PATH_DONE
|
||||||
|
|
||||||
|
:SHARE_PATH
|
||||||
|
if not exist \\boneyard\rellang\vc150.win\msvc goto ERROR
|
||||||
|
set __MSVCDIR=\\boneyard\rellang\vc150.win\msvc
|
||||||
|
|
||||||
|
@REM Setup PATH, DevDir, LIB, and INCLUDE locations.
|
||||||
|
|
||||||
|
:PATH_DONE
|
||||||
|
set PATH=%__MSVCDIR%\bin;%PATH%;%_WINCEROOT%\sdk\bin\i386;C:\MASM\BIN
|
||||||
|
set MSDevDir=%__MSVCDIR%
|
||||||
|
set LIB=%__MSVCDIR%\lib
|
||||||
|
set INCLUDE=%__MSVCDIR%\include
|
||||||
|
goto DONE
|
||||||
|
|
||||||
|
:ERROR
|
||||||
|
echo ERROR: vc150.win path NOT found.
|
||||||
|
goto DONE
|
||||||
|
|
||||||
|
:ERROR2
|
||||||
|
echo ERROR: WINCEROOT must be set.
|
||||||
|
|
||||||
|
:DONE
|
||||||
|
command
|
||||||
22
DOS/VESATEST.exe/setupen2.bat_
Normal file
22
DOS/VESATEST.exe/setupen2.bat_
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
@REM
|
||||||
|
@REM Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
@REM
|
||||||
|
@REM
|
||||||
|
@REM Use of this sample source code is subject to the terms of the Microsoft
|
||||||
|
@REM license agreement under which you licensed this sample source code. If
|
||||||
|
@REM you did not accept the terms of the license agreement, you are not
|
||||||
|
@REM authorized to use this sample source code. For the terms of the license,
|
||||||
|
@REM please see the license agreement between you and Microsoft or, if applicable,
|
||||||
|
@REM see the LICENSE.RTF on your install media or the root of your tools installation.
|
||||||
|
@REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
|
||||||
|
@REM
|
||||||
|
@echo off
|
||||||
|
prompt 16-bit dev mode - type exit to return to normal$_%prompt%
|
||||||
|
|
||||||
|
if exist %_WINCEROOT%\sdk\vc150.win set __MSVCDIR=%_WINCEROOT%\sdk\vc150.win
|
||||||
|
if not exist %_WINCEROOT%\sdk\vc150.win set __MSVCDIR=\\boneyard\rellang\vc150.win\msvc
|
||||||
|
|
||||||
|
set PATH=%__MSVCDIR%\bin;%PATH%;%_WINCEROOT%\sdk\bin\i386
|
||||||
|
set MSDevDir=%__MSVCDIR%
|
||||||
|
set lib=%__MSVCDIR%\lib
|
||||||
|
set include=%__MSVCDIR%\include
|
||||||
19
DOS/VESATEST.exe/setupenv.bat
Normal file
19
DOS/VESATEST.exe/setupenv.bat
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
@REM
|
||||||
|
@REM Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
@REM
|
||||||
|
@REM
|
||||||
|
@REM Use of this sample source code is subject to the terms of the Microsoft
|
||||||
|
@REM license agreement under which you licensed this sample source code. If
|
||||||
|
@REM you did not accept the terms of the license agreement, you are not
|
||||||
|
@REM authorized to use this sample source code. For the terms of the license,
|
||||||
|
@REM please see the license agreement between you and Microsoft or, if applicable,
|
||||||
|
@REM see the LICENSE.RTF on your install media or the root of your tools installation.
|
||||||
|
@REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
|
||||||
|
@REM
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
SET _WINCEROOT=C:\WINCE600
|
||||||
|
|
||||||
|
%comspec% /k setupen2.bat
|
||||||
|
|
||||||
28
DOS/VESATEST.exe/setupenv.bat_
Normal file
28
DOS/VESATEST.exe/setupenv.bat_
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
@REM
|
||||||
|
@REM Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
@REM
|
||||||
|
@REM
|
||||||
|
@REM Use of this sample source code is subject to the terms of the Microsoft
|
||||||
|
@REM license agreement under which you licensed this sample source code. If
|
||||||
|
@REM you did not accept the terms of the license agreement, you are not
|
||||||
|
@REM authorized to use this sample source code. For the terms of the license,
|
||||||
|
@REM please see the license agreement between you and Microsoft or, if applicable,
|
||||||
|
@REM see the LICENSE.RTF on your install media or the root of your tools installation.
|
||||||
|
@REM THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
|
||||||
|
@REM
|
||||||
|
@REM set __MSVCDIR=\\boneyard\boneyard-dfs\us\rellang\vc150.win\msvc
|
||||||
|
@REM
|
||||||
|
@REM set PATH=%__MSVCDIR%\bin;%PATH%;%_WINCEROOT%\sdk\bin\i386
|
||||||
|
@REM set MSDevDir=%__MSVCDIR%
|
||||||
|
@REM set lib=%__MSVCDIR%\lib
|
||||||
|
@REM set include=%__MSVCDIR%\include
|
||||||
|
|
||||||
|
@REM
|
||||||
|
@REM changed to the following code to allow exiting from 16-bit development mode back to the main 32 bit dev mode window
|
||||||
|
@REM setupen2.bat also checks for vc1.5 being installed on the local HD (under %_WINCEROOT%\sdk\vc150.win) and uses that if found
|
||||||
|
@REM else it goes to corpnet (under \\boneyard\rellan\vc150.win\msvc)
|
||||||
|
@REM
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
%comspec% /k setupen2.bat
|
||||||
|
|
||||||
170
DOS/VESATEST.exe/vesatest.c
Normal file
170
DOS/VESATEST.exe/vesatest.c
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
//
|
||||||
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Use of this sample source code is subject to the terms of the Microsoft
|
||||||
|
// license agreement under which you licensed this sample source code. If
|
||||||
|
// you did not accept the terms of the license agreement, you are not
|
||||||
|
// authorized to use this sample source code. For the terms of the license,
|
||||||
|
// please see the license agreement between you and Microsoft or, if applicable,
|
||||||
|
// see the LICENSE.RTF on your install media or the root of your tools installation.
|
||||||
|
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
|
||||||
|
//
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <conio.h>
|
||||||
|
|
||||||
|
#define TRUE 1
|
||||||
|
#define FALSE 0
|
||||||
|
|
||||||
|
typedef int BOOL;
|
||||||
|
|
||||||
|
typedef unsigned char BYTE, *LPBYTE, UCHAR, *PUCHAR;
|
||||||
|
typedef unsigned int USHORT, *PUSHORT;
|
||||||
|
typedef unsigned long ULONG, *PULONG;
|
||||||
|
|
||||||
|
typedef unsigned short WORD, *PWORD;
|
||||||
|
typedef unsigned long DWORD, *PDWORD;
|
||||||
|
|
||||||
|
typedef signed char INT8;
|
||||||
|
typedef unsigned char UINT8;
|
||||||
|
typedef signed short INT16;
|
||||||
|
typedef unsigned short UINT16;
|
||||||
|
typedef signed int INT32;
|
||||||
|
typedef unsigned int UINT32;
|
||||||
|
|
||||||
|
#pragma pack(1)
|
||||||
|
|
||||||
|
typedef struct _VESA_GENERAL_INFO
|
||||||
|
{
|
||||||
|
UCHAR szSignature[4];
|
||||||
|
WORD wVersion;
|
||||||
|
UCHAR far * pszVendor;
|
||||||
|
DWORD dwCapabilities;
|
||||||
|
WORD far * pModeList;
|
||||||
|
WORD wTotalMemory;
|
||||||
|
WORD wOemSoftwareRev;
|
||||||
|
UCHAR far* pszVenderName;
|
||||||
|
UCHAR far* pszProductName;
|
||||||
|
UCHAR far* pszProductRev;
|
||||||
|
UCHAR ucReserved[222];
|
||||||
|
UCHAR ucOemData[256];
|
||||||
|
} VESA_GENERAL_INFO;
|
||||||
|
|
||||||
|
typedef struct _VESA_MODE_INFO
|
||||||
|
{
|
||||||
|
WORD wModeAttributes; /* Mode attributes */
|
||||||
|
UCHAR ucWindowAAttributes; /* Window A attributes */
|
||||||
|
UCHAR ucWindowBAttributes; /* Window B attributes */
|
||||||
|
WORD wWindowGranularity; /* Window granularity in k */
|
||||||
|
WORD wWindowSize; /* Window size in k */
|
||||||
|
WORD wWindowASegment; /* Window A segment */
|
||||||
|
WORD wWindowBSegment; /* Window B segment */
|
||||||
|
DWORD pWindowSchemeFunction; /* Pointer to window function */
|
||||||
|
WORD wBytesPerScanLine; /* Bytes per scanline */
|
||||||
|
WORD wXResolution; /* Horizontal resolution */
|
||||||
|
WORD wYResolution; /* Vertical resolution */
|
||||||
|
UCHAR ucXCharSize; /* Character cell width */
|
||||||
|
UCHAR ucYCharSize; /* Character cell height */
|
||||||
|
UCHAR ucNumberOfPlanes; /* Number of memory planes */
|
||||||
|
UCHAR ucBitsPerPixel; /* Bits per pixel */
|
||||||
|
UCHAR ucNumberOfBanks; /* Number of CGA style banks */
|
||||||
|
UCHAR ucMemoryModel; /* Memory model type */
|
||||||
|
UCHAR ucBankSize; /* Size of CGA style banks */
|
||||||
|
UCHAR ucNumberOfImagePages; /* Number of images pages */
|
||||||
|
UCHAR ucReserved1; /* Reserved */
|
||||||
|
UCHAR ucRedMaskSize; /* Size of direct color red mask */
|
||||||
|
UCHAR ucRedFieldPosition; /* Bit posn of lsb of red mask */
|
||||||
|
UCHAR ucGreenMaskSize; /* Size of direct color green mask */
|
||||||
|
UCHAR ucGreenFieldPosition; /* Bit posn of lsb of green mask */
|
||||||
|
UCHAR ucBlueMaskSize; /* Size of direct color blue mask */
|
||||||
|
UCHAR ucBlueFieldPosition; /* Bit posn of lsb of blue mask */
|
||||||
|
UCHAR ucRsvdMaskSize; /* Size of direct color res mask */
|
||||||
|
UCHAR ucRsvdFieldPosition; /* Bit posn of lsb of res mask */
|
||||||
|
UCHAR ucDirectColorModeInfo; /* Direct color mode attributes */
|
||||||
|
/* VESA 2.0 variables */
|
||||||
|
DWORD dwPhysBasePtr; /* physical address for flat frame buffer */
|
||||||
|
UCHAR ucReserved2[212]; /* Pad to 256 byte block size */
|
||||||
|
} VESA_MODE_INFO;
|
||||||
|
|
||||||
|
#pragma pack()
|
||||||
|
|
||||||
|
int listedModes=0;
|
||||||
|
void ListVideoModes(void)
|
||||||
|
{
|
||||||
|
VESA_GENERAL_INFO vesaInfo, far *pVesaInfo = &vesaInfo;
|
||||||
|
WORD far * ModePtr;
|
||||||
|
int ValidModeCount = 0;
|
||||||
|
|
||||||
|
vesaInfo.szSignature[0] = 'V';
|
||||||
|
vesaInfo.szSignature[1] = 'B';
|
||||||
|
vesaInfo.szSignature[2] = 'E';
|
||||||
|
vesaInfo.szSignature[3] = '2';
|
||||||
|
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
push es
|
||||||
|
mov ax, 04F00h ; Get VESA info
|
||||||
|
les di, pVesaInfo ; Pointer to info buffer
|
||||||
|
int 10h ; check for VESA
|
||||||
|
pop es
|
||||||
|
}
|
||||||
|
|
||||||
|
//printf("Vesa BIOS Version: %d.%d\n", vesaInfo.wVersion >> 8, vesaInfo.wVersion & 0xff);
|
||||||
|
|
||||||
|
ModePtr = vesaInfo.pModeList;
|
||||||
|
|
||||||
|
while (*ModePtr != 0xffff)
|
||||||
|
{
|
||||||
|
VESA_MODE_INFO modeInfo, far *pModeInfo = &modeInfo;
|
||||||
|
WORD modeNumber = *ModePtr++;
|
||||||
|
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
push es
|
||||||
|
mov cx, modeNumber ; mode to request info on
|
||||||
|
les di, pModeInfo ; pointer to info buffer
|
||||||
|
mov ax, 04f01h ; get MODE info
|
||||||
|
int 10h
|
||||||
|
pop es
|
||||||
|
}
|
||||||
|
|
||||||
|
if (modeInfo.ucNumberOfPlanes == 1 &&
|
||||||
|
modeInfo.dwPhysBasePtr != 0 &&
|
||||||
|
modeInfo.ucBitsPerPixel != 15)
|
||||||
|
{
|
||||||
|
if(!(modeInfo.ucBitsPerPixel == 16 &&
|
||||||
|
(modeInfo.ucRedMaskSize != 5 ||
|
||||||
|
modeInfo.ucGreenMaskSize != 6 ||
|
||||||
|
modeInfo.ucBlueMaskSize != 5)))
|
||||||
|
{
|
||||||
|
if ((ValidModeCount % 5) == 0)
|
||||||
|
{
|
||||||
|
//printf("\n");
|
||||||
|
}
|
||||||
|
/*printf(" %4dx%4dx%2d",
|
||||||
|
modeInfo.wXResolution,
|
||||||
|
modeInfo.wYResolution,
|
||||||
|
modeInfo.ucBitsPerPixel);*/
|
||||||
|
ValidModeCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//printf("\n\nNumber of valid FLAT driver modes: %d\n", ValidModeCount);
|
||||||
|
listedModes=ValidModeCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
ListVideoModes();
|
||||||
|
if(listedModes==0)
|
||||||
|
{
|
||||||
|
system("cls");
|
||||||
|
printf("Your video card doesn't support VESA,please choose another one!\n");
|
||||||
|
getch();
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
printf("VESATEST_201B103 - VESA check succesfuly\n");
|
||||||
|
}
|
||||||
|
|
||||||
BIN
DOS/VESATEST.exe/vesatest.exe
Normal file
BIN
DOS/VESATEST.exe/vesatest.exe
Normal file
Binary file not shown.
BIN
DOS/VESATEST.exe/vesatest.obj
Normal file
BIN
DOS/VESATEST.exe/vesatest.obj
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user