OSDN Git Service

[VM][FMTOWNS][MEMORY] Fix setup around memory banks by I/O 0404h and 0480h.
[csp-qt/common_source_project-fm7.git] / source / src / vm / babbage2nd / display.h
1 /*
2         Gijutsu-Hyoron-Sha Babbage-2nd Emulator 'eBabbage-2nd'
3
4         Author : Takeda.Toshiya
5         Date   : 2009.12.26 -
6
7         [ display ]
8 */
9
10 #ifndef _DISPLAY_H_
11 #define _DISPLAY_H_
12
13 #include "../vm.h"
14 #include "../../emu.h"
15 #include "../device.h"
16
17 #define SIG_DISPLAY_7SEG_LED    0
18 #define SIG_DISPLAY_8BIT_LED    1
19
20 namespace BABBAGE2ND {
21 class DISPLAY : public DEVICE
22 {
23 private:
24         scrntype_t screen[36][256];
25         
26         int seg[6][7];
27         uint8_t ls373;
28         uint8_t pio_7seg;
29         uint8_t pio_8bit;
30         
31 public:
32         DISPLAY(VM_TEMPLATE* parent_vm, EMU_TEMPLATE* parent_emu) : DEVICE(parent_vm, parent_emu)
33         {
34                 set_device_name(_T("7-Segment LEDs"));
35         }
36         ~DISPLAY() {}
37         
38         // common functions
39         void initialize();
40         void __FASTCALL write_signal(int id, uint32_t data, uint32_t mask);
41         void event_vline(int v, int clock);
42         bool process_state(FILEIO* state_fio, bool loading);
43         
44         // unique function
45         void draw_screen();
46 };
47 }
48 #endif
49