亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? main.c

?? 樹大根深三棱盡所標桿ssfsfsa fdsafs
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*****************************************************************************			       XCopilotThis code is part of XCopilot, a port of copilot		  Copyright (C) 1997 Ivan A. Curtis		       icurtis@radlogic.com.auThe original MS-Windows95 copilot emulator was written by Greg Hewgill.The following copyright notice appeared on the original copilot sources:		  Copyright (c) 1996 Greg Hewgill MC68000 Emulation code is from Bernd Schmidt's Unix Amiga Emulator.       The following copyright notice appeared in those files:	  Original UAE code Copyright (c) 1995 Bernd SchmidtThis code must not be distributed without these copyright notices intact.**************************************************************************************************************************************************************Filename:	main.cDescription:	main file for xcopilot emulatorUpdate History:   (most recent first)   Ian Goldberg   26-Jun-98 12:37 -- Made memversion command-line option                                     and XCOPILOTMEMVERSION env. var.   Gene McCulley  30-Apr-98 07:02 -- Made ramsize command-line option   Gene McCulley  28-Apr-98 16:23 -- Added ~/.xcopilot support   Ian Goldberg   25-Sep-97 11:09 -- rewrite of serial and gdb support   Ian Goldberg   11-Sep-97 09:48 -- added bus error support   Jeff Dionne    10-Jul-97 10:00 -- added support for gdb debugging via TCP   Ian Goldberg   06-Jul-97 17:34 -- added support for serial I/O via a pty   Brian Grossman 30-Jun-97 24:00 -- added pixeldoubling   Ian Goldberg   18-Apr-97 11:13 -- added support for gdb debugging via a pty   I. Curtis       9-Apr-97 11:42 -- v0.4   I. Curtis      18-Mar-97 14:00 -- v0.3   I. Curtis      26-Feb-97 13:52 -- first release   I. Curtis      23-Feb-97 20:43 -- Created.******************************************************************************/#include <config.h>#include <sys/time.h>#include <sys/stat.h>#include <sys/types.h>#include <pwd.h>#include <sys/wait.h>#include <termios.h>#ifdef HAVE_SYS_SELECT_H#include <sys/select.h>#endif#include <unistd.h>#include <sys/ipc.h>#include <sys/shm.h>#include <sys/stat.h>#include <fcntl.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include "config.h"#include "sysdeps.h"#include "shared.h"#include "memory.h"#include "custom.h"#include "newcpu.h"#include "display.h"#include "pilotcpu.h"#include "pdebug.h"#include "main.h"extern int tcp_open(char *name);/***************************************************************************** *				Global symbols				     * *****************************************************************************/char *id_version = "XCopilot "VERSION;/***************************************************************************** *				Local symbols				     * *****************************************************************************//* * These error messages correspond to the codes in memory.h */static const char *CpuInitErrors[] = {  "",  "ROM file not found",  "Error loading ROM file",  "Error loading RAM file",};/***************************************************************************** *				Local functions				     * *****************************************************************************//********************************************* * attach to the shared memory blocks        * * for the main memory and for the registers * * of the custom block                       * *********************************************/static shared_img *attach_shm(Pilot *pilot){  void *s;  s = shmat(pilot->shmid, (char *)0, 0);  if (s == (void *)-1) {    perror("shmat");    exit(1);  }  return((shared_img *)s);}/************************************* * This is the CPU emulation thread *************************************/static void cpu_proc(shared_img *shptr, Pilot *pilot){  int             r;  /*   * init cpu   * cpu event loop   */  r = CPU_init(shptr, pilot->RamSize, pilot->DataDir, pilot->RomFile,               pilot->RamFile, pilot->ScratchFile, pilot->ResetPilot,               pilot->NoCheck);  if (r != 0) {    fprintf(stderr, "E - %s\n", CpuInitErrors[r]);    exit(1);  }  /*   * fprintf(stderr, "I - calling CPU..\n"); fflush(stderr);   */  CPU(shptr);}/************************************* * This is the LCD emulation thread * *************************************/static void lcd_proc(shared_img *shptr, Pilot *pilot){  int no_x_shm = pilot->NoXShm;  int magfactor = pilot->MagFactor;  int private_cmap = pilot->PrivateColormap;  char *sbuf;   /*    * initialize memory    * init xwindows    * process events    */  memory_init(pilot->RamSize, pilot->DataDir, pilot->RomFile, pilot->RamFile,              pilot->ScratchFile, pilot->ResetPilot, pilot->NoCheck);#ifndef DISABLE_DISPLAY  sbuf = xcpInitialize(shptr, pilot->context, pilot->topWidget, no_x_shm, magfactor,                       private_cmap, NULL, pilot->bbg);  xcpEventLoop(pilot->context, pilot->topWidget, sbuf, shptr);#endif}/******************************** * This is the Debugger thread * ********************************/#define DEBUG_PORTNUM 2000static void debug_proc(shared_img *shptr, Pilot *pilot){  if (strcmp(pilot->Debugging, "old")) {    return;				/* we are not debugging */  }  /*   * initialize memory   * initialize Shptr in newcpu module   */  memory_init(pilot->RamSize, pilot->DataDir, pilot->RomFile, pilot->RamFile,              pilot->ScratchFile, pilot->ResetPilot, pilot->NoCheck);  MC68000_setshare(shptr);  /* Old-style debugging on port 2000 */  pdebug_loop(pilot->DebugArgs, DEBUG_PORTNUM, shptr);  // DAVIDM shptr->CpuReq = cpuExit;}static int correct_write(int fd, unsigned char *buf, int amt){    int wrote = 0;    while (amt) {	int res = write(fd, buf, amt);	if (res <= 0) return res;	wrote += res;	buf += res;	amt -= res;    }    return wrote;}static void attach_serial(unsigned use_serial, char *SerialPort, int *readfd,                          int *writefd){  /* Attach to the pty for serial I/O */  if (use_serial) {    close(0);    close(1);    if (open(SerialPort, O_RDWR) != 0) {	fprintf(stderr, "Error opening %s\n", SerialPort);	perror("read");	exit(1);    }    if (dup2(0,1) != 1) {	fprintf(stderr, "Error opening %s\n", SerialPort);	perror("dup2");	exit(1);    }    fprintf(stderr, "Serial I/O on %s\n", SerialPort);  }  *readfd = 0;  *writefd = 1;}static void attach_gdb(char *DebugArgs, int *gdbfd){    int gdb_fd;    /* Get a fd for talking to gdb, if necessary */    if (!DebugArgs) DebugArgs = "/dev/ptyqf";    if (strchr(DebugArgs, ':')) {        /* gdb on a TCP port, actually */        gdb_fd = tcp_open(DebugArgs);    } else {        gdb_fd = open(DebugArgs, O_RDWR);    }    if (gdb_fd < 0) {	perror("open");	fprintf(stderr, "Debugging failed on %s; "	                "resuming without debugging.\n", DebugArgs);    } else {	fprintf(stderr, "Debugging on %s\n", DebugArgs);    }    *gdbfd = gdb_fd;}static void set_baud(int fd, int baudrate){    struct termios tempio;    unsigned int brate;    /* get current setting */    if (tcgetattr(fd, &tempio) < 0) {	/* We can't do this on this kind of fd */	return;    }    switch (baudrate) {    case 300:	brate = B300;	break;    case 1200:	brate = B1200;	break;    case 2400:	brate = B2400;	break;    case 4800:	brate = B4800;	break;    case 9600:	brate = B9600;	break;    case 19200:	brate = B19200;	break;    case 38400:	brate = B38400;	break;#ifdef B57600    case 57600:        brate = B57600;        break;#endif    default:	fprintf(stderr, "E - unsupported baudrate %d; using 38400\n",			    baudrate);	brate = B38400;    }    tempio.c_iflag = 0;    tempio.c_oflag = 0;    tempio.c_cflag |= CLOCAL;    tempio.c_lflag = 0;    tempio.c_cc[VMIN] = 1;    tempio.c_cc[VTIME] = 0;    if (cfsetispeed(&tempio, brate) < 0) {	perror("E - cfsetispeed");    }    if (cfsetospeed(&tempio, brate) < 0) {	perror("E - cfsetospeed");    }    if (tcsetattr(fd, TCSANOW, &tempio) < 0) {	perror("E - tcsetattr");    }}static void set_flags(int fd, int flags){    struct termios tempio;    /* get current setting */    if (tcgetattr(fd, &tempio) < 0) {	/* We can't do this on this kind of fd */	return;    }    tempio.c_cflag &= ~(CSIZE|CSTOPB|PARENB|PARODD);    if (flags & 1) {	tempio.c_cflag |= CS8;    } else {	tempio.c_cflag |= CS7;    }    if (flags & 2) {	tempio.c_cflag |= CSTOPB;    }    if (flags & 4) {	tempio.c_cflag |= PARODD;    }    if (flags & 8) {	tempio.c_cflag |= PARENB;    }    if (tcsetattr(fd, TCSANOW, &tempio) < 0) {	perror("E - tcsetattr");    }}/****************************** * This is the gdb I/O thread * ******************************/static void gdb_proc(shared_img *shptr, Pilot *pilot){    fd_set	orig_readers;    fd_set	readers;    int		maxfd;    int		gdb_towrite = pilot->gdb_in;    int		gdb_fd = -1;    if (strcmp(pilot->Debugging, "gdb")) {	return;    }    attach_gdb(pilot->DebugArgs, &gdb_fd);    FD_ZERO(&orig_readers);    FD_SET(gdb_fd, &orig_readers);    FD_SET(gdb_towrite, &orig_readers);    maxfd = 0;    if (gdb_fd > maxfd) maxfd = gdb_fd;    if (gdb_towrite > maxfd) maxfd = gdb_towrite;    maxfd++;    /*     * WARNING: This uses a shared memory data structure to store the FIFO. The     * consumer is getting things from this _at the same time_ as this is     * producing.  Examine custom.c and take a course in concurrent programming     * before modifying this.  :-) - Ian     */    while(shptr->CpuReq != cpuExit) {	struct timeval tv;	int selres;	unsigned char buf[FIFO_SIZE];

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品久久久久久| 26uuu国产一区二区三区| 国产精品高清亚洲| 波多野结衣的一区二区三区| 国产精品久久久久久久久图文区 | 中文字幕国产一区| 成人免费视频app| 亚洲欧洲成人精品av97| 99国产欧美久久久精品| 亚洲免费资源在线播放| 在线播放视频一区| 国产真实精品久久二三区| 国产午夜精品一区二区三区视频 | 成人av网站在线观看免费| 1024亚洲合集| 欧美日韩国产片| 精品一区二区三区蜜桃| 国产精品素人一区二区| 欧美伊人久久大香线蕉综合69| 日本伊人色综合网| 国产欧美一区二区精品婷婷| 日本韩国欧美在线| 久99久精品视频免费观看| 国产精品久久午夜| 在线综合+亚洲+欧美中文字幕| 狠狠久久亚洲欧美| 一区二区三区久久| 久久色.com| 欧美日韩在线一区二区| 国产一区二区三区高清播放| 亚洲欧洲精品一区二区三区不卡| 91麻豆精品国产91久久久资源速度| 国产一区 二区 三区一级| 日韩一区欧美小说| 日韩欧美资源站| 91亚洲精品一区二区乱码| 麻豆精品国产传媒mv男同| 亚洲视频香蕉人妖| 欧美成人女星排名| 欧美在线色视频| 成人午夜视频在线观看| 亚洲黄色免费电影| 久久精子c满五个校花| 欧美性大战xxxxx久久久| 国产成人av福利| 亚洲aⅴ怡春院| 国产色产综合色产在线视频| 欧美精品三级日韩久久| 99国产麻豆精品| 国产精品996| 美女mm1313爽爽久久久蜜臀| 亚洲一二三级电影| 一区在线中文字幕| 国产亚洲自拍一区| 欧美一区二区三区性视频| 色婷婷精品大视频在线蜜桃视频| 黄色精品一二区| 日本最新不卡在线| 亚洲精品中文字幕乱码三区| 国产欧美日韩在线| 久久久午夜电影| 一本色道久久综合亚洲91| 日韩av一二三| 亚洲成人自拍网| 亚洲一区二三区| 亚洲天堂福利av| 中文字幕一区二区三区在线不卡| 久久日韩粉嫩一区二区三区| 中文字幕第一区二区| 久久久亚洲午夜电影| 亚洲精品在线三区| 日韩欧美亚洲国产另类| 91精品国产高清一区二区三区蜜臀| 日本道色综合久久| 91免费在线播放| 99国产麻豆精品| 色婷婷激情久久| 91麻豆国产福利精品| 91一区二区三区在线播放| 97超碰欧美中文字幕| 91小视频免费观看| 在线视频欧美精品| 欧美三级午夜理伦三级中视频| 91高清在线观看| 欧美日韩精品一区二区三区四区| 欧美日韩在线三级| 91精品欧美综合在线观看最新| 5566中文字幕一区二区电影| 日韩免费观看高清完整版| 日韩精品一区在线| 国产欧美综合在线观看第十页| 国产欧美综合在线| 亚洲日本在线视频观看| 亚洲一区二区五区| 7777精品伊人久久久大香线蕉经典版下载| 欧美日韩久久久一区| 日韩一区二区影院| 久久综合色综合88| 亚洲视频小说图片| 日韩国产欧美在线播放| 久久精品国产免费看久久精品| 国产九九视频一区二区三区| 成人av网址在线观看| 欧美少妇xxx| 精品久久久久久久久久久久久久久 | 日韩欧美电影一二三| 91精品国产91久久综合桃花| 欧美xxxx在线观看| 中文字幕av一区二区三区| 亚洲欧美日韩综合aⅴ视频| 成人理论电影网| voyeur盗摄精品| 欧美日韩黄视频| 欧美大片一区二区三区| 亚洲国产精品二十页| 亚洲国产一二三| 国产精品99久久久| 欧美日韩国产色站一区二区三区| 久久亚洲欧美国产精品乐播| 亚洲精品国产一区二区精华液| 日本sm残虐另类| 99久久99久久精品国产片果冻 | 国产成人在线观看| 欧美中文字幕一区二区三区亚洲| 久久新电视剧免费观看| 亚洲成a人片在线不卡一二三区| 国产成人精品一区二区三区四区 | 亚洲猫色日本管| 精品制服美女丁香| 欧美私人免费视频| 中文字幕免费不卡在线| 日韩精品乱码免费| 一本久久精品一区二区| 国产天堂亚洲国产碰碰| 日本亚洲电影天堂| 色欧美片视频在线观看在线视频| 久久品道一品道久久精品| 日日噜噜夜夜狠狠视频欧美人| 99视频在线精品| 国产亚洲精品资源在线26u| 日本va欧美va精品发布| 欧美日韩免费在线视频| 国产精品的网站| 国产成人免费9x9x人网站视频| 欧美一区二区不卡视频| 亚洲国产aⅴ天堂久久| 色综合天天综合在线视频| 国产欧美日韩精品a在线观看| 久久99九九99精品| 日韩欧美一级二级| 偷拍一区二区三区四区| 欧美日韩在线播放一区| 亚洲精品高清视频在线观看| av在线播放不卡| 国产精品久久午夜| 成人午夜大片免费观看| 国产欧美一区二区三区在线看蜜臀 | 亚洲日本丝袜连裤袜办公室| 东方欧美亚洲色图在线| 久久精品亚洲精品国产欧美| 精品一区二区在线视频| 337p粉嫩大胆噜噜噜噜噜91av| 日韩中文欧美在线| 欧美精品aⅴ在线视频| 日韩和欧美一区二区| 欧美理论片在线| 奇米影视一区二区三区| 日韩一区二区在线观看| 美女爽到高潮91| 久久这里只精品最新地址| 国产一区二区三区不卡在线观看 | 日韩亚洲欧美综合| 蜜桃久久av一区| 久久无码av三级| 国产成人超碰人人澡人人澡| 日本一区二区三级电影在线观看 | 国产欧美一区二区在线观看| 成熟亚洲日本毛茸茸凸凹| 国产精品入口麻豆原神| 99国产精品久| 亚洲r级在线视频| 日韩一级视频免费观看在线| 黑人巨大精品欧美一区| 国产精品福利电影一区二区三区四区| 成人av免费网站| 亚洲伊人伊色伊影伊综合网| 91精品综合久久久久久| 国产真实乱对白精彩久久| 中文字幕一区二区日韩精品绯色| 色88888久久久久久影院按摩| 午夜久久电影网| 久久久美女毛片| 91免费版在线看| 日韩精品亚洲一区| 国产日韩欧美a| 91久久久免费一区二区| 免费人成在线不卡| 中文字幕第一区二区| 欧美日韩一区二区三区四区五区| 久久精品国产精品青草|