mfld-fr / emu86

Intel IA16 emulator for embedded development
35 stars 6 forks source link

Fix ELKS ROM BIOS to handle video text attributes #58

Closed ghaerr closed 3 years ago

ghaerr commented 3 years ago

Fixes character display on ELKS compiled with BIOS Console. Discussed in https://github.com/mfld-fr/emu86/pull/54#issuecomment-835842510.

Implements more complete PC BIOS INT 10h AH=06h Scrollup specification.

Currently, ROM BIOS mem_stat manipulations are mostly handled in con-sdl.c SDL backend, but for full compatibility with video RAM emulation, may want to be moved to rom-xxx.c implementation.

con_put_char must now be passed video attribute (usually ATTR_NORMAL) for SDL backend. Should work with stdio and character backends where attribute is discarded.

vi now works well on Direct and BIOS Consoles.

ghaerr commented 3 years ago

I did not catch that ELKS uses character attributes only in video mode 3 and not in 7.

ELKS Direct Console is coded to work with both video modes 3 and 7. However, just as in EMU86, ELKS will assume the video mode specified by inspecting the BDA directly (not through any BIOS INT request). So, we should probably implement MDA since ELKS supports it, but likely ELKS itself hasn't been tested much or at all lately on actual MDA hardware.

So I agree there is no need at that time for MDA attributes emulation.

True for now.

I will change the default video mode from 7 to 3 in the PC/XT/AT BIOS stub for consistency, and put a 'unsupported attributes' warning when other OS would ask for mode 7.

Looks good.