435262605f
Jazz Jackrabbit has a very unusual VGA setup, where it uses odd/even mode with 256-color graphics. Probably, it wants to use fast VRAM-to-VRAM copies without having to store 4 copies of the sprites as needed in mode X, one for each mod-4 alignment; odd/even mode simplifies the code a lot if it's okay to place on a 160-pixels horizontal grid. At the same time, because it wants to use double buffering (a la "mode X") it uses byte mode, not word mode as is the case in text modes. In order to implement the combination of odd/even mode (plane number comes from bit 0 of the address) and byte mode (use all bytes of VRAM, whereas word mode only uses bytes 0, 2, 4,... on each of the four planes), we need to separate the effect on the plane number from the effect on the address. Implementing the modes properly is a mess in QEMU, because it would change the layout of VRAM and break migration. As an approximation, shift right when the CPU accesses memory instead of shifting left when the CRT controller reads it. A hack is needed in order to write font data properly (see comment in the code), but it works well enough for the game. Because doubleword and chain4 modes are now independent, chain4 does not assert anymore that the address is in range. Instead it just returns all ones and discards writes, like other modes. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
acpi-vga-stub.c | ||
acpi-vga.c | ||
artist.c | ||
ati_2d.c | ||
ati_dbg.c | ||
ati_int.h | ||
ati_regs.h | ||
ati.c | ||
bcm2835_fb.c | ||
blizzard.c | ||
bochs-display.c | ||
cg3.c | ||
cirrus_vga_internal.h | ||
cirrus_vga_isa.c | ||
cirrus_vga_rop2.h | ||
cirrus_vga_rop.h | ||
cirrus_vga.c | ||
dpcd.c | ||
edid-generate.c | ||
edid-region.c | ||
exynos4210_fimd.c | ||
framebuffer.c | ||
framebuffer.h | ||
g364fb.c | ||
i2c-ddc.c | ||
jazz_led.c | ||
Kconfig | ||
macfb.c | ||
meson.build | ||
next-fb.c | ||
omap_dss.c | ||
omap_lcdc.c | ||
pl110_template.h | ||
pl110.c | ||
pxa2xx_lcd.c | ||
qxl-logger.c | ||
qxl-render.c | ||
qxl.c | ||
qxl.h | ||
ramfb-standalone.c | ||
ramfb.c | ||
sii9022.c | ||
sm501.c | ||
ssd0303.c | ||
ssd0323.c | ||
tc6393xb.c | ||
tcx.c | ||
trace-events | ||
trace.h | ||
vga_int.h | ||
vga_regs.h | ||
vga-access.h | ||
vga-helpers.h | ||
vga-isa.c | ||
vga-mmio.c | ||
vga-pci.c | ||
vga.c | ||
vhost-user-gpu-pci.c | ||
vhost-user-gpu.c | ||
vhost-user-vga.c | ||
virtio-dmabuf.c | ||
virtio-gpu-base.c | ||
virtio-gpu-gl.c | ||
virtio-gpu-pci-gl.c | ||
virtio-gpu-pci-rutabaga.c | ||
virtio-gpu-pci.c | ||
virtio-gpu-rutabaga.c | ||
virtio-gpu-udmabuf-stubs.c | ||
virtio-gpu-udmabuf.c | ||
virtio-gpu-virgl.c | ||
virtio-gpu.c | ||
virtio-vga-gl.c | ||
virtio-vga-rutabaga.c | ||
virtio-vga.c | ||
virtio-vga.h | ||
vmware_vga.c | ||
xenfb.c | ||
xlnx_dp.c |