Previous 15994 Revisions Next

r9738 Monday 6th December, 2010 at 18:19:52 UTC by Miodrag Milanović
[VT100] Screen resolution change
[src/mess/drivers]vt100.c
[src/mess/video]vtvideo.c

src/mess/video/vtvideo.c
r9737r9738
7070/***************************************************************************
7171    IMPLEMENTATION
7272***************************************************************************/
73
74static void vt_video_recompute_parameters(running_device *device)
75{
76   vt_video_t *vt = get_safe_token(device);
77   int horiz_pix_total = 0;
78   int vert_pix_total = 0;
79   rectangle visarea;
80
81   horiz_pix_total = vt->columns * 10;
82   vert_pix_total  = 25 * 10;
83
84   visarea.min_x = 0;
85   visarea.min_y = 0;
86   visarea.max_x = horiz_pix_total - 1;
87   visarea.max_y = vert_pix_total - 1;
88
89   vt->screen->configure(horiz_pix_total, vert_pix_total, visarea,
90            vt->screen->frame_period().attoseconds);
91}
7392READ8_DEVICE_HANDLER( vt_video_lba7_r )
7493{
7594   vt_video_t *vt = get_safe_token(device);
r9737r9738
131150{
132151   vt_video_t *vt = get_safe_token(device);
133152   if (BIT(data,5)==0) {
153      UINT8 col = vt->columns;
134154      if (BIT(data,4)==0) {
135155         vt->columns = 80;
136156      } else {
137157         vt->columns = 132;
138158      }
159      if (col!=vt->columns) {
160         vt_video_recompute_parameters(device);
161      }
139162      vt->interlaced = 1;
140163   } else {
141164      if (BIT(data,4)==0) {
src/mess/drivers/vt100.c
r9737r9738
407407   MDRV_SCREEN_REFRESH_RATE(60)
408408   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
409409   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
410   MDRV_SCREEN_SIZE(132*10, 30*10)
411   MDRV_SCREEN_VISIBLE_AREA(0, 132*10-1, 0, 30*10-1)
410   MDRV_SCREEN_SIZE(80*10, 25*10)
411   MDRV_SCREEN_VISIBLE_AREA(0, 80*10-1, 0, 25*10-1)
412412   MDRV_GFXDECODE(vt100)
413413   MDRV_PALETTE_LENGTH(2)
414414   MDRV_PALETTE_INIT(monochrome_green)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team