sgdk
ym2612.h File Reference

YM2612 support. More...

Go to the source code of this file.

Defines

#define YM2612_BASEPORT   0xA04000
 YM2612 base port address.

Functions

void YM2612_reset ()
 Reset YM2612 chip.
u8 YM2612_read (const u16 port)
 Read YM2612 port.
void YM2612_write (const u16 port, const u8 data)
 Write YM2612 port.
void YM2612_writeSafe (const u16 port, const u8 data)
void YM2612_writeReg (const u16 part, const u8 reg, const u8 data)
 Set YM2612 register value.
void YM2612_writeRegSafe (const u16 part, const u8 reg, const u8 data)
void YM2612_enableDAC ()
 Enable YM2612 DAC.
void YM2612_disableDAC ()
 Disable YM2612 DAC.

Detailed Description

YM2612 support.

Author:
Stephane Dallongeville
Date:
08/2011

This unit provides access to the YM2612 through the 68000 CPU.


Function Documentation

u8 YM2612_read ( const u16  port)

Read YM2612 port.

Parameters:
portPort number (0-3)
Returns:
YM2612 port value.

Reading YM2612 always return YM2612 status (busy and timer flag) whatever is the port read.

void YM2612_write ( const u16  port,
const u8  data 
)

Write YM2612 port.

Parameters:
portPort number (0-3)
dataData to write

This function does not perform busy check before writing to YM port.
See also YM2612_writeSafe().

void YM2612_writeReg ( const u16  part,
const u8  reg,
const u8  data 
)

Set YM2612 register value.

Parameters:
partpart number (0-1)
regregister number
dataregister value

This function does not perform busy check before writing to YM port.
See also YM2612_writeRegSafe().

void YM2612_writeRegSafe ( const u16  part,
const u8  reg,
const u8  data 
)
Deprecated:
Use YM2612_writeReg(..) method instead.
void YM2612_writeSafe ( const u16  port,
const u8  data 
)
Deprecated:
Use YM2612_write(..) method instead.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines