Changeset 152 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Inc
- Timestamp:
- May 1, 2011, 10:42:58 AM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Inc
- Files:
-
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
r150 r152 43 43 FLG_DPT_SERIAL_DEVICE EQU (1<<9) ; Serial Port Device 44 44 FLG_DPT_BLOCK_MODE_SUPPORTED EQU (1<<10) ; Use block transfer commands 45 45 FLG_DPT_INTERRUPT_IN_SERVICE EQU (1<<11) ; Set when waiting for IRQ 46 46 FLG_DPT_RESET_nDRDY EQU (1<<12) ; Drive ready to accept commands 47 47 FLG_DPT_RESET_nINITPRMS EQU (1<<13) ; Initialize Device Parameters successfull -
trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc
r150 r152 6 6 7 7 ;-------------------------------------------------------------------- 8 ; Emulates INSW for XTIDE dual (8-bit) data port.8 ; Emulates INSW for XTIDE. 9 9 ; 10 ; eDUAL_BYTE_PORT_INSW10 ; XTIDE_INSW 11 11 ; Parameters: 12 12 ; BX: Bit mask for toggling XTIDE data low/high reg 13 ; DX: Port address (must be IDE Data Register)13 ; DX: XTIDE Data Low Register address 14 14 ; ES:DI: Ptr to destination buffer 15 15 ; Returns: … … 18 18 ; AL, FLAGS 19 19 ;-------------------------------------------------------------------- 20 %macro eDUAL_BYTE_PORT_INSW 020 %macro XTIDE_INSW 0 21 21 %ifdef USE_186 ; INS instruction available 22 22 insb ; Load low byte from port DX to [ES:DI] … … 36 36 37 37 ;-------------------------------------------------------------------- 38 ; Emulates OUTSW for XTIDE dual (8-bit) data port.38 ; Emulates OUTSW for XTIDE. 39 39 ; 40 ; eDUAL_BYTE_PORT_OUTSW40 ; XTIDE_OUTSW 41 41 ; Parameters: 42 42 ; BX: Bit mask for toggling XTIDE data low/high reg 43 ; DX: Port address (must be IDE Data Register)43 ; DX: XTIDE Data Low Register address 44 44 ; DS:SI: Ptr to source buffer 45 45 ; Returns: … … 48 48 ; AX, FLAGS 49 49 ;-------------------------------------------------------------------- 50 %macro eDUAL_BYTE_PORT_OUTSW 050 %macro XTIDE_OUTSW 0 51 51 %ifdef USE_186 ; OUTS instruction available 52 52 lodsb ; Load low byte from [DS:SI] to AL 53 53 xor dx, bx ; IDE Data Reg to XTIDE Data High Reg 54 54 outsb ; Output high byte from [DS:SI] 55 xor dx, bx ; IDE Data Reg to XTIDEData Low Reg55 xor dx, bx ; XTIDE Data High Reg to Data Low Reg 56 56 out dx, al ; Output low byte from AL 57 57 %else ; If 8088/8086 … … 60 60 xchg al, ah ; => AL=high byte, AH=low byte 61 61 out dx, al ; Output high byte 62 xor dx, bx ; XTIDE Data High Reg to IDE Data Reg 62 xor dx, bx ; XTIDE Data High Reg to Data Low Reg 63 mov al, ah ; Copy low byte to AL 64 out dx, al ; Output low byte 65 %endif 66 %endmacro 67 68 69 ;-------------------------------------------------------------------- 70 ; Emulates OUTSW for modified XTIDE. 71 ; 72 ; XTIDE_MOD_OUTSW 73 ; Parameters: 74 ; DX: XTIDE Data Low Register address 75 ; DS:SI: Ptr to source buffer 76 ; Returns: 77 ; SI: Incremented/decremented for next word 78 ; Corrupts registers: 79 ; AX, FLAGS 80 ;-------------------------------------------------------------------- 81 %macro XTIDE_MOD_OUTSW 0 82 %ifdef USE_186 ; OUTS instruction available 83 lodsb ; Load low byte from [DS:SI] to AL 84 inc dx ; IDE Data Reg to XTIDE MOD Data High Reg 85 outsb ; Output high byte from [DS:SI] 86 dec dx ; XTIDE Data High Reg to Data Low Reg 87 out dx, al ; Output low byte from AL 88 %else ; If 8088/8086 89 lodsw ; Load word from [DS:SI] 90 inc dx ; IDE Data Reg to XTIDE MOD Data High Reg 91 xchg al, ah ; => AL=high byte, AH=low byte 92 out dx, al ; Output high byte 93 dec dx ; XTIDE Data High Reg to Data Low Reg 63 94 mov al, ah ; Copy low byte to AL 64 95 out dx, al ; Output low byte -
trunk/XTIDE_Universal_BIOS/Inc/IntController.inc
r145 r152 1 ; File name : Interrupts.inc 2 ; Project name : IDE BIOS 3 ; Created date : 29.7.2007 4 ; Last update : 6.11.2009 5 ; Author : Tomi Tilli 6 ; Description : Equates for Interrupts. 7 %ifndef INTERRUPTS_INC 8 %define INTERRUPTS_INC 1 ; Project name : XTIDE Universal BIOS 2 ; Description : Equates for 8259 Interrupt Controllers. 3 %ifndef INT_CONTROLLER_INC 4 %define INT_CONTROLLER_INC 9 5 10 6 ; 8259 Master and Slave Interrupt Controller Ports 11 RPORT_8259MA_IRR_ISR EQU 20h ; Master 8259 Read IRR / ISR 12 WPORT_8259MA_COMMAND EQU 20h ; Master 8259 Write command 13 WPORT_8259MA_INIT EQU 21h ; Master 8259 Write Init command 14 PORT_8259MA_IMR EQU 21h ; Master 8259 IMR 15 RPORT_8259SL_IRR_ISR EQU 0A0h ; Slave 8259 Read IRR / ISR 16 WPORT_8259SL_COMMAND EQU 0A0h ; Slave 8259 Write command 17 WPORT_8259SL_INIT EQU 0A1h ; Slave 8259 Write Init command 18 PORT_8259SL_IMR EQU 0A1h ; Slave 8259 IMR 7 MASTER_8259_IRR_AND_ISR_in EQU 20h ; Interrupt Request Register / Interrupt In-Service Register 8 MASTER_8259_COMMAND_out EQU 20h ; Command output 9 MASTER_8259_IMR EQU 21h ; Interrupt Mask Register 10 MASTER_8259_INIT_out EQU 21h ; Initialization Command Parameters 11 SLAVE_8259_IRR_AND_ISR_in EQU 0A0h ; Interrupt Request Register / Interrupt In-Service Register 12 SLAVE_8259_COMMAND_out EQU 0A0h ; Command output 13 SLAVE_8259_IMR EQU 0A1h ; Interrupt Mask Register 14 SLAVE_8259_INIT_out EQU 0A1h ; Initialization Command Parameters 19 15 20 ; Valid commands to port 20h (master, WPORT_8259MA_COMMAND) 21 ; and A0h (slave, WPORT_8259SL_COMMAND) 22 CMD_ROT_IN_AUTO_EOI_MODE_CLEAR EQU 000h 23 CMD_READ_IRR EQU 00Ah 24 CMD_READ_ISR EQU 00Bh 25 CMD_END_OF_INTERRUPT EQU 020h 26 CMD_NO_OPERATION EQU 040h 27 CMD_CLEAR_SPECIAL_MASK_MODE EQU 048h 28 CMD_SPEC_EOI_IRQ0 EQU 060h 29 CMD_SPEC_EOI_IRQ1 EQU 061h 30 CMD_SPEC_EOI_IRQ2 EQU 062h 31 CMD_SPEC_EOI_IRQ3 EQU 063h 32 CMD_SPEC_EOI_IRQ4 EQU 064h 33 CMD_SPEC_EOI_IRQ5 EQU 065h 34 CMD_SPEC_EOI_IRQ6 EQU 066h 35 CMD_SPEC_EOI_IRQ7 EQU 067h 36 CMD_SET_SPECIAL_MASK_MODE EQU 068h 37 CMD_ROT_IN_AUTO_EOI_MODE_SET EQU 080h 38 CMD_ROT_ON_NONSPEC_EOI EQU 0A0h 39 CMD_IRQ0_LOWST_PRIO EQU 0C0h 40 CMD_IRQ1_LOWST_PRIO EQU 0C1h 41 CMD_IRQ2_LOWST_PRIO EQU 0C2h 42 CMD_IRQ3_LOWST_PRIO EQU 0C3h 43 CMD_IRQ4_LOWST_PRIO EQU 0C4h 44 CMD_IRQ5_LOWST_PRIO EQU 0C5h 45 CMD_IRQ6_LOWST_PRIO EQU 0C6h 46 CMD_IRQ7_LOWST_PRIO EQU 0C7h 47 CMD_EOI_AND_IRQ0_LOWST_PRIO EQU 0E0h 48 CMD_EOI_AND_IRQ1_LOWST_PRIO EQU 0E1h 49 CMD_EOI_AND_IRQ2_LOWST_PRIO EQU 0E2h 50 CMD_EOI_AND_IRQ3_LOWST_PRIO EQU 0E3h 51 CMD_EOI_AND_IRQ4_LOWST_PRIO EQU 0E4h 52 CMD_EOI_AND_IRQ5_LOWST_PRIO EQU 0E5h 53 CMD_EOI_AND_IRQ6_LOWST_PRIO EQU 0E6h 54 CMD_EOI_AND_IRQ7_LOWST_PRIO EQU 0E7h 16 ; 8259 Interrupt Controller Commands 17 COMMAND_CLEAR_ROTATE_IN_AUTOMATIC_EOI_MODE EQU 00h 18 COMMAND_READ_INTERRUPT_REQUEST_REGISTER EQU 0Ah 19 COMMAND_READ_INTERRUPT_INSERVICE_REGISTER EQU 0Bh 20 COMMAND_END_OF_INTERRUPT EQU 20h 21 COMMAND_NO_OPERATION EQU 40h 22 COMMAND_CLEAR_SPECIAL_MASK_MODE EQU 48h 23 COMMAND_SPECIFIC_EOI_FOR_IR0 EQU 60h 24 COMMAND_SPECIFIC_EOI_FOR_IR1 EQU 61h 25 COMMAND_SPECIFIC_EOI_FOR_IR2 EQU 62h 26 COMMAND_SPECIFIC_EOI_FOR_IR3 EQU 63h 27 COMMAND_SPECIFIC_EOI_FOR_IR4 EQU 64h 28 COMMAND_SPECIFIC_EOI_FOR_IR5 EQU 65h 29 COMMAND_SPECIFIC_EOI_FOR_IR6 EQU 66h 30 COMMAND_SPECIFIC_EOI_FOR_IR7 EQU 67h 31 COMMAND_SET_SPECIAL_MASK_MODE EQU 68h 32 COMMAND_SET_ROTATE_IN_AUTOMATIC_EOI_MODE EQU 80h 33 COMMAND_ROTATE_ON_NONSPECIFIC_EOI EQU 0A0h 34 COMMAND_IR0_LOWEST_PRIORITY EQU 0C0h 35 COMMAND_IR1_LOWEST_PRIORITY EQU 0C1h 36 COMMAND_IR2_LOWEST_PRIORITY EQU 0C2h 37 COMMAND_IR3_LOWEST_PRIORITY EQU 0C3h 38 COMMAND_IR4_LOWEST_PRIORITY EQU 0C4h 39 COMMAND_IR5_LOWEST_PRIORITY EQU 0C5h 40 COMMAND_IR6_LOWEST_PRIORITY EQU 0C6h 41 COMMAND_IR7_LOWEST_PRIORITY EQU 0C7h 42 COMMAND_EOI_AND_IR0_LOWEST_PRIORITY EQU 0E0h 43 COMMAND_EOI_AND_IR1_LOWEST_PRIORITY EQU 0E1h 44 COMMAND_EOI_AND_IR2_LOWEST_PRIORITY EQU 0E2h 45 COMMAND_EOI_AND_IR3_LOWEST_PRIORITY EQU 0E3h 46 COMMAND_EOI_AND_IR4_LOWEST_PRIORITY EQU 0E4h 47 COMMAND_EOI_AND_IR5_LOWEST_PRIORITY EQU 0E5h 48 COMMAND_EOI_AND_IR6_LOWEST_PRIORITY EQU 0E6h 49 COMMAND_EOI_AND_IR7_LOWEST_PRIORITY EQU 0E7h 55 50 56 51 57 ; Interrupt Vector Table 58 INTV_IRQ0 EQU 08h ; System timer 59 INTV_IRQ1 EQU 09h ; Keyboard 60 INTV_IRQ2 EQU 0Ah 61 INTV_IRQ3 EQU 0Bh 62 INTV_IRQ4 EQU 0Ch 63 INTV_IRQ5 EQU 0Dh 64 INTV_IRQ6 EQU 0Eh 65 INTV_IRQ7 EQU 0Fh 66 INTV_EQUIPMENT_CONF EQU 11h ; Equipment configuration 67 INTV_MEMORY_SIZE EQU 12h ; Base memory size 68 INTV_DISK_FUNC EQU 13h ; Disk functions 69 INTV_SYSTEM_SERVICES EQU 15h ; Different system functions 70 INTV_KEYBOARD_FUNC EQU 16h ; Keyboard functions 71 INTV_BOOT_FAILURE EQU 18h ; Process Boot Failure 72 INTV_BOOTSTRAP EQU 19h ; Boot Strap Loader 73 INTV_TIME_OF_DAY EQU 1Ah ; Time of day functions 74 INTV_KEYB_BREAK EQU 1Bh ; Keyboard break 75 INTV_USER_TIMER_TICK EQU 1Ch ; User timer tick 76 INTV_DPT EQU 1Eh ; Diskette Parameter Table 77 INTV_FLOPPY_FUNC EQU 40h ; Floppy functions 78 INTV_HD0DPT EQU 41h ; Ptr to HD0 Disk Parameter Table 79 INTV_HD1DPT EQU 46h ; Ptr to HD1 Disk Parameter Table 80 INTV_USERS_ALARM EQU 4Ah ; Users alarm 81 INTV_IRQ8 EQU 70h 82 INTV_IRQ9 EQU 71h 83 INTV_IRQ10 EQU 72h 84 INTV_IRQ11 EQU 73h 85 INTV_IRQ12 EQU 74h 86 INTV_IRQ13 EQU 75h 87 INTV_IRQ14 EQU 76h 88 INTV_IRQ15 EQU 77h 89 90 91 %endif ; INTERRUPTS_INC 52 %endif ; INT_CONTROLLER_INC -
trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc
r150 r152 22 22 .fpOldI13h resb 4 ; Far pointer to old INT 13h handler 23 23 .wTimeoutCounter resb 2 24 .pInServiceDPT resb 2 ; Ptr to DPT for drive waiting for interrupt25 24 .wSignature resb 2 ; Sign for finding stolen 1 kiB 26 25
Note:
See TracChangeset
for help on using the changeset viewer.