File:  [RetroPC.NET] / xmil / adv / patch / sndboard.c
Revision 1.1: download - view: text, annotated - select for diffs
Fri Feb 4 15:42:09 2005 JST (20 years, 8 months ago) by yui
Branches: MAIN
CVS tags: HEAD
RetroPC CVS restarting 2005/02/04 (T.Yui)

#include	"compiler.h"
#include	"pccore.h"
#include	"iocore.h"
#include	"advpsg.h"


	_ADVPSG	advpsg;


void IOOUTCALL sndboard_psgreg(UINT port, REG8 dat) {

	advpsg.addr = dat;
	(void)port;
}

void IOOUTCALL sndboard_psgdat(UINT port, REG8 dat) {

	advpsg_setreg(&advpsg, advpsg.addr, dat);
	(void)port;
}

REG8 IOINPCALL sndboard_psgsta(UINT port) {

	if (advpsg.addr < 0x10) {
		// 直接よむよむ
		return(((UINT8 *)&advpsg.reg)[advpsg.addr]);
//		return(advpsg_getreg(&advpsg, advpsg.addr));
	}
	else {
		(void)port;
		return(0xff);
	}
}


// ----

void sndboard_reset(void) {

	advpsg_reset(&advpsg);
}


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