src/mess/mslegacy.c
| r1972 | r1973 | |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "deprecat.h" |
| 12 | 12 | #include "mslegacy.h" |
| 13 | | #include "video/mc6845.h" |
| 14 | 13 | |
| 15 | 14 | |
| 16 | 15 | static const char *const mess_default_text[] = |
| r1972 | r1973 | |
| 78 | 77 | |
| 79 | 78 | |
| 80 | 79 | /*************************************************************************** |
| 81 | | PALETTE |
| 82 | | ***************************************************************************/ |
| 83 | | |
| 84 | | void palette_set_colors_rgb(running_machine *machine, pen_t color_base, const UINT8 *colors, int color_count) |
| 85 | | { |
| 86 | | while (color_count--) |
| 87 | | { |
| 88 | | UINT8 r = *colors++; |
| 89 | | UINT8 g = *colors++; |
| 90 | | UINT8 b = *colors++; |
| 91 | | palette_set_color_rgb(machine, color_base++, r, g, b); |
| 92 | | } |
| 93 | | } |
| 94 | | |
| 95 | | |
| 96 | | |
| 97 | | /*************************************************************************** |
| 98 | 80 | UI TEXT |
| 99 | 81 | ***************************************************************************/ |
| 100 | 82 | |
| r1972 | r1973 | |
| 103 | 85 | return mess_default_text[string_num]; |
| 104 | 86 | } |
| 105 | 87 | |
| 106 | | |
| 107 | | |
| 108 | | /*************************************************************************** |
| 109 | | MC6845 |
| 110 | | ***************************************************************************/ |
| 111 | | |
| 112 | | mc6845_t *mslegacy_mc6845; |
| 113 | | |
| 114 | | void crtc6845_config(int index, const mc6845_interface *intf) |
| 115 | | { |
| 116 | | /* NPW 23-Feb-2008 - All usage of 6845 devices has probably been broken here */ |
| 117 | | assert(index == 0); |
| 118 | | mslegacy_mc6845 = devtag_get_token(Machine, MC6845, "crtc"); |
| 119 | | } |
| 120 | | |
| 121 | | |
| 122 | | |
| 123 | | WRITE8_HANDLER(crtc6845_0_address_w) |
| 124 | | { |
| 125 | | device_config *devconf = (device_config *) device_list_find_by_tag(machine->config->devicelist, MC6845, "crtc"); |
| 126 | | mc6845_address_w(devconf, offset, data); |
| 127 | | } |
| 128 | | |
| 129 | | |
| 130 | | |
| 131 | | READ8_HANDLER(crtc6845_0_register_r) |
| 132 | | { |
| 133 | | device_config *devconf = (device_config *) device_list_find_by_tag(machine->config->devicelist, MC6845, "crtc"); |
| 134 | | return mc6845_register_r(devconf, offset); |
| 135 | | } |
| 136 | | |
| 137 | | |
| 138 | | |
| 139 | | WRITE8_HANDLER(crtc6845_0_register_w) |
| 140 | | { |
| 141 | | device_config *devconf = (device_config *) device_list_find_by_tag(machine->config->devicelist, MC6845, "crtc"); |
| 142 | | mc6845_register_w(devconf, offset, data); |
| 143 | | } |
| 144 | | |
| 145 | | |
| 146 | | |
| 147 | | VIDEO_UPDATE(crtc6845) |
| 148 | | { |
| 149 | | mc6845_update(mslegacy_mc6845, bitmap, cliprect); |
| 150 | | return 0; |
| 151 | | } |
src/mess/mslegacy.h
| r1972 | r1973 | |
| 76 | 76 | }; |
| 77 | 77 | |
| 78 | 78 | |
| 79 | | /* palette */ |
| 80 | | void palette_set_colors_rgb(running_machine *machine, pen_t color_base, const UINT8 *colors, int color_count); |
| 81 | 79 | |
| 82 | | |
| 83 | 80 | /* uitext */ |
| 84 | 81 | const char * ui_getstring (int string_num); |
| 85 | 82 | |
| 86 | | |
| 87 | | /* mc6845 */ |
| 88 | | struct _mc6845_t; |
| 89 | | struct _mc6845_interface; |
| 90 | | |
| 91 | | extern struct _mc6845_t *mslegacy_mc6845; |
| 92 | | |
| 93 | | WRITE8_HANDLER(crtc6845_0_address_w); |
| 94 | | READ8_HANDLER(crtc6845_0_register_r); |
| 95 | | WRITE8_HANDLER(crtc6845_0_register_w); |
| 96 | | VIDEO_UPDATE(crtc6845); |
| 97 | | void crtc6845_config(int index, const struct _mc6845_interface *intf); |
| 98 | | |
| 99 | | |
| 100 | 83 | #endif /* MSLEGACY_H */ |