当前位置: 首页>>代码示例>>C++>>正文


C++ pclog函数代码示例

本文整理汇总了C++中pclog函数的典型用法代码示例。如果您正苦于以下问题:C++ pclog函数的具体用法?C++ pclog怎么用?C++ pclog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pclog函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: disc_load

void disc_load(int drive, char *fn)
{
        int c = 0, size;
        char *p;
        FILE *f;
//        pclog("disc_load %i %s\n", drive, fn);
//        setejecttext(drive, "");
        if (!fn) return;
        p = get_extension(fn);
        if (!p) return;
//        setejecttext(drive, fn);
        pclog("Loading :%i %s %s\n", drive, fn,p);
        f = fopen(fn, "rb");
        if (!f) return;
        fseek(f, -1, SEEK_END);
        size = ftell(f) + 1;
        fclose(f);        
        while (loaders[c].ext)
        {
                if (!strcasecmp(p, loaders[c].ext) && (size == loaders[c].size || loaders[c].size == -1))
                {
                        pclog("Loading as %s\n", p);
                        driveloaders[drive] = c;
                        loaders[c].load(drive, fn);
                        drive_empty[drive] = 0;
                        disc_changed[drive] = 1;
                        strcpy(discfns[drive], fn);
                        return;
                }
                c++;
        }
        pclog("Couldn't load %s %s\n",fn,p);
        drive_empty[drive] = 1;
        discfns[drive][0] = 0;
}
开发者ID:aliaspider,项目名称:PCem-mooch,代码行数:35,代码来源:disc.c

示例2: dynld_module

void *
dynld_module(const char *name, dllimp_t *table)
{
    HMODULE h;
    dllimp_t *imp;
    void *func;
    /* char **foo; */

    /* See if we can load the desired module. */
    if ((h = LoadLibrary(name)) == NULL) {
	pclog("DynLd(\"%s\"): library not found!\n", name);
	return(NULL);
    }

    /* Now load the desired function pointers. */
    for (imp=table; imp->name!=NULL; imp++) {
	func = GetProcAddress(h, imp->name);
	if (func == NULL) {
		pclog("DynLd(\"%s\"): function '%s' not found!\n",
						name, imp->name);
		CloseHandle(h);
		return(NULL);
	}

	/* To overcome typing issues.. */
	*(char **)imp->func = (char *)func;
    }

    /* All good. */
    return((void *)h);
}
开发者ID:Nado15,项目名称:86Box,代码行数:31,代码来源:win_dynld.c

示例3: model_init

void model_init()
{
        pclog("Initting as %s\n", model_getname());
        io_init();
        
        models[model].init();

	pclog("PCI: %02X, Max IDE: %02X, 386: %02X\n", PCI, maxide, is386);
}
开发者ID:Wack0,项目名称:PCem-X,代码行数:9,代码来源:model.c

示例4: rom_init_interleaved

int rom_init_interleaved(rom_t *rom, char *fn_low, char *fn_high, uint32_t address, int size, int mask, int file_offset, uint32_t flags)
{
        FILE *f_low  = romfopen(fn_low, "rb");
        FILE *f_high = romfopen(fn_high, "rb");
        int c;
        
        if (!f_low || !f_high)
        {
#ifndef RELEASE_BUILD
                if (!f_low)
                        pclog("ROM image not found : %s\n", fn_low);
                else
#else
		if (f_low)
#endif
                        fclose(f_low);
#ifndef RELEASE_BUILD
                if (!f_high)
                        pclog("ROM image not found : %s\n", fn_high);
                else
#else
		if (f_high)
#endif
                        fclose(f_high);
                return -1;
        }
        
        rom->rom = malloc(size);
        fseek(f_low, file_offset, SEEK_SET);
        fseek(f_high, file_offset, SEEK_SET);
        for (c = 0; c < size; c += 2)
        {
                rom->rom[c]     = getc(f_low);
                rom->rom[c + 1] = getc(f_high);
        }
        fclose(f_high);
        fclose(f_low);
        
        rom->mask = mask;
        
        mem_mapping_add(&rom->mapping, address, size, rom_read,
                                                      rom_readw,
                                                      rom_readl,
                                                      mem_write_null,
                                                      mem_write_nullw,
                                                      mem_write_nulll,
                                                      rom->rom,
                                                      flags,
                                                      rom);

        return 0;
}
开发者ID:MoochMcGee,项目名称:PCem-X-libretro,代码行数:52,代码来源:rom.c

示例5: bug_spflsh

/* Flush the serial port. */
static void
bug_spflsh(void)
{
    *bug_bptr = '\0';
    pclog("BUGGER- serial port [%s]\n", bug_buff);
    bug_bptr = bug_buff;
}
开发者ID:Nado15,项目名称:86Box,代码行数:8,代码来源:bugger.c

示例6: network_pcap_close

/* Close up shop. */
void
network_pcap_close(void)
{
    pcap_t *pc;

    if (pcap != NULL) {
	pclog("Closing WinPcap\n");

	/* Tell the polling thread to shut down. */
	pc = pcap; pcap = NULL;
#if 1
	/* Terminate the polling thread. */
	if (poll_tid != NULL) {
		thread_kill(poll_tid);
		poll_tid = NULL;
	}
#else
	/* Wait for the polling thread to shut down. */
	while (poll_tid != NULL)
		;
#endif

	/* OK, now shut down WinPcap itself. */
	f_pcap_close(pc);

	/* Unload the DLL if possible. */
	if (pcap_handle != NULL) {
		dynld_close(pcap_handle);
		pcap_handle = NULL;
	}
    }
    poll_rx = NULL;
    poll_arg = NULL;
}
开发者ID:Nado15,项目名称:86Box,代码行数:35,代码来源:net_pcap.c

示例7: QueueByte

static void QueueByte(mpu_t *mpu, uint8_t data) 
{
	if (mpu->state.block_ack) 
	{
		mpu->state.block_ack=0;
		return;
	}
	
	if (mpu->queue_used == 0 && mpu->intelligent) 
	{
		mpu->state.irq_pending=1;
		//PIC_ActivateIRQ(mpu->irq);
		picint(1 << mpu->irq);
	}
	if (mpu->queue_used < MPU401_QUEUE) 
	{
		int pos = mpu->queue_used+mpu->queue_pos;
		
		if (mpu->queue_pos >= MPU401_QUEUE) 
			mpu->queue_pos -= MPU401_QUEUE;
		
		if (pos>=MPU401_QUEUE) 
			pos-=MPU401_QUEUE;
		
		mpu->queue_used++;
		mpu->queue[pos]=data;
	} 
	else
		pclog("MPU401:Data queue full\n");
}
开发者ID:Nado15,项目名称:86Box,代码行数:30,代码来源:snd_mpu401.c

示例8: bug_wspcfg

/* Handle a write to the Serial Port Configuration register. */
static void
bug_wspcfg(uint8_t val)
{
    bug_spcfg = val;

    pclog("BUGGER- spcfg %02x\n", bug_spcfg);
}
开发者ID:Nado15,项目名称:86Box,代码行数:8,代码来源:bugger.c

示例9: MPU401_EOIHandler

//Updates counters and requests new data on "End of Input"
static void MPU401_EOIHandler(void *p)
{
	mpu_t *mpu = (mpu_t *)p;
	uint8_t i;

	pclog("MPU-401 end of input callback\n");
	
	mpu401_eoi_callback = 0;
	mpu->state.eoi_scheduled=0;
	if (mpu->state.send_now) 
	{
		mpu->state.send_now=0;
		if (mpu->state.cond_req) UpdateConductor(mpu);
		else UpdateTrack(mpu, mpu->state.channel);
	}
	mpu->state.irq_pending=0;
	if (!mpu->state.playing || !mpu->state.req_mask)  return;
	i=0;
	do {
		if (mpu->state.req_mask&(1<<i)) {
			QueueByte(mpu, 0xf0+i);
			mpu->state.req_mask&=~(1<<i);
			break;
		}
	} while ((i++)<16);
}
开发者ID:Nado15,项目名称:86Box,代码行数:27,代码来源:snd_mpu401.c

示例10: bug_wdata

/* Handle a write to the data register. */
static void
bug_wdata(uint8_t val)
{
    bug_data = val;

    if (bug_ctrl & CTRL_SPCFG)
	bug_wspcfg(val);
      else if (bug_ctrl & CTRL_SPORT)
	bug_wsport(val);
      else {
	if (bug_ctrl & CTRL_SEG2)
		bug_seg2 = val;
	  else if (bug_ctrl & CTRL_SEG1)
		bug_seg1 = val;
	  else if (bug_ctrl & CTRL_GLED)
		bug_ledg = val;
	  else
		bug_ledr = val;

	pclog("BUGGER- data %02x\n", bug_data);
    }

    /* Update the UI with active settings. */
    bug_setui();
}
开发者ID:Nado15,项目名称:86Box,代码行数:26,代码来源:bugger.c

示例11: keyboard_xt_write

void keyboard_xt_write(uint16_t port, uint8_t val, void *priv)
{
        switch (port)
        {
                case 0x61:
                if (!(keyboard_xt.pb & 0x40) && (val & 0x40)) /*Reset keyboard*/
                {
                        pclog("keyboard_xt : reset keyboard\n");
			key_queue_end = key_queue_start;
                        keyboard_xt_adddata(0xaa);
                }
		if ((keyboard_xt.pb & 0x80)==0 && (val & 0x80)!=0)
		{
			keyboard_xt.pa = 0;
			keyboard_xt.blocked = 0;
			picintc(2);
		}
                keyboard_xt.pb = val;
                ppi.pb = val;

                timer_process();
                timer_update_outstanding();
        
		speaker_update();
                speaker_gated = val & 1;
                speaker_enable = val & 2;
                if (speaker_enable) 
                        was_speaker_enable = 1;
                pit_set_gate(&pit, 2, val & 1);
                   
                break;
        }
}
开发者ID:Nado15,项目名称:86Box,代码行数:33,代码来源:keyboard_xt.c

示例12: keyboard_xt_adddata

void keyboard_xt_adddata(uint8_t val)
{
        key_queue[key_queue_end] = val;
        pclog("keyboard_xt : %02X added to key queue at %i\n", val, key_queue_end);
        key_queue_end = (key_queue_end + 1) & 0xf;
        return;
}
开发者ID:Nado15,项目名称:86Box,代码行数:7,代码来源:keyboard_xt.c

示例13: mpu401_init

void mpu401_init(mpu_t *mpu, uint16_t addr, int irq, int mode)
{
#if 0
	if (mode != M_INTELLIGENT)
	{
		mpu401_uart_init(mpu, addr);
		return;
	}
#endif

	mpu->status = STATUS_INPUT_NOT_READY;
	mpu->irq = irq;
	mpu->queue_used = 0;
	mpu->queue_pos = 0;
	mpu->mode = M_UART;

	mpu->intelligent = (mode == M_INTELLIGENT) ? 1 : 0;
	pclog("Starting as %s (mode is %s)\n", mpu->intelligent ? "INTELLIGENT" : "UART", (mode == M_INTELLIGENT) ? "INTELLIGENT" : "UART");

	mpu401_event_callback = 0;
	mpu401_eoi_callback = 0;
	mpu401_reset_callback = 0;

	io_sethandler(addr, 0x0002, mpu401_read, NULL, NULL, mpu401_write, NULL, NULL, mpu);
	io_sethandler(0x2A20, 0x0010, NULL, NULL, NULL, imf_write, NULL, NULL, mpu);
	timer_add(MPU401_Event, &mpu401_event_callback, &mpu401_event_callback, mpu);
	timer_add(MPU401_EOIHandler, &mpu401_eoi_callback, &mpu401_eoi_callback, mpu);
	timer_add(MPU401_ResetDone, &mpu401_reset_callback, &mpu401_reset_callback, mpu);
	
	MPU401_Reset(mpu);
}
开发者ID:Nado15,项目名称:86Box,代码行数:31,代码来源:snd_mpu401.c

示例14: network_pcap_init

/* Initialize the (Win)Pcap module for use. */
int
network_pcap_init(netdev_t *list)
{
    char errbuf[PCAP_ERRBUF_SIZE];
    pcap_if_t *devlist, *dev;
    int i = 0;

    /* Local variables. */
    pcap = NULL;

    /* Try loading the DLL. */
    pcap_handle = dynld_module("wpcap.dll", pcap_imports);
    if (pcap_handle == NULL) return(-1);

    /* Retrieve the device list from the local machine */
    if (f_pcap_findalldevs(&devlist, errbuf) == -1) {
	pclog("PCAP: error in pcap_findalldevs: %s\n", errbuf);
	return(-1);
    }

    for (dev=devlist; dev!=NULL; dev=dev->next) {
	strcpy(list->device, dev->name);
	if (dev->description)
		strcpy(list->description, dev->description);
	  else
		memset(list->description, '\0', sizeof(list->description));
	list++; i++;
    }

    /* Release the memory. */
    f_pcap_freealldevs(devlist);

    return(i);
}
开发者ID:Nado15,项目名称:86Box,代码行数:35,代码来源:net_pcap.c

示例15: keyboard_pcjr_read

uint8_t keyboard_pcjr_read(uint16_t port, void *priv)
{
        uint8_t temp;
        switch (port)
        {
                case 0x60:
                temp = keyboard_pcjr.pa;
                break;
                
                case 0x61:
                temp = keyboard_pcjr.pb;
                break;
                
                case 0x62:
                temp = (keyboard_pcjr.latched ? 1 : 0);
                temp |= 0x02; /*Modem card not installed*/
                temp |= (ppispeakon ? 0x10 : 0);
                temp |= (ppispeakon ? 0x20 : 0);
                temp |= (keyboard_pcjr.data ? 0x40: 0);
                if (keyboard_pcjr.data)
                        temp |= 0x40;
                break;
                
                case 0xa0:
                keyboard_pcjr.latched = 0;
		temp = 0;
                break;
                
                default:
                pclog("\nBad XT keyboard read %04X\n", port);
		temp = 0xff;
        }
        return temp;
}
开发者ID:Nado15,项目名称:86Box,代码行数:34,代码来源:keyboard_pcjr.c


注:本文中的pclog函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。