aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/qapi/source.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-12-29 14:56:24 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2024-01-18 10:43:14 +0100
commit435262605fa2737af73b7057f525f8fe221c1006 (patch)
treec0e44cc644aa3262941b19d4c5d36537498360d2 /scripts/qapi/source.py
parentvga: use latches in odd/even mode too (diff)
downloadqemu-435262605fa2737af73b7057f525f8fe221c1006.tar.xz
qemu-435262605fa2737af73b7057f525f8fe221c1006.zip
vga: sort-of implement word and double-word access modes
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>
Diffstat (limited to 'scripts/qapi/source.py')
0 files changed, 0 insertions, 0 deletions