mirror of
https://github.com/Tolik-Trek/Shared_Includes.git
synced 2026-06-15 09:01:33 +03:00
...
This commit is contained in:
parent
5a2e8b02b3
commit
4709a77da0
@ -560,7 +560,45 @@ Port_All_Mode EQU #204E
|
|||||||
; bit5 -
|
; bit5 -
|
||||||
; bit6 -
|
; bit6 -
|
||||||
; bit7 -
|
; bit7 -
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
;ISA-8
|
||||||
|
;
|
||||||
|
;Interaction with ISA devices:
|
||||||
|
;1) send 10h value to port 1FFDh(system port);
|
||||||
|
;2) send control byte to port 0E2h(third memory window port);
|
||||||
|
;control byte:
|
||||||
|
;D7...should be 1
|
||||||
|
;D6...should be 1
|
||||||
|
;D5...should be 0
|
||||||
|
;D4...should be 1
|
||||||
|
;D3...should be 0
|
||||||
|
;D2...specify access mode (0 - ISA memory, 1 - ISA ports)
|
||||||
|
;D1...specify number of ISA slot
|
||||||
|
;D0...should be 0
|
||||||
|
;
|
||||||
|
;fixed bug with D2 and D1 bits (functional exchange, but not documented)
|
||||||
|
;
|
||||||
|
;The r/w signals are forming from r/w signals memory range #C000h-#FFFF.
|
||||||
|
;And the address lines A13...A0 has taken from processor data-BUS.
|
||||||
|
;The other ISA-signals such as RESET, AEN, A19...A14 can be set in port
|
||||||
|
; #9FBDh. And default value is 0.
|
||||||
|
;port 9FBDh:
|
||||||
|
;D7...RESET, 1=reset, 0=normal
|
||||||
|
;D6...AEN, 1=
|
||||||
|
;D5...A19
|
||||||
|
;D4...A18
|
||||||
|
;D3...A17
|
||||||
|
;D2...A16
|
||||||
|
;D1...A15
|
||||||
|
;D0...A14
|
||||||
PORT_ISA EQU #9FBD
|
PORT_ISA EQU #9FBD
|
||||||
|
SLOT3_ISA: EQU SLOT3
|
||||||
|
.IRQ0_RAM EQU #D0
|
||||||
|
.IRQ0_IO EQU #D4
|
||||||
|
.IRQ1_RAM EQU #D2
|
||||||
|
.IRQ1_IO EQU #D6
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
Port_VSYNC EQU #BD ; #41 - 320Lines/49Hz, #61 - 312Lines/50Hz
|
Port_VSYNC EQU #BD ; #41 - 320Lines/49Hz, #61 - 312Lines/50Hz
|
||||||
.SET_320L EQU #41
|
.SET_320L EQU #41
|
||||||
|
|||||||
@ -51,23 +51,23 @@
|
|||||||
.ADR_R: ;RET
|
.ADR_R: ;RET
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
MACRO RAMD_KEY
|
MACRO RAMD_KEY
|
||||||
SUB 4
|
SUB 4
|
||||||
DI
|
DI
|
||||||
LD B,SYS_PAGE
|
LD B,SYS_PAGE
|
||||||
LD C,SLOT3
|
LD C,SLOT3
|
||||||
OUT (C),B
|
OUT (C),B
|
||||||
LD HL,RAMD_KEYS
|
LD HL,RAMD_KEYS
|
||||||
ADD A,L
|
ADD A,L
|
||||||
LD L,A
|
LD L,A
|
||||||
DEC L
|
DEC L
|
||||||
LD (A_RAMD_VARS),HL
|
LD (A_RAMD_VARS),HL
|
||||||
INC L
|
INC L
|
||||||
LD L, (HL)
|
LD L, (HL)
|
||||||
RET_SLOT3
|
RET_SLOT3
|
||||||
EI
|
EI
|
||||||
LD A, L
|
LD A, L
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
; MACRO DSS adr, dt
|
; MACRO DSS adr, dt
|
||||||
; IF (adr >= $)
|
; IF (adr >= $)
|
||||||
@ -298,48 +298,48 @@
|
|||||||
|
|
||||||
|
|
||||||
;=======================================
|
;=======================================
|
||||||
MACRO SAFE_PORTY
|
MACRO SAFE_PORTY
|
||||||
IFNDEF NeedSafePort_Y
|
IFNDEF NeedSafePort_Y
|
||||||
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
|
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
|
||||||
ELSEIF NeedSafePort_Y
|
ELSEIF NeedSafePort_Y
|
||||||
LD A,#C0
|
LD A,#C0
|
||||||
OUT (PORT_Y),A
|
OUT (PORT_Y),A
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
MACRO ZERO_PORTY
|
MACRO ZERO_PORTY
|
||||||
IFNDEF NeedSafePort_Y
|
IFNDEF NeedSafePort_Y
|
||||||
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
|
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
|
||||||
ELSEIF NeedSafePort_Y
|
ELSEIF NeedSafePort_Y
|
||||||
LD A,0
|
LD A,0
|
||||||
OUT (PORT_Y),A
|
OUT (PORT_Y),A
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
MACRO SAFE_PORTY_2
|
MACRO SAFE_PORTY_2
|
||||||
IFNDEF NeedSafePort_Y
|
IFNDEF NeedSafePort_Y
|
||||||
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
|
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
|
||||||
ELSEIF NeedSafePort_Y
|
ELSEIF NeedSafePort_Y
|
||||||
EXX
|
EXX
|
||||||
LD C,PORT_Y
|
LD C,PORT_Y
|
||||||
IN B,(C)
|
IN B,(C)
|
||||||
PUSH BC
|
PUSH BC
|
||||||
LD E,#C0
|
LD E,#C0
|
||||||
OUT (C),E
|
OUT (C),E
|
||||||
EXX
|
EXX
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
MACRO RESTORE_PORTY
|
MACRO RESTORE_PORTY
|
||||||
IFNDEF NeedSafePort_Y
|
IFNDEF NeedSafePort_Y
|
||||||
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
|
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
|
||||||
ELSEIF NeedSafePort_Y
|
ELSEIF NeedSafePort_Y
|
||||||
EXX
|
EXX
|
||||||
POP BC
|
POP BC
|
||||||
OUT (C),B
|
OUT (C),B
|
||||||
EXX
|
EXX
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
;=======================================
|
;=======================================
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ exe_header.length equ $-exe_header
|
|||||||
printstr:
|
printstr:
|
||||||
; ¢ ॣ. HL ¤à¥á ¯¥ç â ¥¬ë© ¡ãä¥à
|
; ¢ ॣ. HL ¤à¥á ¯¥ç â ¥¬ë© ¡ãä¥à
|
||||||
LD C,Dss.PChars
|
LD C,Dss.PChars
|
||||||
jp ToDSS
|
jp ToDSS
|
||||||
;---------------------------------------
|
;---------------------------------------
|
||||||
|
|
||||||
;---------------------------------------
|
;---------------------------------------
|
||||||
|
|||||||
@ -40,13 +40,23 @@ BOOT_SECTOR EQU #00
|
|||||||
.ID_FAT32 EQU #52 ; TEXT 8 BS_FilSysType €¡¡à¥¢¨ âãà ä ©«®¢®© á¨á⥬ë
|
.ID_FAT32 EQU #52 ; TEXT 8 BS_FilSysType €¡¡à¥¢¨ âãà ä ©«®¢®© á¨á⥬ë
|
||||||
; #5A
|
; #5A
|
||||||
; PC Loader
|
; PC Loader
|
||||||
.BOOT_CODE_FAT16 EQU #3E
|
; ...
|
||||||
.BOOT_CODE_FAT32 EQU #5A
|
|
||||||
; Partition table
|
; Partition table
|
||||||
.PARTITION_TABLE EQU #1BE
|
.PARTITION_TABLE EQU #1BE
|
||||||
|
; Records
|
||||||
|
; ...
|
||||||
|
; Signature
|
||||||
|
.MBR_SIGNATURE EQU #1FE; WORD #AA55
|
||||||
|
;------------------------------; #200
|
||||||
|
; ‚ᯮ¬®£ ⥫ìë¥ ¤ ë¥
|
||||||
|
;------------------------------;
|
||||||
|
; PC Loader start
|
||||||
|
.BOOT_CODE_FAT16 EQU #3E
|
||||||
|
.BOOT_CODE_FAT32 EQU #5A
|
||||||
|
; ; Table parameters
|
||||||
.PARTITION_TABLE.Size EQU #40
|
.PARTITION_TABLE.Size EQU #40
|
||||||
.RECORD_SIZE EQU #10
|
.RECORD_SIZE EQU #10
|
||||||
; Record
|
; Record data
|
||||||
.Partition.isActive EQU #00 ; BYTE 0
|
.Partition.isActive EQU #00 ; BYTE 0
|
||||||
.Partition.Start_head EQU #01 ; BYTE 0
|
.Partition.Start_head EQU #01 ; BYTE 0
|
||||||
.Partition.Start_sector EQU #02 ; BYTE 0
|
.Partition.Start_sector EQU #02 ; BYTE 0
|
||||||
@ -57,8 +67,19 @@ BOOT_SECTOR EQU #00
|
|||||||
.Partition.End_cylinder EQU #07 ; BYTE 0
|
.Partition.End_cylinder EQU #07 ; BYTE 0
|
||||||
.Partition.Start_LBA EQU #08 ; DWORD 0
|
.Partition.Start_LBA EQU #08 ; DWORD 0
|
||||||
.Partition.Size_LBA EQU #0C ; DWORD 0
|
.Partition.Size_LBA EQU #0C ; DWORD 0
|
||||||
; Signature
|
; DRIVE TYPES
|
||||||
.MBR_SIGNATURE EQU #1FE; WORD #AA55
|
.Floppy_3x5_2x88 EQU #F0 ; 2.88 MB 3.5-inch, 2-sided, 36-sectors
|
||||||
|
.Floppy_3x5_1x44 EQU #F0 ; 1.44 MB 3.5-inch, 2-sided, 18-sectors
|
||||||
|
.Floppy_3x5_720 EQU #F9 ; 720K 3.5-inch, 2-sided, 9-sectors
|
||||||
|
.Floppy_5x25_1x20 EQU #F9 ; 1.2 MB 5.25-inch, 2-sided, 15-sectors
|
||||||
|
.Floppy_5x25_360 EQU #FD ; 360K 5.25-inch, 2-sided, 9-sectors
|
||||||
|
.Floppy_5x25_320 EQU #FF ; 320K 5.25-inch, 2-sided, 8-sectors
|
||||||
|
.Floppy_5x25_180 EQU #FC ; 180K 5.25-inch, 1-sided, 9-sectors
|
||||||
|
.Floppy_5x25_160 EQU #FE ; 160K 5.25-inch, 1-sided, 8-sectors
|
||||||
|
.Floppy_8_250 EQU #FE ; 250K 8-inch, 1-sided, single-density
|
||||||
|
.Floppy_8_500 EQU #FD ; 500K 8-inch, 2-sided, single-density
|
||||||
|
.Floppy_8_1x20 EQU #FE ; 1.2 MB 8-inch, 2-sided, double-density
|
||||||
|
.Hard_Drive EQU #F8 ; ----- Hard disk
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
STRUCT _sFSinfo
|
STRUCT _sFSinfo
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user