Major video changes of the day (October 3rd, 2024)

8514/A changes:
1. Correct interlaced display resolution.
2. Added a limit to cursor coordinates.
3. Test/WIP features of the add-on Mach8 side (ATI 8514/A Ultra) such as configurable BIOS.
4. Made the CMD 5 of the acceleration (Polygon Boundary) more accurate per manual (as much as I could regarding the clipping).

Cirrus related:
1. Added SUBSYS PCI vendor/device ID of the 5480 (per manual).

IBM VGA:
1. Built-in/option rom-less VGA don't need the "available" flag.

ATI Mach8/32:
1. As with 8514/A, corrected interlaced display.

XGA-1/-2:
1. Moved the XGA R/W memory size tests out of the SVGA R/W routines to reflect the per card basis, although anything that uses its own SVGA mapping would call the tests there (such as Cirrus, Headland and ATI) when not accessing the LFB. This finally puts an end to the XGA MCA mapping enabling bugs.
2. Re-organized the ISA standalone and non-standalone (INMOS) sides of the chips so that they work properly and remove the FILE rom loading hack from init.
3. The Memory Mapped R/W sides now account for instance in their address range.
4. INMOS only: prevent any ROM address access to anything lower than 0xc8000 to not conflict with the main BIOS rom loading.
5. Fixed native pitch by using the correct register, this fixes non 1024x768 resolutions under NT.
6. More logs when enabled to see any future bugs.
This commit is contained in:
TC1995
2024-10-03 14:56:23 +02:00
parent 8899b1411b
commit f102fee497
12 changed files with 513 additions and 414 deletions

View File

@@ -41,6 +41,8 @@ typedef union {
typedef struct ibm8514_t {
rom_t bios_rom;
rom_t bios_rom2;
rom_t bios_rom3;
hwcursor8514_t hwcursor;
hwcursor8514_t hwcursor_latch;
uint8_t pos_regs[8];

View File

@@ -171,9 +171,11 @@ typedef struct svga_t {
pc_timer_t timer;
pc_timer_t timer8514;
pc_timer_t timer_xga;
double clock;
double clock8514;
double clock_xga;
double multiplier;
@@ -319,9 +321,13 @@ extern void ati8514_pos_write(uint16_t port, uint8_t val, void *priv);
extern void ati8514_init(svga_t *svga, void *ext8514, void *dev8514);
#endif
extern void xga_poll(void *priv, svga_t *svga);
extern void xga_write_test(uint32_t addr, uint8_t val, void *priv);
extern uint8_t xga_read_test(uint32_t addr, void *priv);
extern void xga_poll(void *priv);
extern void xga_recalctimings(svga_t *svga);
extern uint32_t svga_decode_addr(svga_t *svga, uint32_t addr, int write);
extern int svga_init(const device_t *info, svga_t *svga, void *priv, int memsize,
void (*recalctimings_ex)(struct svga_t *svga),
uint8_t (*video_in)(uint16_t addr, void *priv),

View File

@@ -28,9 +28,7 @@ typedef struct vga_t {
rom_t bios_rom;
} vga_t;
static video_timings_t timing_vga = { VIDEO_ISA, 8, 16, 32, 8, 16, 32 };
void vga_out(uint16_t addr, uint8_t val, void *priv);
uint8_t vga_in(uint16_t addr, void *priv);
extern void vga_out(uint16_t addr, uint8_t val, void *priv);
extern uint8_t vga_in(uint16_t addr, void *priv);
#endif /*VIDEO_VGA_H*/

View File

@@ -31,10 +31,12 @@ typedef struct xga_hwcursor_t {
} xga_hwcursor_t;
typedef struct xga_t {
mem_mapping_t membios_mapping;
mem_mapping_t memio_mapping;
mem_mapping_t linear_mapping;
mem_mapping_t video_mapping;
rom_t bios_rom;
rom_t membios_rom;
rom_t vga_bios_rom;
xga_hwcursor_t hwcursor;
xga_hwcursor_t hwcursor_latch;
@@ -47,8 +49,8 @@ typedef struct xga_t {
uint8_t pos_regs[8];
uint8_t disp_addr;
uint8_t dac_mask;
uint8_t dac_status;
uint8_t dac_mask;
uint8_t dac_status;
uint8_t cfg_reg;
uint8_t instance;
uint8_t op_mode;
@@ -87,6 +89,8 @@ typedef struct xga_t {
uint8_t instance_isa;
uint8_t instance_num;
uint8_t ext_mem_addr;
uint8_t vga_post;
uint8_t addr_test;
uint8_t *vram;
uint8_t *changedvram;
@@ -167,6 +171,9 @@ typedef struct xga_t {
uint32_t write_bank;
uint32_t px_map_base;
uint32_t pallook[512];
uint32_t bios_diag;
PALETTE xgapal;
uint64_t dispontime;
uint64_t dispofftime;