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
This commit is contained in:
imp 2005-01-09 22:17:39 +00:00
parent 32dbe1c9e7
commit 1a23cb536c
4 changed files with 58 additions and 0 deletions

View File

@ -77,21 +77,28 @@
static void master_gdc_cmd(unsigned int); static void master_gdc_cmd(unsigned int);
static void master_gdc_prm(unsigned int); static void master_gdc_prm(unsigned int);
static void master_gdc_word_prm(unsigned int); static void master_gdc_word_prm(unsigned int);
#ifdef LINE30
static void master_gdc_fifo_empty(void); static void master_gdc_fifo_empty(void);
#endif
static void master_gdc_wait_vsync(void); static void master_gdc_wait_vsync(void);
static void gdc_cmd(unsigned int); static void gdc_cmd(unsigned int);
#ifdef LINE30
static void gdc_prm(unsigned int); static void gdc_prm(unsigned int);
static void gdc_word_prm(unsigned int); static void gdc_word_prm(unsigned int);
static void gdc_fifo_empty(void); static void gdc_fifo_empty(void);
#endif
static void gdc_wait_vsync(void); static void gdc_wait_vsync(void);
#ifdef LINE30
static int check_gdc_clock(void); static int check_gdc_clock(void);
static int gdc_INFO = _25L; static int gdc_INFO = _25L;
#endif
static int gdc_FH = _24KHZ; static int gdc_FH = _24KHZ;
static void initialize_gdc(unsigned int, int); static void initialize_gdc(unsigned int, int);
#ifdef LINE30
static unsigned int master_param[2][2][8] = { static unsigned int master_param[2][2][8] = {
{{78, 8, 7, 9, 7, 7, 25, 400}, /* 400/24k */ {{78, 8, 7, 9, 7, 7, 25, 400}, /* 400/24k */
{_CR-2, _VS, _HS-1, _HFP-1, _HBP-1, _VFP, _VBP, _LF}}, /* 480/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 SlavePCH[2] = {40,80};
static int MasterPCH = 80; static int MasterPCH = 80;
static int SlaveScrlLF[3] = {400,400,_LF}; static int SlaveScrlLF[3] = {400,400,_LF};
#endif
#endif /* __PC98_PC98_30LINE_H__ */ #endif /* __PC98_PC98_30LINE_H__ */

View File

@ -54,7 +54,9 @@
#include <dev/fb/fbreg.h> #include <dev/fb/fbreg.h>
#ifdef LINE30
#include <pc98/pc98/pc98.h> #include <pc98/pc98/pc98.h>
#endif
#include <pc98/pc98/pc98_machdep.h> #include <pc98/pc98/pc98_machdep.h>
#include <isa/isavar.h> #include <isa/isavar.h>
@ -518,8 +520,10 @@ VIDEO_DRIVER(gdc, gdcvidsw, gdc_configure);
static video_info_t bios_vmode[] = { static video_info_t bios_vmode[] = {
{ M_PC98_80x25, V_INFO_COLOR, 80, 25, 8, 16, 4, 1, { 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 }, 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, { 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 }, TEXT_BUF_BASE, TEXT_BUF_SIZE, TEXT_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
#endif
#ifndef GDC_NOGRAPHICS #ifndef GDC_NOGRAPHICS
{ M_PC98_EGC640x400, V_INFO_COLOR | V_INFO_GRAPHICS, { M_PC98_EGC640x400, V_INFO_COLOR | V_INFO_GRAPHICS,
640, 400, 8, 16, 4, 4, 640, 400, 8, 16, 4, 4,
@ -529,10 +533,12 @@ static video_info_t bios_vmode[] = {
640, 400, 8, 16, 8, 1, 640, 400, 8, 16, 8, 1,
GRAPHICS_BUF_BASE, 0x00008000, 0x00008000, 0, 0, GRAPHICS_BUF_BASE, 0x00008000, 0x00008000, 0, 0,
V_INFO_MM_PACKED, 1 }, V_INFO_MM_PACKED, 1 },
#ifdef LINE30
{ M_PC98_PEGC640x480, V_INFO_COLOR | V_INFO_GRAPHICS | V_INFO_VESA, { M_PC98_PEGC640x480, V_INFO_COLOR | V_INFO_GRAPHICS | V_INFO_VESA,
640, 480, 8, 16, 8, 1, 640, 480, 8, 16, 8, 1,
GRAPHICS_BUF_BASE, 0x00008000, 0x00008000, 0, 0, GRAPHICS_BUF_BASE, 0x00008000, 0x00008000, 0, 0,
V_INFO_MM_PACKED, 1 }, V_INFO_MM_PACKED, 1 },
#endif
#endif #endif
{ EOT }, { EOT },
}; };
@ -573,7 +579,9 @@ map_gen_mode_num(int type, int color, int mode)
int to; int to;
} mode_map[] = { } mode_map[] = {
{ M_TEXT_80x25, M_PC98_80x25, }, { M_TEXT_80x25, M_PC98_80x25, },
#ifdef LINE30
{ M_TEXT_80x30, M_PC98_80x30, }, { M_TEXT_80x30, M_PC98_80x30, },
#endif
}; };
int i; int i;
@ -677,10 +685,12 @@ static void master_gdc_word_prm(unsigned int wpmtr)
master_gdc_prm((wpmtr >> 8) & 0x00ff); master_gdc_prm((wpmtr >> 8) & 0x00ff);
} }
#ifdef LINE30
static void master_gdc_fifo_empty(void) static void master_gdc_fifo_empty(void)
{ {
while ( (inb(TEXT_GDC) & 4) == 0); while ( (inb(TEXT_GDC) & 4) == 0);
} }
#endif
static void master_gdc_wait_vsync(void) static void master_gdc_wait_vsync(void)
{ {
@ -694,6 +704,7 @@ static void gdc_cmd(unsigned int cmd)
outb( GRAPHIC_GDC+2, cmd); outb( GRAPHIC_GDC+2, cmd);
} }
#ifdef LINE30
static void gdc_prm(unsigned int pmtr) static void gdc_prm(unsigned int pmtr)
{ {
while ( (inb(GRAPHIC_GDC) & 2) != 0); while ( (inb(GRAPHIC_GDC) & 2) != 0);
@ -710,6 +721,7 @@ static void gdc_fifo_empty(void)
{ {
while ( (inb(GRAPHIC_GDC) & 0x04) == 0); while ( (inb(GRAPHIC_GDC) & 0x04) == 0);
} }
#endif
static void gdc_wait_vsync(void) static void gdc_wait_vsync(void)
{ {
@ -717,6 +729,7 @@ static void gdc_wait_vsync(void)
while ( (inb(GRAPHIC_GDC) & 0x20) == 0); while ( (inb(GRAPHIC_GDC) & 0x20) == 0);
} }
#ifdef LINE30
static int check_gdc_clock(void) static int check_gdc_clock(void)
{ {
if ((inb(IO_SYSPORT) & 0x80) == 0){ if ((inb(IO_SYSPORT) & 0x80) == 0){
@ -725,9 +738,11 @@ static int check_gdc_clock(void)
return _2_5MHZ; return _2_5MHZ;
} }
} }
#endif
static void initialize_gdc(unsigned int mode, int isGraph) static void initialize_gdc(unsigned int mode, int isGraph)
{ {
#ifdef LINE30
/* start 30line initialize */ /* start 30line initialize */
int m_mode, s_mode, gdc_clock, hsync_clock; 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(); gdc_wait_vsync();
master_gdc_cmd(isGraph ? _GDC_STOP : _GDC_START); 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 #ifndef GDC_NOGRAPHICS

View File

@ -77,21 +77,28 @@
static void master_gdc_cmd(unsigned int); static void master_gdc_cmd(unsigned int);
static void master_gdc_prm(unsigned int); static void master_gdc_prm(unsigned int);
static void master_gdc_word_prm(unsigned int); static void master_gdc_word_prm(unsigned int);
#ifdef LINE30
static void master_gdc_fifo_empty(void); static void master_gdc_fifo_empty(void);
#endif
static void master_gdc_wait_vsync(void); static void master_gdc_wait_vsync(void);
static void gdc_cmd(unsigned int); static void gdc_cmd(unsigned int);
#ifdef LINE30
static void gdc_prm(unsigned int); static void gdc_prm(unsigned int);
static void gdc_word_prm(unsigned int); static void gdc_word_prm(unsigned int);
static void gdc_fifo_empty(void); static void gdc_fifo_empty(void);
#endif
static void gdc_wait_vsync(void); static void gdc_wait_vsync(void);
#ifdef LINE30
static int check_gdc_clock(void); static int check_gdc_clock(void);
static int gdc_INFO = _25L; static int gdc_INFO = _25L;
#endif
static int gdc_FH = _24KHZ; static int gdc_FH = _24KHZ;
static void initialize_gdc(unsigned int, int); static void initialize_gdc(unsigned int, int);
#ifdef LINE30
static unsigned int master_param[2][2][8] = { static unsigned int master_param[2][2][8] = {
{{78, 8, 7, 9, 7, 7, 25, 400}, /* 400/24k */ {{78, 8, 7, 9, 7, 7, 25, 400}, /* 400/24k */
{_CR-2, _VS, _HS-1, _HFP-1, _HBP-1, _VFP, _VBP, _LF}}, /* 480/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 SlavePCH[2] = {40,80};
static int MasterPCH = 80; static int MasterPCH = 80;
static int SlaveScrlLF[3] = {400,400,_LF}; static int SlaveScrlLF[3] = {400,400,_LF};
#endif
#endif /* __PC98_PC98_30LINE_H__ */ #endif /* __PC98_PC98_30LINE_H__ */

View File

@ -54,7 +54,9 @@
#include <dev/fb/fbreg.h> #include <dev/fb/fbreg.h>
#ifdef LINE30
#include <pc98/pc98/pc98.h> #include <pc98/pc98/pc98.h>
#endif
#include <pc98/pc98/pc98_machdep.h> #include <pc98/pc98/pc98_machdep.h>
#include <isa/isavar.h> #include <isa/isavar.h>
@ -518,8 +520,10 @@ VIDEO_DRIVER(gdc, gdcvidsw, gdc_configure);
static video_info_t bios_vmode[] = { static video_info_t bios_vmode[] = {
{ M_PC98_80x25, V_INFO_COLOR, 80, 25, 8, 16, 4, 1, { 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 }, 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, { 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 }, TEXT_BUF_BASE, TEXT_BUF_SIZE, TEXT_BUF_SIZE, 0, 0, V_INFO_MM_TEXT },
#endif
#ifndef GDC_NOGRAPHICS #ifndef GDC_NOGRAPHICS
{ M_PC98_EGC640x400, V_INFO_COLOR | V_INFO_GRAPHICS, { M_PC98_EGC640x400, V_INFO_COLOR | V_INFO_GRAPHICS,
640, 400, 8, 16, 4, 4, 640, 400, 8, 16, 4, 4,
@ -529,10 +533,12 @@ static video_info_t bios_vmode[] = {
640, 400, 8, 16, 8, 1, 640, 400, 8, 16, 8, 1,
GRAPHICS_BUF_BASE, 0x00008000, 0x00008000, 0, 0, GRAPHICS_BUF_BASE, 0x00008000, 0x00008000, 0, 0,
V_INFO_MM_PACKED, 1 }, V_INFO_MM_PACKED, 1 },
#ifdef LINE30
{ M_PC98_PEGC640x480, V_INFO_COLOR | V_INFO_GRAPHICS | V_INFO_VESA, { M_PC98_PEGC640x480, V_INFO_COLOR | V_INFO_GRAPHICS | V_INFO_VESA,
640, 480, 8, 16, 8, 1, 640, 480, 8, 16, 8, 1,
GRAPHICS_BUF_BASE, 0x00008000, 0x00008000, 0, 0, GRAPHICS_BUF_BASE, 0x00008000, 0x00008000, 0, 0,
V_INFO_MM_PACKED, 1 }, V_INFO_MM_PACKED, 1 },
#endif
#endif #endif
{ EOT }, { EOT },
}; };
@ -573,7 +579,9 @@ map_gen_mode_num(int type, int color, int mode)
int to; int to;
} mode_map[] = { } mode_map[] = {
{ M_TEXT_80x25, M_PC98_80x25, }, { M_TEXT_80x25, M_PC98_80x25, },
#ifdef LINE30
{ M_TEXT_80x30, M_PC98_80x30, }, { M_TEXT_80x30, M_PC98_80x30, },
#endif
}; };
int i; int i;
@ -677,10 +685,12 @@ static void master_gdc_word_prm(unsigned int wpmtr)
master_gdc_prm((wpmtr >> 8) & 0x00ff); master_gdc_prm((wpmtr >> 8) & 0x00ff);
} }
#ifdef LINE30
static void master_gdc_fifo_empty(void) static void master_gdc_fifo_empty(void)
{ {
while ( (inb(TEXT_GDC) & 4) == 0); while ( (inb(TEXT_GDC) & 4) == 0);
} }
#endif
static void master_gdc_wait_vsync(void) static void master_gdc_wait_vsync(void)
{ {
@ -694,6 +704,7 @@ static void gdc_cmd(unsigned int cmd)
outb( GRAPHIC_GDC+2, cmd); outb( GRAPHIC_GDC+2, cmd);
} }
#ifdef LINE30
static void gdc_prm(unsigned int pmtr) static void gdc_prm(unsigned int pmtr)
{ {
while ( (inb(GRAPHIC_GDC) & 2) != 0); while ( (inb(GRAPHIC_GDC) & 2) != 0);
@ -710,6 +721,7 @@ static void gdc_fifo_empty(void)
{ {
while ( (inb(GRAPHIC_GDC) & 0x04) == 0); while ( (inb(GRAPHIC_GDC) & 0x04) == 0);
} }
#endif
static void gdc_wait_vsync(void) static void gdc_wait_vsync(void)
{ {
@ -717,6 +729,7 @@ static void gdc_wait_vsync(void)
while ( (inb(GRAPHIC_GDC) & 0x20) == 0); while ( (inb(GRAPHIC_GDC) & 0x20) == 0);
} }
#ifdef LINE30
static int check_gdc_clock(void) static int check_gdc_clock(void)
{ {
if ((inb(IO_SYSPORT) & 0x80) == 0){ if ((inb(IO_SYSPORT) & 0x80) == 0){
@ -725,9 +738,11 @@ static int check_gdc_clock(void)
return _2_5MHZ; return _2_5MHZ;
} }
} }
#endif
static void initialize_gdc(unsigned int mode, int isGraph) static void initialize_gdc(unsigned int mode, int isGraph)
{ {
#ifdef LINE30
/* start 30line initialize */ /* start 30line initialize */
int m_mode, s_mode, gdc_clock, hsync_clock; 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(); gdc_wait_vsync();
master_gdc_cmd(isGraph ? _GDC_STOP : _GDC_START); 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 #ifndef GDC_NOGRAPHICS