OpenCores
URL https://opencores.org/ocsvn/s80186/s80186/trunk

Subversion Repositories s80186

[/] [s80186/] [trunk/] [sim/] [display/] [Display.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jamieiles
// Copyright Jamie Iles, 2017
2
//
3
// This file is part of s80x86.
4
//
5
// s80x86 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 3 of the License, or
8
// (at your option) any later version.
9
//
10
// s80x86 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
16
// along with s80x86.  If not, see <http://www.gnu.org/licenses/>.
17
 
18
#pragma once
19
 
20
#include <memory>
21
#include <string>
22
#include <array>
23
 
24
#include "Cursor.h"
25
 
26
class Window;
27
 
28
class Display
29
{
30
public:
31
    Display(unsigned num_rows = 25, unsigned num_cols = 80);
32
    ~Display();
33
 
34
    void set_cursor(unsigned row, unsigned col);
35
    void write_char(uint16_t c);
36
    void refresh(Cursor cursor);
37
 
38
private:
39
    void load_font();
40
 
41
    unsigned num_rows;
42
    unsigned num_cols;
43
    std::unique_ptr<Window> window;
44
    unsigned row;
45
    unsigned col;
46
    std::unique_ptr<uint16_t[]> characters;
47
    char font_bitmap[256 * 8];
48
};

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.