Previous 15994 Revisions Next

r2310 Monday 7th April, 2008 at 01:16:20 UTC by Barry Rodewald
[X68000] Fixed assert.
[src/mess/drivers]x68k.c
[src/mess/video]x68k.c

src/mess/video/x68k.c
r2309r2310
198198
199199   logerror("video_screen_configure(machine->primary_screen,%i,%i,[%i,%i,%i,%i],55.45)\n",scr.max_x,scr.max_y,visiblescr.min_x,visiblescr.min_y,visiblescr.max_x,visiblescr.max_y);
200200   video_screen_configure(machine->primary_screen,scr.max_x,scr.max_y,&visiblescr,HZ_TO_ATTOSECONDS(55.45));
201/*
202   rect.min_x = rect.min_y = 0;
203   sys.crtc.visible_width = (sys.crtc.reg[3] - sys.crtc.reg[2]) * 8;
204   if(sys.crtc.height == 256)
205      sys.crtc.visible_height = (sys.crtc.reg[7] - sys.crtc.reg[6]) / 2;
206   else
207      sys.crtc.visible_height = sys.crtc.reg[7] - sys.crtc.reg[6];
208   if(!(sys.crtc.reg[20] & 0x10))  // 15kHz horizontal frequency
209      sys.crtc.visible_height *= 2;
210
211   rect.max_x = sys.crtc.width - 1;
212   rect.max_y = sys.crtc.height - 1;
213
214   sys.crtc.video_width = sys.crtc.reg[0] * 8;
215   sys.crtc.video_height = sys.crtc.reg[4] + 1;
216   if(sys.crtc.height == 256)
217      sys.crtc.video_height = (sys.crtc.reg[4] / 2) + 1;
218   if(rect.max_x < 1 || rect.max_y < 1)
219      return;  // bail out
220
221   if(sys.crtc.video_width < rect.max_x)
222      sys.crtc.video_width = rect.max_x + 1;
223   if(sys.crtc.video_height < rect.max_y)
224      sys.crtc.video_height = rect.max_y + 1;
225
226   // for now, we'll just center the display area, rather than calculate the display position from the CRTC regs
227   sys.crtc.hshift = (sys.crtc.width - sys.crtc.visible_width) / 2;
228   sys.crtc.vshift = (sys.crtc.height - sys.crtc.visible_height) / 2;
229
230   video_screen_configure(machine->primary_screen,sys.crtc.video_width,sys.crtc.video_height,&rect,HZ_TO_ATTOSECONDS(55.45));
231   logerror("video_screen_configure(machine->primary_screen,%i,%i,[%i,%i,%i,%i],55.45)\n",sys.crtc.video_width,sys.crtc.video_height,rect.min_x,rect.min_y,rect.max_x,rect.max_y);
232//   x68k_scanline = video_screen_get_vpos(machine->primary_screen);
233   if(sys.crtc.reg[4] != 0)
234   {
235//      scantime = ATTOTIME_IN_HZ(55.45) / sys.crtc.reg[4];
236//      timer_adjust_periodic(scanline_timer, attotime_zero, 0, scantime);
237   }*/
238201}
239202
240203TIMER_CALLBACK(x68k_hsync)
src/mess/drivers/x68k.c
r2309r2310
19511951   timer_adjust_periodic(mouse_timer, attotime_zero, 0, ATTOTIME_IN_MSEC(1));  // a guess for now
19521952   sys.mouse.inputtype = 0;
19531953
1954   nec765_init(&fdc_interface,NEC72065,NEC765_RDY_PIN_CONNECTED);
1955   nec765_reset(0);
1956
19541957   x68k_mfp = devtag_get_token(machine, MC68901, "mfp");
19551958}
19561959
r2309r2310
19781981   // copy last half of BIOS to a user region, to use for inital startup
19791982   memcpy(user2,(rom+0xff0000),0x10000);
19801983
1984   memset(&sys,0,sizeof(sys));
1985
19811986   ppi8255_init(&ppi_interface);
1982   nec765_init(&fdc_interface,NEC72065,NEC765_RDY_PIN_CONNECTED);
19831987   hd63450_init(&dmac_interface);
1984   nec765_reset(0);
19851988   mfp_init();
19861989   scc_init(&scc_interface);
19871990   rp5c15_init(machine, &rtc_intf);
19881991
1989   memset(&sys,0,sizeof(sys));
1990
19911992   cpunum_set_irq_callback(0, x68k_int_ack);
19921993
19931994   // init keyboard

Previous 15994 Revisions Next


© 1998-2018 The MESS Team