/*
* Copyright (c) 1994 Christian E. Hopps
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Christian E. Hopps.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if ! defined (_GRFABS_CCREG_H)
#define _GRFABS_CCREG_H
typedef colormap_t *alloc_colormap_func (int);
typedef struct monitor_data {
LIST_HEAD(modelist, display_mode) modes; /* a list of supported modes. */
dmode_t *current_mode;
u_long flags; /* monitor flags. */
} mdata_t;
typedef struct display_mode_data {
monitor_t * monitor; /* the monitor that owns this mode. */
view_t * current_view; /* current view to be displayed. */
cop_t **frames;
u_short hedley_current; /* current hedley quadrent. */
u_short bplcon0; /* bplcon0 data. */
u_short std_start_x;
u_short std_start_y;
#if defined (GRF_ECS) || defined (GRF_AGA)
/* ECS registers. */
u_short beamcon0;
u_short hbstart; /* no modes use the rest of these */
u_short hbstop; /* ECS registers. */
u_short hsstart;
u_short hsstop;
u_short vbstart;
u_short vbstop;
u_short vsstart;
u_short vsstop;
#endif
/* some limit stuff. */
dimen_t max_size; /* largest fit. */
dimen_t min_size; /* smallest fit. */
u_short min_depth;
u_short max_depth;
u_long flags; /* mode specific flags. */
use_colormap_func *use_colormap;
get_colormap_func *get_colormap;
alloc_colormap_func *alloc_colormap;
display_view_func *display_view;
vbl_handler_func *vbl_handler; /* gets called every vertical blank. */
/* when this is the current mode.*/
} dmdata_t;
typedef struct view_data {
dmode_t *mode; /* the mode for this view */
colormap_t *colormap;
u_long flags; /* view specific flags. */
} vdata_t;
enum view_flag_bits {
VB_DISPLAY,
};
enum view_flags {
VF_DISPLAY = 1 << VB_DISPLAY, /* set if view is being displayed */
};
/*
* This that are in grfabs_ccglb.c
*/
#if defined (GRF_A2024)
# if defined (GRF_PAL)
extern cop_t std_pal_a2024_copper_list[];
extern int std_pal_a2024_copper_list_len;
extern int std_pal_a2024_copper_list_size;
# endif
# if defined (GRF_NTSC)
extern cop_t std_a2024_copper_list[];
extern int std_a2024_copper_list_len;
extern int std_a2024_copper_list_size;
# endif
extern cop_t std_dlace_copper_list[];
extern int std_dlace_copper_list_len;
extern int std_dlace_copper_list_size;