Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Documentation/text/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ ELKS "INITSEG" (setup data segment) offsets:
| Hex | Dec | Size | Name | Description | Where set
+------+-----+------+-------------------+--------------------------+------------
| 0007 | 7 | byte | screen_cols | screen width | setup.S
| 000E | 14 | byte | screen_lines | screen height | setup.S
| 000E | 14 | byte | screen_lines | UNUSED |
| 0020 | 32 | byte | cpu_type | UNUSED |
| 002A | 42 | word | mem_kbytes | base memory size in K | setup.S
| 0030 | 48 |16byte| proc_name | UNUSED |
Expand Down
7 changes: 2 additions & 5 deletions Documentation/text/porting-guide.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ELKS Porting Guide
==================
21 June 2022 - Rev 4 ghaerr
26 Oct 2025 - Rev 5 ghaerr

Platforms (target)
-------------------------------------------------
Expand Down Expand Up @@ -98,7 +98,7 @@ BIOS Console
------------
BIOS Console using BIOS only console-bios.c
SETUP_VID_COLS setupb(7)
SETUP_VID_LINES setupb(14)
SETUP_VID_LINES 25
BDA:0x49 VID_MODE (7=MDA, force 1 console)
All INT 10h and INT 16h BIOS Console routines console-bios-asm.S
INT 16h AH=01h Poll kbd
Expand Down Expand Up @@ -165,9 +165,6 @@ INT 10h AH=0Eh Write teletype current page CONFIG_CONSOLE_HEADLESS
boot_sect.S, setup.S, conio-bios.S
INT 10h AH=0Fh Get video mode CONFIG_ARCH_IBMPC, setup.S

INT 10h AH=12h Get EGA video configuration CONFIG_HW_VGA
INT 10h AH=1Ah Get VGA video configuration CONFIG_HW_VGA

INT 12h Get memory in kilobytes boot_sect.S, setup.S

INT 13h AH=00h Reset disk system CONFIG_BLK_DEV_BIOS, boot_sect.S
Expand Down
6 changes: 0 additions & 6 deletions Documentation/text/rom_configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ OS/loader function.
Systems with SIO console doesn't need a keyboard BIOS


'System has a VGA-adapter' CONFIG_HW_VGA
--------------------------------------------

No search to VGA


'System has a PS/2 pointing device' CONFIG_HW_PS2_MOUSE
------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion blink16.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
CONFIG_ARCH_IBMPC=y
# CONFIG_ARCH_8018X is not set
# CONFIG_ARCH_PC98 is not set
CONFIG_HW_VGA=y
# CONFIG_HW_SERIAL_FIFO is not set

#
Expand Down
46 changes: 8 additions & 38 deletions elks/arch/i86/boot/setup.S
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
! index
! ...
! 4: display page, 1 byte UNUSED
! 6: video mode, 1 byte
! 6: video mode, 1 byte UNUSED
! 7: screen_cols, 1 byte
! 8: video data, 2 bytes
! 10: mono/color, video memory size, 2 bytes
! 14: screen_lines, 1 byte
! 15: VGA present, 1 byte
! 8: video data, 2 bytes UNUSED
! 10: mono/color, video memory size, 2 bytes UNUSED
! 14: screen_lines, 1 byte UNUSED
! 15: VGA present, 1 byte UNUSED
! 0x20: cpu_type byte Processor type
! 0 = 8088
! 1 = 8086
Expand Down Expand Up @@ -893,44 +893,14 @@ arch_get_mem:
ret

// Set INITSEG values for IBM PC
// Determine display type using INT 10h AH=12 and INT 10h AH=1A
// Get display page and mode using INT 10h AH=0F
// Get display columns using INT 10h AH=0F
// Determine size of main memory using INT 12h
// FIXME move to separate setup-bios.S file or individual drivers

arch_set_initseg:

#ifdef CONFIG_HW_VGA
// check for EGA/VGA and some config parameters
mov $0x12,%ah // Get video data
mov $0x10,%bl
int $0x10
mov %ax,8
mov %bx,10
mov %cx,12
mov $0x5019,%ax
cmp $0x10,%bl
je novga
mov $0x1a00,%ax // Added check for EGA/VGA discrimination
int $0x10
mov %ax,%bx
mov $0x5019,%ax
movb $0,15 // by default, no VGA
cmp $0x1a,%bl // 1a means VGA, anything else EGA or lower
jne novga
movb $1,15 // we've detected a VGA
#else
movb $0,15 // no VGA in system
mov $25,%al // height of display in rows
#endif /* CONFIG_HW_VGA*/

novga: mov %al,14 // CGA 25 rows

// Get video-card data

mov $0x0f,%ah
mov $0x0f,%ah // get video state
int $0x10
mov %ax,6 // al = video mode, ah = window width
mov %ah,7 // ah = video columns

call getcpu // implemented in cputype.S

Expand Down
1 change: 0 additions & 1 deletion elks/arch/i86/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ CONFIG_ARCH_IBMPC=y
#
# Devices
#
CONFIG_HW_VGA=y
CONFIG_HW_SERIAL_FIFO=y

#
Expand Down
1 change: 0 additions & 1 deletion elks/config.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ mainmenu_option next_comment

comment 'Devices'

bool 'VGA adapter' CONFIG_HW_VGA y
bool 'Serial port FIFO' CONFIG_HW_SERIAL_FIFO y

elif [ "$CONFIG_ARCH_8018X" = "y" ]; then
Expand Down
8 changes: 4 additions & 4 deletions elks/include/linuxmt/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifdef CONFIG_ARCH_IBMPC
#define MAX_SERIAL 4 /* max number of serial tty devices*/
#define SETUP_VID_COLS setupb(7) /* BIOS video # columns */
#define SETUP_VID_LINES setupb(14) /* BIOS video # lines */
#define SETUP_VID_LINES 25 /* video # lines */
#define SETUP_CPU_TYPE setupb(0x20) /* processor type */
#define SETUP_MEM_KBYTES setupw(0x2a) /* base memory in 1K bytes */
#define SETUP_XMS_KBYTES setupw(0x1ea) /* xms memory in 1K bytes */
Expand Down Expand Up @@ -51,9 +51,9 @@
#endif /* CONFIG_ARCH_IBMPC */

#ifdef CONFIG_ARCH_PC98
#define MAX_SERIAL 1 /* max number of serial tty devices*/
#define SETUP_VID_COLS 80 /* video # columns */
#define SETUP_VID_LINES 25 /* video # lines */
#define MAX_SERIAL 1 /* max number of serial tty devices*/
#define SETUP_VID_COLS 80 /* video # columns */
#define SETUP_VID_LINES 25 /* video # lines */
#define SETUP_CPU_TYPE setupb(0x20) /* processor type */
#define SETUP_MEM_KBYTES setupw(0x2a) /* base memory in 1K bytes */
#define SETUP_XMS_KBYTES setupw(0x1ea) /* xms memory in 1K bytes */
Expand Down
10 changes: 5 additions & 5 deletions elkscmd/nano-X/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ ifeq ($(CONFIG_ARCH_IBMPC), y)
DRIVERS += drivers/mou_ser.o drivers/kbd_tty.o
DRIVERS += drivers/mempl4.o drivers/elksutilasm.o

ifeq ($(CONFIG_HW_VGA), y)
# EGA/VGA screen driver
DRIVERS += drivers/scr_bios.o drivers/vgaplan4.o
DRIVERS += drivers/romfont.o drivers/elksutilasm.o
else
DRIVERS += drivers/scr_cga.o drivers/vgaplan4_cga.o
DRIVERS += drivers/ramfont.o drivers/X6x13.o
endif
endif

# CGA screen driver
#DRIVERS += drivers/scr_cga.o drivers/vgaplan4_cga.o
#DRIVERS += drivers/ramfont.o drivers/X6x13.o

# high speed C VGA driver (BCC)
#DRIVERS += drivers/elkplan4.o

Expand Down
2 changes: 1 addition & 1 deletion elkscmd/nano-X/demos/nxtetris.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#define TEXT_Y_POSITION 15
#define TEXT2_Y_POSITION 30
#define WELL_WIDTH 12
#if defined(CONFIG_HW_VGA) || defined(CONFIG_ARCH_PC98)
#if 1 /* defined(CONFIG_HW_VGA) || defined(CONFIG_ARCH_PC98) */
#define WELL_HEIGHT 28
#define WELL_VISIBLE_HEIGHT 24
#else
Expand Down
1 change: 0 additions & 1 deletion emu86-disk.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#

CONFIG_ARCH_IBMPC=y
CONFIG_HW_VGA=y
# CONFIG_HW_SERIAL_FIFO is not set

#
Expand Down
1 change: 0 additions & 1 deletion emu86-rom-full.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#

CONFIG_ARCH_IBMPC=y
# CONFIG_HW_VGA is not set
# CONFIG_HW_SERIAL_FIFO is not set

#
Expand Down
1 change: 0 additions & 1 deletion ibmpc-1440-nc.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ CONFIG_ARCH_IBMPC=y
# CONFIG_ARCH_PC98 is not set
# CONFIG_HW_COMPAQFAST is not set
# CONFIG_HW_MK88 is not set
CONFIG_HW_VGA=y
CONFIG_HW_SERIAL_FIFO=y

#
Expand Down
1 change: 0 additions & 1 deletion ibmpc-1440.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ CONFIG_ARCH_IBMPC=y
# CONFIG_ARCH_PC98 is not set
# CONFIG_HW_COMPAQFAST is not set
# CONFIG_HW_MK88 is not set
CONFIG_HW_VGA=y
CONFIG_HW_SERIAL_FIFO=y

#
Expand Down