Changeset 625 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Feb 19, 2023, 9:26:52 PM (22 months ago)
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r617 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 303 303 ;-------------------------------------------------------------------- 304 304 ALIGN JUMP_ALIGN 305 IdeCommand_ReadLBAlowRegisterToAL: 305 IdeCommand_ReadLBAlowRegisterToAL: ; Unused entrypoint OK 306 306 ; HOB bit (defined in 48-bit address feature set) should be zero by default 307 307 ; so we get the correct value for CHS, LBA28 and LBA48 drives and commands -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r602 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 50 50 ALIGN JUMP_ALIGN 51 51 IdeTransfer_StartWithCommandInAL: 52 %ifdef USE_PS2 53 ; Turn on the software controlled HDD LED on IBM PS/2 machines 54 xchg bx, ax ; Save AX 55 in al, 92h ; Read System Control Port A 56 or al, 80h ; Set bit 7 to turn on LED (bit 6 would also work) 57 out 92h, al ; Write it back 58 xchg bx, ax ; Restore AX 59 %endif 52 60 ; Are we reading or writing? 53 61 test al, 16 ; Bit 4 is cleared on all the read commands but set on 3 of the 4 write commands … … 124 132 ; All sectors successfully transferred 125 133 add cx, [bp+PIOVARS.bSectorsDone] ; Never sets CF 134 %ifdef USE_PS2 135 ; Turn off the software controlled HDD LED on IBM PS/2 machines 136 in al, 92h ; Read System Control Port A 137 and al, 3Fh ; Clear bits 7 and 6 to turn off LED 138 out 92h, al ; Write it back 139 %endif 126 140 ret 127 141 … … 133 147 mov cl, [bp+PIOVARS.bSectorsDone] 134 148 mov ch, 0 ; Preserve CF 149 %endif 150 %ifdef USE_PS2 151 ; Turn off the software controlled HDD LED on IBM PS/2 machines 152 in al, 92h ; Read System Control Port A 153 and al, 3Fh ; Clear bits 7 and 6 to turn off LED (Clears CF) 154 out 92h, al ; Write it back 155 stc ; Restore the CF 135 156 %endif 136 157 ret -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
r618 r625 5 5 ; 6 6 ; XTIDE Universal BIOS and Associated Tools 7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 8 8 ; 9 9 ; This program is free software; you can redistribute it and/or modify … … 45 45 pop es 46 46 %endif 47 AtaID_FixIllegalValuesFromESSI: 47 AtaID_FixIllegalValuesFromESSI: ; Unused entrypoint OK 48 48 jc SHORT .Return ; Nothing to fix since failed to read ATA Info 49 49 -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r624 r625 15 15 ; 16 16 ; XTIDE Universal BIOS and Associated Tools 17 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.17 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 18 18 ; 19 19 ; This program is free software; you can redistribute it and/or modify … … 64 64 65 65 ; ROM variables (must start at offset 0) 66 CNT_ROM_BLOCKS EQU BIOS_SIZE / 512 ; number of 512B blocks, 16 = 8kB BIOS66 CNT_ROM_BLOCKS EQU BIOS_SIZE / 512 ; number of 512B blocks, 16 = 8kB BIOS 67 67 istruc ROMVARS 68 at ROMVARS.wRomSign, dw 0AA55h ; PC ROM signature 69 at ROMVARS.bRomSize, db CNT_ROM_BLOCKS ; ROM size in 512B blocks 70 at ROMVARS.rgbJump, jmp Initialize_FromMainBiosRomSearch 71 at ROMVARS.rgbSign, db FLASH_SIGNATURE 72 at ROMVARS.szTitle, db TITLE_STRING 73 at ROMVARS.szVersion, db "r" 74 db ROM_VERSION_STRING 75 db BUILD_DATE_STRING,NULL 68 at ROMVARS.wRomSign, dw 0AA55h ; PC ROM signature 69 at ROMVARS.bRomSize, db CNT_ROM_BLOCKS ; ROM size in 512B blocks 70 at ROMVARS.rgbJump, jmp Initialize_FromMainBiosRomSearch 71 at ROMVARS.rgbSign, db FLASH_SIGNATURE 72 at ROMVARS.szTitle, db TITLE_STRING 73 at ROMVARS.szVersion, db "r" 74 db ROM_VERSION_STRING 75 db BUILD_DATE_STRING,NULL 76 %ifdef MODULE_BOOT_MENU 77 at ROMVARS.pColorTheme, dw ColorTheme ; Offset to the ATTRIBUTE_CHARS struc that holds the color theme 78 %endif 76 79 77 80 ;---------------------------; … … 84 87 at ROMVARS.wFlags, dw FLG_ROMVARS_FULLMODE | MASK_ROMVARS_INCLUDED_MODULES 85 88 %endif 89 at ROMVARS.wRamVars, dw NULL ; Use 'stolen' top of conventional memory by default in Full mode 86 90 at ROMVARS.wDisplayMode, dw DEFAULT_TEXT_MODE 87 91 %ifdef MODULE_BOOT_MENU 88 92 at ROMVARS.wBootTimeout, dw BOOT_MENU_DEFAULT_TIMEOUT 89 at ROMVARS.pColorTheme, dw ColorTheme ; Offset to the ATTRIBUTE_CHARS struc that holds the color theme 90 %endif 93 %endif 94 %ifdef USE_PS2 95 at ROMVARS.bIdeCnt, db 4 ; Number of supported controllers with two McIDE adapters 96 %else 91 97 at ROMVARS.bIdeCnt, db 2 ; Number of supported controllers 98 %endif 92 99 at ROMVARS.bBootDrv, db 80h ; Boot Menu default drive 93 100 at ROMVARS.bMinFddCnt, db 0 ; Do not force minimum number of floppy drives … … 99 106 at ROMVARS.ideVars0+IDEVARS.bDevice, db DEVICE_16BIT_ATA 100 107 %ifdef MODULE_IRQ 108 %ifdef USE_PS2 109 at ROMVARS.ideVars0+IDEVARS.bIRQ, db 0 110 %else 101 111 at ROMVARS.ideVars0+IDEVARS.bIRQ, db 14 112 %endif 102 113 %endif 103 114 at ROMVARS.ideVars0+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, dw DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) … … 108 119 at ROMVARS.ideVars1+IDEVARS.bDevice, db DEVICE_16BIT_ATA 109 120 %ifdef MODULE_IRQ 121 %ifdef USE_PS2 122 at ROMVARS.ideVars1+IDEVARS.bIRQ, db 0 123 %else 110 124 at ROMVARS.ideVars1+IDEVARS.bIRQ, db 15 125 %endif 111 126 %endif 112 127 at ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, dw DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) … … 117 132 at ROMVARS.ideVars2+IDEVARS.bDevice, db DEVICE_16BIT_ATA 118 133 %ifdef MODULE_IRQ 134 %ifdef USE_PS2 135 at ROMVARS.ideVars2+IDEVARS.bIRQ, db 0 136 %else 119 137 at ROMVARS.ideVars2+IDEVARS.bIRQ, db 0 ; Should be 11 on the GSI Inc. Model 2C 138 %endif 120 139 %endif 121 140 at ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, dw DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) … … 126 145 at ROMVARS.ideVars3+IDEVARS.bDevice, db DEVICE_16BIT_ATA 127 146 %ifdef MODULE_IRQ 147 %ifdef USE_PS2 148 at ROMVARS.ideVars3+IDEVARS.bIRQ, db 0 149 %else 128 150 at ROMVARS.ideVars3+IDEVARS.bIRQ, db 0 ; Should be 10 on the GSI Inc. Model 2C 151 %endif 129 152 %endif 130 153 at ROMVARS.ideVars3+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, dw DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) … … 139 162 ;-----------------------------------; 140 163 at ROMVARS.wFlags, dw MASK_ROMVARS_INCLUDED_MODULES 164 at ROMVARS.wRamVars, dw LITE_MODE_RAMVARS_SEGMENT 141 165 at ROMVARS.wDisplayMode, dw DEFAULT_TEXT_MODE 142 166 %ifdef MODULE_BOOT_MENU 143 167 at ROMVARS.wBootTimeout, dw BOOT_MENU_DEFAULT_TIMEOUT 144 at ROMVARS.pColorTheme, dw ColorTheme ; Offset to the ATTRIBUTE_CHARS struc that holds the color theme145 168 %endif 146 169 at ROMVARS.bIdeCnt, db 1 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r623 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 36 36 push es 37 37 38 %ifndef USE_AT 39 mov ax, LITE_MODE_RAMVARS_SEGMENT 40 test BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE 41 jz SHORT .InitializeRamvars ; No need to steal RAM 42 %endif 38 mov ax, [cs:ROMVARS.wRamVars] 39 test ax, ax ; UMB segment or LITE_MODE_RAMVARS_SEGMENT? 40 jnz SHORT .InitializeRamvars ; No need to steal RAM 43 41 44 LOAD_BDA_SEGMENT_TO ds, ax, ! ; Zero AX42 mov ds, ax 45 43 mov al, [cs:ROMVARS.bStealSize] 46 44 sub [BDA.wBaseMem], ax … … 67 65 ret 68 66 67 69 68 ;-------------------------------------------------------------------- 70 69 ; Returns segment to RAMVARS. 71 ; RAMVARS might be located at the top of interrupt vectors (0030:0000h) 72 ; or at the top of system base RAM.70 ; RAMVARS might be located at the top of interrupt vectors (0030:0000h), 71 ; at the top of system base RAM or in a user configured UMB. 73 72 ; 74 73 ; RamVars_GetSegmentToDS … … 82 81 ALIGN JUMP_ALIGN 83 82 RamVars_GetSegmentToDS: 83 mov ds, [cs:ROMVARS.wRamVars] 84 mov di, ds 85 test di, di ; UMB segment or LITE_MODE_RAMVARS_SEGMENT? 86 jnz SHORT .Return 84 87 85 %ifndef USE_AT ; Always in Full Mode for AT builds86 test BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE87 jnz SHORT .GetStolenSegmentToDS88 %ifndef USE_18689 mov di, LITE_MODE_RAMVARS_SEGMENT90 mov ds, di91 %else92 push LITE_MODE_RAMVARS_SEGMENT93 pop ds94 %endif95 ret96 %endif97 98 ALIGN JUMP_ALIGN99 .GetStolenSegmentToDS:100 LOAD_BDA_SEGMENT_TO ds, di101 88 ;%ifdef USE_186 102 89 ; imul di, [BDA.wBaseMem], 64 ; 2 bytes less but slower, especially on 386/486 processors … … 111 98 cmp WORD [RAMVARS.wSignature], RAMVARS_RAM_SIGNATURE 112 99 jne SHORT .LoopStolenKBs ; Loop until sign found (always found eventually) 100 .Return: 113 101 ret 114 102
Note:
See TracChangeset
for help on using the changeset viewer.