Merge branch 'master' into experimental
This commit is contained in:
@@ -45,6 +45,7 @@ static int old_overscan_color = 0;
|
||||
|
||||
int update_overscan = 0;
|
||||
|
||||
#ifdef JEGA
|
||||
uint8_t jfont_sbcs_19[SBCS19_LEN]; /* 256 * 19( * 8) */
|
||||
uint8_t jfont_dbcs_16[DBCS16_LEN]; /* 65536 * 16 * 2 (* 8) */
|
||||
|
||||
@@ -146,6 +147,7 @@ void ega_jega_read_font(ega_t *ega)
|
||||
ega->font_index++;
|
||||
ega->RSTAT |= 0x02;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ega_out(uint16_t addr, uint8_t val, void *p)
|
||||
{
|
||||
@@ -259,7 +261,11 @@ void ega_out(uint16_t addr, uint8_t val, void *p)
|
||||
return;
|
||||
case 0x3d1:
|
||||
case 0x3d5:
|
||||
#ifdef JEGA
|
||||
if ((ega->crtcreg < 0xb9) || !ega->is_jega)
|
||||
#else
|
||||
if (ega->crtcreg < 0xb9)
|
||||
#endif
|
||||
{
|
||||
crtcreg = ega->crtcreg & 0x1f;
|
||||
if (crtcreg <= 7 && ega->crtc[0x11] & 0x80) return;
|
||||
@@ -274,6 +280,7 @@ void ega_out(uint16_t addr, uint8_t val, void *p)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef JEGA
|
||||
else
|
||||
{
|
||||
switch(ega->crtcreg)
|
||||
@@ -331,6 +338,7 @@ void ega_out(uint16_t addr, uint8_t val, void *p)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -391,11 +399,16 @@ uint8_t ega_in(uint16_t addr, void *p)
|
||||
return ega->crtcreg;
|
||||
case 0x3d1:
|
||||
case 0x3d5:
|
||||
#ifdef JEGA
|
||||
if ((ega->crtcreg < 0xb9) || !ega->is_jega)
|
||||
#else
|
||||
if (ega->crtcreg < 0xb9)
|
||||
#endif
|
||||
{
|
||||
crtcreg = ega->crtcreg & 0x1f;
|
||||
return ega->crtc[crtcreg];
|
||||
}
|
||||
#ifdef JEGA
|
||||
else
|
||||
{
|
||||
switch(ega->crtcreg)
|
||||
@@ -434,6 +447,8 @@ uint8_t ega_in(uint16_t addr, void *p)
|
||||
return 0x00;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 0xff;
|
||||
case 0x3da:
|
||||
ega->attrff = 0;
|
||||
ega->stat ^= 0x30; /*Fools IBM EGA video BIOS self-test*/
|
||||
@@ -534,6 +549,7 @@ void ega_poll(void *p)
|
||||
{
|
||||
if (fullchange)
|
||||
{
|
||||
#ifdef JEGA
|
||||
if (ega_jega_enabled(ega))
|
||||
{
|
||||
ega_render_text_jega(ega, drawcursor);
|
||||
@@ -542,6 +558,9 @@ void ega_poll(void *p)
|
||||
{
|
||||
ega_render_text_standard(ega, drawcursor);
|
||||
}
|
||||
#else
|
||||
ega_render_text_standard(ega, drawcursor);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1016,7 +1035,9 @@ void ega_common_defaults(ega_t *ega)
|
||||
|
||||
update_overscan = 0;
|
||||
|
||||
#ifdef JEGA
|
||||
ega->is_jega = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void *ega_standalone_init()
|
||||
@@ -1138,6 +1159,7 @@ void *sega_standalone_init()
|
||||
return ega;
|
||||
}
|
||||
|
||||
#ifdef JEGA
|
||||
uint16_t chrtosht(FILE *fp)
|
||||
{
|
||||
uint16_t i, j;
|
||||
@@ -1243,6 +1265,7 @@ void *jega_standalone_init()
|
||||
|
||||
return ega;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ega_standalone_available()
|
||||
{
|
||||
@@ -1337,6 +1360,7 @@ device_t sega_device =
|
||||
ega_config
|
||||
};
|
||||
|
||||
#ifdef JEGA
|
||||
device_t jega_device =
|
||||
{
|
||||
"AX JEGA",
|
||||
@@ -1349,3 +1373,4 @@ device_t jega_device =
|
||||
NULL,
|
||||
ega_config
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -91,11 +91,13 @@ typedef struct ega_t
|
||||
|
||||
int video_res_x, video_res_y, video_bpp;
|
||||
|
||||
#ifdef JEGA
|
||||
uint8_t RMOD1, RMOD2, RDAGS, RDFFB, RDFSB, RDFAP, RPESL, RPULP, RPSSC, RPSSU, RPSSL;
|
||||
uint8_t RPPAJ;
|
||||
uint8_t RCMOD, RCCLH, RCCLL, RCCSL, RCCEL, RCSKW, ROMSL, RSTAT;
|
||||
int is_jega, font_index;
|
||||
int chr_left, chr_wide;
|
||||
#endif
|
||||
} ega_t;
|
||||
|
||||
extern int update_overscan;
|
||||
@@ -113,6 +115,7 @@ extern device_t ega_device;
|
||||
extern device_t cpqega_device;
|
||||
extern device_t sega_device;
|
||||
|
||||
#ifdef JEGA
|
||||
#define SBCS 0
|
||||
#define DBCS 1
|
||||
#define ID_LEN 6
|
||||
@@ -122,3 +125,4 @@ extern device_t sega_device;
|
||||
|
||||
extern uint8_t jfont_sbcs_19[SBCS19_LEN]; /* 256 * 19( * 8) */
|
||||
extern uint8_t jfont_dbcs_16[DBCS16_LEN]; /* 65536 * 16 * 2 (* 8) */
|
||||
#endif
|
||||
|
||||
@@ -146,6 +146,7 @@ void ega_render_text_standard(ega_t *ega, int drawcursor)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef JEGA
|
||||
static __inline int is_kanji1(uint8_t chr)
|
||||
{
|
||||
return (chr >= 0x81 && chr <= 0x9f) || (chr >= 0xe0 && chr <= 0xfc);
|
||||
@@ -374,6 +375,7 @@ void ega_render_text_jega(ega_t *ega, int drawcursor)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void ega_render_2bpp_lowres(ega_t *ega)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,9 @@ extern uint8_t edatlookup[4][4];
|
||||
|
||||
void ega_render_blank(ega_t *ega);
|
||||
void ega_render_text_standard(ega_t *ega, int drawcursor);
|
||||
#ifdef JEGA
|
||||
void ega_render_text_jega(ega_t *ega, int drawcursor);
|
||||
#endif
|
||||
|
||||
void ega_render_2bpp_lowres(ega_t *ega);
|
||||
void ega_render_2bpp_highres(ega_t *ega);
|
||||
|
||||
Reference in New Issue
Block a user