Skip to content

[Nano-X] Speed up VGA 4-plane 16-color display output#2217

Merged
ghaerr merged 1 commit intomasterfrom
nxfast
Feb 3, 2025
Merged

[Nano-X] Speed up VGA 4-plane 16-color display output#2217
ghaerr merged 1 commit intomasterfrom
nxfast

Conversation

@ghaerr
Copy link
Copy Markdown
Owner

@ghaerr ghaerr commented Feb 3, 2025

Should speed up VGA display output by quite a bit on real hardware. After (re)writing an AS86 assembly VGA driver for the 8086-toolchain in ghaerr/8086-toolchain#46, I noticed quite a few speed improvements that could be made to the C driver currently used in Nano-X.

The enhancements to the C vgaplan4.c driver include:

  • Use OUTW instead of OUTB for writing VGA control registers
  • Use kernel arch/io.h outw macro instead of calling function to output bytes to VGA
  • Use LDS BX instead of loading DS and BX separately in RMW_FP, OR_BYTE, etc routines
  • Save DS in DX instead of pushing to stack in same routines

@tyama501, I would be interested to know whether this speeds Nano-X up much on PC-98. In particular, large rectangle fills or screen clears should be much faster. (I am working next on getting UNIX sockets working on FAT filesystem).

The screen driver could probably be sped up even more by moving to a GCC assembly language version. I haven't done this yet, as that entails rewriting (again) the new C86 vga-4bp.s driver from Intel AS86 format to AT&T GCC format.

@ghaerr ghaerr merged commit 3a10bb6 into master Feb 3, 2025
@ghaerr ghaerr deleted the nxfast branch February 3, 2025 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant