Previous 15994 Revisions Next

r10508 Saturday 19th February, 2011 at 17:34:51 UTC by Angelo Salese
[UPD7220]: Take lines per character row into account
[src/mess/drivers]a5105.c qx10.c
[src/mess/video]upd7220.c upd7220.h

src/mess/video/upd7220.c
r10507r10508
10391039      for (y = sy; y < sy + len; y++)
10401040      {
10411041         addr = sad + (y * upd7220->pitch);
1042         if (upd7220->draw_text_func) upd7220->draw_text_func(device, bitmap, upd7220->vram, addr, y, wd, upd7220->pitch,0,0,upd7220->aw * 8 - 1,upd7220->al - 1);
1042         if (upd7220->draw_text_func) upd7220->draw_text_func(device, bitmap, upd7220->vram, addr, y, wd, upd7220->pitch,0,0,upd7220->aw * 8 - 1,upd7220->al - 1, upd7220->lr);
10431043      }
10441044
10451045      sy = y + 1;
r10507r10508
10961096         if (im)
10971097            draw_graphics_line(device, bitmap, addr, y, wd);
10981098         else
1099            if (upd7220->draw_text_func) upd7220->draw_text_func(device, bitmap, upd7220->vram, addr, y, wd, upd7220->pitch,0,0,upd7220->aw * 8 - 1,upd7220->al - 1);
1099            if (upd7220->draw_text_func) upd7220->draw_text_func(device, bitmap, upd7220->vram, addr, y, wd, upd7220->pitch,0,0,upd7220->aw * 8 - 1,upd7220->al - 1,upd7220->lr);
11001100      }
11011101
11021102      sy = y + 1;
src/mess/video/upd7220.h
r10507r10508
5757typedef void (*upd7220_display_pixels_func)(device_t *device, bitmap_t *bitmap, int y, int x, UINT32 address, UINT16 data);
5858#define UPD7220_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t *bitmap, int y, int x, UINT32 address, UINT16 data)
5959
60typedef void (*upd7220_draw_text_line)(device_t *device, bitmap_t *bitmap, UINT16 *vram, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y);
61#define UPD7220_DRAW_TEXT_LINE(name) void name(device_t *device, bitmap_t *bitmap, UINT16 *vram, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y)
60typedef void (*upd7220_draw_text_line)(device_t *device, bitmap_t *bitmap, UINT16 *vram, 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);
61#define UPD7220_DRAW_TEXT_LINE(name) void name(device_t *device, bitmap_t *bitmap, UINT16 *vram, 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)
6262
6363typedef struct _upd7220_interface upd7220_interface;
6464struct _upd7220_interface
src/mess/drivers/qx10.c
r10507r10508
561561
562562      color = (state->color_mode) ? 1 : (attr & 4) ? 2 : 1; /* TODO: color mode */
563563
564      for( yi = 0; yi < 16; yi++)
564      for( yi = 0; yi < lr; yi++)
565565      {
566566         for( xi = 0; xi < 8; xi++)
567567         {
568568            int res_x,res_y;
569569            UINT8 pen = ((state->m_char_rom[tile*16+yi] >> xi) & 1) ? color : 0;
570570
571            if(yi >= 16)
572               pen = 0;
573
571574            res_x = x * 8 + xi;
572            res_y = y * 16 + yi;
575            res_y = y * lr + yi;
573576
574577            if(res_x > screen_max_x || res_y > screen_max_y)
575578               continue;
src/mess/drivers/a5105.c
r10507r10508
347347      tile = (vram[addr+x] & 0xff);
348348      color = ((vram[addr+x] & 0x0f00) >> 8);
349349
350      for( yi = 0; yi < 8; yi++)
350      for( yi = 0; yi < lr; yi++)
351351      {
352352         for( xi = 0; xi < 8; xi++)
353353         {
354354            int res_x,res_y;
355355            int pen = (state->m_char_rom[tile*8+yi] >> xi) & 1 ? color : 0;
356356
357            if(yi >= 8) { pen = 0; }
358
357359            res_x = x * 8 + xi;
358            res_y = y * 8 + yi;
360            res_y = y * lr + yi;
359361
360362            if(res_x > screen_max_x || res_y > screen_max_y)
361363               continue;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team