DragonVM/extra/dss/bios/data.dss
2025-05-01 13:18:54 +02:00

349 lines
No EOL
10 KiB
Text

@guard _DATA_DSS_
@export BIOS_API dss/sdk//bios_api.dss
@export_comment BIOS_API " --"
@export_comment BIOS_API " -- This file is automatically generated by the DragonAssembler (version %dasm_version%) "
@export_comment BIOS_API " -- Please do not modify this file in any way. "
@export_comment BIOS_API " --\n"
## ============================= Memory Mapped Devices and Registers =============================
@export_comment BIOS_API " These are the base addresses of the memory map."
@raw_export_start BIOS_API
@group MemoryAddresses
MBR 0x1380
INT_VEC 0x1080
DISK_INTERFACE 0x1580
RAM 0x1740
CMOS 0x1000
VGA 0x1600
KEYBOARD 0x1280
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " These are the addresses of CMOS data."
@raw_export_start BIOS_API
@group CMOS_Settings
MEM_START { MemoryAddresses.CMOS + 0x0000 }
MEM_SIZE { MemoryAddresses.CMOS + 0x0002 }
CLOCK_SPEED { MemoryAddresses.CMOS + 0x0004 }
SCREEN_REDRAW_RATE { MemoryAddresses.CMOS + 0x0006 }
SCREEN_WIDTH { MemoryAddresses.CMOS + 0x0007 }
SCREEN_HEIGHT { MemoryAddresses.CMOS + 0x0009 }
BOOT_DISK { MemoryAddresses.CMOS + 0x0010 }
STACK_SIZE { MemoryAddresses.CMOS + 0x0011 }
DISK_LIST { MemoryAddresses.CMOS + 0x007E }
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " These are the FLAG addresses."
@raw_export_start BIOS_API
@group Flags
InterruptsEnabled 0x00
OffsetModeEnabled 0x01
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " These are the Hardware Interrupt codes of this machine."
@raw_export_start BIOS_API
@group HW_Int
DISK_INTERFACE_FINISHED 0x80
KEY_PRESSED 0xA0
KEY_RELEASED 0xA1
TEXT_ENTERED 0xA2
TEXT16_SCREEN_REFRESHED 0xE0
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " These are the memory-mapped registers used to interact with the video card's interface."
@raw_export_start BIOS_API
@group VGA_Registers
VIDEO_MODE { MemoryAddresses.VGA + 0x0000 }
CLEAR_COLOR { MemoryAddresses.VGA + 0x0001 }
PALETTE { MemoryAddresses.VGA + 0x0002 }
SIGNAL { MemoryAddresses.VGA + 0x0003 }
TEXT_SINGLE_CHAR { MemoryAddresses.VGA + 0x0004 }
TEXT_SIGNLE_INVERT { MemoryAddresses.VGA + 0x0005 }
TEXT_SIGNLE_STR { MemoryAddresses.VGA + 0x0006 }
FLAGS { MemoryAddresses.VGA + 0x007E }
MEMORY_CONTROLLER_X { MemoryAddresses.VGA + 0x0080 }
MEMORY_CONTROLLER_X_BYTE { MemoryAddresses.VGA + 0x0080 + 1 }
MEMORY_CONTROLLER_Y { MemoryAddresses.VGA + 0x0082 }
MEMORY_CONTROLLER_Y_BYTE { MemoryAddresses.VGA + 0x0082 + 1 }
MEMORY_CONTROLLER_CHAR { MemoryAddresses.VGA + 0x0084 }
MEMORY_CONTROLLER_BG_COL { MemoryAddresses.VGA + 0x0085 }
MEMORY_CONTROLLER_FG_COL { MemoryAddresses.VGA + 0x0086 }
BUFF_START { MemoryAddresses.VGA + 0x00E0 }
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " These are the memory-mapped registers used to interact with the keyboard's interface."
@raw_export_start BIOS_API
@group Keyboard_Registers
MODIFIERS_BITFIELD { MemoryAddresses.KEYBOARD + 0x0000 }
KEYCODE { MemoryAddresses.KEYBOARD + 0x0002 }
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " These are the different Video Modes that the video card supports."
@raw_export_start BIOS_API
@group VGA_VideoModes
TEXT_SINGLE_COLOR 0x00
TEXT_16_COLORS 0x01
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " These are signals used to comunicate with the video card's interface, when in TEXT_SINGLE_COLOR mode."
@raw_export_start BIOS_API
@group Sig_VGA_Text_Single_Color
CONTINUE 0x00
PRINT_CHAR 0x02
STORE_CHAR 0x03
PRINT_FLUSH_BUFF 0x04
FLUSH_BUFF 0x05
PRINT_BUFF 0x06
PRINT_STRING 0x07
REFRESH_SCREEN 0xE0
CLEAR_SCREEN 0xE1
REDRAW_SCREEN 0xE2
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " These are signals used to comunicate with the video card's interface, when in TEXT16_COLOR mode."
@raw_export_start BIOS_API
@group Sig_VGA_Text_16_Color
CONTINUE 0x00
SWAP_BUFFERS 0x10
WRITE_VRAM 0x11
SCROLL 0x12
FORCE_REFRESH_SCREEN 0xE0
FORCE_CLEAR_SCREEN 0xE1
FORCE_REDRAW_SCREEN 0xE2
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@define S_REG_1 0x07
@define S_REG_2 0x08
@define S_REG_OFFSET 0x09
@define INST_BIOS_NODE_TOGGLE 0x02
## ===============================================================================================
## ========================================== Other Data =========================================
@export_comment BIOS_API " Structure of a DPT (Dragon Partition Table)."
@raw_export_start BIOS_API
@group DPTStructure
DISK_ADDR 0x0200
ENTRIES_START 0x000C
ENTRY_START_ADDR 0x0000
ENTRY_PART_SIZE 0x0004
ENTRY_FLAGS 0x0008
ENTRY_PART_LBL 0x0024
ID_CODE 0xF1CA
ENTRY_SIZE_B 100
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " Structure of a Bootable partitions (Dragon Partition Table)."
@raw_export_start BIOS_API
@group DPTBootPartStructure
ID_ADDR 0x0000
CODE_START 0x0020
ID_CODE 0xF1C4
CODE_SIZE_B 1024
HEADER_SIZE_B 32
CODE_LOAD_ADDR 0x2C00
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " Structure to store a DPT block."
@raw_export_start BIOS_API
@struct DPTBlock
ID:2
VersionMaj:1
VersionMin:1
PartCount:1
Reserved:7
Entries:500
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " Structure to store a DPT Partition block."
@raw_export_start BIOS_API
@struct DPTPartitionBlock
StartAddress:4
Size:4
Flags:2
Reserved:26
Label:64
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " Structure to store a character cell for the Text16-Video-Mode."
@raw_export_start BIOS_API
@struct Text16VModeCell
Character:1
Foreground:1
Background:1
CoordX:1
CoordY:1
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " Debugger Profiler time units."
@raw_export_start BIOS_API
@group DBGProfilerTime
MILLIS 0x00
SECS 0x01
MICROS 0x02
NANOS 0x03
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " Disk driver modes."
@raw_export_start BIOS_API
@group DiskMode
READ 0x00
WRITE 0x01
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " Disk driver signals."
@raw_export_start BIOS_API
@group DiskSignals
START 0x00
CANCEL 0x01
IGNORE 0xFF
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " Disk driver status."
@raw_export_start BIOS_API
@group DiskStatus
FREE 0x00
WRITING 0x01
READING 0x02
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " Disk driver registers."
@raw_export_start BIOS_API
@group DiskRegisters
SIGNAL 0x00
MODE_SELECTOR 0x01
DISK_SELECTOR 0x02
SECTOR_SELECTOR 0x03
ADDRESS_SELECTOR 0x05
DATA_SIZE 0x07
MEMORY_ADDRESS 0x09
RO_STATUS 0x0B
RO_CURRENT_DISK 0x0C
RO_CURRENT_SECTOR 0x0D
RO_CURRENT_ADDRESS 0x0F
RO_REST_DATA_SIZE 0x11
RO_MEMORY_ADDRESS 0x13
@end
@raw_export_end
@export_comment BIOS_API " --\n"
@export_comment BIOS_API " Disk driver data structure."
@raw_export_start BIOS_API
@struct DiskDriverData
Mode:1 > 0x00
Disk:1 > 0x00
Sector:2 > 0x00, 0x00
Address:2 > 0x00, 0x00
DataSize:2 > 0x00, 0x00
MemoryAddress:2 > 0x00, 0x00
@end
@raw_export_end
@export_comment BIOS_API " --\n"
## ===============================================================================================
.data
$_bios_version_number_maj 0x00, 0x00
$_bios_version_number_min 0x00, 0x04
$_bios_name "DragonBIOS "
$_clock_str " Clock: "
$_mem_str " Memory: "
$_hz_str " Hz"
$_byte_str " Bytes"
$_bios_logo_2_line_1 "|===================================================|"
$_bios_logo_2_line_2 "| '$$$o. |"
$_bios_logo_2_line_3 "| '$$$$bo... ..o: |"
$_bios_logo_2_line_4 "| '$$$$$$$$booocS$$$ .. ,. |"
$_bios_logo_2_line_5 "| '. '*$$$$SP V$o..o$$. .$$$b |"
$_bios_logo_2_line_6 "| '$$o. .$$$$$o. ...A$$$$$$$$$$$$$$b |"
$_bios_logo_2_line_7 "| ''bo. '*$$$$$$$$$$$$$$$$$$$$P*$$$$$$$$: |"
$_bios_logo_2_line_8 "| '$$. V$$$$$$$$$P'**''*'' VP * 'l |"
$_bios_logo_2_line_9 "| '$$$o.4$$$$$$$$X |"
$_bios_logo_2_line_10 "| '*$$$$$$$$$$$$$AoA$o..oooooo.. .b |"
$_bios_logo_2_line_11 "| .X$$$$$$$$$$$P'' ''*oo,, ,$P |"
$_bios_logo_2_line_12 "| $$P''V$$$$$$$: . ''*****' |"
$_bios_logo_2_line_13 "| .*' A$$$$$$$$o.4; . |"
$_bios_logo_2_line_14 "| .oP'' '$$$$$$b. .$; |"
$_bios_logo_2_line_15 "| A$$$$$$$$$$P |"
$_bios_logo_2_line_16 "| ' '$$$$$P' |"
$_bios_logo_2_line_17 "| $$P*' |"
$_bios_logo_2_line_18 "| .$' |"
$_bios_logo_2_line_19 "|===================================================|"
## $_bios_logo_line_1 " _____ ____ _____ ____ _____ "
## $_bios_logo_line_2 " | __ \ | _ \_ _/ __ \ / ____| "
## $_bios_logo_line_3 " | | | |_ __ __ _ __ _ ___ _ __ | |_) || || | | | (___ "
## $_bios_logo_line_4 " | | | | '__/ _` |/ _` |/ _ \| '_ \| _ < | || | | |\___ \ "
## $_bios_logo_line_5 " | |__| | | | (_| | (_| | (_) | | | | |_) || || |__| |____) | "
## $_bios_logo_line_6 " |_____/|_| \__,_|\__, |\___/|_| |_|____/_____\____/|_____/ "
## $_bios_logo_line_7 " __/ | "
## $_bios_logo_line_8 " |___/ "