Mach64 font fix about Solaris. (September 13th, 2024)

The so called "NT 3.5 font fix" on the Mach64 applies only to the Source Control reg with bits 2-3 set, but Solaris only sets bit 2 (without bit 3), so, don't align the source with bit 3 cleared. This fixes the garbled fonts under Solaris using said card.
This commit is contained in:
TC1995
2024-09-13 13:51:20 +02:00
parent fe5177fd00
commit 8e4cd08a19

View File

@@ -333,7 +333,8 @@ enum {
enum {
SRC_PATT_EN = 1,
SRC_PATT_ROT_EN = 2,
SRC_LINEAR_EN = 4
SRC_LINEAR_EN = 4,
SRC_BYTE_ALIGN = 8
};
enum {
@@ -1280,6 +1281,14 @@ mach64_queue(mach64_t *mach64, uint32_t addr, uint32_t val, uint32_t type)
void
mach64_start_fill(mach64_t *mach64)
{
mach64->accel.dst_pix_width = mach64->dp_pix_width & 7;
mach64->accel.src_pix_width = (mach64->dp_pix_width >> 8) & 7;
mach64->accel.host_pix_width = (mach64->dp_pix_width >> 16) & 7;
mach64->accel.dst_size = mach64_width[mach64->accel.dst_pix_width];
mach64->accel.src_size = mach64_width[mach64->accel.src_pix_width];
mach64->accel.host_size = mach64_width[mach64->accel.host_pix_width];
mach64->accel.dst_x = 0;
mach64->accel.dst_y = 0;
@@ -1293,7 +1302,8 @@ mach64_start_fill(mach64_t *mach64)
mach64->accel.dst_width = (mach64->dst_height_width >> 16) & 0x1fff;
mach64->accel.dst_height = mach64->dst_height_width & 0x1fff;
if (((mach64->dp_src >> 16) & 7) == MONO_SRC_BLITSRC) {
if ((((mach64->dp_src >> 16) & 7) == MONO_SRC_BLITSRC) &&
((mach64->src_cntl & (SRC_LINEAR_EN | SRC_BYTE_ALIGN)) == (SRC_LINEAR_EN | SRC_BYTE_ALIGN))) {
if (mach64->accel.dst_width & 7)
mach64->accel.dst_width = (mach64->accel.dst_width & ~7) + 8;
}
@@ -1345,14 +1355,6 @@ mach64_start_fill(mach64_t *mach64)
mach64->accel.source_fg = (mach64->dp_src >> 8) & 7;
mach64->accel.source_mix = (mach64->dp_src >> 16) & 7;
mach64->accel.dst_pix_width = mach64->dp_pix_width & 7;
mach64->accel.src_pix_width = (mach64->dp_pix_width >> 8) & 7;
mach64->accel.host_pix_width = (mach64->dp_pix_width >> 16) & 7;
mach64->accel.dst_size = mach64_width[mach64->accel.dst_pix_width];
mach64->accel.src_size = mach64_width[mach64->accel.src_pix_width];
mach64->accel.host_size = mach64_width[mach64->accel.host_pix_width];
if (mach64->accel.src_size == WIDTH_1BIT)
mach64->accel.src_offset <<= 3;
else
@@ -1861,6 +1863,7 @@ mach64_blit(uint32_t cpu_dat, int count, mach64_t *mach64)
cpu_dat >>= (count & 7);
else
cpu_dat <<= (count & 7);
count &= ~7;
}
}