Skip to content

Commit

Permalink
Merge pull request #5 from tsutsui/x68kgrf-vgamode
Browse files Browse the repository at this point in the history
Add X68030 CRT Mode 19 (640x480x4) support for mlterm-x68kgrf.
  • Loading branch information
arakiken committed Nov 11, 2020
2 parents ce52e6d + 50cea00 commit 0d3a3b0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
7 changes: 4 additions & 3 deletions doc/en/README.fb
Expand Up @@ -108,11 +108,12 @@ Framebuffer support
o You can specify --depth=1 (1bpp) or --depth=4 (4bpp) on NetBSD/luna68k.
o You can change the screen resolution and depth by fb_resolution option in
~/.mlterm/main on NetBSD/x68k. Supported resolutions are 512x512x15
512x512x8 768x512x4 768x512x1 1024x768x4 1024x768x1.
512x512x8 768x512x4 768x512x1 1024x768x4 1024x768x1 640x480x4.
fb_resolution=512x512x15
o Unless you specify --multivram=false or separate_wall_picture=false option
in fb_resolution=768x512x4 or 1024x768x4, the wall picture is drawn on Text
VRAM instead of Graphic VRAM and scrolling performance will be improved.
in fb_resolution=768x512x4, 1024x768x4 or 640x480x4, the wall picture is
drawn on Text VRAM instead of Graphic VRAM and scrolling performance will
be improved.

(for OpenBSD)
o Enable following options and rebuild kernel.
Expand Down
10 changes: 5 additions & 5 deletions doc/ja/README.fb
Expand Up @@ -118,12 +118,12 @@ Framebuffer
���뤳�Ȥ��Ǥ��ޤ���
o NetBSD/x68k �Ǥ� ~/.mlterm/main �˼��Τ褦�˻��ꤹ�뤳�Ȥǡ������٤��ѹ��Ǥ�
�ޤ������ݡ��Ȥ�������٤ϡ�512x512x15 512x512x8 768x512x4 768x512x1
1024x768x4 1024x768x1 �Ǥ���
1024x768x4 1024x768x1 640x480x4 �Ǥ���
fb_resolution=512x512x15
o NetBSD/x68k �Ǥϡ�fb_resolution=768x512x4 ���� 1024x768x4 �ξ��ˡ
--multivram=false ���� separate_wall_picture=false ���ץ�������ꤷ�ʤ���
�С��ɻ�Τ� Text VRAM �� (����¾�� Graphic VRAM) �����褷�ޤ�������ˤ�
����������®�٤��������ޤ���
o NetBSD/x68k �Ǥϡ�fb_resolution=768x512x4��1024x768x4 ���� 640x480x4 �ξ��
�ˡ� --multivram=false ���� separate_wall_picture=false ���ץ�������ꤷ��
���С��ɻ�Τ� Text VRAM �� (����¾�� Graphic VRAM) �����褷�ޤ�������ˤ�
ꡢ����������®�٤��������ޤ���

(for OpenBSD)
o ����2�Ԥ�ͭ���ˤ��ƥ����ͥ�κƹ��ۤ�ԤäƤ���������
Expand Down
13 changes: 12 additions & 1 deletion uitoolkit/fb/ui_display_x68kgrf.c
Expand Up @@ -153,6 +153,8 @@ static int open_display(u_int depth) {
{4, 0x24e4 /* Graphic vram is prior to text one. */, 0x0010}};
fb_reg_conf_t conf_1024_768_4 = {{169, 14, 28, 156, 439, 5, 40, 424, 27, 1050},
{4, 0x24e4 /* Graphic vram is prior to text one. */, 0x0010}};
fb_reg_conf_t conf_640_480_4 = {{99, 11, 13, 93, 524, 1, 33, 513, 27, 1047},
{4, 0x24e4 /* Graphic vram is prior to text one. */, 0x0010}};
struct rgb_info rgb_info_15bpp = {3, 3, 3, 6, 11, 1};
struct termios tm;

Expand Down Expand Up @@ -214,7 +216,11 @@ static int open_display(u_int depth) {
orig_reg.crtc.r08, orig_reg.crtc.r20, orig_reg.videoc.r0, orig_reg.videoc.r1,
orig_reg.videoc.r2);
#else
orig_reg = conf_768_512_4;
if (vinfo.gd_dwidth == 640) {
orig_reg = conf_640_480_4;
} else {
orig_reg = conf_768_512_4;
}
orig_reg.videoc.r2 = 0x20;
#endif

Expand All @@ -240,6 +246,11 @@ static int open_display(u_int depth) {

_display.width = _disp.width = 1024;
_display.height = _disp.height = 768;
} else if (fb_width == 640 && fb_height == 480) {
conf = &conf_640_480_4;

_display.width = _disp.width = 640;
_display.height = _disp.height = 480;
} else {
conf = &conf_768_512_4;

Expand Down

0 comments on commit 0d3a3b0

Please sign in to comment.