summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/aica.h
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
commitddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch)
treea70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/devices/sound/aica.h
parent333bff8de64dfaeb98134000412796b4fdef970b (diff)
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/devices/sound/aica.h')
-rw-r--r--src/devices/sound/aica.h74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/devices/sound/aica.h b/src/devices/sound/aica.h
index a67143c3871..744c80aea9f 100644
--- a/src/devices/sound/aica.h
+++ b/src/devices/sound/aica.h
@@ -28,7 +28,7 @@ enum AICA_STATE {AICA_ATTACK,AICA_DECAY1,AICA_DECAY2,AICA_RELEASE};
struct AICA_LFO_t
{
unsigned short phase;
- UINT32 phase_step;
+ uint32_t phase_step;
int *table;
int *scale;
};
@@ -46,23 +46,23 @@ struct AICA_EG_t
int RR; //Release
int DL; //Decay level
- UINT8 LPLINK;
+ uint8_t LPLINK;
};
struct AICA_SLOT
{
union
{
- UINT16 data[0x40]; //only 0x1a bytes used
- UINT8 datab[0x80];
+ uint16_t data[0x40]; //only 0x1a bytes used
+ uint8_t datab[0x80];
} udata;
- UINT8 active; //this slot is currently playing
- UINT8 *base; //samples base address
- UINT32 prv_addr; // previous play address (for ADPCM)
- UINT32 cur_addr; //current play address (24.8)
- UINT32 nxt_addr; //next play address
- UINT32 step; //pitch step (24.8)
- UINT8 Backwards; //the wave is playing backwards
+ uint8_t active; //this slot is currently playing
+ uint8_t *base; //samples base address
+ uint32_t prv_addr; // previous play address (for ADPCM)
+ uint32_t cur_addr; //current play address (24.8)
+ uint32_t nxt_addr; //next play address
+ uint32_t step; //pitch step (24.8)
+ uint8_t Backwards; //the wave is playing backwards
AICA_EG_t EG; //Envelope
AICA_LFO_t PLFO; //Phase LFO
AICA_LFO_t ALFO; //Amplitude LFO
@@ -71,15 +71,15 @@ struct AICA_SLOT
int cur_quant; //current ADPCM step
int curstep;
int cur_lpquant, cur_lpsample, cur_lpstep;
- UINT8 *adbase, *adlpbase;
- UINT8 lpend;
+ uint8_t *adbase, *adlpbase;
+ uint8_t lpend;
};
class aica_device : public device_t,
public device_sound_interface
{
public:
- aica_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ aica_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_master(device_t &device) { downcast<aica_device &>(device).m_master = true; }
static void set_roffset(device_t &device, int roffset) { downcast<aica_device &>(device).m_roffset = roffset; }
@@ -116,7 +116,7 @@ private:
int Get_RR(int base,int R);
void Compute_EG(AICA_SLOT *slot);
int EG_Update(AICA_SLOT *slot);
- UINT32 Step(AICA_SLOT *slot);
+ uint32_t Step(AICA_SLOT *slot);
void Compute_LFO(AICA_SLOT *slot);
void InitADPCM(int *PrevSignal, int *PrevQuant);
inline signed short DecodeADPCM(int *PrevSignal, unsigned char Delta, int *PrevQuant);
@@ -129,7 +129,7 @@ private:
void UpdateRegR(address_space &space, int reg);
void w16(address_space &space,unsigned int addr,unsigned short val);
unsigned short r16(address_space &space, unsigned int addr);
- inline INT32 UpdateSlot(AICA_SLOT *slot);
+ inline int32_t UpdateSlot(AICA_SLOT *slot);
void DoMasterSamples(int nsamples);
void aica_exec_dma(address_space &space);
@@ -137,7 +137,7 @@ private:
void AICALFO_Init();
inline signed int AICAPLFO_Step(AICA_LFO_t *LFO);
inline signed int AICAALFO_Step(AICA_LFO_t *LFO);
- void AICALFO_ComputeStep(AICA_LFO_t *LFO,UINT32 LFOF,UINT32 LFOWS,UINT32 LFOS,int ALFO);
+ void AICALFO_ComputeStep(AICA_LFO_t *LFO,uint32_t LFOF,uint32_t LFOWS,uint32_t LFOS,int ALFO);
bool m_master;
int m_roffset; /* offset in the region */
@@ -147,29 +147,29 @@ private:
union
{
- UINT16 data[0xc0/2];
- UINT8 datab[0xc0];
+ uint16_t data[0xc0/2];
+ uint8_t datab[0xc0];
} m_udata;
- UINT16 m_IRQL, m_IRQR;
- UINT16 m_EFSPAN[0x48];
+ uint16_t m_IRQL, m_IRQR;
+ uint16_t m_EFSPAN[0x48];
AICA_SLOT m_Slots[64];
signed short m_RINGBUF[64];
unsigned char m_BUFPTR;
unsigned char *m_AICARAM;
- UINT32 m_AICARAM_LENGTH, m_RAM_MASK, m_RAM_MASK16;
+ uint32_t m_AICARAM_LENGTH, m_RAM_MASK, m_RAM_MASK16;
sound_stream * m_stream;
- std::unique_ptr<INT32[]> m_buffertmpl;
- std::unique_ptr<INT32[]> m_buffertmpr;
+ std::unique_ptr<int32_t[]> m_buffertmpl;
+ std::unique_ptr<int32_t[]> m_buffertmpr;
- UINT32 m_IrqTimA;
- UINT32 m_IrqTimBC;
- UINT32 m_IrqMidi;
+ uint32_t m_IrqTimA;
+ uint32_t m_IrqTimBC;
+ uint32_t m_IrqMidi;
- UINT8 m_MidiOutW,m_MidiOutR;
- UINT8 m_MidiStack[16];
- UINT8 m_MidiW,m_MidiR;
+ uint8_t m_MidiOutW,m_MidiOutR;
+ uint8_t m_MidiStack[16];
+ uint8_t m_MidiW,m_MidiR;
int m_LPANTABLE[0x20000];
int m_RPANTABLE[0x20000];
@@ -177,18 +177,18 @@ private:
int m_TimPris[3];
int m_TimCnt[3];
- UINT16 m_mcieb, m_mcipd;
+ uint16_t m_mcieb, m_mcipd;
// timers
emu_timer *m_timerA, *m_timerB, *m_timerC;
// DMA stuff
struct{
- UINT32 dmea;
- UINT16 drga;
- UINT16 dlg;
- UINT8 dgate;
- UINT8 ddir;
+ uint32_t dmea;
+ uint16_t drga;
+ uint16_t dlg;
+ uint8_t dgate;
+ uint8_t ddir;
}m_dma;
@@ -202,7 +202,7 @@ private:
int m_length;
signed short *m_RBUFDST; //this points to where the sample will be stored in the RingBuf
- INT32 m_EG_TABLE[0x400];
+ int32_t m_EG_TABLE[0x400];
int m_PLFO_TRI[256],m_PLFO_SQR[256],m_PLFO_SAW[256],m_PLFO_NOI[256];
int m_ALFO_TRI[256],m_ALFO_SQR[256],m_ALFO_SAW[256],m_ALFO_NOI[256];
int m_PSCALES[8][256];