trunk/src/mess/includes/radio86.h
| r19389 | r19390 | |
| 19 | 19 | |
| 20 | 20 | virtual void video_start(); |
| 21 | 21 | |
| 22 | | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 22 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 23 | 23 | |
| 24 | | bitmap_ind16 m_bitmap; |
| 24 | bitmap_rgb32 m_bitmap; |
| 25 | 25 | |
| 26 | 26 | UINT8 m_tape_value; |
| 27 | 27 | UINT8 m_mikrosha_font_page; |
| r19389 | r19390 | |
| 38 | 38 | DECLARE_DRIVER_INIT(radio86); |
| 39 | 39 | DECLARE_MACHINE_RESET(radio86); |
| 40 | 40 | DECLARE_PALETTE_INIT(radio86); |
| 41 | | UINT32 screen_update_radio86(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 41 | UINT32 screen_update_radio86(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 42 | 42 | TIMER_CALLBACK_MEMBER(radio86_reset); |
| 43 | 43 | DECLARE_READ8_MEMBER(radio86_8255_portb_r2); |
| 44 | 44 | DECLARE_READ8_MEMBER(radio86_8255_portc_r2); |
trunk/src/mess/video/radio86.c
| r19389 | r19390 | |
| 16 | 16 | machine().primary_screen->register_screen_bitmap(m_bitmap); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | | UINT32 radio86_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 19 | UINT32 radio86_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 20 | 20 | { |
| 21 | 21 | copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); |
| 22 | 22 | return 0; |
| r19389 | r19390 | |
| 26 | 26 | { |
| 27 | 27 | radio86_state *state = device->machine().driver_data<radio86_state>(); |
| 28 | 28 | int i; |
| 29 | | bitmap_ind16 &bitmap = state->m_bitmap; |
| 29 | bitmap_rgb32 &bitmap = state->m_bitmap; |
| 30 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 30 | 31 | UINT8 *charmap = state->memregion("gfx1")->base(); |
| 31 | 32 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 32 | 33 | if (vsp) { |
| r19389 | r19390 | |
| 39 | 40 | pixels ^= 0xff; |
| 40 | 41 | } |
| 41 | 42 | for(i=0;i<6;i++) { |
| 42 | | bitmap.pix16(y, x + i) = (pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0; |
| 43 | bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0]; |
| 43 | 44 | } |
| 44 | 45 | } |
| 45 | 46 | |
| r19389 | r19390 | |
| 48 | 49 | { |
| 49 | 50 | radio86_state *state = device->machine().driver_data<radio86_state>(); |
| 50 | 51 | int i; |
| 51 | | bitmap_ind16 &bitmap = state->m_bitmap; |
| 52 | bitmap_rgb32 &bitmap = state->m_bitmap; |
| 53 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 52 | 54 | UINT8 *charmap = state->memregion("gfx1")->base() + (state->m_mikrosha_font_page & 1) * 0x400; |
| 53 | 55 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 54 | 56 | if (vsp) { |
| r19389 | r19390 | |
| 61 | 63 | pixels ^= 0xff; |
| 62 | 64 | } |
| 63 | 65 | for(i=0;i<6;i++) { |
| 64 | | bitmap.pix16(y, x + i) = (pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0; |
| 66 | bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0]; |
| 65 | 67 | } |
| 66 | 68 | } |
| 67 | 69 | |
| r19389 | r19390 | |
| 69 | 71 | { |
| 70 | 72 | radio86_state *state = device->machine().driver_data<radio86_state>(); |
| 71 | 73 | int i; |
| 72 | | bitmap_ind16 &bitmap = state->m_bitmap; |
| 74 | bitmap_rgb32 &bitmap = state->m_bitmap; |
| 75 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 73 | 76 | UINT8 *charmap = state->memregion("gfx1")->base() + (gpa & 1) * 0x400; |
| 74 | 77 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 75 | 78 | if (vsp) { |
| r19389 | r19390 | |
| 82 | 85 | pixels ^= 0xff; |
| 83 | 86 | } |
| 84 | 87 | for(i=0;i<6;i++) { |
| 85 | | bitmap.pix16(y, x + i) = (pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0; |
| 88 | bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0]; |
| 86 | 89 | } |
| 87 | 90 | } |
| 88 | 91 | |
| r19389 | r19390 | |
| 90 | 93 | { |
| 91 | 94 | radio86_state *state = device->machine().driver_data<radio86_state>(); |
| 92 | 95 | int i; |
| 93 | | bitmap_ind16 &bitmap = state->m_bitmap; |
| 96 | bitmap_rgb32 &bitmap = state->m_bitmap; |
| 97 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 94 | 98 | UINT8 *charmap = state->memregion("gfx1")->base() + 0x400 * (gpa * 2 + hlgt); |
| 95 | 99 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 96 | 100 | if (vsp) { |
| r19389 | r19390 | |
| 103 | 107 | pixels ^= 0xff; |
| 104 | 108 | } |
| 105 | 109 | for(i=0;i<6;i++) { |
| 106 | | bitmap.pix16(y, x + i) = (pixels >> (5-i)) & 1; |
| 110 | bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1]; |
| 107 | 111 | } |
| 108 | 112 | } |
| 109 | 113 | |
| 110 | | UINT32 radio86_state::screen_update_radio86(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 114 | UINT32 radio86_state::screen_update_radio86(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 111 | 115 | { |
| 112 | 116 | device_t *devconf = machine().device("i8275"); |
| 113 | 117 | i8275_update( devconf, bitmap, cliprect); |
trunk/src/mess/video/upd7220.c
| r19389 | r19390 | |
| 1554 | 1554 | // update_text - |
| 1555 | 1555 | //------------------------------------------------- |
| 1556 | 1556 | |
| 1557 | | void upd7220_device::update_text(bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 1557 | void upd7220_device::update_text(bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 1558 | 1558 | { |
| 1559 | 1559 | UINT32 addr, sad; |
| 1560 | 1560 | UINT16 len; |
| r19389 | r19390 | |
| 1582 | 1582 | // draw_graphics_line - |
| 1583 | 1583 | //------------------------------------------------- |
| 1584 | 1584 | |
| 1585 | | void upd7220_device::draw_graphics_line(bitmap_ind16 &bitmap, UINT32 addr, int y, int wd) |
| 1585 | void upd7220_device::draw_graphics_line(bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd) |
| 1586 | 1586 | { |
| 1587 | 1587 | int sx; |
| 1588 | 1588 | |
| r19389 | r19390 | |
| 1600 | 1600 | // update_graphics - |
| 1601 | 1601 | //------------------------------------------------- |
| 1602 | 1602 | |
| 1603 | | void upd7220_device::update_graphics(bitmap_ind16 &bitmap, const rectangle &cliprect, int force_bitmap) |
| 1603 | void upd7220_device::update_graphics(bitmap_rgb32 &bitmap, const rectangle &cliprect, int force_bitmap) |
| 1604 | 1604 | { |
| 1605 | 1605 | UINT32 addr, sad; |
| 1606 | 1606 | UINT16 len; |
| r19389 | r19390 | |
| 1653 | 1653 | // update_screen - |
| 1654 | 1654 | //------------------------------------------------- |
| 1655 | 1655 | |
| 1656 | | UINT32 upd7220_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 1656 | UINT32 upd7220_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 1657 | 1657 | { |
| 1658 | 1658 | if (m_de) |
| 1659 | 1659 | { |
trunk/src/mess/video/upd7220.h
| r19389 | r19390 | |
| 64 | 64 | // TYPE DEFINITIONS |
| 65 | 65 | //************************************************************************** |
| 66 | 66 | |
| 67 | | typedef void (*upd7220_display_pixels_func)(device_t *device, bitmap_ind16 &bitmap, int y, int x, UINT32 address); |
| 68 | | #define UPD7220_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_ind16 &bitmap, int y, int x, UINT32 address) |
| 67 | typedef void (*upd7220_display_pixels_func)(device_t *device, bitmap_rgb32 &bitmap, int y, int x, UINT32 address); |
| 68 | #define UPD7220_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_rgb32 &bitmap, int y, int x, UINT32 address) |
| 69 | 69 | |
| 70 | | typedef void (*upd7220_draw_text_line)(device_t *device, bitmap_ind16 &bitmap, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y,int lr, int cursor_on, int cursor_addr); |
| 71 | | #define UPD7220_DRAW_TEXT_LINE(name) void name(device_t *device, bitmap_ind16 &bitmap, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y,int lr, int cursor_on, int cursor_addr) |
| 70 | typedef void (*upd7220_draw_text_line)(device_t *device, bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y,int lr, int cursor_on, int cursor_addr); |
| 71 | #define UPD7220_DRAW_TEXT_LINE(name) void name(device_t *device, bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y,int lr, int cursor_on, int cursor_addr) |
| 72 | 72 | |
| 73 | 73 | |
| 74 | 74 | // ======================> upd7220_interface |
| r19389 | r19390 | |
| 109 | 109 | DECLARE_READ8_MEMBER( vram_r ); |
| 110 | 110 | DECLARE_WRITE8_MEMBER( vram_w ); |
| 111 | 111 | |
| 112 | | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 112 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 113 | 113 | virtual const rom_entry *device_rom_region() const; |
| 114 | 114 | virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const; |
| 115 | 115 | |
| r19389 | r19390 | |
| 150 | 150 | void draw_char(int x, int y); |
| 151 | 151 | int translate_command(UINT8 data); |
| 152 | 152 | void process_fifo(); |
| 153 | | void update_text(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 154 | | void draw_graphics_line(bitmap_ind16 &bitmap, UINT32 addr, int y, int wd); |
| 155 | | void update_graphics(bitmap_ind16 &bitmap, const rectangle &cliprect, int force_bitmap); |
| 153 | void update_text(bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 154 | void draw_graphics_line(bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd); |
| 155 | void update_graphics(bitmap_rgb32 &bitmap, const rectangle &cliprect, int force_bitmap); |
| 156 | 156 | |
| 157 | 157 | devcb_resolved_write_line m_out_drq_func; |
| 158 | 158 | devcb_resolved_write_line m_out_hsync_func; |
trunk/src/mess/video/mikromik.c
| r19389 | r19390 | |
| 3 | 3 | |
| 4 | 4 | |
| 5 | 5 | //------------------------------------------------- |
| 6 | | // PALETTE_INIT( mm1 ) |
| 7 | | //------------------------------------------------- |
| 8 | | |
| 9 | | PALETTE_INIT_MEMBER(mm1_state,mm1) |
| 10 | | { |
| 11 | | palette_set_color(machine(), 0, RGB_BLACK); /* black */ |
| 12 | | palette_set_color_rgb(machine(), 1, 0x00, 0xc0, 0x00); /* green */ |
| 13 | | palette_set_color_rgb(machine(), 2, 0x00, 0xff, 0x00); /* bright green */ |
| 14 | | } |
| 15 | | |
| 16 | | |
| 17 | | //------------------------------------------------- |
| 18 | 6 | // i8275_interface crtc_intf |
| 19 | 7 | //------------------------------------------------- |
| 20 | 8 | |
| r19389 | r19390 | |
| 41 | 29 | |
| 42 | 30 | int color = hlt_in ? 2 : (video_in ^ compl_in); |
| 43 | 31 | |
| 44 | | state->m_bitmap.pix16(y, x + i) = color; |
| 32 | state->m_bitmap.pix32(y, x + i) = RGB_MONOCHROME_GREEN_HIGHLIGHT[color]; |
| 45 | 33 | } |
| 46 | 34 | } |
| 47 | 35 | |
| r19389 | r19390 | |
| 77 | 65 | |
| 78 | 66 | for (int i = 0; i < 8; i++) |
| 79 | 67 | { |
| 80 | | if (BIT(data, i)) bitmap.pix16(y, x + i) = 1; |
| 68 | if (BIT(data, i)) bitmap.pix32(y, x + i) = RGB_MONOCHROME_GREEN_HIGHLIGHT[1]; |
| 81 | 69 | } |
| 82 | 70 | } |
| 83 | 71 | |
| r19389 | r19390 | |
| 109 | 97 | // SCREEN_UPDATE_IND16( mm1 ) |
| 110 | 98 | //------------------------------------------------- |
| 111 | 99 | |
| 112 | | UINT32 mm1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 100 | UINT32 mm1_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 113 | 101 | { |
| 114 | 102 | /* text */ |
| 115 | 103 | i8275_update(m_crtc, bitmap, cliprect); |
| r19389 | r19390 | |
| 161 | 149 | //MCFG_SCREEN_RAW_PARAMS(XTAL_18_720MHz, ...) |
| 162 | 150 | |
| 163 | 151 | MCFG_GFXDECODE(mm1) |
| 164 | | MCFG_PALETTE_LENGTH(3) |
| 165 | | MCFG_PALETTE_INIT_OVERRIDE(mm1_state,mm1) |
| 166 | 152 | |
| 167 | 153 | MCFG_I8275_ADD(I8275_TAG, crtc_intf) |
| 168 | 154 | MCFG_UPD7220_ADD(UPD7220_TAG, XTAL_18_720MHz/8, hgdc_intf, mm1_upd7220_map) |
trunk/src/mess/drivers/sm1800.c
| r19389 | r19390 | |
| 39 | 39 | DECLARE_WRITE8_MEMBER(sm1800_8255_portc_w); |
| 40 | 40 | DECLARE_READ8_MEMBER(sm1800_8255_porta_r); |
| 41 | 41 | DECLARE_READ8_MEMBER(sm1800_8255_portc_r); |
| 42 | | bitmap_ind16 m_bitmap; |
| 42 | bitmap_rgb32 m_bitmap; |
| 43 | 43 | UINT8 m_irq_state; |
| 44 | 44 | virtual void machine_reset(); |
| 45 | 45 | virtual void video_start(); |
| 46 | 46 | virtual void palette_init(); |
| 47 | | UINT32 screen_update_sm1800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 47 | UINT32 screen_update_sm1800(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 48 | 48 | INTERRUPT_GEN_MEMBER(sm1800_vblank_interrupt); |
| 49 | 49 | }; |
| 50 | 50 | |
| r19389 | r19390 | |
| 85 | 85 | |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | | UINT32 sm1800_state::screen_update_sm1800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 88 | UINT32 sm1800_state::screen_update_sm1800(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 89 | 89 | { |
| 90 | 90 | device_t *devconf = machine().device("i8275"); |
| 91 | 91 | i8275_update( devconf, bitmap, cliprect); |
| r19389 | r19390 | |
| 103 | 103 | { |
| 104 | 104 | int i; |
| 105 | 105 | sm1800_state *state = device->machine().driver_data<sm1800_state>(); |
| 106 | | bitmap_ind16 &bitmap = state->m_bitmap; |
| 106 | bitmap_rgb32 &bitmap = state->m_bitmap; |
| 107 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 107 | 108 | UINT8 *charmap = state->memregion("chargen")->base(); |
| 108 | 109 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 109 | 110 | if (vsp) |
| r19389 | r19390 | |
| 116 | 117 | pixels ^= 0xff; |
| 117 | 118 | |
| 118 | 119 | for(i=0;i<8;i++) |
| 119 | | bitmap.pix16(y, x + i) = (pixels >> (7-i)) & 1 ? (hlgt ? 2 : 1) : 0; |
| 120 | bitmap.pix32(y, x + i) = palette[(pixels >> (7-i)) & 1 ? (hlgt ? 2 : 1) : 0]; |
| 120 | 121 | } |
| 121 | 122 | |
| 122 | 123 | const i8275_interface sm1800_i8275_interface = { |
trunk/src/mess/drivers/qx10.c
| r19389 | r19390 | |
| 85 | 85 | //required_shared_ptr<UINT8> m_video_ram; |
| 86 | 86 | UINT8 *m_video_ram; |
| 87 | 87 | |
| 88 | | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 88 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 89 | 89 | |
| 90 | 90 | virtual void machine_start(); |
| 91 | 91 | virtual void machine_reset(); |
| r19389 | r19390 | |
| 154 | 154 | static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels ) |
| 155 | 155 | { |
| 156 | 156 | qx10_state *state = device->machine().driver_data<qx10_state>(); |
| 157 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 157 | 158 | int xi,gfx[3]; |
| 158 | 159 | UINT8 pen; |
| 159 | 160 | |
| r19389 | r19390 | |
| 176 | 177 | pen|= ((gfx[1] >> (7-xi)) & 1) ? 2 : 0; |
| 177 | 178 | pen|= ((gfx[2] >> (7-xi)) & 1) ? 4 : 0; |
| 178 | 179 | |
| 179 | | bitmap.pix16(y, x + xi) = pen; |
| 180 | bitmap.pix32(y, x + xi) = palette[pen]; |
| 180 | 181 | } |
| 181 | 182 | } |
| 182 | 183 | |
| 183 | 184 | static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text ) |
| 184 | 185 | { |
| 185 | 186 | qx10_state *state = device->machine().driver_data<qx10_state>(); |
| 187 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 186 | 188 | int x; |
| 187 | 189 | int xi,yi; |
| 188 | 190 | int tile; |
| r19389 | r19390 | |
| 227 | 229 | continue; |
| 228 | 230 | |
| 229 | 231 | if(pen) |
| 230 | | bitmap.pix16(res_y, res_x) = pen; |
| 232 | bitmap.pix32(res_y, res_x) = palette[pen]; |
| 231 | 233 | } |
| 232 | 234 | } |
| 233 | 235 | } |
| 234 | 236 | } |
| 235 | 237 | |
| 236 | | UINT32 qx10_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) |
| 238 | UINT32 qx10_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect ) |
| 237 | 239 | { |
| 238 | 240 | bitmap.fill(get_black_pen(machine()), cliprect); |
| 239 | 241 | |
trunk/src/mess/drivers/a5105.c
| r19389 | r19390 | |
| 87 | 87 | static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels ) |
| 88 | 88 | { |
| 89 | 89 | a5105_state *state = device->machine().driver_data<a5105_state>(); |
| 90 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 90 | 91 | |
| 91 | 92 | int xi,gfx; |
| 92 | 93 | UINT8 pen; |
| r19389 | r19390 | |
| 97 | 98 | { |
| 98 | 99 | pen = ((gfx >> xi) & 1) ? 7 : 0; |
| 99 | 100 | |
| 100 | | bitmap.pix16(y, x + xi) = pen; |
| 101 | bitmap.pix32(y, x + xi) = palette[pen]; |
| 101 | 102 | } |
| 102 | 103 | } |
| 103 | 104 | |
| 104 | 105 | static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text ) |
| 105 | 106 | { |
| 106 | 107 | a5105_state *state = device->machine().driver_data<a5105_state>(); |
| 108 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 107 | 109 | int x; |
| 108 | 110 | int xi,yi; |
| 109 | 111 | int tile,color; |
| r19389 | r19390 | |
| 134 | 136 | if(res_x > screen_max_x || res_y > screen_max_y) |
| 135 | 137 | continue; |
| 136 | 138 | |
| 137 | | bitmap.pix16(res_y, res_x) = pen; |
| 139 | bitmap.pix32(res_y, res_x) = palette[pen]; |
| 138 | 140 | } |
| 139 | 141 | } |
| 140 | 142 | } |
trunk/src/mess/drivers/apc.c
| r19389 | r19390 | |
| 103 | 103 | required_shared_ptr<UINT8> m_video_ram_2; |
| 104 | 104 | |
| 105 | 105 | // screen updates |
| 106 | | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 106 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 107 | 107 | |
| 108 | 108 | |
| 109 | 109 | DECLARE_READ8_MEMBER(apc_port_28_r); |
| r19389 | r19390 | |
| 168 | 168 | m_aux_pcg = memregion("aux_pcg")->base(); |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | | UINT32 apc_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) |
| 171 | UINT32 apc_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect ) |
| 172 | 172 | { |
| 173 | 173 | bitmap.fill(get_black_pen(machine()), cliprect); |
| 174 | 174 | |
| r19389 | r19390 | |
| 188 | 188 | static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text ) |
| 189 | 189 | { |
| 190 | 190 | apc_state *state = device->machine().driver_data<apc_state>(); |
| 191 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 191 | 192 | int xi,yi,yi_trans; |
| 192 | 193 | int x; |
| 193 | 194 | UINT8 char_size; |
| r19389 | r19390 | |
| 278 | 279 | pen = (tile_data >> (xi) & 1) ? color : 0; |
| 279 | 280 | |
| 280 | 281 | if(pen) |
| 281 | | bitmap.pix16(res_y, res_x) = pen; |
| 282 | bitmap.pix32(res_y, res_x) = palette[pen]; |
| 282 | 283 | |
| 283 | 284 | // if(state->m_video_ff[WIDTH40_REG]) |
| 284 | 285 | // { |
trunk/src/mess/drivers/pc9801.c
| r19389 | r19390 | |
| 303 | 303 | required_device<upd7220_device> m_hgdc2; |
| 304 | 304 | |
| 305 | 305 | virtual void video_start(); |
| 306 | | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 306 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 307 | 307 | |
| 308 | 308 | required_shared_ptr<UINT8> m_video_ram_1; |
| 309 | 309 | required_shared_ptr<UINT8> m_video_ram_2; |
| r19389 | r19390 | |
| 575 | 575 | state_save_register_global_pointer(machine(), m_pcg_ram, 0x200000); |
| 576 | 576 | } |
| 577 | 577 | |
| 578 | | UINT32 pc9801_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 578 | UINT32 pc9801_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 579 | 579 | { |
| 580 | 580 | bitmap.fill(get_black_pen(machine()), cliprect); |
| 581 | 581 | |
| r19389 | r19390 | |
| 588 | 588 | static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels ) |
| 589 | 589 | { |
| 590 | 590 | pc9801_state *state = device->machine().driver_data<pc9801_state>(); |
| 591 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 591 | 592 | int xi; |
| 592 | 593 | int res_x,res_y; |
| 593 | 594 | UINT8 pen; |
| r19389 | r19390 | |
| 614 | 615 | if(interlace_on) |
| 615 | 616 | { |
| 616 | 617 | if(device->machine().primary_screen->visible_area().contains(res_x, res_y*2+0)) |
| 617 | | bitmap.pix16(res_y*2+0, res_x) = pen + colors16_mode; |
| 618 | bitmap.pix32(res_y*2+0, res_x) = palette[pen + colors16_mode]; |
| 618 | 619 | if(device->machine().primary_screen->visible_area().contains(res_x, res_y*2+1)) |
| 619 | | bitmap.pix16(res_y*2+1, res_x) = pen + colors16_mode; |
| 620 | bitmap.pix32(res_y*2+1, res_x) = palette[pen + colors16_mode]; |
| 620 | 621 | } |
| 621 | 622 | else |
| 622 | | bitmap.pix16(res_y, res_x) = pen + colors16_mode; |
| 623 | bitmap.pix32(res_y, res_x) = palette[pen + colors16_mode]; |
| 623 | 624 | } |
| 624 | 625 | } |
| 625 | 626 | |
| 626 | 627 | static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text ) |
| 627 | 628 | { |
| 628 | 629 | pc9801_state *state = device->machine().driver_data<pc9801_state>(); |
| 630 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 629 | 631 | int xi,yi; |
| 630 | 632 | int x; |
| 631 | 633 | UINT8 char_size; |
| r19389 | r19390 | |
| 728 | 730 | pen = (tile_data >> (7-xi) & 1) ? color : 0; |
| 729 | 731 | |
| 730 | 732 | if(pen) |
| 731 | | bitmap.pix16(res_y, res_x) = pen; |
| 733 | bitmap.pix32(res_y, res_x) = palette[pen]; |
| 732 | 734 | |
| 733 | 735 | if(state->m_video_ff[WIDTH40_REG]) |
| 734 | 736 | { |
| 735 | 737 | if(!device->machine().primary_screen->visible_area().contains(res_x+1, res_y)) |
| 736 | 738 | continue; |
| 737 | 739 | |
| 738 | | bitmap.pix16(res_y, res_x+1) = pen; |
| 740 | bitmap.pix32(res_y, res_x+1) = palette[pen]; |
| 739 | 741 | } |
| 740 | 742 | } |
| 741 | 743 | } |
trunk/src/mess/drivers/ipds.c
| r19389 | r19390 | |
| 29 | 29 | DECLARE_WRITE8_MEMBER(ipds_b1_w); |
| 30 | 30 | DECLARE_WRITE8_MEMBER(kbd_put); |
| 31 | 31 | UINT8 m_term_data; |
| 32 | | bitmap_ind16 m_bitmap; |
| 32 | bitmap_rgb32 m_bitmap; |
| 33 | 33 | virtual void video_start(); |
| 34 | 34 | virtual void machine_reset(); |
| 35 | | UINT32 screen_update_ipds(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 35 | UINT32 screen_update_ipds(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 36 | 36 | }; |
| 37 | 37 | |
| 38 | 38 | READ8_MEMBER( ipds_state::ipds_b0_r ) |
| r19389 | r19390 | |
| 88 | 88 | { |
| 89 | 89 | int i; |
| 90 | 90 | ipds_state *state = device->machine().driver_data<ipds_state>(); |
| 91 | | bitmap_ind16 &bitmap = state->m_bitmap; |
| 91 | bitmap_rgb32 &bitmap = state->m_bitmap; |
| 92 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 92 | 93 | UINT8 *charmap = state->memregion("chargen")->base(); |
| 93 | 94 | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 94 | 95 | |
| r19389 | r19390 | |
| 102 | 103 | pixels ^= 0xff; |
| 103 | 104 | |
| 104 | 105 | for(i=0;i<6;i++) |
| 105 | | bitmap.pix16(y, x + i) = (pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0; |
| 106 | bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0]; |
| 106 | 107 | } |
| 107 | 108 | |
| 108 | 109 | const i8275_interface ipds_i8275_interface = |
| r19389 | r19390 | |
| 115 | 116 | ipds_display_pixels |
| 116 | 117 | }; |
| 117 | 118 | |
| 118 | | UINT32 ipds_state::screen_update_ipds(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 119 | UINT32 ipds_state::screen_update_ipds(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 119 | 120 | { |
| 120 | 121 | device_t *devconf = machine().device("i8275"); |
| 121 | 122 | i8275_update( devconf, bitmap, cliprect); |