Merge pull request #3929 from Cacodemon345/mga-busmastering-fixes
MGA: Gamma-correct hardware cursor
This commit is contained in:
@@ -337,6 +337,8 @@ enum {
|
|||||||
RAMDAC_8BIT
|
RAMDAC_8BIT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
uint32_t svga_lookup_lut_ram(svga_t* svga, uint32_t val);
|
||||||
|
|
||||||
/* We need a way to add a device with a pointer to a parent device so it can attach itself to it, and
|
/* We need a way to add a device with a pointer to a parent device so it can attach itself to it, and
|
||||||
possibly also a second ATi 68860 RAM DAC type that auto-sets SVGA render on RAM DAC render change. */
|
possibly also a second ATi 68860 RAM DAC type that auto-sets SVGA render on RAM DAC render change. */
|
||||||
extern void ati68860_ramdac_out(uint16_t addr, uint8_t val, void *priv, svga_t *svga);
|
extern void ati68860_ramdac_out(uint16_t addr, uint8_t val, void *priv, svga_t *svga);
|
||||||
|
@@ -5404,7 +5404,7 @@ mystique_hwcursor_draw(svga_t *svga, int displine)
|
|||||||
case XCURCTRL_CURMODE_XGA:
|
case XCURCTRL_CURMODE_XGA:
|
||||||
for (uint8_t x = 0; x < 64; x++) {
|
for (uint8_t x = 0; x < 64; x++) {
|
||||||
if (!(dat[1] & (1ULL << 63)))
|
if (!(dat[1] & (1ULL << 63)))
|
||||||
svga->monitor->target_buffer->line[displine][offset + svga->x_add] = (dat[0] & (1ULL << 63)) ? mystique->cursor.col[1] : mystique->cursor.col[0];
|
svga->monitor->target_buffer->line[displine][offset + svga->x_add] = (dat[0] & (1ULL << 63)) ? svga_lookup_lut_ram(svga, mystique->cursor.col[1]) : svga_lookup_lut_ram(svga, mystique->cursor.col[0]);
|
||||||
else if (dat[0] & (1ULL << 63))
|
else if (dat[0] & (1ULL << 63))
|
||||||
svga->monitor->target_buffer->line[displine][offset + svga->x_add] ^= 0xffffff;
|
svga->monitor->target_buffer->line[displine][offset + svga->x_add] ^= 0xffffff;
|
||||||
|
|
||||||
|
@@ -30,8 +30,8 @@
|
|||||||
#include <86box/vid_svga_render.h>
|
#include <86box/vid_svga_render.h>
|
||||||
#include <86box/vid_svga_render_remap.h>
|
#include <86box/vid_svga_render_remap.h>
|
||||||
|
|
||||||
static inline uint32_t
|
uint32_t
|
||||||
lookup_lut_ram(svga_t* svga, uint32_t val)
|
svga_lookup_lut_ram(svga_t* svga, uint32_t val)
|
||||||
{
|
{
|
||||||
if (!svga->lut_map)
|
if (!svga->lut_map)
|
||||||
return val;
|
return val;
|
||||||
@@ -42,7 +42,7 @@ lookup_lut_ram(svga_t* svga, uint32_t val)
|
|||||||
return makecol32(r, g, b) | (val & 0xFF000000);
|
return makecol32(r, g, b) | (val & 0xFF000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define lookup_lut(val) lookup_lut_ram(svga, val)
|
#define lookup_lut(val) svga_lookup_lut_ram(svga, val)
|
||||||
|
|
||||||
void
|
void
|
||||||
svga_render_null(svga_t *svga)
|
svga_render_null(svga_t *svga)
|
||||||
|
Reference in New Issue
Block a user