This commit is contained in:
Tolik 2026-01-27 21:24:28 +10:00
parent 5a2e8b02b3
commit 4709a77da0
3 changed files with 121 additions and 62 deletions

View File

@ -560,7 +560,45 @@ Port_All_Mode EQU #204E
; bit5 -
; bit6 -
; 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
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
.SET_320L EQU #41

View File

@ -51,23 +51,23 @@
.ADR_R: ;RET
ENDM
MACRO RAMD_KEY
SUB 4
DI
LD B,SYS_PAGE
LD C,SLOT3
OUT (C),B
LD HL,RAMD_KEYS
ADD A,L
LD L,A
DEC L
LD (A_RAMD_VARS),HL
INC L
LD L, (HL)
RET_SLOT3
EI
LD A, L
ENDM
MACRO RAMD_KEY
SUB 4
DI
LD B,SYS_PAGE
LD C,SLOT3
OUT (C),B
LD HL,RAMD_KEYS
ADD A,L
LD L,A
DEC L
LD (A_RAMD_VARS),HL
INC L
LD L, (HL)
RET_SLOT3
EI
LD A, L
ENDM
; MACRO DSS adr, dt
; IF (adr >= $)
@ -298,48 +298,48 @@
;=======================================
MACRO SAFE_PORTY
IFNDEF NeedSafePort_Y
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
ELSEIF NeedSafePort_Y
LD A,#C0
OUT (PORT_Y),A
ENDIF
ENDM
MACRO SAFE_PORTY
IFNDEF NeedSafePort_Y
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
ELSEIF NeedSafePort_Y
LD A,#C0
OUT (PORT_Y),A
ENDIF
ENDM
MACRO ZERO_PORTY
IFNDEF NeedSafePort_Y
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
ELSEIF NeedSafePort_Y
LD A,0
OUT (PORT_Y),A
ENDIF
ENDM
MACRO ZERO_PORTY
IFNDEF NeedSafePort_Y
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
ELSEIF NeedSafePort_Y
LD A,0
OUT (PORT_Y),A
ENDIF
ENDM
MACRO SAFE_PORTY_2
IFNDEF NeedSafePort_Y
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
ELSEIF NeedSafePort_Y
EXX
LD C,PORT_Y
IN B,(C)
PUSH BC
LD E,#C0
OUT (C),E
EXX
ENDIF
ENDM
MACRO SAFE_PORTY_2
IFNDEF NeedSafePort_Y
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
ELSEIF NeedSafePort_Y
EXX
LD C,PORT_Y
IN B,(C)
PUSH BC
LD E,#C0
OUT (C),E
EXX
ENDIF
ENDM
MACRO RESTORE_PORTY
IFNDEF NeedSafePort_Y
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
ELSEIF NeedSafePort_Y
EXX
POP BC
OUT (C),B
EXX
ENDIF
ENDM
MACRO RESTORE_PORTY
IFNDEF NeedSafePort_Y
ASSERT 0, "--===[ Error! To use SAFE_PORTY you MUST define NeedSafePort_Y 0/1 ]===--"
ELSEIF NeedSafePort_Y
EXX
POP BC
OUT (C),B
EXX
ENDIF
ENDM
;=======================================
@ -391,7 +391,7 @@ exe_header.length equ $-exe_header
printstr:
; ¢ ॣ. HL  ¤à¥á ­  ¯¥ç â ¥¬ë© ¡ãä¥à
LD C,Dss.PChars
jp ToDSS
jp ToDSS
;---------------------------------------
;---------------------------------------

View File

@ -40,13 +40,23 @@ BOOT_SECTOR EQU #00
.ID_FAT32 EQU #52 ; TEXT 8 BS_FilSysType €¡¡à¥¢¨ âãà  ä ©«®¢®© á¨á⥬ë
; #5A
; PC Loader
.BOOT_CODE_FAT16 EQU #3E
.BOOT_CODE_FAT32 EQU #5A
; ...
; Partition table
.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
.RECORD_SIZE EQU #10
; Record
; Record data
.Partition.isActive EQU #00 ; BYTE 0
.Partition.Start_head EQU #01 ; 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.Start_LBA EQU #08 ; DWORD 0
.Partition.Size_LBA EQU #0C ; DWORD 0
; Signature
.MBR_SIGNATURE EQU #1FE; WORD #AA55
; DRIVE TYPES
.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