File:  [RetroPC.NET] / np2 / win9xc / commng.cpp
Revision 1.3: download - view: text, annotated - select for diffs
Fri Nov 21 15:51:15 2003 JST (21 years, 11 months ago) by yui
Branches: MAIN
CVS tags: VER_0_72, HEAD
debuneko- (T.Yui)

#include	"compiler.h"
#include	"commng.h"
#include	"cmver.h"


// ---- non connect

static UINT ncread(COMMNG self, BYTE *data) {

	(void)self;
	(void)data;
	return(0);
}

static UINT ncwrite(COMMNG self, BYTE data) {

	(void)self;
	(void)data;
	return(0);
}

static BYTE ncgetstat(COMMNG self) {

	(void)self;
	return(0xf0);
}

static long ncmsg(COMMNG self, UINT msg, long param) {

	(void)self;
	(void)msg;
	(void)param;
	return(0);
}

static void ncrelease(COMMNG self) {
}

static const _COMMNG com_nc = {
		COMCONNECT_OFF, ncread, ncwrite, ncgetstat, ncmsg, ncrelease};


// ----

void commng_initialize(void) {

	cmvermouth_initialize();
}

COMMNG commng_create(UINT device) {

	COMMNG	ret;

	ret = NULL;
	if (device == COMCREATE_MPU98II) {
		ret = cmvermouth_create();
	}
	if (ret == NULL) {
		ret = (COMMNG)&com_nc;
	}
	return(ret);
}

void commng_destroy(COMMNG hdl) {

	if (hdl) {
		hdl->release(hdl);
	}
}


RetroPC.NET-CVS <cvs@retropc.net>