[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the Ma
From: |
Laurent Vivier |
Subject: |
Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM |
Date: |
Tue, 5 Oct 2021 11:50:50 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
Le 04/10/2021 à 23:19, Mark Cave-Ayland a écrit :
> The monitor modes table is found by experimenting with the Monitors Control
> Panel in MacOS and analysing the reads/writes. From this it can be found that
> the mode is controlled by writes to the DAFB_MODE_CTRL1 and DAFB_MODE_CTRL2
> registers.
>
> Implement the first block of DAFB registers as a register array including the
> existing sense register, the newly discovered control registers above, and
> also
> the DAFB_MODE_VADDR1 and DAFB_MODE_VADDR2 registers which are used by NetBSD
> to
> determine the current video mode.
>
> These experiments also show that the offset of the start of video RAM and the
> stride can change depending upon the monitor mode, so update
> macfb_draw_graphic()
> and both the BI_MAC_VADDR and BI_MAC_VROW bootinfo for the q800 machine
> accordingly.
>
> Finally update macfb_common_realize() so that only the resolution and depth
> supported by the display type can be specified on the command line.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
> ---
> hw/display/macfb.c | 124 ++++++++++++++++++++++++++++++++-----
> hw/display/trace-events | 1 +
> hw/m68k/q800.c | 11 ++--
> include/hw/display/macfb.h | 16 ++++-
> 4 files changed, 131 insertions(+), 21 deletions(-)
>
> diff --git a/hw/display/macfb.c b/hw/display/macfb.c
> index f98bcdec2d..357fe18be5 100644
> --- a/hw/display/macfb.c
> +++ b/hw/display/macfb.c
>
...
> +static MacFbMode *macfb_find_mode(MacfbDisplayType display_type,
> + uint16_t width, uint16_t height,
> + uint8_t depth)
> +{
> + MacFbMode *macfb_mode;
> + int i;
> +
> + for (i = 0; i < ARRAY_SIZE(macfb_mode_table); i++) {
> + macfb_mode = &macfb_mode_table[i];
> +
> + if (display_type == macfb_mode->type && width == macfb_mode->width &&
> + height == macfb_mode->height && depth == macfb_mode->depth) {
> + return macfb_mode;
> + }
> + }
> +
> + return NULL;
> +}
> +
I misunderstood this part when I reviewed v1...
It means you have to provide the monitor type to QEMU to switch from the
default mode?
But, as a user, how do we know which modes are allowed with which resolution?
Is possible to try to set internally the type here according to the resolution?
Could you provide an command line example how to start the q800 with the
1152x870 resolution?
Thanks,
Laurent
- Re: [PATCH v2 01/12] macfb: handle errors that occur during realize, (continued)
- [PATCH v2 02/12] macfb: fix invalid object reference in macfb_common_realize(), Mark Cave-Ayland, 2021/10/04
- [PATCH v2 03/12] macfb: fix overflow of color_palette array, Mark Cave-Ayland, 2021/10/04
- [PATCH v2 04/12] macfb: use memory_region_init_ram() in macfb_common_realize() for the framebuffer, Mark Cave-Ayland, 2021/10/04
- [PATCH v2 05/12] macfb: add trace events for reading and writing the control registers, Mark Cave-Ayland, 2021/10/04
- [PATCH v2 06/12] macfb: implement mode sense to allow display type to be detected, Mark Cave-Ayland, 2021/10/04
- [PATCH v2 07/12] macfb: add qdev property to specify display type, Mark Cave-Ayland, 2021/10/04
- [PATCH v2 10/12] macfb: fix 24-bit RGB pixel encoding, Mark Cave-Ayland, 2021/10/04
- [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Mark Cave-Ayland, 2021/10/04
- Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM,
Laurent Vivier <=
- Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Mark Cave-Ayland, 2021/10/05
- Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Laurent Vivier, 2021/10/05
- Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Mark Cave-Ayland, 2021/10/05
- Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Laurent Vivier, 2021/10/06
- Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Mark Cave-Ayland, 2021/10/06
- Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Laurent Vivier, 2021/10/06
- Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Mark Cave-Ayland, 2021/10/06
- Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Laurent Vivier, 2021/10/06
- Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Laurent Vivier, 2021/10/06
- Re: [PATCH v2 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Mark Cave-Ayland, 2021/10/07