MMM
Results 1 to 25 of 412

Thread: WPCREDIT tweaks for the A64

Threaded View

  1. #11
    Fused
    Join Date
    Dec 2003
    Location
    Malaysia
    Posts
    2,769
    Quote Originally Posted by VASkO
    that was fast

    and where do i set the data bits, i want to? is this the XXXXXXXX value in your code?

    what's the last line of your code (last bit) - do i have to replace it with cheksum or leave it as it is?
    here is example of my ISA rom source code... i use it on my NF7S modded bios

    You just need to change the address & data for your patch ( i bold it on my source code

    Good luck

    Code:
    ; ------------------- sys_patch.asm ---------------------------------------------------
    .486p
    
    CSEG	SEGMENT PARA PUBLIC USE16 'CODE'
    	ASSUME CS:CSEG
    	ORG 0
    
    ;Expansion rom header
    	db  55h   ;;Rom signature byte 1
        	db  0AAh  ;;Rom signature byte 2
    	db  01h   ;;512 bytes
    	jmp INIT  ;;jump to initialization
        	
    
    ; equates, have been tested and works fine
    
    	address		equ 0cf8h
    	data		equ 0cfch
    	
    	a_add   	equ 08000006Ch 	; Bus 0 Device 0 Function 0 Offset 6Ch (CPU Disconnect Function)
    	a_data    	equ 0fff1ffffh	
    			
    	ORG 100h
    
    SENDER	PROC	 NEAR
    ; Active comunication with address
    	mov dx,address
    	out dx,eax
    	ret
    SENDER	ENDP
    
    RECEIVER	PROC	NEAR
    ; Comunicate with the address & receive the data
    	mov dx,address
    	out dx,eax
    	mov dx,data
    	in eax,dx
    	ret
    RECEIVER	ENDP
    
    TUNER1	PROC	NEAR
    ; Sending new data at ebx to the address
    	xchg eax,ebx
    	out dx,eax
    	xchg eax,ebx
    	ret
    TUNER1		ENDP
    
    TUNER2	PROC	NEAR
    ; Increase data 
    	or eax,ebx
    	out dx,eax
    	ret
    TUNER2		ENDP
    
    TUNER3	PROC	NEAR
    ; Decrease data
    	and eax,ebx
    	out dx,eax
    	ret
    TUNER3		ENDP
    	
    INIT	PROC	NEAR
    
    ; save all register that will be affected by our code
    	push eax
    	push ebx
    	push edx
    	pushfd
    
    ; CPU Disconnect Function
    	mov eax,a_add
    	mov ebx,a_data
    	call RECEIVER
    	call TUNER3
    
    ; Restore register contents and return to system bios file
    	popfd
    	pop edx
    	pop ebx
    	pop eax
    
    INIT	ENDP
    
    	ORG 200h
    
    CSEG	ENDS	
    		END		
    
    ; -------------------------- END OF sys_patch.asm -------------------------------------------
    Last edited by tictac; 01-29-2005 at 04:36 AM.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •