; []===========================================================[] ; ; NOTICE: THIS PROGRAM BELONGS TO AWARD SOFTWARE INTERNATIONAL(R) ; INC. IT IS CONSIDERED A TRADE SECRET AND IS NOT TO BE ; DIVULGED OR USED BY PARTIES WHO HAVE NOT RECEIVED ; WRITTEN AUTHORIZATION FROM THE OWNER. ; ; []===========================================================[] ; ;---------------------------------------------------------------------------- ;Rev Date Name Description ;---------------------------------------------------------------------------- ;R21 04/15/99 PAL Added "Save_W83782D_Status" and "Restore_W83782D_Status" ;R20 04/14/99 PAL Adjust negative symbol for 600 ;R19 03/25/99 PAL Added "Always_Use_Deshutes_In_Temp3" option ;R18 03/18/99 JMS Add "Case_open_WARNING" option ;R17 03/04/99 PAL Added FAN_Divisor for CPU FAN3 ;R16 03/04/99 PAL Fixed Pentium2 Deshutes diod change to thermistor error ;R15 02/24/99 PAL Fixed coding error when VTIN1 use 2N3904 transistor ;R14 01/29/99 PHI Move sensor code to XGROUP. ; Please use define SENSOR_IN_XGROUP. ;R13 11/04/98 PAL Added "Only_Use_Fan_Cntl" option for customer special ; in dual sensor ;R12 10/23/98 PAL Fixed location error ;R11 10/22/98 LAW add "Not_Use_Temp1","Temp2_USE_SPECIAL_STR","Temp3_USE_SPECIAL_STR" ; "No_Beep_for_Temp2_When_Not_Use_Pentium2_Deshutes" ; for some M/B ;R08B 10/14/98 PAL Fixed R08A location error ;R10A 10/12/98 PAL Fix R10 move code error ;R10 10/09/98 PAL Move all the SMbus of the chipset and use the chipset ; standard I2C code in CHIPPOST.ASM ;R08A 10/09/98 PAL Fixed programming error for PWM2 can not control and ; added "Fan3IN_AS_PWMOUT2" option let user determined ; to use Fan3IN or PWMOUT2 function ;R09 10/08/98 PAL Modify reading temp. method to change word into byte ; and not effect reading value ;R08 10/08/98 PAL Fixed programming error for PWM2 can not control ;R07 09/03/98 LAW Fixed W83782D_USE_SMBUS cann't work with M1543/M1543C ;R06 09/03/98 TNY Support structure for setup string moving to X-Group. ;R05 09/02/98 LAW add "No_Beep_for_CPU2_Temp" for some MB only show no alram ;R04 09/02/98 PAL Added Disable SMI and OVT when Warning Temperature over shutdown temp. ;R03A 08/14/98 LAW fixed coding miss ;R03 08/13/98 PAL Fix coding error ;R02 07/14/98 PAL Fix coding error and add definition No_Show_W83782D_IN7 ; ,No_Show_W83782D_IN8 ;R01 07/01/98 RIC Add VIA SMBus Support. ;R00 06/29/98 PAL Init. Ver. ;[]=======================================================================[] ;W83782D_Support :Winbond W83782D sensor support ;W83782D_USE_SMBUS :W83782D USE SMBUS ;No_Show_W83782D_IN1 ;Hide the IN1 item ;No_Show_W83782D_IN7 ;Hide the IN7 item ;No_Show_W83782D_IN8 ;Hide the IN8 item ;Show_CPU2_Temp :Winbond W83782D MP support ;SHOW_W83782D_CPUFAN1 :W83782D Fan1 support. ;SHOW_W83782D_CPUFAN2 :W83782D Fan2 support. ;SHOW_W83782D_CPUFAN3 :W83782D Fan3 support. ;W83782D_CMOS :W83782D cmos location ;W83782D_CMOS_Bits :W83782D cmos 3 bits location ;Add_294h_Node :LDCM use 294h & 295h for access port ;Thermal_Enable :Slow down speed ;W83782D_USE_48MHz :If W83782D use 48 MHz default is 24 MHz ;W83782D_USE_14MHz :If W83782D use 14 MHz default is 24 MHz ;W83782D_Beep_As_GPO :Select GPO# function not beep ;Use_Pentium2_Deshutes:Use Pentium II CPU Deshutes sensor must define ;Use_2N3904_Transistor:Use 2N3904_Transistor ;Fan_Speed_Control :Control CPU Fan Speed ;W83782D_Fan_CMOS :W83782D Fan speed cmos location ;W83782D_Fan_CMOS_Bits:W83782D Fan speed cmos 3 bits location ;CPU_Temp_Selectable :CPU Temp Selectable range from 30 to 120 degree C ;Fan3IN_AS_PWMOUT2 :Program Fan3IN(Pin18) as PWMOUT2 to control FAN2 ;[]=======================================================================[] ifdef COMPILE_FOR_SENSOR_ASM IF COMPILE_FOR_SENSOR_ASM EQ 2 ;R21 - start SM_RAM SEGMENT USE16 AT 0 INCLUDE SM_RAM.INC SM_RAM ENDS ;R21 - end ifndef SENSOR_IN_XGROUP ;R14 ;[]==============================================================[] ;Input : CL - register index ;Output : AL - Value read ;[]==============================================================[] W83782D_PORT EQU 0295h ifdef W83782D_USE_SMBUS ;R10 - start public Get_W83782D_Byte public Set_W83782D_Byte public Get_W83782D_Word public Set_W83782D_Word extrn Ct_I2CReadByte:near extrn Ct_I2CWriteByte:near extrn Ct_I2CReadWord:near extrn Ct_I2CWriteWord:near Get_W83782D_Byte Proc Near call Ct_I2CReadByte ret Get_W83782D_Byte ENDP Set_W83782D_Byte Proc Near call Ct_I2CWriteByte ret Set_W83782D_Byte ENDP Get_W83782D_Word Proc Near call Ct_I2CReadWord ret Get_W83782D_Word ENDP Set_W83782D_Word Proc Near call Ct_I2CWriteWord ret Set_W83782D_Word ENDP ;R10 - end public Get_W83782D_Byte public Set_W83782D_Byte public Get_W83782D_Word public Set_W83782D_Word comment % ;R10 ifdef PIIX_ID ;[]==============================================================[] ;Input : CL - register index ; CH - device ID ;Output : AL - Value read ;[]==============================================================[] Get_W83782D_Byte Proc Near push cx mov dx,SMBus_Port +04h inc ch mov al,ch ;ID cmd(read) out dx,al NEWIODELAY NEWIODELAY call Chk_SMBus_READY pop ax mov dl,03h out dx,al ;Index NEWIODELAY NEWIODELAY mov dl,02h mov al,48h out dx,al ;read data NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY mov dl,05 in al,dx ;Data0 NEWIODELAY NEWIODELAY ret Get_W83782D_Byte Endp ;[]==============================================================[] ;Input : CL - register index ; CH - device ID ; AL - Value to write ;Output: none ;[]==============================================================[] Set_W83782D_Byte Proc Near push ax push cx mov dx,SMBus_Port +04h mov al,ch ;ID cmd(Write) out dx,al NEWIODELAY NEWIODELAY call Chk_SMBus_READY pop ax mov dl,03h out dx,al ;Index NEWIODELAY NEWIODELAY pop ax mov dl,05 out dx,al ;Data0 NEWIODELAY NEWIODELAY mov dl,02h mov al,48h out dx,al ;write data NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY ret Set_W83782D_Byte Endp ;[]==============================================================[] ;Input : CL - register index ; CH - device ID ;Output : AX - Value read ;[]==============================================================[] Get_W83782D_Word Proc Near push cx mov dx,SMBus_Port +04h inc ch mov al,ch ;ID cmd(read) out dx,al NEWIODELAY NEWIODELAY call Chk_SMBus_READY mov dl,03h pop ax out dx,al ;Index NEWIODELAY NEWIODELAY mov dl,02h mov al,4ch out dx,al ;write data NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY mov dl,06 in al,dx ;Data1 NEWIODELAY NEWIODELAY mov ah,al mov dl,05 in al,dx ;Data0 NEWIODELAY NEWIODELAY ret Get_W83782D_Word endp ;[]==============================================================[] ;Input : CL - register index ; CH - device ID ; AX - Value to write ;Output: none ;[]==============================================================[] Set_W83782D_Word Proc Near push ax push cx mov dx,SMBus_Port +04h mov al,ch ;ID cmd(Write) out dx,al NEWIODELAY NEWIODELAY call Chk_SMBus_READY pop ax mov dl,03h out dx,al ;Index NEWIODELAY NEWIODELAY pop ax mov dl,05 out dx,al ;Data0 NEWIODELAY NEWIODELAY mov dl,06 mov al,ah out dx,al ;Data1 NEWIODELAY NEWIODELAY mov dl,02h mov al,4ch out dx,al ;write data NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY ret Set_W83782D_Word Endp endif; PIIX_ID ifdef M1543 ;[]==============================================================[] ;Input : CL - register index ;Output : AL - Value read ;[]==============================================================[] public Get_W83782D_Byte public Set_W83782D_Byte public Get_W83782D_Word public Set_W83782D_Word Get_W83782D_Byte Proc Near push cx call Wait_SMBUS_Idle_Status ;R07 mov dx,SMBus_Port +03h inc ch mov al,ch ;ID cmd(read) out dx,al NEWIODELAY NEWIODELAY mov dl,01h mov al,20h out dx,al ;read data NEWIODELAY NEWIODELAY pop ax mov dl,07h out dx,al ;Index NEWIODELAY NEWIODELAY mov dl,02h mov al,0ffh out dx,al ;starting access NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY mov dl, 04 in al, dx ;Data0 NEWIODELAY NEWIODELAY ret Get_W83782D_Byte Endp ;[]==============================================================[] ;Input : CL - register index ; AL - Value to write ;Output: none ;[]==============================================================[] Set_W83782D_Byte Proc Near push ax push cx call Wait_SMBUS_Idle_Status ;R07 mov dx,SMBus_Port +03h mov al,ch ;ID cmd(Write) out dx,al NEWIODELAY NEWIODELAY mov dl,01h mov al,20h out dx,al ;write data NEWIODELAY NEWIODELAY pop ax mov dl,07h out dx,al ;Index NEWIODELAY NEWIODELAY pop ax mov dl,04h out dx,al ;Data0 NEWIODELAY NEWIODELAY mov dl,02h mov al,0ffh out dx,al ;starting access NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY ret Set_W83782D_Byte Endp ;[]==============================================================[] ;Input : CL - register index ;Output : AX - Value read ;[]==============================================================[] Get_W83782D_Word Proc Near push cx call Wait_SMBUS_Idle_Status ;R07 mov dx,SMBus_Port +03h inc ch mov al,ch ;ID cmd(read) out dx,al NEWIODELAY NEWIODELAY mov dl,01h mov al,30h out dx,al ;read Word NEWIODELAY NEWIODELAY pop ax mov dl,07h out dx,al ;Index NEWIODELAY NEWIODELAY mov dl,02h mov al,0ffh out dx,al ;starting access NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY mov dl,05h in al,dx ;Data1 NEWIODELAY NEWIODELAY mov ah,al mov dl,04h in al,dx ;Data0 NEWIODELAY NEWIODELAY ret Get_W83782D_Word endp ;[]==============================================================[] ;Input : CL - register index ; AX - Value to write ;Output: none ;[]==============================================================[] Set_W83782D_Word Proc Near push ax push cx call Wait_SMBUS_Idle_Status ;R07 mov dx,SMBus_Port +03h mov al, ch ;ID cmd(Write) out dx,al NEWIODELAY NEWIODELAY mov dl,01h mov al,30h out dx,al ;write Word NEWIODELAY NEWIODELAY pop ax mov dl,07h out dx,al ;Index NEWIODELAY NEWIODELAY pop ax mov dl,04 out dx,al ;Data0 NEWIODELAY NEWIODELAY mov dl,05 mov al,ah out dx,al ;Data1 NEWIODELAY NEWIODELAY mov dl,02h mov al,0ffh out dx,al ;starting access NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY ret Set_W83782D_Word Endp ;R07 - start Public Wait_SMBUS_Idle_Status Wait_SMBUS_Idle_Status Proc Near push cx mov cx, 01000h Wait_SMBus_Idle_Status_loop: mov dx, SMBus_Port + 0 mov al, 0ffh out dx, al in al, dx ;get status test al, 04h jnz short Clear_final loop short Wait_SMBus_Idle_Status_Loop Clear_final: pop cx ret Wait_SMBUS_Idle_Status EndP ;R07 - end endif; M1543 ;R01 - starts if VIA_SMBus ;[]==============================================================[] ;Input : CL - register index ; CH - device ID ;Output : AL - Value read ;[]==============================================================[] Get_W83782D_Byte Proc Near push cx mov dx,SMBus_Port +04h inc ch mov al,ch ;ID cmd(read) out dx,al NEWIODELAY NEWIODELAY call Chk_SMBus_READY pop ax mov dl,03h out dx,al ;Index NEWIODELAY NEWIODELAY mov dl,02h mov al,48h out dx,al ;read data NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY mov dl,05 in al,dx ;Data0 NEWIODELAY NEWIODELAY ret Get_W83782D_Byte Endp ;[]==============================================================[] ;Input : CL - register index ; CH - device ID ; AL - Value to write ;Output: none ;[]==============================================================[] Set_W83782D_Byte Proc Near push ax push cx mov dx,SMBus_Port +04h mov al,ch ;ID cmd(Write) out dx,al NEWIODELAY NEWIODELAY call Chk_SMBus_READY pop ax mov dl,03h out dx,al ;Index NEWIODELAY NEWIODELAY pop ax mov dl,05 out dx,al ;Data0 NEWIODELAY NEWIODELAY mov dl,02h mov al,48h out dx,al ;write data NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY ret Set_W83782D_Byte Endp ;[]==============================================================[] ;Input : CL - register index ; CH - device ID ;Output : AX - Value read ;[]==============================================================[] Get_W83782D_Word Proc Near push cx mov dx,SMBus_Port +04h inc ch mov al,ch ;ID cmd(read) out dx,al NEWIODELAY NEWIODELAY call Chk_SMBus_READY mov dl,03h pop ax out dx,al ;Index NEWIODELAY NEWIODELAY mov dl,02h mov al,4ch out dx,al ;write data NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY mov dl,06 in al,dx ;Data1 NEWIODELAY NEWIODELAY mov ah,al mov dl,05 in al,dx ;Data0 NEWIODELAY NEWIODELAY ret Get_W83782D_Word endp ;[]==============================================================[] ;Input : CL - register index ; CH - device ID ; AX - Value to write ;Output: none ;[]==============================================================[] Set_W83782D_Word Proc Near push ax push cx mov dx,SMBus_Port +04h mov al,ch ;ID cmd(Write) out dx,al NEWIODELAY NEWIODELAY call Chk_SMBus_READY pop ax mov dl,03h out dx,al ;Index NEWIODELAY NEWIODELAY pop ax mov dl,05 out dx,al ;Data0 NEWIODELAY NEWIODELAY mov dl,06 mov al,ah out dx,al ;Data1 NEWIODELAY NEWIODELAY mov dl,02h mov al,4ch out dx,al ;write data NEWIODELAY NEWIODELAY xor cx,cx @@: newiodelay loop short @B call Chk_SMBus_READY ret Set_W83782D_Word Endp endif; VIA_SMBus ;R01 - ends % ;R10A endif; W83782D_USE_SMBUS ;R10A% ;R10 public Get_W83782D public Set_W83782D Get_W83782D Proc Near ifdef W83782D_USE_SMBUS pushf push dx ;R10ifndef M1543 ;R07 ;R10 push cx ;R10 ;R10 mov dx,SMBus_Port +04h ;R10 mov al,05bh ;W83782D read cmd ;R10 out dx,al ;R10 NEWIODELAY ;R10 NEWIODELAY ;R10 ;R10 call Chk_SMBus_READY ;R10 ;R10 pop cx ;R10 mov dl,03h ;R10 mov al,cl ;R10 out dx,al ;Index ;R10 NEWIODELAY ;R10 NEWIODELAY ;R10 ;R10 mov dl,02h ;R10 mov al,48h ;R10 out dx,al ;read data ;R10 NEWIODELAY ;R10 NEWIODELAY ;R10 ;R10 mov cx,100h ;R10 @@: ;R10 newiodelay ;R10 loop short @B ;R10 ;R10 call Chk_SMBus_READY ;R10 ;R10 mov dl,05 ;R10 in al,dx ;Data0 ;R10 NEWIODELAY ;R10 NEWIODELAY ;R10 ;R10else; M1543 ;R07 mov ch, 5ah ;R07 Call Get_W83782D_Byte ;R07 ;R10endif; M1543 ;R07 pop dx popf else; W83782D_USE_SMBUS pushf push dx mov dx,W83782D_PORT mov al,cl out dx,al push cx mov cx,100h @@: newiodelay loop short @B pop cx inc dx in al,dx newiodelay newiodelay pop dx popf endif; W83782D_USE_SMBUS ret Get_W83782D Endp ;[]==============================================================[] ;Input : CL - register index ; AL - Value to write ;Output: none ;[]==============================================================[] Set_W83782D Proc Near ifdef W83782D_USE_SMBUS pushf push dx ;R10ifndef M1543 ;R07 ;R10 push ax ;R10 push cx ;R10 ;R10 mov dx,SMBus_Port +04h ;R10 mov al,05ah ;W83782D write cmd ;R10 out dx,al ;R10 NEWIODELAY ;R10 NEWIODELAY ;R10 ;R10 call Chk_SMBus_READY ;R10 ;R10 pop cx ;R10 mov dl,03h ;R10 mov al,cl ;R10 out dx,al ;Index ;R10 NEWIODELAY ;R10 NEWIODELAY ;R10 ;R10 pop ax ;R10 mov dl,05 ;R10 out dx,al ;Data0 ;R10 NEWIODELAY ;R10 NEWIODELAY ;R10 ;R10 mov dl,02h ;R10 mov al,48h ;R10 out dx,al ;write data ;R10 NEWIODELAY ;R10 NEWIODELAY ;R10 ;R10 xor cx,cx ;R10 @@: ;R10 newiodelay ;R10 loop short @B ;R10 ;R10 call Chk_SMBus_READY ;R10 ;R10else; M1543 ;R07 mov ch, 5ah ;R07 Call Set_W83782D_Byte ;R07 ;R10endif; M1543 ;R07 pop dx popf else; W83782D_USE_SMBUS pushf push dx push ax mov dx,W83782D_PORT mov al,cl out dx,al push cx mov cx,100h @@: newiodelay loop short @B pop cx inc dx pop ax out dx,al newiodelay newiodelay pop dx popf endif; W83782D_USE_SMBUS ret Set_W83782D Endp ifdef ACPI_Support ifndef Only_Use_Fan_Cntl ;R13 extrn ACPI_Critical_Item:near extrn TEMP1_HIGH:near extrn SENSOR_FLAG:near ;[]========================================================================[] ;Procedure: Ct_FillTempPointer ; ;Function : Return Thermal Zone Temperature pointer ; ;Input : F segment shadow RAM is writeable ; ;Output : none ; ;[]========================================================================[] Public Ct_FillTempPointer Ct_FillTempPointer Proc Near push es mov ax,0f000h mov es,ax mov di,offset DGROUP:SENSOR_FLAG test word ptr es:[di],01h jz short No_Sensor mov di,offset DGROUP:TEMP1_HIGH extrn CPU_TEMP_ITEM:near mov si,offset DGROUP:CPU_TEMP_ITEM call E_GetItem_Value ;R04 - start push ax mov si,offset DGROUP:ACPI_Critical_Item call E_GetItem_Value xor ah,ah shl ax,1 mov si,offset Critical_Table add si,ax mov ax,word ptr cs:[si] mov word ptr es:[di+8],ax ;Critical trip point sub ax, 2732 mov bl, 10 div bl pop bx ;R04 - end ifndef CPU_Temp_Selectable mov si,offset CPU_TEMP_Tbl ;R04 xor bh,bh ;R04 add si,bx ;R04 mov bl,cs:[si] ;R04 ;R04 xor ah,ah ;R04 mov si,offset CPU_TEMP_TBL ;R04 add si,ax ;R04 mov al,byte ptr cs:[si] endif; CPU_Temp_Selectable ;R04 - start cmp bl,al ; al is shutdown temp. jbe short @F mov bl, al @@: mov al, bl ;R04 - end mov cl,10 mul cl add ax,2732 mov word ptr es:[di],ax ; Trip point 1 high mov word ptr es:[di+4],ax ; Trip point 2 high sub ax,30 mov word ptr es:[di+2],ax ; Trip point 1 low mov word ptr es:[di+6],ax ; Trip point 2 low ;R04 mov si,offset DGROUP:ACPI_Critical_Item ;R04 call E_GetItem_Value ;R04 xor ah,ah ;R04 shl ax,1 ;R04 mov si,offset Critical_Table ;R04 add si,ax ;R04 mov ax,word ptr cs:[si] ;R04 mov word ptr es:[di+8],ax ;Critical trip point No_Sensor: pop es ret Ct_FillTempPointer Endp Critical_Table: dw 3332 ;60c dw 3382 ;65c dw 3432 ;70c dw 3482 ;75c endif; Only_Use_Fan_Cntl ;R13 endif ;ACPI_Support ;*************************************************************************** ;**** SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM **** ;**** SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM **** ;**** SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM **** ;**** SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM **** ;*************************************************************************** ;[]==============================================================[] ;[]==============================================================[] Public Prg_W83782D_Chip ;R06 Prg_W83782D_Chip Proc Near ;R07 mov dx,W83782D_PORT ;R07 mov al,48h ;R07 out dx,al ;R07 newiodelay ;R07 newiodelay ;R07 inc dx ;R07 mov al,2dh ;R07 out dx,al ;R07 newiodelay ;R07 newiodelay ;R07 ;Hide W83782D's display items if it is not mounted on M/B. mov cl,48h call Get_W83782D cmp al,2dh ;R03A je short @F je @F ;R03A push ds mov ax,0f000h mov ds,ax ifndef Only_Use_Fan_Cntl ;R13 extrn CPU_Temp_Item:near ifndef Not_Use_Temp1 ;R11 extrn Temp1_Item:near endif; Not_Use_Temp1 ;R11 extrn Temp2_Item:near ifdef Show_CPU2_Temp extrn Temp3_Item:near endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ;R13 ifdef SHOW_W83782D_CPUFAN1 extrn Current_CPUFAN1_Item:near endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 extrn Current_CPUFAN2_Item:near endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 ;R08A extrn Current_CPUFAN3_Item:near endif; Fan3IN_AS_PWMOUT2 ;R08A endif; SHOW_W83782D_CPUFAN3 extrn Current_IN0_Item:near ifndef No_Show_W83782D_IN1 extrn Current_IN1_Item:near endif; No_Show_W83782D_IN1 extrn Current_IN2_Item:near extrn Current_IN3_Item:near extrn Current_IN4_Item:near extrn Current_IN5_Item:near extrn Current_IN6_Item:near ifndef No_Show_W83782D_IN7 ;R02 extrn Current_IN7_Item:near endif; No_Show_W83782D_IN7 ;R02 ifndef No_Show_W83782D_IN8 ;R02 extrn Current_IN8_Item:near endif; No_Show_W83782D_IN8 ;R02 extrn F000_Shadow_W:near extrn F000_Shadow_R:near extrn F000_call_proc:near assume ds:DGROUP f000_call DGROUP:F000_Shadow_W ;R02 - start ifdef Fan_Speed_Control or word ptr ds:[Fan_Speed_Item ].ITEMSTAT,ITEMDISABLE endif; Fan_Speed_Control ;R02 - end ifndef Only_Use_Fan_Cntl ;R13 or word ptr ds:[CPU_Temp_Item].ITEMSTAT,ITEMDISABLE ifndef Not_Use_Temp1 ;R11 or word ptr ds:[Temp1_Item].ITEMSTAT,ITEMDISABLE endif; Not_Use_Temp1 ;R11 or word ptr ds:[Temp2_Item].ITEMSTAT,ITEMDISABLE ifdef Show_CPU2_Temp or word ptr ds:[Temp3_Item].ITEMSTAT,ITEMDISABLE endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ;R13 ifdef SHOW_W83782D_CPUFAN1 or word ptr ds:[Current_CPUFAN1_Item].ITEMSTAT,ITEMDISABLE endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 or word ptr ds:[Current_CPUFAN2_Item].ITEMSTAT,ITEMDISABLE endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 ;R08A or word ptr ds:[Current_CPUFAN3_Item].ITEMSTAT,ITEMDISABLE endif; Fan3IN_AS_PWMOUT2 ;R08A endif; SHOW_W83782D_CPUFAN3 or word ptr ds:[Current_IN0_Item].ITEMSTAT,ITEMDISABLE ifndef No_Show_W83782D_IN1 or word ptr ds:[Current_IN1_Item].ITEMSTAT,ITEMDISABLE endif; No_Show_W83782D_IN1 or word ptr ds:[Current_IN2_Item].ITEMSTAT,ITEMDISABLE or word ptr ds:[Current_IN3_Item].ITEMSTAT,ITEMDISABLE or word ptr ds:[Current_IN4_Item].ITEMSTAT,ITEMDISABLE or word ptr ds:[Current_IN5_Item].ITEMSTAT,ITEMDISABLE or word ptr ds:[Current_IN6_Item].ITEMSTAT,ITEMDISABLE ifndef No_Show_W83782D_IN7 ;R02 or word ptr ds:[Current_IN7_Item].ITEMSTAT,ITEMDISABLE endif; No_Show_W83782D_IN7 ;R02 ifndef No_Show_W83782D_IN8 ;R02 or word ptr ds:[Current_IN8_Item].ITEMSTAT,ITEMDISABLE endif; No_Show_W83782D_IN8 ;R02 ifdef ACPI_Support ifndef Only_Use_Fan_Cntl ;R13 extrn ACPI_Critical_Item:near or word ptr ds:[ACPI_Critical_Item].ITEMSTAT,ITEMDISABLE endif; Only_Use_Fan_Cntl ;R13 endif; ACPI_Support ifdef ACPI_SUPPORT ifndef Only_Use_Fan_Cntl ;R13 and word ptr ds:[SENSOR_FLAG],not 01h endif; Only_Use_Fan_Cntl ;R13 endif ;ACPI_SUPPORT f000_call DGROUP:F000_Shadow_R pop ds jmp Prg_W83782D_Chip_End @@: mov cx,10 Clear_W83782D: push cx mov cl,41h call Get_W83782D mov cl,42h call Get_W83782D pop cx loop short Clear_W83782D mov si,offset EGROUP:Prg_W83782D_Tbl Init_Start: mov cl,cs:[si] call Get_W83782D mov cl,cs:[si] and al,cs:[si+1] or al,cs:[si+2] call Set_W83782D add si,3 cmp si,offset EGROUP:Prg_W83782D_Tbl_End jne short Init_Start ifndef Only_Use_Fan_Cntl ;R13 mov si,offset DGROUP:CPU_Temp_Item call E_GetItem_Value ;R04 - start push ax ifdef ACPI_Support ifndef Only_Use_Fan_Cntl ;R13 mov si,offset DGROUP:ACPI_Critical_Item call E_GetItem_Value xor ah,ah shl ax,1 mov si,offset Critical_Table add si,ax mov ax,word ptr cs:[si] sub ax, 2732 mov bl, 10 div bl else; ACPI_Support mov al, 80 ;max. Warning temp. endif; Only_Use_Fan_Cntl ;R13 endif; ACPI_Support pop bx ;R04 - end ifndef CPU_Temp_Selectable mov si,offset CPU_TEMP_Tbl ;R04 xor bh,bh ;R04 add si,bx ;R04 mov bl,cs:[si] ;R04 ;R04 mov si,offset CPU_TEMP_Tbl ;R04 xor ah,ah ;R04 add si,ax ;R04 mov al,cs:[si] endif; CPU_Temp_Selectable ;R04 - start push bx cmp bl,al ;al shutdown temp jbe short @F mov cl,4ch call Get_W83782D or al,00001000b ;Disable OVT Pin mov cl,4ch call Set_W83782D mov cl,40h call Get_W83782D and al,not 00000010b ;Disable SMI Pin mov cl,40h call Set_W83782D mov cl,56h call Get_W83782D and al,not 00100000b ;disable CPU temp. beep mov cl,56h call Set_W83782D ifdef Show_CPU2_Temp mov cl,4ch call Get_W83782D or al,00001000b ;Disable OVT Pin mov cl,4ch call Set_W83782D mov cl,57h call Get_W83782D and al,not 00100000b ;disable CPU2 temp. beep mov cl,57h call Set_W83782D endif; Show_CPU2_Temp @@: pop ax ;R04 - end push ax push ax push ax push ax ifdef W83782D_USE_SMBUS ;Program CPU1 (sensor2) pop ax mov cx,9203h call Set_W83782D_Word ;set Tos (High limit) pop ax sub al,5 mov cx,9202h call Set_W83782D_Word ;set Thyst (Low limit) ifdef Thermal_Enable_Use_SMI mov al,02h ;interrupt mode else; Thermal_Enable_Use_SMI mov al,0 ;comparator mode endif; Thermal_Enable_Use_SMI mov cx,9201h call Set_W83782D_Byte ;Program CPU2 (sensor3) pop ax mov cx,9003h call Set_W83782D_Word ;set Tos (High limit) pop ax sub al,5 mov cx,9002h call Set_W83782D_Word ;set Thyst (Low limit) ifdef Thermal_Enable_Use_SMI mov al,02h ;interrupt mode else; Thermal_Enable_Use_SMI mov al,0 ;comparator mode endif; Thermal_Enable_Use_SMI mov cx,9001h ;sensor configuration call Set_W83782D_Byte else; W83782D_USE_SMBUS mov cl,4eh call Get_W83782D and al,11111000b or al,00000001b ;bank1 select call Set_W83782D pop ax mov cl,55h call Set_W83782D ;set Tos (High limit) pop ax sub al,5 mov cl,53h call Set_W83782D ;set Thyst (Low limit) ifdef Thermal_Enable_Use_SMI mov cl,52h call Get_W83782D or al,00000010b ;set interrupt mode call Set_W83782D endif; Thermal_Enable_Use_SMI mov cl,4eh call Get_W83782D and al,11111000b or al,00000010b ;bank2 select call Set_W83782D pop ax mov cl,55h call Set_W83782D ;set Tos (High limit) pop ax sub al,5 mov cl,53h call Set_W83782D ;set Thyst (Low limit) ifdef Thermal_Enable_Use_SMI mov cl,52h call Get_W83782D or al,00000010b ;set interrupt mode call Set_W83782D endif; Thermal_Enable_Use_SMI mov cl,4eh call Get_W83782D and al,11111000b ;bank0 select call Set_W83782D endif; W83782D_USE_SMBUS ;R11 - start ifdef No_Beep_for_Temp2_When_Not_Use_Pentium2_Deshutes mov cl,4eh call Get_W83782D and al,11111000b or al,00000001b ;bank1 select mov cl,4eh call Set_W83782D mov cl,50h ;read Temp2 if not Use call Get_W83782D ;Pentium2 Deshutes push ax ;then donnot enable Beep ;of the temp2 over mov cl,4eh call Get_W83782D and al,11111000b ;bank0 select call Set_W83782D pop ax cmp al, 7fh ;temp2 value is over this CPU ;maybe isnot Pentium2 Deshutes je Is_Not_Use_Pentium2_Deshutes_CPU endif; No_Beep_for_Temp2_When_Not_Use_Pentium2_Deshutes ;R11 - end mov cl,56h call Get_W83782D or al,00100000b ;enable CPU temp. beep mov cl,56h call Set_W83782D Is_Not_Use_Pentium2_Deshutes_CPU: ;R11 ifdef Show_CPU2_Temp ifndef No_Beep_for_CPU2_Temp ;R05 mov cl,57h call Get_W83782D or al,00100000b ;enable CPU2 temp. beep mov cl,57h call Set_W83782D endif; No_Beep_for_CPU2_Temp ;R05 endif; Show_CPU2_Temp mov cl,4ch call Get_W83782D ifdef Thermal_Enable_Use_SMI or al,01000000b ;set interrupt mode endif; Thermal_Enable_Use_SMI ifndef Show_CPU2_Temp or al,00010000b ;disable CPU3 temp. interrupt endif; Show_CPU2_Temp mov cl,4ch call Set_W83782D endif; Only_Use_Fan_Cntl ;R13 ifdef Fan_Speed_Control extrn Fan_Speed_Item:near mov si,offset DGROUP:Fan_Speed_Item call E_GetItem_Value or al, 08h mov ah, al shl ah, 4 or al, ah push ax mov cl, 5ch call Set_W83782D mov cl,4eh ;select Bank 4 call Get_W83782D and al, 0f8h or al, 04h mov cl,4eh call Set_W83782D pop ax mov cl, 5ch call Set_W83782D mov cl,4eh ;restore bank call Get_W83782D and al, 0f8h mov cl,4eh call Set_W83782D endif; Fan_Speed_Control mov cl,4eh ;select Bank 4 call Get_W83782D push ax ;save on now bank and al, 0f8h or al, 04h mov cl,4eh call Set_W83782D mov cl,50h call Get_W83782D ;clear VSB,VBAT mov cl, 51h mov al, 0fh call Set_W83782D pop ax mov cl,4eh call Set_W83782D Prg_W83782D_Chip_End: ;R18 -starts ifdef Case_open_WARNING mov cl,46h mov al, 01h call Set_W83782D mov cl,41h call Get_W83782D mov cl,42h call Get_W83782D mov cl,57h call Get_W83782D and al,NOT 00010000b ;clear case open beep mov cl,57h call Set_W83782D mov cx, 2000h DelayClear: newiodelay newiodelay loop DelayClear extrn Get_Cmos:near extrn Set_Cmos:near and OEM_Error_CMOS2[bp], not OEM_Error_CMOS_Bits2 mov al,OEM_Error_CMOS2 NMI_OFF F000_CALL DGROUP:Get_Cmos and al,NOT OEM_Error_CMOS_Bits2 mov ah,al ;Clear case open flag mov al,OEM_Error_CMOS2 NMI_OFF F000_CALL DGROUP:Set_Cmos mov cl,42h call Get_W83782D test al, 10h ;test Chassis intrusion bit jz short @f mov al,OEM_Error_CMOS2 NMI_OFF F000_CALL DGROUP:Get_Cmos or al,OEM_Error_CMOS_Bits2 mov ah,al ;set case open flag mov al,OEM_Error_CMOS2 NMI_OFF F000_CALL DGROUP:Set_Cmos or OEM_Error_CMOS2[bp],OEM_Error_CMOS_Bits2 mov cl,57h call Get_W83782D or al,00010000b ;set case open beep out 88h,al mov cl,57h call Set_W83782D mov cx, 2000h Delayloop: newiodelay newiodelay loop short Delayloop @@: endif; Case_open_WARNING ;R18 -ends ret Prg_W83782D_Chip Endp ;R21 - start Public Save_W83782D_Status Save_W83782D_Status Proc Near push ebx mov edi, ebx add edi, offset Sensor_State_Save mov cl, 2bh @@: push cx Call Get_W83782D stosb byte ptr es:[edi] pop cx inc cl cmp cl, 5fh jbe short @B mov cl, 4eh Call Get_W83782D and al, 0f8h or al, 01h mov cl, 4eh Call Set_W83782D mov cl, 52h @@: push cx Call Get_W83782D stosb byte ptr es:[edi] pop cx inc cl cmp cl, 56h jbe short @B mov cl, 4eh Call Get_W83782D and al, 0f8h or al, 02h mov cl, 4eh Call Set_W83782D mov cl, 52h @@: push cx Call Get_W83782D stosb byte ptr es:[edi] pop cx inc cl cmp cl, 56h jbe short @B mov cl, 4eh Call Get_W83782D and al, 0f8h mov cl, 4eh Call Set_W83782D pop ebx ret Save_W83782D_Status Endp Public Restore_W83782D_Status Restore_W83782D_Status Proc Near push ebx mov esi, ebx add esi, offset Sensor_State_Save mov cl, 2bh @@: push cx lodsb byte ptr es:[esi] Call Set_W83782D pop cx inc cl cmp cl, 5fh jbe short @B mov cl, 4eh Call Get_W83782D and al, 0f8h or al, 01h mov cl, 4eh Call Set_W83782D mov cl, 52h @@: push cx lodsb byte ptr es:[esi] Call Set_W83782D pop cx inc cl cmp cl, 56h jbe short @B mov cl, 4eh Call Get_W83782D and al, 0f8h or al, 02h mov cl, 4eh Call Set_W83782D mov cl, 52h @@: push cx lodsb byte ptr es:[esi] Call Set_W83782D pop cx inc cl cmp cl, 56h jbe short @B mov cl, 4eh Call Get_W83782D and al, 0f8h or al, 80h mov cl, 4eh Call Set_W83782D mov cl, 40h Call Get_W83782D or al, 81h mov cl, 40h Call Set_W83782D pop ebx ret Restore_W83782D_Status Endp ;R21 - end ;R18 - start ifdef Case_open_WARNING ifdef OEM_Error_Special_Show2 public OEM_Error_Special_String2 OEM_Error_Special_String2 db V_HILITE,'Warning!! Your Computer' db ' Case has been opening.' db V_NORMAL,0 endif; OEM_Error_Special_Show2 endif; Case_open_WARNING ;R18 - end assume ds:EGROUP ifndef Only_Use_Fan_Cntl ;R13 ifndef CPU_Temp_Selectable CPU_TEMP_Tbl: db 0120 ;disabled db 032h ;50C db 035h ;53C db 038h ;56C db 03ch ;60C db 03fh ;63C db 042h ;66C db 046h ;70C ifdef INTEL_M2_CPU_Temprature_Rang db 04Bh ;75C db 050h ;80C db 055h ;85C db 05Ah ;90C db 05Fh ;95C endif; INTEL_M2_CPU_Temprature_Rang endif; CPU_Temp_Selectable endif; Only_Use_Fan_Cntl ;R13 ALIGN 4 ;--------------------------- ; index and or ;--------------------------- Prg_W83782D_Tbl: ifdef W83782D_USE_14MHz db 4bh, 0f3h, 000h endif; W83782D_USE_14MHz ifdef W83782D_USE_48MHz db 4bh, 0f3h, 008h endif; W83782D_USE_48MHz ;R08A - start ;R08Bifdef Fan3IN_AS_PWMOUT2 ;R08B db 4dh, 0cfh, 000h ;Fan3IN as PWMOUT2 ;R08B db 5ch, 0f7h, 008h ;R08 enable PWM2 ;R08Bendif; Fan3IN_AS_PWMOUT2 ;R08A - end ;R12ifdef Use_2N3904_Transistor ;R12 db 5dh, 0f0h, 00dh ;R12 db 59h, 00h, 000h ;R12endif; Use_2N3904_Transistor ;R12 ;R12ifdef Use_Pentium2_Deshutes ;R12 db 5dh, 0f0h, 00dh ;R12endif; Use_Pentium2_Deshutes ;R12;R03A db 5dh 0feh, 001h ;R03 ;R12 db 5dh, 0feh, 001h ;R03A db 40h, 00h, 080h db 43h, 00h, 0ffh db 44h, 00h, 0ffh db 46h, 00h, 080h ifndef Only_Use_Fan_Cntl ;R13 ;R12 - start ifdef Use_2N3904_Transistor db 5dh, 0f0h, 00dh db 59h, 00h, 000h endif; Use_2N3904_Transistor ifdef Use_Pentium2_Deshutes db 5dh, 0f0h, 00dh endif; Use_Pentium2_Deshutes ;R15 - start ifdef VTIN1_Use_2N3904 db 5dh, 0fch, 002h db 59h, 0efh, 000h endif; VTIN1_Use_2N3904 ;R15 - end db 5dh, 0feh, 001h ;R12 - end endif; Only_Use_Fan_Cntl ;R13 ifndef FAN_Divisor db 47h, 00fh, 050h db 4bh, 03fh, 040h else; if FAN_Divisor eq 4 db 47h, 00fh, 0a0h db 4bh, 03fh, 080h endif; FAN_Divisor eq 4 if FAN_Divisor eq 8 db 47h, 00fh, 0f0h db 4bh, 03fh, 0c0h endif; FAN_Divisor eq 8 endif; FAN_Divisor ifdef W83782D_Beep_As_GPO db 40h, 00h, 041h else; W83782D_Beep_As_GPO db 40h, 00h, 001h endif; W83782D_Beep_As_GPO ifdef W83782D_Beep_As_GPO db 4dh, 00h, 0d5h ;disable auto-beep-on else; W83782D_Beep_As_GPO db 4dh, 00h, 095h ;disable auto-beep-on endif; W83782D_Beep_As_GPO ifndef Only_Use_Fan_Cntl ;R13 ifndef Thermal_Enable_Use_SMI db 4ch, 0bfh, 040h endif; Thermal_Enable_Use_SMI ;R04 - start ifdef Thermal_Enable_Use_SMI db 40h, 0fdh, 002h endif; Thermal_Enable_Use_SMI ;R04 - end endif; Only_Use_Fan_Cntl ;R13 ;R08B - start ifdef Fan3IN_AS_PWMOUT2 db 4dh, 0cfh, 000h ;Fan3IN as PWMOUT2 db 5ch, 0f7h, 008h ;R08 enable PWM2 endif; Fan3IN_AS_PWMOUT2 ;R08B - end ;R18 -starts ifdef Case_open_WARNING db 44h, 0EFH, 010h ;Set Chassis intrusion SMI Mask endif; Case_open_WARNING ;R18 -ends ;R19 - start ifdef Always_Use_Deshutes_In_Temp3 db 5dh, 0f7h, 008h db 59h, 0bfh, 040h endif; Always_Use_Deshutes_In_Temp3 ;R19 - end Prg_W83782D_Tbl_End: endif ;SENSOR_IN_XGROUP ;R14 ENDIF ;COMPILE_FOR_SENSOR_ASM EQ 2 endif ;COMPILE_FOR_SENSOR_ASM ifdef COMPILE_FOR_SENSOR_MNU ;*************************************************************************** ;***** Special_Show Special_Show Special_Show Special_Show Special_Show **** ;***** Special_Show Special_Show Special_Show Special_Show Special_Show **** ;***** Special_Show Special_Show Special_Show Special_Show Special_Show **** ;*************************************************************************** IF COMPILE_FOR_SENSOR_MNU EQ 2 ifndef Only_Use_Fan_Cntl ;R13 ifdef CPU_Temp_Selectable dw offset CPU_Temp_Item, offset Show_Scale endif; CPU_Temp_Selectable ifndef Not_Use_Temp1 ;R11 dw offset Temp1_Item, offset Show_Temp1 endif; Not_Use_Temp1 ;R11 dw offset Temp2_Item, offset Show_Temp2 ifdef Show_CPU2_Temp dw offset Temp3_Item, offset Show_Temp3 endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ;R13 ifdef SHOW_W83782D_CPUFAN1 dw offset Current_CPUFAN1_Item, offset Show_Current_CPUFAN1 endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 dw offset Current_CPUFAN2_Item, offset Show_Current_CPUFAN2 endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 ;R08A dw offset Current_CPUFAN3_Item, offset Show_Current_CPUFAN3 endif; Fan3IN_AS_PWMOUT2 ;R08A endif; SHOW_W83782D_CPUFAN3 dw offset Current_IN0_Item, offset Show_Current_IN0 ifndef No_Show_W83782D_IN1 dw offset Current_IN1_Item, offset Show_Current_IN1 endif; No_Show_W83782D_IN1 dw offset Current_IN2_Item, offset Show_Current_IN2 dw offset Current_IN3_Item, offset Show_Current_IN3 dw offset Current_IN4_Item, offset Show_Current_IN4 dw offset Current_IN5_Item, offset Show_Current_IN5 dw offset Current_IN6_Item, offset Show_Current_IN6 ifndef No_Show_W83782D_IN7 ;R02 dw offset Current_IN7_Item, offset Show_Current_IN7 endif; No_Show_W83782D_IN7 ;R02 ifndef No_Show_W83782D_IN8 ;R02 dw offset Current_IN8_Item, offset Show_Current_IN8 endif; No_Show_W83782D_IN8 ;R02 ENDIF ;COMPILE_FOR_SENSOR_MNU ;*************************************************************************** ;**** SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU **** ;**** SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU **** ;**** SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU **** ;**** SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU SENSOR.MNU **** ;*************************************************************************** IF COMPILE_FOR_SENSOR_MNU EQ 1 Public First_W83782D_Item ;R06 First_W83782D_Item Label Near ;R06 ifdef Fan_Speed_Control DEFINE_ITEM Fan_Speed_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem endif; Fan_Speed_Control ifndef Only_Use_Fan_Cntl ;R13 ifdef CPU_Temp_Selectable DEFINE_ITEM CPU_Temp_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem else; CPU_Temp_Selectable ifndef INTEL_M2_CPU_Temprature_Rang DEFINE_ITEM CPU_Temp_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem else; INTEL_M2_CPU_Temprature_Rang DEFINE_ITEM CPU_Temp_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem endif; INTEL_M2_CPU_Temprature_Rang endif; CPU_Temp_Selectable ifndef Not_Use_Temp1 ;R11 DEFINE_ITEM Temp1_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem endif; Not_Use_Temp1 ;R11 DEFINE_ITEM Temp2_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem ifdef Show_CPU2_Temp DEFINE_ITEM Temp3_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ;R13 ifdef SHOW_W83782D_CPUFAN1 DEFINE_ITEM Current_CPUFAN1_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 DEFINE_ITEM Current_CPUFAN2_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 ;R08A DEFINE_ITEM Current_CPUFAN3_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem endif; Fan3IN_AS_PWMOUT2 ;R08A endif; SHOW_W83782D_CPUFAN3 ;R02DEFINE_ITEM Current_IN0_Item ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02 ;R02ifndef No_Show_W83782D_IN1 ;R02 ;R02 public Current_IN1_Item ;R02Current_IN1_Item label near ;R02Xaxis = Xaxis + 18 ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02Xaxis = Xaxis - 18 ;R02 ;R02DEFINE_ITEM Current_IN2_Item ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02 ;R02 public Current_IN3_Item ;R02Current_IN3_Item label near ;R02Xaxis = Xaxis + 18 ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02Xaxis = Xaxis - 18 ;R02 ;R02DEFINE_ITEM Current_IN4_Item ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02 ;R02 public Current_IN5_Item ;R02Current_IN5_Item label near ;R02Xaxis = Xaxis + 18 ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02Xaxis = Xaxis - 18 ;R02 ;R02DEFINE_ITEM Current_IN6_Item ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02 ;R02 public Current_IN7_Item ;R02Current_IN7_Item label near ;R02Xaxis = Xaxis + 18 ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02Xaxis = Xaxis - 18 ;R02 ;R02DEFINE_ITEM Current_IN8_Item ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02 ;R02else; No_Show_W83782D_IN1 ;R02Yaxis=Yaxis-1 ;R02Xaxis=Xaxis+18 ;R02 ;R02DEFINE_ITEM Current_IN2_Item ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02 ;R02Yaxis=Yaxis+1 ;R02Xaxis=Xaxis-36 ;R02 public Current_IN3_Item ;R02Current_IN3_Item label near ;R02Xaxis = Xaxis + 18 ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02Xaxis = Xaxis - 18 ;R02 ;R02Yaxis=Yaxis-1 ;R02Xaxis=Xaxis+36 ;R02DEFINE_ITEM Current_IN4_Item ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02 ;R02Yaxis=Yaxis+1 ;R02Xaxis=Xaxis-36 ;R02 public Current_IN5_Item ;R02Current_IN5_Item label near ;R02Xaxis = Xaxis + 18 ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02Xaxis = Xaxis - 18 ;R02 ;R02Yaxis=Yaxis-3 ;R02Xaxis=Xaxis-60 ;R02DEFINE_ITEM Current_IN6_Item ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02Xaxis=Xaxis-18 ;R02 ;R02 ;R02Yaxis=Yaxis+1 ;R02Xaxis=Xaxis-36 ;R02 public Current_IN7_Item ;R02Current_IN5_Item label near ;R02Xaxis = Xaxis + 18 ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02Xaxis = Xaxis - 18 ;R02 ;R02Yaxis=Yaxis-3 ;R02Xaxis=Xaxis-60 ;R02DEFINE_ITEM Current_IN8_Item ;R02DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 ;R02 menuitem ;R02Xaxis=Xaxis-18 ;R02 ;R02endif; No_Show_W83782D_IN1 ;R02 - start IN2=0 IN3=1 IN4=0 IN5=1 IN6=0 IN7=1 IN8=0 DEFINE_ITEM Current_IN0_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem Xaxis = Xaxis + 18 Yaxis = Yaxis - 1 ifndef NO_SHOW_W83782D_IN1 DEFINE_ITEM Current_IN1_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem Xaxis = Xaxis - 18 else; NO_SHOW_W83782D_IN1 IN2=1 IN3=0 IN4=1 IN5=0 IN6=1 IN7=0 IN8=1 endif; NO_SHOW_W83782D_IN1 DEFINE_ITEM Current_IN2_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem IF IN2 EQ 1 Xaxis = Xaxis - 18 ELSE; IN2 EQ 1 Xaxis = Xaxis + 18 Yaxis = Yaxis - 1 ENDIF; IN2 EQ 1 DEFINE_ITEM Current_IN3_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem IF IN3 EQ 1 Xaxis = Xaxis - 18 ELSE; IN3 EQ 1 Xaxis = Xaxis + 18 Yaxis = Yaxis - 1 ENDIF; IN3 EQ 1 DEFINE_ITEM Current_IN4_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem IF IN4 EQ 1 Xaxis = Xaxis - 18 ELSE; IN4 EQ 1 Xaxis = Xaxis + 18 Yaxis = Yaxis - 1 ENDIF; IN4 EQ 1 DEFINE_ITEM Current_IN5_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem IF IN5 EQ 1 Xaxis = Xaxis - 18 ELSE; IN5 EQ 1 Xaxis = Xaxis + 18 Yaxis = Yaxis - 1 ENDIF; IN5 EQ 1 DEFINE_ITEM Current_IN6_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem IF IN6 EQ 1 Xaxis = Xaxis - 18 ELSE; IN6 EQ 1 Xaxis = Xaxis + 18 Yaxis = Yaxis - 1 ENDIF; IN6 EQ 1 ifndef No_Show_W83782D_IN7 DEFINE_ITEM Current_IN7_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem else; No_Show_W83782D_IN7 ifndef NO_SHOW_W83782D_IN1 IN8=1 else; NO_SHOW_W83782D_IN1 IN8=0 endif; NO_SHOW_W83782D_IN1 endif; No_Show_W83782D_IN7 IF IN7 EQ 1 ifndef No_Show_W83782D_IN7 Xaxis = Xaxis - 18 else; No_Show_W83782D_IN7 Xaxis = Xaxis endif; No_Show_W83782D_IN7 ELSE; IN7 EQ 1 ifndef No_Show_W83782D_IN7 Xaxis = Xaxis + 18 Yaxis = Yaxis - 1 else; No_Show_W83782D_IN7 Xaxis = Xaxis endif; No_Show_W83782D_IN7 ENDIF; IN7 EQ 1 ifndef No_Show_W83782D_IN8 DEFINE_ITEM Current_IN8_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem endif; No_Show_W83782D_IN8 IF IN8 EQ 1 ifndef No_Show_W83782D_IN8 Xaxis = Xaxis - 18 else; No_Show_W83782D_IN8 Xaxis = Xaxis - 18 Yaxis = Yaxis + 1 endif; No_Show_W83782D_IN8 ELSE; IN8 EQ 1 Xaxis = Xaxis ENDIF; IN8 EQ 1 ;R02 - end ifdef ACPI_SUPPORT ifndef Only_Use_Fan_Cntl ;R13 DEFINE_ITEM ACPI_Critical_Item DEFINE_MENUITEM , GROUP_HEALTH, 0, 10 menuitem endif; Only_Use_Fan_Cntl ;R13 endif ;ACPI_SUPPORT Public Last_W83782D_Item ;R06 Last_W83782D_Item Label Near ;R06 ENDIF ;COMPILE_FOR_SENSOR_MNU ;*************************************************************************** ;**** SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR **** ;**** SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR **** ;**** SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR **** ;**** SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR SENSOR.STR **** ;*************************************************************************** IF COMPILE_FOR_SENSOR_MNU EQ 0 ifdef Fan_Speed_Control Fan_Speed_Str db 'Fan Speed Control' db (COLLON_LOC - ($-(offset Fan_Speed_Str))) dup (" ") db ': ',0 Fan_Speed_Val db '46.87KHz',0 db '23.43KHz',0 db '11.72KHz',0 db '5.85KHz ',0 db '2.93KHz ',0 endif; Fan_Speed_Control ifdef ACPI_SUPPORT ifndef Only_Use_Fan_Cntl ;R13 ACPI_Critical_Str db 'Shutdown Temperature' db (COLLON_LOC - ($-(offset ACPI_Critical_Str))) dup (" ") db ': ',0 Critical_str db '60øC/140øF',0 db '65øC/149øF',0 db '70øC/158øF',0 db '75øC/167øF',0 endif; Only_Use_Fan_Cntl ;R13 endif ;ACPI_SUPPORT ifndef Only_Use_Fan_Cntl ;R13 CPU_Temp_Str db 'CPU Warning Temperature' db (COLLON_LOC - ($-(offset CPU_Temp_Str))) dup (" ") ifdef CPU_Temp_Selectable db ':',0 else; CPU_Temp_Selectable db ': ',0 endif; CPU_Temp_Selectable ifndef CPU_Temp_Selectable CPU_Temp_Val db 'Disabled ',0 db '50øC/122øF',0 db '53øC/127øF',0 db '56øC/133øF',0 db '60øC/140øF',0 db '63øC/145øF',0 db '66øC/151øF',0 db '70øC/158øF',0 ifdef INTEL_M2_CPU_Temprature_Rang db '75øC/167øF',0 db '80øC/176øF',0 db '85øC/185øF',0 db '90øC/194øF',0 db '95øC/205øF',0 endif; INTEL_M2_CPU_Temprature_Rang endif; CPU_Temp_Selectable ifndef Not_Use_Temp1 ;R11 Temp1_Str db 'Current System Temp.' db (COLLON_LOC - ($-(offset Temp1_Str))) dup (" ") db ': ',0 endif; Not_Use_Temp1 ;R11 ifndef Temp2_USE_SPECIAL_STR ;R11 Temp2_Str db 'Current CPU1 Temperature' else; Temp2_USE_SPECIAL_STR ;R11 Temp2_Str db Temp2_USE_SPECIAL_STR ;R11 endif; Temp2_USE_SPECIAL_STR ;R11 db (COLLON_LOC - ($-(offset Temp2_Str))) dup (" ") db ': ',0 ifdef Show_CPU2_Temp ifndef Temp3_USE_SPECIAL_STR ;R11 Temp3_Str db 'Current CPU2 Temperature' else; Temp3_USE_SPECIAL_STR ;R11 Temp3_Str db Temp3_USE_SPECIAL_STR ;R11 endif; Temp3_USE_SPECIAL_STR ;R11 db (COLLON_LOC - ($-(offset Temp3_Str))) dup (" ") db ': ',0 endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ;R13 ifdef SHOW_W83782D_CPUFAN1 Current_CPUFAN1_Str db 'Current CPUFAN1 Speed' db (COLLON_LOC - ($-(offset Current_CPUFAN1_Str))) dup (" ") db ': ',0 endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 Current_CPUFAN2_Str db 'Current CPUFAN2 Speed' db (COLLON_LOC - ($-(offset Current_CPUFAN2_Str))) dup (" ") db ': ',0 endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 ;R08A Current_CPUFAN3_Str db 'Current CPUFAN3 Speed' db (COLLON_LOC - ($-(offset Current_CPUFAN3_Str))) dup (" ") db ': ',0 endif; Fan3IN_AS_PWMOUT2 ;R08A endif; SHOW_W83782D_CPUFAN3 Current_IN0_Str db 'IN0(V) : ',0 ifndef NO_SHOW_W83782D_IN1 Current_IN1_Str db 'IN1(V) : ',0 endif; NO_SHOW_W83782D_IN1 Current_IN2_Str db 'IN2(V) : ',0 Current_IN3_Str db '+ 5 V : ',0 Current_IN4_Str db '+12 V : ',0 ;R20 - start IF W83782D_Support EQ 2 Current_IN5_Str db '-12 V :-',0 Current_IN6_Str db '- 5 V :-',0 else; W83782D_Support ;R20 - end Current_IN5_Str db '-12 V :-',0 Current_IN6_Str db '- 5 V :-',0 endif; W83782D_Support ;R20 ifndef NO_SHOW_W83782D_IN7 ;R02 Current_IN7_Str db 'VBAT(V): ',0 endif; NO_SHOW_W83782D_IN7 ;R02 ifndef NO_SHOW_W83782D_IN8 ;R02 Current_IN8_Str db '5VSB(V): ',0 endif; NO_SHOW_W83782D_IN8 ;R02 ;===================== ifndef Only_Use_Fan_Cntl ;R13 ifdef CPU_Temp_Selectable Show_Scale Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 Post_Func_Call E000_Show_Scale else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Scale ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Scale Endp endif; CPU_Temp_Selectable Show_Temp1 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 Post_Func_Call E000_Show_Temp1 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Temp1 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Temp1 Endp Show_Temp2 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 Post_Func_Call E000_Show_Temp2 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Temp2 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Temp2 Endp ifdef Show_CPU2_Temp Show_Temp3 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 Post_Func_Call E000_Show_Temp3 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Temp3 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Temp3 Endp endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ;R13 ifdef SHOW_W83782D_CPUFAN1 Show_Current_CPUFAN1 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 Post_Func_Call E000_Show_Current_CPUFAN1 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_CPUFAN1 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_CPUFAN1 Endp endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 Show_Current_CPUFAN2 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 Post_Func_Call E000_Show_Current_CPUFAN2 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_CPUFAN2 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_CPUFAN2 Endp endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 ;R08A Show_Current_CPUFAN3 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 Post_Func_Call E000_Show_Current_CPUFAN3 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_CPUFAN3 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_CPUFAN3 Endp endif; Fan3IN_AS_PWMOUT2 ;R08A endif; SHOW_W83782D_CPUFAN3 Show_Current_IN0 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 post_func_call E000_Show_Current_IN0 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_IN0 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_IN0 Endp ifndef NO_SHOW_W83782D_IN1 Show_Current_IN1 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 post_func_call E000_Show_Current_IN1 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_IN1 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_IN1 Endp endif; NO_SHOW_W83782D_IN1 Show_Current_IN2 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 post_func_call E000_Show_Current_IN2 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_IN2 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_IN2 Endp Show_Current_IN3 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 post_func_call E000_Show_Current_IN3 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_IN3 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_IN3 Endp Show_Current_IN4 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 post_func_call E000_Show_Current_IN4 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_IN4 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_IN4 Endp Show_Current_IN5 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 post_func_call E000_Show_Current_IN5 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_IN5 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_IN5 Endp Show_Current_IN6 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 post_func_call E000_Show_Current_IN6 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_IN6 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_IN6 Endp ifndef NO_SHOW_W83782D_IN7 ;R02 Show_Current_IN7 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 post_func_call E000_Show_Current_IN7 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_IN7 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_IN7 Endp endif; NO_SHOW_W83782D_IN7 ;R02 ifndef NO_SHOW_W83782D_IN8 ;R02 Show_Current_IN8 Proc Near cmp byte ptr CALLTYPE[bp],POST_CALL jne short @F ifndef SENSOR_IN_XGROUP ;R14 post_func_call E000_Show_Current_IN8 else ;SENSOR_IN_XGROUP ;R14 Xcall X_Show_Current_IN8 ;R14 endif ;SENSOR_IN_XGROUP ;R14 @@: ret Show_Current_IN8 Endp endif; NO_SHOW_W83782D_IN8 ;R02 ENDIF ;COMPILE_FOR_SENSOR_MNU ;*************************************************************************** ;**** SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 **** ;**** SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 **** ;**** SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 **** ;**** SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 **** ;*************************************************************************** IF COMPILE_FOR_SENSOR_MNU EQ 3 IFNDEF SENSOR_IN_XGROUP ;R14 Vin0_R1 equ 0 Vin0_R2 equ 0 Vin1_R1 equ 0 Vin1_R2 equ 0 Vin2_R1 equ 0 Vin2_R2 equ 0 Vin3_R1 equ 68 Vin3_R2 equ 100 Vin4_R1 equ 28 Vin4_R2 equ 10 Vin5_R1 equ 232 Vin5_R2 equ 56 Vin6_R1 equ 120 Vin6_R2 equ 56 Vin7_R1 equ 0 Vin7_R2 equ 0 Vin8_R1 equ 51 Vin8_R2 equ 75 ifndef Only_Use_Fan_Cntl ;R13 ifdef CPU_Temp_Selectable E000_Show_Scale Proc Near extrn E_GetItem_Value:near mov si,offset DGROUP:CPU_TEMP_ITEM Post_func_Call E_GetItem_Value mov bl, al call E000_DISP_WORD_INT3 mov al, 'ø' call E000_Display_Char mov al, 'C' call E000_Display_Char mov al, '/' call E000_Display_Char ;øC transed to øF --> C = 5/9*(F-32) mov al, bl mov bl,9 mul bl mov bl,5 div bl add al,32 xor ah,ah call E000_DISP_WORD_INT3 mov al, 'ø' call E000_Display_Char mov al, 'F' call E000_Display_Char sub al, -1 ;set overflow flag for display error ret E000_Show_Scale Endp endif; CPU_Temp_Selectable E000_Show_Temp1 Proc Near cmp al, Special_Before je short @F mov cl,27h call E000_Get_W83782D cmp al,100 jbe short OK_78Temp1 mov al,0 OK_78Temp1: mov bl,al call E000_DISP_Byte_INT2 mov al, 'ø' call E000_Display_Char mov al, 'C' call E000_Display_Char mov al, '/' call E000_Display_Char ;øC transed to øF --> C = 5/9*(F-32) mov al,bl mov bl,9 mul bl mov bl,5 div bl add al,32 xor ah,ah call E000_DISP_WORD_INT3 mov al, 'ø' call E000_Display_Char mov al, 'F' call E000_Display_Char @@: ret E000_Show_Temp1 Endp E000_Show_Temp2 Proc Near cmp al, Special_Before je @F ifdef W83782D_USE_SMBUS mov cx,9200h ;R09 call Get_W83782D_Word ;Get sensor2 call Get_W83782D_Byte ;Get sensor2 else; W83782D_USE_SMBUS mov cl,4eh call E000_Get_W83782D and al,11111000b or al,00000001b ;bank1 select mov cl,4eh call E000_Set_W83782D mov cl,50h call E000_Get_W83782D push ax mov cl,4eh call E000_Get_W83782D and al,11111000b ;bank0 select call E000_Set_W83782D pop ax endif; W83782D_USE_SMBUS ifdef Use_Pentium2_Deshutes out 80h, al cmp al,127 jne short OK_Deshutes mov cl,5dh call E000_Get_W83782D ;R15 and al,11111001b ;Disable Pentium2 Deshutes mov cl,5dh ;R16 and al,11111011b ;Disable Pentium2 Deshutes;R15 call E000_Set_W83782D ifdef W83782D_USE_SMBUS mov cx,9200h ;R09 call Get_W83782D_Word ;Get sensor2 call Get_W83782D_Byte ;Get sensor2 else; W83782D_USE_SMBUS mov cl,4eh call E000_Get_W83782D and al,11111000b or al,00000001b ;bank1 select mov cl,4eh call E000_Set_W83782D mov cl,50h call E000_Get_W83782D push ax mov cl,4eh call E000_Get_W83782D and al,11111000b ;bank0 select call E000_Set_W83782D pop ax endif; W83782D_USE_SMBUS OK_Deshutes: endif; Use_Pentium2_Deshutes cmp al, 100 jbe short OK_78Temp2 mov al,0 OK_78Temp2: mov bl,al call E000_DISP_Byte_INT2 mov al, 'ø' call E000_Display_Char mov al, 'C' call E000_Display_Char mov al, '/' call E000_Display_Char ;øC transed to øF --> C = 5/9*(F-32) mov al,bl mov bl,9 mul bl mov bl,5 div bl add al,32 xor ah,ah call E000_DISP_WORD_INT3 mov al, 'ø' call E000_Display_Char mov al, 'F' call E000_Display_Char @@: ret E000_Show_Temp2 Endp ifdef Show_CPU2_Temp E000_Show_Temp3 Proc Near cmp al, Special_Before je @F ifdef W83782D_USE_SMBUS mov cx,9000h ;R09 call Get_W83782D_Word ;Get sensor2 call Get_W83782D_Byte ;Get sensor2 else; W83782D_USE_SMBUS mov cl,4eh call E000_Get_W83782D and al,11111000b or al,00000010b ;bank2 select call E000_Set_W83782D mov cl,50h call E000_Get_W83782D push ax mov cl,4eh call E000_Get_W83782D and al,11111000b ;bank0 select call E000_Set_W83782D pop ax endif; W83782D_USE_SMBUS ifdef Use_Pentium2_Deshutes cmp al,127 jne short OK_Deshutes2 mov cl,5dh call E000_Get_W83782D ;R15 and al,11110101b ;disable Pentium2_Deshutes mov cl,5dh ;R16 and al,11110111b ;disable Pentium2_Deshutes;R15 call E000_Set_W83782D ifdef W83782D_USE_SMBUS mov cx,9000h ;R09 call Get_W83782D_Word ;Get sensor2 call Get_W83782D_Byte ;Get sensor2 else; W83782D_USE_SMBUS mov cl,4eh call E000_Get_W83782D and al,11111000b or al,00000010b ;bank2 select call E000_Set_W83782D mov cl,50h call E000_Get_W83782D push ax mov cl,4eh call E000_Get_W83782D and al,11111000b ;bank0 select call E000_Set_W83782D pop ax endif; W83782D_USE_SMBUS OK_Deshutes2: endif; Use_Pentium2_Deshutes cmp al,100 jbe short OK_78Temp3 mov al,0 OK_78Temp3: mov bl,al call E000_DISP_Byte_INT2 mov al, 'ø' call E000_Display_Char mov al, 'C' call E000_Display_Char mov al, '/' call E000_Display_Char ;øC transed to øF --> C = 5/9*(F-32) mov al,bl mov bl,9 mul bl mov bl,5 div bl add al,32 xor ah,ah call E000_DISP_WORD_INT3 mov al, 'ø' call E000_Display_Char mov al, 'F' call E000_Display_Char @@: ret E000_Show_Temp3 Endp endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ;R13 ifdef SHOW_W83782D_CPUFAN1 E000_Show_Current_CPUFAN1 Proc Near cmp al, Special_Before je short @F mov cl,28h call E000_Get_W83782D cmp al,0ffh jne short CPUFAN_WORKING1 xor ax,ax jmp short SHOW_FAN1 CPUFAN_WORKING1: xor bh,bh mov bl,al ifndef FAN_Divisor mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; if FAN_Divisor eq 4 ifdef FAN_Divisor_Patch_EQU_4 ; mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; FAN_Divisor_Patch_EQU_4 ; mov ax,265ch ;05265ch=(1350000/4) mov dx,05h ;Count=(1350000/(RPM*4)) endif;FAN_Divisor_Patch_EQU_4 endif; FAN_Divisor eq 4 if FAN_Divisor eq 8 mov ax,932eh ;02932eh=(1350000/8) mov dx,02h ;Count=(1350000/(RPM*8)) endif; FAN_Divisor eq 8 endif; FAN_Divisor div bx SHOW_FAN1: call E000_DISP_WORD_INT4 mov al, ' ' call E000_Display_Char mov al, 'R' call E000_Display_Char mov al, 'P' call E000_Display_Char mov al, 'M' call E000_Display_Char @@: ret E000_Show_Current_CPUFAN1 endp endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 E000_Show_Current_CPUFAN2 Proc Near cmp al, Special_Before je short @F mov cl,29h call E000_Get_W83782D cmp al,0ffh jne short CPUFAN_WORKING2 xor ax,ax jmp short SHOW_FAN2 CPUFAN_WORKING2: xor bh,bh mov bl,al ifndef FAN_Divisor mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; if FAN_Divisor eq 4 ifdef FAN_Divisor_Patch_EQU_4 mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; FAN_Divisor_Patch_EQU_4 ; mov ax,265ch ;05265ch=(1350000/4) mov dx,05h ;Count=(1350000/(RPM*4)) endif;FAN_Divisor_Patch_EQU_4 endif; FAN_Divisor eq 4 if FAN_Divisor eq 8 mov ax,932eh ;02932eh=(1350000/8) mov dx,02h ;Count=(1350000/(RPM*8)) endif; FAN_Divisor eq 8 endif; FAN_Divisor div bx SHOW_FAN2: call E000_DISP_WORD_INT4 mov al, ' ' call E000_Display_Char mov al, 'R' call E000_Display_Char mov al, 'P' call E000_Display_Char mov al, 'M' call E000_Display_Char @@: ret E000_Show_Current_CPUFAN2 endp endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 ;R08A E000_Show_Current_CPUFAN3 Proc Near cmp al, Special_Before je short @F mov cl,2ah call E000_Get_W83782D cmp al,0ffh jne short CPUFAN_WORKING3 xor ax,ax jmp short SHOW_FAN3 CPUFAN_WORKING3: xor bh,bh mov bl,al ;R17 - start ifndef FAN_Divisor mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; if FAN_Divisor eq 4 ifdef FAN_Divisor_Patch_EQU_4 mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; FAN_Divisor_Patch_EQU_4 ; mov ax,265ch ;05265ch=(1350000/4) mov dx,05h ;Count=(1350000/(RPM*4)) endif;FAN_Divisor_Patch_EQU_4 endif; FAN_Divisor eq 4 if FAN_Divisor eq 8 mov ax,932eh ;02932eh=(1350000/8) mov dx,02h ;Count=(1350000/(RPM*8)) endif; FAN_Divisor eq 8 endif; FAN_Divisor ;R17 - end ;R17 mov ax,4cb8h ;0a4cb8h=(1350000/2) ;R17 mov dx,0ah ;Count=(1350000/(RPM*2)) div bx SHOW_FAN3: call E000_DISP_WORD_INT4 mov al, ' ' call E000_Display_Char mov al, 'R' call E000_Display_Char mov al, 'P' call E000_Display_Char mov al, 'M' call E000_Display_Char @@: ret E000_Show_Current_CPUFAN3 endp endif; Fan3IN_AS_PWMOUT2 ;R08A endif; SHOW_W83782D_CPUFAN3 Display_Vin Proc Near cmp al,0ffh jne short Vin_WORKING xor ax,ax Vin_WORKING: or dx,dx ;Is above 4 Voltage jz short Below4 ;No, go to below 4V handler push bx push dx xor ah,ah mov bl,16 ;(4080/255) mul bl pop bx ;(R1+R2) mul bx pop bx ;(R2) div bx xor dx,dx mov bx,1000 div bx push dx call E000_DISP_Byte_INT2 mov al, '.' call E000_Display_Char pop ax mov bl,10 div bl cmp al,9 jbe short Below_9B call E000_DISP_Byte_INT2 jmp short Above_9B Below_9B: call E000_DISP_Byte_HEX2 Above_9B: mov al, ' ' call E000_Display_Char mov al, 'V' call E000_Display_Char ret Below4: xor ah,ah mov bx,16 ;(4080/255) mul bx mov bx,1000 div bx push dx call E000_DISP_Byte_INT2 mov al, '.' call E000_Display_Char pop ax mov bl,10 div bl cmp al,9 jbe short Below_9A call E000_DISP_Byte_INT2 jmp short Above_9A Below_9A: call E000_DISP_Byte_HEX2 Above_9A: mov al, ' ' call E000_Display_Char mov al, 'V' call E000_Display_Char ret Display_Vin endp Display_NVin Proc Near cmp al,0ffh jne short NVin_WORKING xor ax,ax NVin_WORKING: or dx,dx ;Is above 4 Voltage jz short NBelow4 ;No, go to below 4V handler push bx push dx xor ah,ah mov bl,16 ;(4080/255) mul bl mov bx, 3600 sub bx, ax mov ax, bx pop bx ;(R1+R2) mul bx pop bx ;(R2) div bx sub ax, 3600 xor dx,dx mov bx,1000 div bx push dx call E000_DISP_Byte_INT2 mov al, '.' call E000_Display_Char pop ax mov bl,10 div bl cmp al,9 jbe short NBelow_9B call E000_DISP_Byte_INT2 jmp short NAbove_9B NBelow_9B: call E000_DISP_Byte_HEX2 NAbove_9B: mov al, ' ' call E000_Display_Char mov al, 'V' call E000_Display_Char ret NBelow4: xor ah,ah mov bx,16 ;(4080/255) mul bx mov bx,1000 div bx push dx call E000_DISP_Byte_INT2 mov al, '.' call E000_Display_Char pop ax mov bl,10 div bl cmp al,9 jbe short NBelow_9A call E000_DISP_Byte_INT2 jmp short NAbove_9A NBelow_9A: call E000_DISP_Byte_HEX2 NAbove_9A: mov al, ' ' call E000_Display_Char mov al, 'V' call E000_Display_Char ret Display_NVin endp E000_Show_Current_IN0 Proc Near cmp al, Special_Before je short @F mov cl,20h ;IN0 VcoreA call E000_Get_W83782D mov dx,(Vin0_R1+Vin0_R2) mov bx,Vin0_R2 call Display_Vin @@: ret E000_Show_Current_IN0 endp ifndef NO_SHOW_W83782D_IN1 E000_Show_Current_IN1 Proc Near cmp al, Special_Before je short @F mov cl,21h ;IN1 VINR0 call E000_Get_W83782D mov dx,(Vin1_R1+Vin1_R2) mov bx,Vin1_R2 call Display_Vin @@: ret E000_Show_Current_IN1 endp endif; NO_SHOW_W83782D_IN1 E000_Show_Current_IN2 Proc Near cmp al, Special_Before je short @F mov cl,22h ;IN2 3.3Vin call E000_Get_W83782D mov dx,(Vin2_R1+Vin2_R2) mov bx,Vin2_R2 call Display_Vin @@: ret E000_Show_Current_IN2 endp E000_Show_Current_IN3 Proc Near cmp al, Special_Before je short @F mov cl,23h ;IN3 5Vin call E000_Get_W83782D mov dx,(Vin3_R1+Vin3_R2) mov bx,Vin3_R2 call Display_Vin @@: ret E000_Show_Current_IN3 endp E000_Show_Current_IN4 Proc Near cmp al, Special_Before je short @F mov cl,24h ;IN4 +12Vin call E000_Get_W83782D mov dx,(Vin4_R1+Vin4_R2) mov bx,Vin4_R2 call Display_Vin @@: ret E000_Show_Current_IN4 endp E000_Show_Current_IN5 Proc Near cmp al, Special_Before je short @F mov cl,25h ;IN5 -12Vin call E000_Get_W83782D mov dx,(Vin5_R1+Vin5_R2) mov bx,Vin5_R2 call Display_NVin @@: ret E000_Show_Current_IN5 endp E000_Show_Current_IN6 Proc Near cmp al, Special_Before je short @F mov cl,26h ;IN6 -5Vin call E000_Get_W83782D mov dx,(Vin6_R1+Vin6_R2) mov bx,Vin6_R2 call Display_NVin @@: ret E000_Show_Current_IN6 endp ifndef NO_SHOW_W83782D_IN7 ;R02 E000_Show_Current_IN7 Proc Near cmp al, Special_Before je short @F mov cl,4eh ;select Bank 5 call E000_Get_W83782D push ax ;save on now bank and al, 0f8h or al, 05h mov cl,4eh call E000_Set_W83782D mov cl,51h ;IN7 VBAT call E000_Get_W83782D mov dx,(Vin7_R1+Vin7_R2) mov bx,Vin7_R2 call Display_Vin pop ax ;restore on now bank mov cl,4eh ;select Bank 5 call E000_Set_W83782D @@: ret E000_Show_Current_IN7 endp endif; NO_SHOW_W83782D_IN7 ;R02 ifndef NO_SHOW_W83782D_IN8 ;R02 E000_Show_Current_IN8 Proc Near cmp al, Special_Before je short @F mov cl,4eh ;select Bank 5 call E000_Get_W83782D push ax ;save on now bank and al, 0f8h or al, 05h mov cl,4eh call E000_Set_W83782D mov cl,50h ;IN8 5VSB call E000_Get_W83782D mov dx,(Vin8_R1+Vin8_R2) mov bx,Vin8_R2 call Display_Vin pop ax ;restore on now bank mov cl,4eh ;select Bank 5 call E000_Set_W83782D @@: ret E000_Show_Current_IN8 endp endif; NO_SHOW_W83782D_IN8 ;R02 E000_DISP_WORD_INT4 proc near F000_call DISP_WORD_INT4 ret E000_DISP_WORD_INT4 endp E000_DISP_WORD_INT3 proc near F000_call DISP_WORD_INT3 ret E000_DISP_WORD_INT3 endp E000_DISP_BYTE_INT2 proc near F000_call DISP_BYTE_INT2 ret E000_DISP_BYTE_INT2 endp E000_DISP_BYTE_HEX2 proc near F000_call DISP_BYTE_HEX2 ret E000_DISP_BYTE_HEX2 endp E000_Get_W83782D proc near call Get_W83782D ret E000_Get_W83782D endp E000_Set_W83782D proc near call Set_W83782D ret E000_Set_W83782D endp E000_Display_Char proc near F000_call Display_Char ret E000_Display_Char endp ifndef BIOS60 Public Update_W83782D_Screen Update_W83782D_Screen Proc near pusha ifdef Update_Sensor_in_CPUFEAT cmp byte ptr CUR_PAGE[bp], PAGE_CPU else; Update_Sensor_in_CPUFEAT ifdef Update_Sensor_in_IOFEAT cmp byte ptr CUR_PAGE[bp], PAGE_IO else; Update_Sensor_in_IOFEAT cmp byte ptr CUR_PAGE[bp], PAGE_CFEATURE endif; Update_Sensor_in_IOFEAT endif; Update_Sensor_in_CPUFEAT jne short Update_W83782D_end ;---------------------------------------- mov si, offset W83782D_Item_List Update_W83782D_Start: mov bx, cs:[si] cmp bx, -1 je short Update_W83782D_end push si F000_call Display_Whole_Item pop si inc si inc si jmp short Update_W83782D_Start ;---------------------------------------- Update_W83782D_end: popa ret Update_W83782D_Screen Endp endif ;BIOS60 ifdef BIOS60 db '$SpeRT' endif ;BIOS60 W83782D_Item_List Label Word ifdef BIOS60 dw W83782D_Runtime_No endif ;BIOS60 ifndef Only_Use_Fan_Cntl ;R13 ifndef Not_Use_Temp1 ;R11 dw offset Temp1_Item endif; Not_Use_Temp1 ;R11 dw offset Temp2_Item ifdef Show_CPU2_Temp dw offset Temp3_Item endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ;R13 ifdef SHOW_W83782D_CPUFAN1 dw offset Current_CPUFAN1_Item endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 dw offset Current_CPUFAN2_Item endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 ;R08A dw offset Current_CPUFAN3_Item endif; Fan3IN_AS_PWMOUT2 ;R08A endif; SHOW_W83782D_CPUFAN3 dw offset Current_IN0_Item ifndef NO_SHOW_W83782D_IN1 dw offset Current_IN1_Item endif; NO_SHOW_W83782D_IN1 dw offset Current_IN2_Item dw offset Current_IN3_Item dw offset Current_IN4_Item dw offset Current_IN5_Item dw offset Current_IN6_Item ifndef NO_SHOW_W83782D_IN7 ;R02 dw offset Current_IN7_Item endif; NO_SHOW_W83782D_IN7 ;R02 ifndef NO_SHOW_W83782D_IN8 ;R02 dw offset Current_IN8_Item endif; NO_SHOW_W83782D_IN8 ;R02 W83782D_Runtime_No EQU (($ - offset W83782D_Item_List)-2)/2 dw -1 ENDIF ;SENSOR_IN_XGROUP ;R14 ENDIF ;COMPILE_FOR_SENSOR_MNU ;R06 - start IF COMPILE_FOR_SENSOR_MNU EQ 4 dw offset First_W83782D_Item, offset Last_W83782D_Item ifndef SENSOR_IN_XGROUP ;R14 dw SEG Prg_W83782D_Chip, offset Prg_W83782D_Chip else ;SENSOR_IN_XGROUP ;R14 dw SEG X_Prg_W83782D_Chip, offset X_Prg_W83782D_Chip ;R14 endif ;SENSOR_IN_XGROUP ;R14 ENDIF ;COMPILE_FOR_SENSOR_MNU IF COMPILE_FOR_SENSOR_MNU EQ 5 extrn First_W83782D_Item:near extrn Last_W83782D_Item:near ifndef SENSOR_IN_XGROUP ;R14 extrn Prg_W83782D_Chip:near else ;SENSOR_IN_XGROUP ;R14 extrn X_Prg_W83782D_Chip:far ;R14 endif ;SENSOR_IN_XGROUP ;R14 ENDIF ;COMPILE_FOR_SENSOR_MNU ;R06 - end endif ;COMPILE_FOR_SENSOR_MNU ;R14 - start ;================================================================== ;======================== SENSOR IN XGROUP ======================== ;======================== SENSOR IN XGROUP ======================== ;======================== SENSOR IN XGROUP ======================== ;======================== SENSOR IN XGROUP ======================== ;================================================================== IFDEF SENSOR_IN_XGROUP ifdef COMPILE_FOR_SENSOR_ASM IF COMPILE_FOR_SENSOR_ASM EQ 2 ;[]==============================================================[] ;Input : CL - register index ;Output : AL - Value read ;[]==============================================================[] W83782D_PORT EQU 0295h ifdef W83782D_USE_SMBUS public X_Get_W83782D_Byte public X_Set_W83782D_Byte public X_Get_W83782D_Word public X_Set_W83782D_Word X_Get_W83782D_Byte Proc Near call far ptr EGROUP:fproc_Ct_I2CReadByte ret X_Get_W83782D_Byte ENDP X_Set_W83782D_Byte Proc Near call far ptr EGROUP:fproc_Ct_I2CWriteByte ret X_Set_W83782D_Byte ENDP X_Get_W83782D_Word Proc Near call far ptr EGROUP:fproc_Ct_I2CReadWord ret X_Get_W83782D_Word ENDP X_Set_W83782D_Word Proc Near call far ptr EGROUP:fproc_Ct_I2CWriteWord ret X_Set_W83782D_Word ENDP endif; W83782D_USE_SMBUS public X_Get_W83782D public X_Set_W83782D extrn X_GetItem_Value:near X_Get_W83782D Proc Near ifdef W83782D_USE_SMBUS pushf push dx mov ch, 5ah Call X_Get_W83782D_Byte pop dx popf else; W83782D_USE_SMBUS pushf push dx mov dx,W83782D_PORT mov al,cl out dx,al push cx mov cx,100h @@: newiodelay loop short @B pop cx inc dx in al,dx newiodelay newiodelay pop dx popf endif; W83782D_USE_SMBUS ret X_Get_W83782D Endp ;[]==============================================================[] ;Input : CL - register index ; AL - Value to write ;Output: none ;[]==============================================================[] X_Set_W83782D Proc Near ifdef W83782D_USE_SMBUS pushf push dx mov ch, 5ah Call X_Set_W83782D_Byte pop dx popf else; W83782D_USE_SMBUS pushf push dx push ax mov dx,W83782D_PORT mov al,cl out dx,al push cx mov cx,100h @@: newiodelay loop short @B pop cx inc dx pop ax out dx,al newiodelay newiodelay pop dx popf endif; W83782D_USE_SMBUS ret X_Set_W83782D Endp ifdef ACPI_Support ifndef Only_Use_Fan_Cntl extrn ACPI_Critical_Item:near extrn TEMP1_HIGH:near extrn SENSOR_FLAG:near ;[]========================================================================[] ;Procedure: X_Ct_FillTempPointer ; ;Function : Return Thermal Zone Temperature pointer ; ;Input : F segment shadow RAM is writeable ; ;Output : none ; ;[]========================================================================[] Public X_Ct_FillTempPointer X_Ct_FillTempPointer Proc far push es mov ax,0f000h mov es,ax mov di,offset DGROUP:SENSOR_FLAG test word ptr es:[di],01h jz short No_Sensor mov di,offset DGROUP:TEMP1_HIGH extrn CPU_TEMP_ITEM:near mov si,offset DGROUP:CPU_TEMP_ITEM call X_GetItem_Value push ax mov si,offset DGROUP:ACPI_Critical_Item call X_GetItem_Value xor ah,ah shl ax,1 mov si,offset Critical_Table add si,ax mov ax,word ptr cs:[si] mov word ptr es:[di+8],ax ;Critical trip point sub ax, 2732 mov bl, 10 div bl pop bx ifndef CPU_Temp_Selectable mov si,offset CPU_TEMP_Tbl xor bh,bh add si,bx mov bl,cs:[si] endif; CPU_Temp_Selectable cmp bl,al ; al is shutdown temp. jbe short @F mov bl, al @@: mov al, bl mov cl,10 mul cl add ax,2732 mov word ptr es:[di],ax ; Trip point 1 high mov word ptr es:[di+4],ax ; Trip point 2 high sub ax,30 mov word ptr es:[di+2],ax ; Trip point 1 low mov word ptr es:[di+6],ax ; Trip point 2 low No_Sensor: pop es retf X_Ct_FillTempPointer Endp Critical_Table: dw 3332 ;60c dw 3382 ;65c dw 3432 ;70c dw 3482 ;75c endif; Only_Use_Fan_Cntl endif ;ACPI_Support ;*************************************************************************** ;**** SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM **** ;**** SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM **** ;**** SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM **** ;**** SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM SENSOR.ASM **** ;*************************************************************************** ;[]==============================================================[] ;[]==============================================================[] Public X_Prg_W83782D_Chip X_Prg_W83782D_Chip Proc far ;Hide W83782D's display items if it is not mounted on M/B. mov cl,48h call X_Get_W83782D cmp al,2dh je @F push ds mov ax,0f000h mov ds,ax ifndef Only_Use_Fan_Cntl extrn CPU_Temp_Item:near ifndef Not_Use_Temp1 extrn Temp1_Item:near endif; Not_Use_Temp1 extrn Temp2_Item:near ifdef Show_CPU2_Temp extrn Temp3_Item:near endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ifdef SHOW_W83782D_CPUFAN1 extrn Current_CPUFAN1_Item:near endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 extrn Current_CPUFAN2_Item:near endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 extrn Current_CPUFAN3_Item:near endif; Fan3IN_AS_PWMOUT2 endif; SHOW_W83782D_CPUFAN3 extrn Current_IN0_Item:near ifndef No_Show_W83782D_IN1 extrn Current_IN1_Item:near endif; No_Show_W83782D_IN1 extrn Current_IN2_Item:near extrn Current_IN3_Item:near extrn Current_IN4_Item:near extrn Current_IN5_Item:near extrn Current_IN6_Item:near ifndef No_Show_W83782D_IN7 extrn Current_IN7_Item:near endif; No_Show_W83782D_IN7 ifndef No_Show_W83782D_IN8 extrn Current_IN8_Item:near endif; No_Show_W83782D_IN8 extrn X_F000_Shadow_W:near extrn X_F000_Shadow_R:near assume ds:DGROUP call X_F000_Shadow_W ifdef Fan_Speed_Control or word ptr ds:[Fan_Speed_Item ].ITEMSTAT,ITEMDISABLE endif; Fan_Speed_Control ifndef Only_Use_Fan_Cntl or word ptr ds:[CPU_Temp_Item].ITEMSTAT,ITEMDISABLE ifndef Not_Use_Temp1 or word ptr ds:[Temp1_Item].ITEMSTAT,ITEMDISABLE endif; Not_Use_Temp1 or word ptr ds:[Temp2_Item].ITEMSTAT,ITEMDISABLE ifdef Show_CPU2_Temp or word ptr ds:[Temp3_Item].ITEMSTAT,ITEMDISABLE endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ifdef SHOW_W83782D_CPUFAN1 or word ptr ds:[Current_CPUFAN1_Item].ITEMSTAT,ITEMDISABLE endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 or word ptr ds:[Current_CPUFAN2_Item].ITEMSTAT,ITEMDISABLE endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 or word ptr ds:[Current_CPUFAN3_Item].ITEMSTAT,ITEMDISABLE endif; Fan3IN_AS_PWMOUT2 endif; SHOW_W83782D_CPUFAN3 or word ptr ds:[Current_IN0_Item].ITEMSTAT,ITEMDISABLE ifndef No_Show_W83782D_IN1 or word ptr ds:[Current_IN1_Item].ITEMSTAT,ITEMDISABLE endif; No_Show_W83782D_IN1 or word ptr ds:[Current_IN2_Item].ITEMSTAT,ITEMDISABLE or word ptr ds:[Current_IN3_Item].ITEMSTAT,ITEMDISABLE or word ptr ds:[Current_IN4_Item].ITEMSTAT,ITEMDISABLE or word ptr ds:[Current_IN5_Item].ITEMSTAT,ITEMDISABLE or word ptr ds:[Current_IN6_Item].ITEMSTAT,ITEMDISABLE ifndef No_Show_W83782D_IN7 or word ptr ds:[Current_IN7_Item].ITEMSTAT,ITEMDISABLE endif; No_Show_W83782D_IN7 ifndef No_Show_W83782D_IN8 or word ptr ds:[Current_IN8_Item].ITEMSTAT,ITEMDISABLE endif; No_Show_W83782D_IN8 ifdef ACPI_Support ifndef Only_Use_Fan_Cntl extrn ACPI_Critical_Item:near or word ptr ds:[ACPI_Critical_Item].ITEMSTAT,ITEMDISABLE endif; Only_Use_Fan_Cntl endif; ACPI_Support ifdef ACPI_SUPPORT ifndef Only_Use_Fan_Cntl and word ptr ds:[SENSOR_FLAG],not 01h endif; Only_Use_Fan_Cntl endif ;ACPI_SUPPORT call X_F000_Shadow_R pop ds jmp Prg_W83782D_Chip_End @@: mov cx,10 Clear_W83782D: push cx mov cl,41h call X_Get_W83782D mov cl,42h call X_Get_W83782D pop cx loop short Clear_W83782D mov si,offset XGROUP:Prg_W83782D_Tbl Init_Start: mov cl,cs:[si] call X_Get_W83782D mov cl,cs:[si] and al,cs:[si+1] or al,cs:[si+2] call X_Set_W83782D add si,3 cmp si,offset XGROUP:Prg_W83782D_Tbl_End jne short Init_Start ifndef Only_Use_Fan_Cntl mov si,offset DGROUP:CPU_Temp_Item call X_GetItem_Value push ax ifdef ACPI_Support ifndef Only_Use_Fan_Cntl mov si,offset DGROUP:ACPI_Critical_Item call X_GetItem_Value xor ah,ah shl ax,1 mov si,offset Critical_Table add si,ax mov ax,word ptr cs:[si] sub ax, 2732 mov bl, 10 div bl else; ACPI_Support mov al, 80 ;max. Warning temp. endif; Only_Use_Fan_Cntl endif; ACPI_Support pop bx ifndef CPU_Temp_Selectable mov si,offset CPU_TEMP_Tbl xor bh,bh add si,bx mov bl,cs:[si] endif; CPU_Temp_Selectable push bx cmp bl,al ;al shutdown temp jbe short @F mov cl,4ch call X_Get_W83782D or al,00001000b ;Disable OVT Pin mov cl,4ch call X_Set_W83782D mov cl,40h call X_Get_W83782D and al,not 00000010b ;Disable SMI Pin mov cl,40h call X_Set_W83782D mov cl,56h call X_Get_W83782D and al,not 00100000b ;disable CPU temp. beep mov cl,56h call X_Set_W83782D ifdef Show_CPU2_Temp mov cl,4ch call X_Get_W83782D or al,00001000b ;Disable OVT Pin mov cl,4ch call X_Set_W83782D mov cl,57h call X_Get_W83782D and al,not 00100000b ;disable CPU2 temp. beep mov cl,57h call X_Set_W83782D endif; Show_CPU2_Temp @@: pop ax push ax push ax push ax push ax ifdef W83782D_USE_SMBUS ;Program CPU1 (sensor2) pop ax mov cx,9203h call X_Set_W83782D_Word ;set Tos (High limit) pop ax sub al,5 mov cx,9202h call X_Set_W83782D_Word ;set Thyst (Low limit) ifdef Thermal_Enable_Use_SMI mov al,02h ;interrupt mode else; Thermal_Enable_Use_SMI mov al,0 ;comparator mode endif; Thermal_Enable_Use_SMI mov cx,9201h call X_Set_W83782D_Byte ;Program CPU2 (sensor3) pop ax mov cx,9003h call X_Set_W83782D_Word ;set Tos (High limit) pop ax sub al,5 mov cx,9002h call X_Set_W83782D_Word ;set Thyst (Low limit) ifdef Thermal_Enable_Use_SMI mov al,02h ;interrupt mode else; Thermal_Enable_Use_SMI mov al,0 ;comparator mode endif; Thermal_Enable_Use_SMI mov cx,9001h ;sensor configuration call X_Set_W83782D_Byte else; W83782D_USE_SMBUS mov cl,4eh call X_Get_W83782D and al,11111000b or al,00000001b ;bank1 select call X_Set_W83782D pop ax mov cl,55h call X_Set_W83782D ;set Tos (High limit) pop ax sub al,5 mov cl,53h call X_Set_W83782D ;set Thyst (Low limit) ifdef Thermal_Enable_Use_SMI mov cl,52h call X_Get_W83782D or al,00000010b ;set interrupt mode call X_Set_W83782D endif; Thermal_Enable_Use_SMI mov cl,4eh call X_Get_W83782D and al,11111000b or al,00000010b ;bank2 select call X_Set_W83782D pop ax mov cl,55h call X_Set_W83782D ;set Tos (High limit) pop ax sub al,5 mov cl,53h call X_Set_W83782D ;set Thyst (Low limit) ifdef Thermal_Enable_Use_SMI mov cl,52h call X_Get_W83782D or al,00000010b ;set interrupt mode call X_Set_W83782D endif; Thermal_Enable_Use_SMI mov cl,4eh call X_Get_W83782D and al,11111000b ;bank0 select call X_Set_W83782D endif; W83782D_USE_SMBUS ifdef No_Beep_for_Temp2_When_Not_Use_Pentium2_Deshutes mov cl,4eh call X_Get_W83782D and al,11111000b or al,00000001b ;bank1 select mov cl,4eh call X_Set_W83782D mov cl,50h ;read Temp2 if not Use call X_Get_W83782D ;Pentium2 Deshutes push ax ;then donnot enable Beep ;of the temp2 over mov cl,4eh call X_Get_W83782D and al,11111000b ;bank0 select call X_Set_W83782D pop ax cmp al, 7fh ;temp2 value is over this CPU ;maybe isnot Pentium2 Deshutes je Is_Not_Use_Pentium2_Deshutes_CPU endif; No_Beep_for_Temp2_When_Not_Use_Pentium2_Deshutes mov cl,56h call X_Get_W83782D or al,00100000b ;enable CPU temp. beep mov cl,56h call X_Set_W83782D Is_Not_Use_Pentium2_Deshutes_CPU: ifdef Show_CPU2_Temp ifndef No_Beep_for_CPU2_Temp mov cl,57h call X_Get_W83782D or al,00100000b ;enable CPU2 temp. beep mov cl,57h call X_Set_W83782D endif; No_Beep_for_CPU2_Temp endif; Show_CPU2_Temp mov cl,4ch call X_Get_W83782D ifdef Thermal_Enable_Use_SMI or al,01000000b ;set interrupt mode endif; Thermal_Enable_Use_SMI ifndef Show_CPU2_Temp or al,00010000b ;disable CPU3 temp. interrupt endif; Show_CPU2_Temp mov cl,4ch call X_Set_W83782D endif; Only_Use_Fan_Cntl ifdef Fan_Speed_Control extrn Fan_Speed_Item:near mov si,offset DGROUP:Fan_Speed_Item call X_GetItem_Value or al, 08h mov ah, al shl ah, 4 or al, ah push ax mov cl, 5ch call X_Set_W83782D mov cl,4eh ;select Bank 4 call X_Get_W83782D and al, 0f8h or al, 04h mov cl,4eh call X_Set_W83782D pop ax mov cl, 5ch call X_Set_W83782D mov cl,4eh ;restore bank call X_Get_W83782D and al, 0f8h mov cl,4eh call X_Set_W83782D endif; Fan_Speed_Control mov cl,4eh ;select Bank 4 call X_Get_W83782D push ax ;save on now bank and al, 0f8h or al, 04h mov cl,4eh call X_Set_W83782D mov cl,50h call X_Get_W83782D ;clear VSB,VBAT mov cl, 51h mov al, 0fh call X_Set_W83782D pop ax mov cl,4eh call X_Set_W83782D Prg_W83782D_Chip_End: retf X_Prg_W83782D_Chip Endp assume ds:XGROUP ifndef Only_Use_Fan_Cntl ifndef CPU_Temp_Selectable CPU_TEMP_Tbl: db 0120 ;disabled db 032h ;50C db 035h ;53C db 038h ;56C db 03ch ;60C db 03fh ;63C db 042h ;66C db 046h ;70C ifdef INTEL_M2_CPU_Temprature_Rang db 04Bh ;75C db 050h ;80C db 055h ;85C db 05Ah ;90C db 05Fh ;95C endif; INTEL_M2_CPU_Temprature_Rang endif; CPU_Temp_Selectable endif; Only_Use_Fan_Cntl ALIGN 4 ;--------------------------- ; index and or ;--------------------------- Prg_W83782D_Tbl: ifdef W83782D_USE_14MHz db 4bh, 0f3h, 000h endif; W83782D_USE_14MHz ifdef W83782D_USE_48MHz db 4bh, 0f3h, 008h endif; W83782D_USE_48MHz db 40h, 00h, 080h db 43h, 00h, 0ffh db 44h, 00h, 0ffh db 46h, 00h, 080h ifndef Only_Use_Fan_Cntl ifdef Use_2N3904_Transistor db 5dh, 0f0h, 00dh db 59h, 00h, 000h endif; Use_2N3904_Transistor ifdef Use_Pentium2_Deshutes db 5dh, 0f0h, 00dh endif; Use_Pentium2_Deshutes ;R15 - start ifdef VTIN1_Use_2N3904 db 5dh, 0fch, 002h db 59h, 0efh, 000h endif; VTIN1_Use_2N3904 ;R15 - end db 5dh, 0feh, 001h endif; Only_Use_Fan_Cntl ifndef FAN_Divisor db 47h, 00fh, 050h db 4bh, 03fh, 040h else; if FAN_Divisor eq 4 db 47h, 00fh, 0a0h db 4bh, 03fh, 080h endif; FAN_Divisor eq 4 if FAN_Divisor eq 8 db 47h, 00fh, 0f0h db 4bh, 03fh, 0c0h endif; FAN_Divisor eq 8 endif; FAN_Divisor ifdef W83782D_Beep_As_GPO db 40h, 00h, 041h else; W83782D_Beep_As_GPO db 40h, 00h, 001h endif; W83782D_Beep_As_GPO ifdef W83782D_Beep_As_GPO db 4dh, 00h, 0d5h ;disable auto-beep-on else; W83782D_Beep_As_GPO db 4dh, 00h, 095h ;disable auto-beep-on endif; W83782D_Beep_As_GPO ifndef Only_Use_Fan_Cntl ifndef Thermal_Enable_Use_SMI db 4ch, 0bfh, 040h endif; Thermal_Enable_Use_SMI ifdef Thermal_Enable_Use_SMI db 40h, 0fdh, 002h endif; Thermal_Enable_Use_SMI endif; Only_Use_Fan_Cntl ifdef Fan3IN_AS_PWMOUT2 db 4dh, 0cfh, 000h ;Fan3IN as PWMOUT2 db 5ch, 0f7h, 008h ;enable PWM2 endif; Fan3IN_AS_PWMOUT2 Prg_W83782D_Tbl_End: ENDIF ;COMPILE_FOR_SENSOR_ASM EQ 2 endif ;COMPILE_FOR_SENSOR_ASM ENDIF ;SENSOR_IN_XGROUP ;*************************************************************************** ;**** SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 **** ;**** SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 **** ;**** SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 **** ;**** SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 SENSOR.E8 **** ;*************************************************************************** IFDEF COMPILE_FOR_SENSOR_MNU IF COMPILE_FOR_SENSOR_MNU EQ 3 IFDEF SENSOR_IN_XGROUP Vin0_R1 equ 0 Vin0_R2 equ 0 Vin1_R1 equ 0 Vin1_R2 equ 0 Vin2_R1 equ 0 Vin2_R2 equ 0 Vin3_R1 equ 68 Vin3_R2 equ 100 Vin4_R1 equ 28 Vin4_R2 equ 10 Vin5_R1 equ 232 Vin5_R2 equ 56 Vin6_R1 equ 120 Vin6_R2 equ 56 Vin7_R1 equ 0 Vin7_R2 equ 0 Vin8_R1 equ 51 Vin8_R2 equ 75 ifndef Only_Use_Fan_Cntl ifdef CPU_Temp_Selectable X_Show_Scale Proc Near extrn X_GetItem_Value:near mov si,offset DGROUP:CPU_TEMP_ITEM Call X_GetItem_Value mov bl, al call far ptr DGROUP:fproc_DISP_WORD_INT3 mov al, 'ø' call X_Display_Char mov al, 'C' call X_Display_Char mov al, '/' call X_Display_Char ;øC transed to øF --> C = 5/9*(F-32) mov al, bl mov bl,9 mul bl mov bl,5 div bl add al,32 xor ah,ah call far ptr DGROUP:fproc_DISP_WORD_INT3 mov al, 'ø' call X_Display_Char mov al, 'F' call X_Display_Char sub al, -1 ;set overflow flag for display error ret X_Show_Scale Endp endif; CPU_Temp_Selectable X_Show_Temp1 Proc Near cmp al, Special_Before je short @F mov cl,27h call X_Get_W83782D cmp al,100 jbe short OK_78Temp1 mov al,0 OK_78Temp1: mov bl,al call far ptr DGROUP:fproc_DISP_Byte_INT2 mov al, 'ø' call X_Display_Char mov al, 'C' call X_Display_Char mov al, '/' call X_Display_Char ;øC transed to øF --> C = 5/9*(F-32) mov al,bl mov bl,9 mul bl mov bl,5 div bl add al,32 xor ah,ah call far ptr DGROUP:fproc_DISP_WORD_INT3 mov al, 'ø' call X_Display_Char mov al, 'F' call X_Display_Char @@: ret X_Show_Temp1 Endp X_Show_Temp2 Proc Near cmp al, Special_Before je @F ifdef W83782D_USE_SMBUS mov cx,9200h call X_Get_W83782D_Byte ;Get sensor2 else; W83782D_USE_SMBUS mov cl,4eh call X_Get_W83782D and al,11111000b or al,00000001b ;bank1 select mov cl,4eh call X_Set_W83782D mov cl,50h call X_Get_W83782D push ax mov cl,4eh call X_Get_W83782D and al,11111000b ;bank0 select call X_Set_W83782D pop ax endif; W83782D_USE_SMBUS ifdef Use_Pentium2_Deshutes out 80h, al cmp al,127 jne short OK_Deshutes mov cl,5dh call X_Get_W83782D ;R15 and al,11111001b ;Disable Pentium2 Deshutes mov cl,5dh ;R16 and al,11111011b ;Disable Pentium2 Deshutes;R15 call X_Set_W83782D ifdef W83782D_USE_SMBUS mov cx,9200h call X_Get_W83782D_Byte ;Get sensor2 else; W83782D_USE_SMBUS mov cl,4eh call X_Get_W83782D and al,11111000b or al,00000001b ;bank1 select mov cl,4eh call X_Set_W83782D mov cl,50h call X_Get_W83782D push ax mov cl,4eh call X_Get_W83782D and al,11111000b ;bank0 select call X_Set_W83782D pop ax endif; W83782D_USE_SMBUS OK_Deshutes: endif; Use_Pentium2_Deshutes cmp al, 100 jbe short OK_78Temp2 mov al,0 OK_78Temp2: mov bl,al call far ptr DGROUP:fproc_DISP_Byte_INT2 mov al, 'ø' call X_Display_Char mov al, 'C' call X_Display_Char mov al, '/' call X_Display_Char ;øC transed to øF --> C = 5/9*(F-32) mov al,bl mov bl,9 mul bl mov bl,5 div bl add al,32 xor ah,ah call far ptr DGROUP:fproc_DISP_WORD_INT3 mov al, 'ø' call X_Display_Char mov al, 'F' call X_Display_Char @@: ret X_Show_Temp2 Endp ifdef Show_CPU2_Temp X_Show_Temp3 Proc Near cmp al, Special_Before je @F ifdef W83782D_USE_SMBUS mov cx,9000h call X_Get_W83782D_Byte ;Get sensor2 else; W83782D_USE_SMBUS mov cl,4eh call X_Get_W83782D and al,11111000b or al,00000010b ;bank2 select call X_Set_W83782D mov cl,50h call X_Get_W83782D push ax mov cl,4eh call X_Get_W83782D and al,11111000b ;bank0 select call X_Set_W83782D pop ax endif; W83782D_USE_SMBUS ifdef Use_Pentium2_Deshutes cmp al,127 jne short OK_Deshutes2 mov cl,5dh call X_Get_W83782D ;R15 and al,11110101b ;disable Pentium2_Deshutes mov cl,5dh ;R16 and al,11110111b ;disable Pentium2_Deshutes;R15 call X_Set_W83782D ifdef W83782D_USE_SMBUS mov cx,9000h call X_Get_W83782D_Byte ;Get sensor2 else; W83782D_USE_SMBUS mov cl,4eh call X_Get_W83782D and al,11111000b or al,00000010b ;bank2 select call X_Set_W83782D mov cl,50h call X_Get_W83782D push ax mov cl,4eh call X_Get_W83782D and al,11111000b ;bank0 select call X_Set_W83782D pop ax endif; W83782D_USE_SMBUS OK_Deshutes2: endif; Use_Pentium2_Deshutes cmp al,100 jbe short OK_78Temp3 mov al,0 OK_78Temp3: mov bl,al call far ptr DGROUP:fproc_DISP_Byte_INT2 mov al, 'ø' call X_Display_Char mov al, 'C' call X_Display_Char mov al, '/' call X_Display_Char ;øC transed to øF --> C = 5/9*(F-32) mov al,bl mov bl,9 mul bl mov bl,5 div bl add al,32 xor ah,ah call far ptr DGROUP:fproc_DISP_WORD_INT3 mov al, 'ø' call X_Display_Char mov al, 'F' call X_Display_Char @@: ret X_Show_Temp3 Endp endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ifdef SHOW_W83782D_CPUFAN1 X_Show_Current_CPUFAN1 Proc Near cmp al, Special_Before je short @F mov cl,28h call X_Get_W83782D cmp al,0ffh jne short CPUFAN_WORKING1 xor ax,ax jmp short SHOW_FAN1 CPUFAN_WORKING1: xor bh,bh mov bl,al ifndef FAN_Divisor mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; if FAN_Divisor eq 4 ifdef FAN_Divisor_Patch_EQU_4 ; mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; FAN_Divisor_Patch_EQU_4 ; mov ax,265ch ;05265ch=(1350000/4) mov dx,05h ;Count=(1350000/(RPM*4)) endif;FAN_Divisor_Patch_EQU_4 endif; FAN_Divisor eq 4 if FAN_Divisor eq 8 mov ax,932eh ;02932eh=(1350000/8) mov dx,02h ;Count=(1350000/(RPM*8)) endif; FAN_Divisor eq 8 endif; FAN_Divisor div bx SHOW_FAN1: call far ptr DGROUP:fproc_DISP_WORD_INT4 mov al, ' ' call X_Display_Char mov al, 'R' call X_Display_Char mov al, 'P' call X_Display_Char mov al, 'M' call X_Display_Char @@: ret X_Show_Current_CPUFAN1 endp endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 X_Show_Current_CPUFAN2 Proc Near cmp al, Special_Before je short @F mov cl,29h call X_Get_W83782D cmp al,0ffh jne short CPUFAN_WORKING2 xor ax,ax jmp short SHOW_FAN2 CPUFAN_WORKING2: xor bh,bh mov bl,al ifndef FAN_Divisor mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; if FAN_Divisor eq 4 ifdef FAN_Divisor_Patch_EQU_4 mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; FAN_Divisor_Patch_EQU_4 ; mov ax,265ch ;05265ch=(1350000/4) mov dx,05h ;Count=(1350000/(RPM*4)) endif;FAN_Divisor_Patch_EQU_4 endif; FAN_Divisor eq 4 if FAN_Divisor eq 8 mov ax,932eh ;02932eh=(1350000/8) mov dx,02h ;Count=(1350000/(RPM*8)) endif; FAN_Divisor eq 8 endif; FAN_Divisor div bx SHOW_FAN2: call far ptr DGROUP:fproc_DISP_WORD_INT4 mov al, ' ' call X_Display_Char mov al, 'R' call X_Display_Char mov al, 'P' call X_Display_Char mov al, 'M' call X_Display_Char @@: ret X_Show_Current_CPUFAN2 endp endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 X_Show_Current_CPUFAN3 Proc Near cmp al, Special_Before je short @F mov cl,2ah call X_Get_W83782D cmp al,0ffh jne short CPUFAN_WORKING3 xor ax,ax jmp short SHOW_FAN3 CPUFAN_WORKING3: xor bh,bh mov bl,al ;R17 - start ifndef FAN_Divisor mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; if FAN_Divisor eq 4 ifdef FAN_Divisor_Patch_EQU_4 mov ax,4cb8h ;0a4cb8h=(1350000/2) mov dx,0ah ;Count=(1350000/(RPM*2)) else; FAN_Divisor_Patch_EQU_4 ; mov ax,265ch ;05265ch=(1350000/4) mov dx,05h ;Count=(1350000/(RPM*4)) endif;FAN_Divisor_Patch_EQU_4 endif; FAN_Divisor eq 4 if FAN_Divisor eq 8 mov ax,932eh ;02932eh=(1350000/8) mov dx,02h ;Count=(1350000/(RPM*8)) endif; FAN_Divisor eq 8 endif; FAN_Divisor ;R17 - end ;R17 mov ax,4cb8h ;0a4cb8h=(1350000/2) ;R17 mov dx,0ah ;Count=(1350000/(RPM*2)) div bx SHOW_FAN3: call far ptr DGROUP:fproc_DISP_WORD_INT4 mov al, ' ' call X_Display_Char mov al, 'R' call X_Display_Char mov al, 'P' call X_Display_Char mov al, 'M' call X_Display_Char @@: ret X_Show_Current_CPUFAN3 endp endif; Fan3IN_AS_PWMOUT2 endif; SHOW_W83782D_CPUFAN3 X_Display_Vin Proc Near cmp al,0ffh jne short Vin_WORKING xor ax,ax Vin_WORKING: or dx,dx ;Is above 4 Voltage jz short Below4 ;No, go to below 4V handler push bx push dx xor ah,ah mov bl,16 ;(4080/255) mul bl pop bx ;(R1+R2) mul bx pop bx ;(R2) div bx xor dx,dx mov bx,1000 div bx push dx call far ptr DGROUP:fproc_DISP_Byte_INT2 mov al, '.' call X_Display_Char pop ax mov bl,10 div bl cmp al,9 jbe short Below_9B call far ptr DGROUP:fproc_DISP_Byte_INT2 jmp short Above_9B Below_9B: call far ptr DGROUP:fproc_DISP_Byte_HEX2 Above_9B: mov al, ' ' call X_Display_Char mov al, 'V' call X_Display_Char ret Below4: xor ah,ah mov bx,16 ;(4080/255) mul bx mov bx,1000 div bx push dx call far ptr DGROUP:fproc_DISP_Byte_INT2 mov al, '.' call X_Display_Char pop ax mov bl,10 div bl cmp al,9 jbe short Below_9A call far ptr DGROUP:fproc_DISP_Byte_INT2 jmp short Above_9A Below_9A: call far ptr DGROUP:fproc_DISP_Byte_HEX2 Above_9A: mov al, ' ' call X_Display_Char mov al, 'V' call X_Display_Char ret X_Display_Vin endp X_Display_NVin Proc Near cmp al,0ffh jne short NVin_WORKING xor ax,ax NVin_WORKING: or dx,dx ;Is above 4 Voltage jz short NBelow4 ;No, go to below 4V handler push bx push dx xor ah,ah mov bl,16 ;(4080/255) mul bl mov bx, 3600 sub bx, ax mov ax, bx pop bx ;(R1+R2) mul bx pop bx ;(R2) div bx sub ax, 3600 xor dx,dx mov bx,1000 div bx push dx call far ptr DGROUP:fproc_DISP_Byte_INT2 mov al, '.' call X_Display_Char pop ax mov bl,10 div bl cmp al,9 jbe short NBelow_9B call far ptr DGROUP:fproc_DISP_Byte_INT2 jmp short NAbove_9B NBelow_9B: call far ptr DGROUP:fproc_DISP_Byte_HEX2 NAbove_9B: mov al, ' ' call X_Display_Char mov al, 'V' call X_Display_Char ret NBelow4: xor ah,ah mov bx,16 ;(4080/255) mul bx mov bx,1000 div bx push dx call far ptr DGROUP:fproc_DISP_Byte_INT2 mov al, '.' call X_Display_Char pop ax mov bl,10 div bl cmp al,9 jbe short NBelow_9A call far ptr DGROUP:fproc_DISP_Byte_INT2 jmp short NAbove_9A NBelow_9A: call far ptr DGROUP:fproc_DISP_Byte_HEX2 NAbove_9A: mov al, ' ' call X_Display_Char mov al, 'V' call X_Display_Char ret X_Display_NVin endp X_Show_Current_IN0 Proc Near cmp al, Special_Before je short @F mov cl,20h ;IN0 VcoreA call X_Get_W83782D mov dx,(Vin0_R1+Vin0_R2) mov bx,Vin0_R2 call X_Display_Vin @@: ret X_Show_Current_IN0 endp ifndef NO_SHOW_W83782D_IN1 X_Show_Current_IN1 Proc Near cmp al, Special_Before je short @F mov cl,21h ;IN1 VINR0 call X_Get_W83782D mov dx,(Vin1_R1+Vin1_R2) mov bx,Vin1_R2 call X_Display_Vin @@: ret X_Show_Current_IN1 endp endif; NO_SHOW_W83782D_IN1 X_Show_Current_IN2 Proc Near cmp al, Special_Before je short @F mov cl,22h ;IN2 3.3Vin call X_Get_W83782D mov dx,(Vin2_R1+Vin2_R2) mov bx,Vin2_R2 call X_Display_Vin @@: ret X_Show_Current_IN2 endp X_Show_Current_IN3 Proc Near cmp al, Special_Before je short @F mov cl,23h ;IN3 5Vin call X_Get_W83782D mov dx,(Vin3_R1+Vin3_R2) mov bx,Vin3_R2 call X_Display_Vin @@: ret X_Show_Current_IN3 endp X_Show_Current_IN4 Proc Near cmp al, Special_Before je short @F mov cl,24h ;IN4 +12Vin call X_Get_W83782D mov dx,(Vin4_R1+Vin4_R2) mov bx,Vin4_R2 call X_Display_Vin @@: ret X_Show_Current_IN4 endp X_Show_Current_IN5 Proc Near cmp al, Special_Before je short @F mov cl,25h ;IN5 -12Vin call X_Get_W83782D mov dx,(Vin5_R1+Vin5_R2) mov bx,Vin5_R2 call X_Display_NVin @@: ret X_Show_Current_IN5 endp X_Show_Current_IN6 Proc Near cmp al, Special_Before je short @F mov cl,26h ;IN6 -5Vin call X_Get_W83782D mov dx,(Vin6_R1+Vin6_R2) mov bx,Vin6_R2 call X_Display_NVin @@: ret X_Show_Current_IN6 endp ifndef NO_SHOW_W83782D_IN7 X_Show_Current_IN7 Proc Near cmp al, Special_Before je short @F mov cl,4eh ;select Bank 5 call X_Get_W83782D push ax ;save on now bank and al, 0f8h or al, 05h mov cl,4eh call X_Set_W83782D mov cl,51h ;IN7 VBAT call X_Get_W83782D mov dx,(Vin7_R1+Vin7_R2) mov bx,Vin7_R2 call X_Display_Vin pop ax ;restore on now bank mov cl,4eh ;select Bank 5 call X_Set_W83782D @@: ret X_Show_Current_IN7 endp endif; NO_SHOW_W83782D_IN7 ifndef NO_SHOW_W83782D_IN8 X_Show_Current_IN8 Proc Near cmp al, Special_Before je short @F mov cl,4eh ;select Bank 5 call X_Get_W83782D push ax ;save on now bank and al, 0f8h or al, 05h mov cl,4eh call X_Set_W83782D mov cl,50h ;IN8 5VSB call X_Get_W83782D mov dx,(Vin8_R1+Vin8_R2) mov bx,Vin8_R2 call X_Display_Vin pop ax ;restore on now bank mov cl,4eh ;select Bank 5 call X_Set_W83782D @@: ret X_Show_Current_IN8 endp endif; NO_SHOW_W83782D_IN8 ifndef BIOS60 Public X_Update_W83782D_Screen X_Update_W83782D_Screen Proc far pusha ifdef Update_Sensor_in_CPUFEAT cmp byte ptr CUR_PAGE[bp], PAGE_CPU else; Update_Sensor_in_CPUFEAT ifdef Update_Sensor_in_IOFEAT cmp byte ptr CUR_PAGE[bp], PAGE_IO else; Update_Sensor_in_IOFEAT cmp byte ptr CUR_PAGE[bp], PAGE_CFEATURE endif; Update_Sensor_in_IOFEAT endif; Update_Sensor_in_CPUFEAT jne short Update_W83782D_end ;---------------------------------------- mov si, offset W83782D_Item_List Update_W83782D_Start: mov bx, cs:[si] cmp bx, -1 je short Update_W83782D_end push si call X_Display_Whole_Item pop si inc si inc si jmp short Update_W83782D_Start ;---------------------------------------- Update_W83782D_end: popa retf X_Update_W83782D_Screen Endp endif ;BIOS60 ifdef BIOS60 db '$SpeRT' endif ;BIOS60 W83782D_Item_List Label Word ifdef BIOS60 dw W83782D_Runtime_No endif ;BIOS60 ifndef Only_Use_Fan_Cntl ifndef Not_Use_Temp1 dw offset Temp1_Item endif; Not_Use_Temp1 dw offset Temp2_Item ifdef Show_CPU2_Temp dw offset Temp3_Item endif; Show_CPU2_Temp endif; Only_Use_Fan_Cntl ifdef SHOW_W83782D_CPUFAN1 dw offset Current_CPUFAN1_Item endif; SHOW_W83782D_CPUFAN1 ifdef SHOW_W83782D_CPUFAN2 dw offset Current_CPUFAN2_Item endif; SHOW_W83782D_CPUFAN2 ifdef SHOW_W83782D_CPUFAN3 ifndef Fan3IN_AS_PWMOUT2 dw offset Current_CPUFAN3_Item endif; Fan3IN_AS_PWMOUT2 endif; SHOW_W83782D_CPUFAN3 dw offset Current_IN0_Item ifndef NO_SHOW_W83782D_IN1 dw offset Current_IN1_Item endif; NO_SHOW_W83782D_IN1 dw offset Current_IN2_Item dw offset Current_IN3_Item dw offset Current_IN4_Item dw offset Current_IN5_Item dw offset Current_IN6_Item ifndef NO_SHOW_W83782D_IN7 dw offset Current_IN7_Item endif; NO_SHOW_W83782D_IN7 ifndef NO_SHOW_W83782D_IN8 dw offset Current_IN8_Item endif; NO_SHOW_W83782D_IN8 W83782D_Runtime_No EQU (($ - offset W83782D_Item_List)-2)/2 dw -1 ENDIF ;SENSOR_IN_XGROUP ENDIF ;COMPILE_FOR_SENSOR_MNU ENDIF ;COMPILE_FOR_SENSOR_MNU ;R14 -end