Changeset 568 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2
- Timestamp:
- Dec 21, 2014, 5:37:53 PM (10 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm
r558 r568 159 159 call Buffers_IsXtideUniversalBiosSignatureInESDI 160 160 je SHORT .RomFound 161 add b h, 2 ; Increment by 8kB161 add bx, 80h ; Increment by 2kB (minimum possible distance from the beginning of one option ROM to the next) 162 162 jnc SHORT .SegmentLoop ; Loop until segment overflows 163 163 clc -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Flash.asm
r526 r568 83 83 84 84 push cx 85 call .GetSdpCommandFunctionTo DXwithFlashvarsInSSBP85 call .GetSdpCommandFunctionToAXwithFlashvarsInSSBP 86 86 mov cx, [bp+FLASHVARS.wEepromPageSize] 87 87 mov si, [bp+FLASHVARS.fpNextSourcePage] … … 94 94 95 95 ;-------------------------------------------------------------------- 96 ; .GetSdpCommandFunctionTo DXwithFlashvarsInSSBP97 ; Parameters: 98 ; SS:BP: Ptr to FLASHVARS 99 ; Returns: 100 ; DX: Ptr to SDP Command function96 ; .GetSdpCommandFunctionToAXwithFlashvarsInSSBP 97 ; Parameters: 98 ; SS:BP: Ptr to FLASHVARS 99 ; Returns: 100 ; AX: Ptr to SDP Command function 101 101 ; Corrupts registers: 102 102 ; BX, SI 103 103 ;-------------------------------------------------------------------- 104 104 ALIGN JUMP_ALIGN 105 .GetSdpCommandFunctionTo DXwithFlashvarsInSSBP:105 .GetSdpCommandFunctionToAXwithFlashvarsInSSBP: 106 106 eMOVZX bx, [bp+FLASHVARS.bEepromSdpCommand] 107 107 mov si, [cs:bx+.rgpSdpCommandToEepromTypeLookupTable] 108 108 mov bl, [bp+FLASHVARS.bEepromType] 109 mov dx, [cs:bx+si]109 mov ax, [cs:bx+si] 110 110 ret 111 111 … … 182 182 ; Nothing 183 183 ; Corrupts registers: 184 ; Nothing184 ; AX 185 185 ;-------------------------------------------------------------------- 186 186 %macro DISABLE_SDP 2 187 mov BYTE [%1], 0AAh 188 mov BYTE [%2], 55h 189 mov BYTE [%1], 80h 190 mov BYTE [%1], 0AAh 191 mov BYTE [%2], 55h 192 mov BYTE [%1], 20h 187 mov ax, 80AAh 188 %%Again: 189 mov [%1], al ; 0AAh 190 shr al, 1 191 mov [%2], al ; 55h 192 mov [%1], ah ; 80h/20h 193 xor ax, 0A0FFh 194 jns SHORT %%Again 193 195 %endmacro 194 196 … … 215 217 WriteSdpEnableCommandFor2864mod: 216 218 ENABLE_SDP 155Ch, 0AA3h 217 jmp ReturnFromSdpCommand219 jmp SHORT ReturnFromSdpCommand 218 220 219 221 ALIGN JUMP_ALIGN 220 222 WriteSdpEnableCommandFor28256or28512: 221 223 ENABLE_SDP 5555h, 2AAAh 222 jmp ReturnFromSdpCommand224 jmp SHORT ReturnFromSdpCommand 223 225 224 226 … … 241 243 WriteSdpDisableCommandFor28256or28512: 242 244 DISABLE_SDP 5555h, 2AAAh 243 DoNotWriteAnySdpCommand: 244 jmp SHORT ReturnFromSdpCommand 245 246 247 ;-------------------------------------------------------------------- 248 ; WriteNextChangedByteFromPageToEeprom 249 ; Parameters: 245 jmp SHORT ReturnFromSdpCommand 246 247 DoNotWriteAnySdpCommand EQU ReturnFromSdpCommand 248 249 250 ;-------------------------------------------------------------------- 251 ; WriteAllChangedBytesFromPageToEeprom 252 ; Parameters: 253 ; AX: Offset to SDP command function 254 ; BX: Offset to next destination byte 250 255 ; CX: Number of bytes left to write 251 ; DX: Offset to SDP command function252 ; BX: Offset to next destination byte253 256 ; SI: Offset to next source byte 254 257 ; ES:DI: Ptr to next comparison byte … … 258 261 ; Cleared if page written successfully 259 262 ; Corrupts registers: 260 ; AX, BX, CX, SI, DI, DS, ES263 ; AX, BX, CX, DX, SI, DI, DS, ES 261 264 ;-------------------------------------------------------------------- 262 265 ALIGN JUMP_ALIGN 263 266 WriteAllChangedBytesFromPageToEeprom: 264 mov ax, [bp+FLASHVARS.fpNextSourcePage+2] ; AX = Source segment267 mov dx, [bp+FLASHVARS.fpNextSourcePage+2] ; DX = Source segment 265 268 mov ds, [bp+FLASHVARS.fpNextDestinationPage+2] ; DS = EEPROM segment 266 269 cli ; Disable interrupts 267 jmp dx ; Write SDP command (once to the beginning of page)270 jmp ax ; Write SDP command (once to the beginning of page) 268 271 ALIGN JUMP_ALIGN 269 272 ReturnFromSdpCommand: 270 mov ds, ax ; DS:SI now points to source byte273 mov ds, dx ; DS:SI now points to source byte 271 274 272 275 ALIGN JUMP_ALIGN … … 278 281 mov ds, [bp+FLASHVARS.fpNextDestinationPage+2] ; DS:BX now points to EEPROM 279 282 mov [bx], al ; Write byte to EEPROM 280 mov ds, [bp+FLASHVARS.fpNextSourcePage+2]; Restore DS283 mov ds, dx ; Restore DS 281 284 mov [bp+FLASHVARS.wLastOffsetWritten], bx 282 285 mov [bp+FLASHVARS.bLastByteWritten], al -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm
r526 r568 185 185 pop ds 186 186 187 cmp word[cs:g_cfgVars+CFGVARS.wEepromSegment], 0188 jn z.alreadySet187 cmp WORD [cs:g_cfgVars+CFGVARS.wEepromSegment], 0 188 jne .alreadySet 189 189 190 190 push es … … 198 198 mov ax, DEFAULT_EEPROM_SEGMENT 199 199 .storeEepromSegment: 200 mov word[cs:g_cfgVars+CFGVARS.wEepromSegment], ax200 mov WORD [cs:g_cfgVars+CFGVARS.wEepromSegment], ax 201 201 202 202 .alreadySet:
Note:
See TracChangeset
for help on using the changeset viewer.