1 /*
2  *  KCemu -- The emulator for the KC85 homecomputer series and much more.
3  *  Copyright (C) 1997-2010 Torsten Paul
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License along
16  *  with this program; if not, write to the Free Software Foundation, Inc.,
17  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef __ui_generic_ui_0_h
21 #define __ui_generic_ui_0_h
22 
23 #include "kc/system.h"
24 
25 #include "ui/generic/ui_base.h"
26 
27 class UI_0 : public UI_Base
28 {
29  public:
30   enum {
31     UI_GENERIC_MODE_Z1013_32x32 = 0,
32     UI_GENERIC_MODE_Z1013_64x16 = 1,
33     UI_GENERIC_MODE_GDC         = 2,
34   };
35 
36  protected:
37   byte_t *_font;
38   byte_t *_pix_cache;
39   byte_t *_col_cache;
40 
41   int     _mode;
42 
43  protected:
44   void init(void);
45   void dispose(void);
46   inline void generic_put_pixels(byte_t *ptr, byte_t val, word_t color);
47 
48   virtual void generic_update_gdc(byte_t *font, bool clear_cache);
49   virtual void generic_update_32x32(byte_t *font, bool clear_cache);
50   virtual void generic_update_64x16(byte_t *font, bool clear_cache);
51 
52 public:
53   UI_0(void);
54   virtual ~UI_0(void);
55 
56   virtual int  generic_get_mode(void);
57   virtual void generic_set_mode(int mode);
58 
59   virtual void generic_signal_v_retrace(bool value);
60 
61   virtual void generic_update(Scanline *scanline, MemAccess *memaccess, bool clear_cache);
62 };
63 
64 #endif /* __ui_generic_ui_0_h */
65