Reworked the RAMDAC and clock chip initialization - now they're all device_t's;

Moved the BT48x hardware cursor draw function to the RAMDAC's code where it belongs;
Renamed the BT48x RAMDAC code file to vid_bt48x_ramdac.c (was vid_bt485_ramdac.c);
Fixed BT48x 64x64 hardware cursor bugs (caused by the index variable being uint8_t when it should have been uint16_t) introduced in the previous commit.
This commit is contained in:
OBattler
2018-10-05 01:54:54 +02:00
parent 706e819ca2
commit f81574b419
27 changed files with 1514 additions and 1071 deletions

View File

@@ -11,7 +11,7 @@
* This is intended to be used by another SVGA driver,
* and not as a card in it's own right.
*
* Version: @(#)vid_svga.c 1.0.32 2018/10/04
* Version: @(#)vid_svga.c 1.0.33 2018/10/04
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -75,14 +75,6 @@ svga_set_override(svga_t *svga, int val)
}
/* Used to add custom write modes, eg. by the CL-GD 54xx to add write modes 4 and 5. */
void
svga_set_ven_write(svga_t *svga, void (*ven_write)(struct svga_t *svga, uint8_t val, uint32_t addr))
{
svga->ven_write = ven_write;
}
void
svga_out(uint16_t addr, uint8_t val, void *p)
{
@@ -803,6 +795,9 @@ svga_init(svga_t *svga, void *p, int memsize,
svga->hwcursor_draw = hwcursor_draw;
svga->overlay_draw = overlay_draw;
svga->hwcursor.xsize = svga->hwcursor.ysize = 32;
svga->hwcursor.yoff = 32;
mem_mapping_add(&svga->mapping, 0xa0000, 0x20000,
svga_read, svga_readw, svga_readl,
svga_write, svga_writew, svga_writel,