trunk/src/mess/drivers/hh_tms1k.c
| r244633 | r244634 | |
| 42 | 42 | m_display_maxx(0) |
| 43 | 43 | { } |
| 44 | 44 | |
| 45 | // devices |
| 45 | 46 | required_device<cpu_device> m_maincpu; |
| 46 | 47 | optional_ioport_array<7> m_inp_matrix; // max 7 |
| 47 | 48 | optional_device<speaker_sound_device> m_speaker; |
| 48 | 49 | |
| 50 | // misc common |
| 49 | 51 | UINT16 m_r; |
| 50 | 52 | UINT16 m_o; |
| 51 | 53 | UINT16 m_inp_mux; |
| 52 | 54 | bool m_power_on; |
| 53 | 55 | |
| 56 | UINT8 read_inputs(int columns); |
| 57 | DECLARE_INPUT_CHANGED_MEMBER(tms0980_power_button); |
| 58 | DECLARE_WRITE_LINE_MEMBER(tms0980_auto_power_off); |
| 59 | |
| 60 | virtual void machine_start(); |
| 61 | virtual void machine_reset(); |
| 62 | |
| 63 | // display common |
| 54 | 64 | int m_display_wait; |
| 55 | 65 | int m_display_maxy; |
| 56 | 66 | int m_display_maxx; |
| r244633 | r244634 | |
| 61 | 71 | UINT16 m_7seg_mask[0x20]; |
| 62 | 72 | |
| 63 | 73 | TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); |
| 64 | | bool index_is_7segled(int index); |
| 65 | 74 | void display_update(); |
| 66 | 75 | |
| 67 | | UINT8 read_inputs(int columns); |
| 68 | | DECLARE_INPUT_CHANGED_MEMBER(tms0980_power_button); |
| 69 | | DECLARE_WRITE_LINE_MEMBER(tms0980_auto_power_off); |
| 70 | | |
| 71 | 76 | // game-specific handlers |
| 72 | 77 | void mathmagi_display(); |
| 73 | 78 | DECLARE_READ8_MEMBER(mathmagi_read_k); |
| r244633 | r244634 | |
| 131 | 136 | DECLARE_READ8_MEMBER(unk3403_read_k); |
| 132 | 137 | DECLARE_WRITE16_MEMBER(unk3403_write_r); |
| 133 | 138 | DECLARE_WRITE16_MEMBER(unk3403_write_o); |
| 134 | | |
| 135 | | virtual void machine_start(); |
| 136 | | virtual void machine_reset(); |
| 137 | 139 | }; |
| 138 | 140 | |
| 139 | 141 | |
| r244633 | r244634 | |
| 144 | 146 | memset(m_display_cache, 0, sizeof(m_display_cache)); |
| 145 | 147 | memset(m_display_decay, 0, sizeof(m_display_decay)); |
| 146 | 148 | memset(m_7seg_mask, 0, sizeof(m_7seg_mask)); |
| 147 | | |
| 149 | |
| 148 | 150 | m_o = 0; |
| 149 | 151 | m_r = 0; |
| 150 | 152 | m_inp_mux = 0; |