提交 0add30cf 编写于 作者: A aurel32

G364 video adapter enhancement

This patch improves G364 video card emulation (used in MIPS Magnum machine):
- Use memory dirty tracking to not refresh whole screen each time
- Use macros for debugging messages
- Add support for hardware cursor
- Handle Y-panning
- Raise irq at each screen redraw
- Support retrieving of some registers
- Add load/save support

The emulation has been tested in Linux 2.1 and Windows NT 3.5, in
640x480, 800x600, 1024x768 and 1280x1024 resolutions.
Signed-off-by: NHervé Poussineau <hpoussin@reactos.org>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6356 c046a42c-6fe2-441c-8c8c-71466251a162
上级 f0f2f976
此差异已折叠。
/*
* QEMU G364 framebuffer Emulator.
*
* Copyright (c) 2007 Hervé Poussineau
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
static void glue(g364fb_draw_graphic, BPP)(G364State *s, int full_update)
{
int i, j;
int w_display;
uint8_t *data_buffer;
uint8_t *data_display, *dd;
data_buffer = s->vram_buffer;
w_display = s->scr_width * PIXEL_WIDTH / 8;
data_display = ds_get_data(s->ds);
for(i = 0; i < s->scr_height; i++) {
dd = data_display;
for (j = 0; j < s->scr_width; j++, dd += PIXEL_WIDTH / 8, data_buffer++) {
uint8_t index = *data_buffer;
*((glue(glue(uint, PIXEL_WIDTH), _t) *)dd) = glue(rgb_to_pixel, BPP)(
s->palette[index][0],
s->palette[index][1],
s->palette[index][2]);
}
data_display += ds_get_linesize(s->ds);
}
}
......@@ -10,8 +10,10 @@ void *ds1225y_init(target_phys_addr_t mem_base, const char *filename);
void ds1225y_set_protection(void *opaque, int protection);
/* g364fb.c */
int g364fb_mm_init(int vram_size, int it_shift,
target_phys_addr_t vram_base, target_phys_addr_t ctrl_base);
int g364fb_mm_init(uint8_t *vram, ram_addr_t vram_offset,
int vram_size, target_phys_addr_t vram_base,
target_phys_addr_t ctrl_base, int it_shift,
qemu_irq irq);
/* mipsnet.c */
void mipsnet_init(int base, qemu_irq irq, NICInfo *nd);
......
......@@ -201,7 +201,8 @@ void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size,
/* Video card */
switch (jazz_model) {
case JAZZ_MAGNUM:
g364fb_mm_init(vga_ram_size, 0, 0x40000000, 0x60000000);
g364fb_mm_init(phys_ram_base + ram_size, ram_size, vga_ram_size,
0x40000000, 0x60000000, 0, rc4030[3]);
break;
case JAZZ_PICA61:
isa_vga_mm_init(phys_ram_base + ram_size, ram_size, vga_ram_size,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册