From 1a23cb536c6bb6c65d1746267ea7e19db937feed Mon Sep 17 00:00:00 2001 From: imp Date: Sun, 9 Jan 2005 22:17:39 +0000 Subject: In my last commit, I'd assumed that LINE30 was always defined. It turns out that LINE30_ROW was always defined, not LINE30. I confused this for LINE30 and did the unifdef -DLINE30 using that mistaken belief. This corrects that problem. Submitted by: nyan-san --- sys/pc98/cbus/30line.h | 8 ++++++++ sys/pc98/cbus/gdc.c | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+) (limited to 'sys/pc98/cbus') diff --git a/sys/pc98/cbus/30line.h b/sys/pc98/cbus/30line.h index 0c860b9..c2e0f10 100644 --- a/sys/pc98/cbus/30line.h +++ b/sys/pc98/cbus/30line.h @@ -77,21 +77,28 @@ static void master_gdc_cmd(unsigned int); static void master_gdc_prm(unsigned int); static void master_gdc_word_prm(unsigned int); +#ifdef LINE30 static void master_gdc_fifo_empty(void); +#endif static void master_gdc_wait_vsync(void); static void gdc_cmd(unsigned int); +#ifdef LINE30 static void gdc_prm(unsigned int); static void gdc_word_prm(unsigned int); static void gdc_fifo_empty(void); +#endif static void gdc_wait_vsync(void); +#ifdef LINE30 static int check_gdc_clock(void); static int gdc_INFO = _25L; +#endif static int gdc_FH = _24KHZ; static void initialize_gdc(unsigned int, int); +#ifdef LINE30 static unsigned int master_param[2][2][8] = { {{78, 8, 7, 9, 7, 7, 25, 400}, /* 400/24k */ {_CR-2, _VS, _HS-1, _HFP-1, _HBP-1, _VFP, _VBP, _LF}}, /* 480/24k */ @@ -118,5 +125,6 @@ static unsigned int slave_param[2][6][8] = { static int SlavePCH[2] = {40,80}; static int MasterPCH = 80; static int SlaveScrlLF[3] = {400,400,_LF}; +#endif #endif /* __PC98_PC98_30LINE_H__ */ diff --git a/sys/pc98/cbus/gdc.c b/sys/pc98/cbus/gdc.c index 368b832..8d463fb 100644 --- a/sys/pc98/cbus/gdc.c +++ b/sys/pc98/cbus/gdc.c @@ -54,7 +54,9 @@ #include +#ifdef LINE30 #include +#endif #include #include @@ -518,8 +520,10 @@ VIDEO_DRIVER(gdc, gdcvidsw, gdc_configure); static video_info_t bios_vmode[] = { { M_PC98_80x25, V_INFO_COLOR, 80, 25, 8, 16, 4, 1, TEXT_BUF_BASE, TEXT_BUF_SIZE, TEXT_BUF_SIZE, 0, 0, V_INFO_MM_TEXT }, +#ifdef LINE30 { M_PC98_80x30, V_INFO_COLOR, 80, 30, 8, 16, 4, 1, TEXT_BUF_BASE, TEXT_BUF_SIZE, TEXT_BUF_SIZE, 0, 0, V_INFO_MM_TEXT }, +#endif #ifndef GDC_NOGRAPHICS { M_PC98_EGC640x400, V_INFO_COLOR | V_INFO_GRAPHICS, 640, 400, 8, 16, 4, 4, @@ -529,11 +533,13 @@ static video_info_t bios_vmode[] = { 640, 400, 8, 16, 8, 1, GRAPHICS_BUF_BASE, 0x00008000, 0x00008000, 0, 0, V_INFO_MM_PACKED, 1 }, +#ifdef LINE30 { M_PC98_PEGC640x480, V_INFO_COLOR | V_INFO_GRAPHICS | V_INFO_VESA, 640, 480, 8, 16, 8, 1, GRAPHICS_BUF_BASE, 0x00008000, 0x00008000, 0, 0, V_INFO_MM_PACKED, 1 }, #endif +#endif { EOT }, }; @@ -573,7 +579,9 @@ map_gen_mode_num(int type, int color, int mode) int to; } mode_map[] = { { M_TEXT_80x25, M_PC98_80x25, }, +#ifdef LINE30 { M_TEXT_80x30, M_PC98_80x30, }, +#endif }; int i; @@ -677,10 +685,12 @@ static void master_gdc_word_prm(unsigned int wpmtr) master_gdc_prm((wpmtr >> 8) & 0x00ff); } +#ifdef LINE30 static void master_gdc_fifo_empty(void) { while ( (inb(TEXT_GDC) & 4) == 0); } +#endif static void master_gdc_wait_vsync(void) { @@ -694,6 +704,7 @@ static void gdc_cmd(unsigned int cmd) outb( GRAPHIC_GDC+2, cmd); } +#ifdef LINE30 static void gdc_prm(unsigned int pmtr) { while ( (inb(GRAPHIC_GDC) & 2) != 0); @@ -710,6 +721,7 @@ static void gdc_fifo_empty(void) { while ( (inb(GRAPHIC_GDC) & 0x04) == 0); } +#endif static void gdc_wait_vsync(void) { @@ -717,6 +729,7 @@ static void gdc_wait_vsync(void) while ( (inb(GRAPHIC_GDC) & 0x20) == 0); } +#ifdef LINE30 static int check_gdc_clock(void) { if ((inb(IO_SYSPORT) & 0x80) == 0){ @@ -725,9 +738,11 @@ static int check_gdc_clock(void) return _2_5MHZ; } } +#endif static void initialize_gdc(unsigned int mode, int isGraph) { +#ifdef LINE30 /* start 30line initialize */ int m_mode, s_mode, gdc_clock, hsync_clock; @@ -832,6 +847,12 @@ static void initialize_gdc(unsigned int mode, int isGraph) gdc_wait_vsync(); master_gdc_cmd(isGraph ? _GDC_STOP : _GDC_START); +#else + master_gdc_wait_vsync(); + master_gdc_cmd(isGraph ? _GDC_STOP : _GDC_START); /* text */ + gdc_wait_vsync(); + gdc_cmd(isGraph ? _GDC_START : _GDC_STOP); /* graphics */ +#endif } #ifndef GDC_NOGRAPHICS -- cgit v1.1