?? nmkrom.bat
字號:
@echo off
if %1x == x goto exit4
if NOT EXIST config\%1 goto exit3
if %masm_ver%x == x set masm_ver=v611
if %masm_ver% == v611 set COMPILER=ml
if %masm_ver% == v611 set OPT1=
if %masm_ver% == v600 set COMPILER=mlx
if %masm_ver% == v600 set OPT1=/VM
set OPT2=/Fl
rem # Get Device ID and BinFile in the vars DeviceId and BinFile
del SetDevId.bat
getdevid %1 >SetDevId.bat
if ERRORLEVEL 1 goto exit4
call SetDevId
attrib -r config\%DeviceId%.id
attrib -r ..\..\cxrom\config\config.id
if %0x == mk2romx goto mk2
goto mkcon1
:mk2
shift
:mkcon1
verify on
del config\%DeviceId%.id
del ..\..\cxrom\config\config.id
del error*.*
rem del *.err
echo %masm_ver% %0 %1 %2 %3 %4 > error
copy config\%1 config\%DeviceId%.id
rem === Here we check for ConfigFile type 1 or 2 ===
if %2x == x goto OldConfig
rem *New Config Format: User RefBrd Tbl Oem*
rem *Priority: User(highest) Oem Tbl RefBrd Rv250gen*
rem ****************************************
if x%4 == x goto skipoem
rem oem constants (optional)
if EXIST config\oem\%4 goto oemcfg
echo %4 does not exist
goto exit
:oemcfg
type config\oem\%4 >> config\%DeviceId%.id
:skipoem
if x%3 == x goto skipmmt
rem multimedia and hardware table constants (optional)
if EXIST config\hwmmt\%3 goto hwmmtcfg
echo %3 does not exist
goto exit
:hwmmtcfg
type config\hwmmt\%3 >> config\%DeviceId%.id
:skipmmt
rem *The RefBrd ConfigFile must be present to come here
if EXIST config\refboard\%2 goto refbdcfg
echo %2 does not exist
goto exit
:refbdcfg
type config\refboard\%2 >> config\%DeviceId%.id
if EXIST config\rv250gen.cfg goto AppendRv250Gen
echo Config\Rv250gen.cfg file is missing.
rem pause
goto OldConfig
:AppendRv250Gen
type config\rv250gen.cfg >> config\%DeviceId%.id
rem **** End New config ****
:OldConfig
if %0x == mk2romx goto mk2a
goto mkcon2
:mk2a
echo ROM2 equ 1 >> config\%DeviceId%.id
:mkcon2
echo ; >> config\%DeviceId%.id
call deviceid.bat %DeviceId%
if %pcidevid%==0 goto exit5
echo ; >> config\%DeviceId%.id
echo CONFIG_FILE equ "BR %1 %2 %3 %4 %masm_ver% " >> config\%DeviceId%.id
echo ; >> config\%DeviceId%.id
rem echo include ..\..\r200\v200cnst.cfg >> config\%DeviceId%.id
echo include ..\..\cxrom\cx$conn.asm > ..\..\cxrom\config\config.id
type config\%DeviceId%.id >> ..\..\cxrom\config\config.id
rem build vesa$04r.db
cd ..\..\cxvesa\build
call mkvesa32.bat
cd ..\..\build\rv250
if EXIST objs6 goto delobjs6
mkdir objs6
:delobjs6
del objs6\*.obj
%COMPILER% %OPT1% %OPT2% /Sn /Zm /c /Cp /Foobjs6\cx$rom.obj ..\..\cxrom\cx$rom.asm >> error
if ERRORLEVEL 1 goto exit2
%COMPILER% %OPT1% %OPT2% /Sn /Zm /c /Cp /Foobjs6\o$rom.obj ..\..\radeon\o$rom.asm >> error
if ERRORLEVEL 1 goto exit2
%COMPILER% %OPT1% %OPT2% /Sn /Zm /c /Cp /Foobjs6\o$init.obj ..\..\radeon\o$init.asm >> error
if ERRORLEVEL 1 goto exit2
%COMPILER% %OPT1% %OPT2% /Sn /Zm /c /Cp /Foobjs6\tv$subs.obj ..\..\tvout\int\tv$subs.asm >> error
if ERRORLEVEL 1 goto exit2
%COMPILER% %OPT1% %OPT2% /Sn /Zm /c /Cp /Foobjs6\fp$subs.obj ..\..\dfpanel\fp$subs.asm >> error
if ERRORLEVEL 1 goto exit2
%COMPILER% %OPT1% %OPT2% /Sn /Zm /c /Cp /Foobjs6\v010.obj ..\..\cxrom\v010.asm >> error
if ERRORLEVEL 1 goto exit2
cd ..\..\vgacomm
call mkvga.bat
cd ..\build\rv250
echo objs6\cx$rom+objs6\o$rom.obj+ > x
echo ..\..\vgacomm\objs\v001+..\..\vgacomm\objs\v002+..\..\vgacomm\objs\v003+ >> x
echo ..\..\vgacomm\objs\v004+..\..\vgacomm\objs\v006+ >> x
echo ..\..\vgacomm\objs\vx001+..\..\vgacomm\objs\vx002+ >> x
echo ..\..\vgacomm\objs\ah05+..\..\vgacomm\objs\ah06+..\..\vgacomm\objs\ah07+ >> x
echo ..\..\vgacomm\objs\ah08+..\..\vgacomm\objs\ah09+..\..\vgacomm\objs\ah0b+ >> x
echo ..\..\vgacomm\objs\ah0c+..\..\vgacomm\objs\ah0d+..\..\vgacomm\objs\ah0e+ >> x
echo ..\..\vgacomm\objs\ah0f+..\..\vgacomm\objs\ah10+..\..\vgacomm\objs\ah11+ >> x
echo ..\..\vgacomm\objs\ah13+..\..\vgacomm\objs\ah1a+ >> x
echo objs6\fp$subs+objs6\tv$subs+objs6\v010+objs6\o$init >> x
echo o$rom; >> x
del b$*.*
del o$rom.exe
link /MAP @x >> error
if ERRORLEVEL 1 goto exit1
exe2bin o$rom b$%1
del o$rom.exe
..\..\tools\bin\cxchksum input b$%1 > g
del b$*.*
..\..\tools\bin\binfo wonder.x01 > error2
rem del %1
ren wonder.x01 %BinFile%
if EXIST \bin goto copybin
mkdir bin
:copybin
copy %BinFile% bin\*.* /y
del %BinFile%
@type error2
rem pause
rem ts error*.* error
goto exit
:exit5
echo First 2 letters of ConfigFile don't match existing Device IDs.
goto exit
:exit4
echo NMKROM usage:
echo nmkrom <ConfigFile> [config2] [config3] [config4]
echo <ConfigFile> is required
echo [config2] and [config3] are optional
echo [config4] is optional if [config3] exists
goto exit
:exit3
echo Configuration file (%1) not found!
goto exit
:exit2
echo Assembling error!
goto exit
:exit1
echo Error while linking modules!
:exit
@set COMPILER=
@set OPT1=
@set OPT2=
@set pcidevid=
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -