src/mess/video/x68k.c
| r2309 | r2310 | |
| 198 | 198 | |
| 199 | 199 | 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); |
| 200 | 200 | 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 | | }*/ |
| 238 | 201 | } |
| 239 | 202 | |
| 240 | 203 | TIMER_CALLBACK(x68k_hsync) |
src/mess/drivers/x68k.c
| r2309 | r2310 | |
| 1951 | 1951 | timer_adjust_periodic(mouse_timer, attotime_zero, 0, ATTOTIME_IN_MSEC(1)); // a guess for now |
| 1952 | 1952 | sys.mouse.inputtype = 0; |
| 1953 | 1953 | |
| 1954 | nec765_init(&fdc_interface,NEC72065,NEC765_RDY_PIN_CONNECTED); |
| 1955 | nec765_reset(0); |
| 1956 | |
| 1954 | 1957 | x68k_mfp = devtag_get_token(machine, MC68901, "mfp"); |
| 1955 | 1958 | } |
| 1956 | 1959 | |
| r2309 | r2310 | |
| 1978 | 1981 | // copy last half of BIOS to a user region, to use for inital startup |
| 1979 | 1982 | memcpy(user2,(rom+0xff0000),0x10000); |
| 1980 | 1983 | |
| 1984 | memset(&sys,0,sizeof(sys)); |
| 1985 | |
| 1981 | 1986 | ppi8255_init(&ppi_interface); |
| 1982 | | nec765_init(&fdc_interface,NEC72065,NEC765_RDY_PIN_CONNECTED); |
| 1983 | 1987 | hd63450_init(&dmac_interface); |
| 1984 | | nec765_reset(0); |
| 1985 | 1988 | mfp_init(); |
| 1986 | 1989 | scc_init(&scc_interface); |
| 1987 | 1990 | rp5c15_init(machine, &rtc_intf); |
| 1988 | 1991 | |
| 1989 | | memset(&sys,0,sizeof(sys)); |
| 1990 | | |
| 1991 | 1992 | cpunum_set_irq_callback(0, x68k_int_ack); |
| 1992 | 1993 | |
| 1993 | 1994 | // init keyboard |