Putting all audio code in one folder

This commit is contained in:
Sergio Martin 2024-01-19 17:42:29 +01:00
parent ae2f61d029
commit 823bc9ad1c
35 changed files with 72 additions and 92 deletions

View File

@ -65,8 +65,7 @@ quickNESSrc = [
'QuickNES_Core/nes_emu/Mapper_TaitoTC0190.cpp',
'QuickNES_Core/nes_emu/Mapper_Un1rom.cpp',
'QuickNES_Core/nes_emu/nes_ntsc.cpp',
'Mapper_70.cpp',
'quickNESInstance.hpp'
'Mapper_70.cpp'
]
# quickNES Core Configuration

View File

@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <cstdio>
#include <string>
#include "blargg_common.h"
#include "Nes_Apu.h"
#include "audio/apu.h"
#include "Nes_Cpu.h"
#include "Nes_Ppu.h"
#include "Nes_Mapper.h"

View File

@ -7,9 +7,10 @@
#define NES_EMU_H
#include "blargg_common.h"
#include "Multi_Buffer.h"
#include "audio/Multi_Buffer.h"
#include "Nes_Cart.h"
#include "Nes_Core.h"
class Nes_State;
class Nes_Emu {

View File

@ -1,7 +1,7 @@
// Nes_Emu 0.7.0. http://www.slack.net/~ant/libs/
#include "Nes_Buffer.h"
#include "Nes_Apu.h"
#include "audio/Nes_Buffer.h"
#include "audio/apu.h"
/* Library Copyright (C) 2003-2006 Shay Green. This library is free software;
you can redistribute it and/or modify it under the terms of the GNU Lesser

View File

@ -1,8 +1,8 @@
// Nes_Emu 0.7.0. http://www.slack.net/~ant/libs/
#include "Nes_Effects_Buffer.h"
#include "Nes_Apu.h"
#include "audio/Nes_Effects_Buffer.h"
#include "audio/apu.h"
/* Copyright (C) 2004-2006 Shay Green. This module is free software; you
can redistribute it and/or modify it under the terms of the GNU Lesser

View File

@ -1,7 +1,7 @@
// Nes_Snd_Emu 0.1.7. http://www.slack.net/~ant/
#include "Nes_Apu.h"
#include "apu.h"
/* Copyright (C) 2003-2006 Shay Green. This module is free software; you
can redistribute it and/or modify it under the terms of the GNU Lesser

View File

@ -1,7 +1,7 @@
// Nes_Snd_Emu 0.1.7. http://www.slack.net/~ant/
#include "Nes_Apu.h"
#include "apu.h"
/* Copyright (C) 2003-2006 Shay Green. This module is free software; you
can redistribute it and/or modify it under the terms of the GNU Lesser

View File

@ -1,9 +1,8 @@
// Nes_Emu 0.7.0. http://www.slack.net/~ant/
#include "Nes_Fme7_Apu.h"
#include <string.h>
#include "audio/fme7/apu.h"
#include <cstring>
/* Copyright (C) 2003-2006 Shay Green. This module is free software; you
can redistribute it and/or modify it under the terms of the GNU Lesser

View File

@ -1,14 +1,11 @@
#pragma once
// Sunsoft FME-7 sound emulator
// Nes_Emu 0.7.0
#ifndef NES_FME7_APU_H
#define NES_FME7_APU_H
#include <stdint.h>
#include <cstdint>
#include "blargg_common.h"
#include "Blip_Buffer.h"
#include "audio/Blip_Buffer.h"
struct fme7_apu_state_t
{
@ -133,4 +130,3 @@ inline void Nes_Fme7_Apu::load_state( fme7_apu_state_t const& in )
run_until(last_time);
}
#endif

View File

@ -0,0 +1,17 @@
# quickerNES Audio sources
quickerNESAudioSrc = [
'audio/apu.cpp',
'audio/Nes_Oscs.cpp',
'audio/Nes_Buffer.cpp',
'audio/Blip_Buffer.cpp',
'audio/Effects_Buffer.cpp',
'audio/Nes_Effects_Buffer.cpp',
'audio/Multi_Buffer.cpp',
'audio/namco/apu.cpp',
'audio/vrc6/apu.cpp',
'audio/vrc7/emu2413.cpp',
'audio/vrc7/emu2413_state.cpp',
'audio/vrc7/apu.cpp',
'audio/fme7/apu.cpp',
]

View File

@ -1,7 +1,8 @@
// Nes_Snd_Emu 0.1.7. http://www.slack.net/~ant/
#include "Nes_Namco_Apu.h"
#include "audio/Blip_Buffer.h"
#include "audio/namco/apu.h"
/* Copyright (C) 2003-2006 Shay Green. This module is free software; you
can redistribute it and/or modify it under the terms of the GNU Lesser

View File

@ -1,15 +1,20 @@
#pragma once
// Namco 106 sound chip emulator
// Nes_Snd_Emu 0.1.7
#ifndef NES_NAMCO_APU_H
#define NES_NAMCO_APU_H
#include <cstdint>
#include "audio/apu.h"
#include <stdint.h>
#include "Nes_Apu.h"
struct namco_state_t;
struct namco_state_t
{
uint8_t regs [0x80];
uint8_t addr;
uint8_t unused;
uint8_t positions [8];
uint32_t delays [8];
};
static_assert( sizeof (namco_state_t) == 172 );
class Nes_Namco_Apu {
public:
@ -63,17 +68,6 @@ private:
void run_until( nes_time_t );
};
struct namco_state_t
{
uint8_t regs [0x80];
uint8_t addr;
uint8_t unused;
uint8_t positions [8];
uint32_t delays [8];
};
BOOST_STATIC_ASSERT( sizeof (namco_state_t) == 172 );
inline uint8_t& Nes_Namco_Apu::access()
{
int addr = addr_reg & 0x7f;
@ -101,4 +95,3 @@ inline void Nes_Namco_Apu::write_data( nes_time_t time, int data )
access() = data;
}
#endif

View File

@ -1,7 +1,7 @@
// Nes_Snd_Emu 0.1.7. http://www.slack.net/~ant/
#include "Nes_Vrc6_Apu.h"
#include "audio/vrc6/apu.h"
/* Copyright (C) 2003-2006 Shay Green. This module is free software; you
can redistribute it and/or modify it under the terms of the GNU Lesser

View File

@ -1,15 +1,12 @@
#pragma once
// Konami VRC6 sound chip emulator
// Nes_Snd_Emu 0.1.7
#ifndef NES_VRC6_APU_H
#define NES_VRC6_APU_H
#include <stdint.h>
#include "Nes_Apu.h"
#include "Blip_Buffer.h"
#include <cstdint>
#include "audio/apu.h"
#include "audio/Blip_Buffer.h"
struct vrc6_apu_state_t;
@ -95,5 +92,3 @@ inline void Nes_Vrc6_Apu::treble_eq( blip_eq_t const& eq )
saw_synth.treble_eq( eq );
square_synth.treble_eq( eq );
}
#endif

View File

@ -1,7 +1,7 @@
#include "Nes_Mapper.h"
#include "Nes_Vrc7.h"
#include "emu2413.h"
#include <string.h>
#include "audio/vrc7/apu.h"
#include "audio/vrc7/emu2413.h"
#include <cstring>
#define BYTESWAP(xxxx) {uint32_t _temp = (uint32_t)(xxxx);\
((uint8_t*)&(xxxx))[0] = (uint8_t)((_temp) >> 24);\

View File

@ -1,13 +1,11 @@
#pragma once
// Konami VRC7 sound chip emulator
// Nes_Snd_Emu 0.1.7. Copyright (C) 2003-2005 Shay Green. GNU LGPL license.
#ifndef NES_VRC7_H
#define NES_VRC7_H
#include "emu2413_state.h"
#include "Blip_Buffer.h"
#include "audio/vrc7/emu2413_state.h"
#include "audio/Blip_Buffer.h"
struct vrc7_snapshot_t;
@ -69,4 +67,3 @@ inline void Nes_Vrc7::osc_output( int i, Blip_Buffer* buf )
oscs [i].output = buf;
}
#endif

View File

@ -1,5 +1,4 @@
#ifndef EMU2413_H
#define EMU2413_H
#pragma once
typedef signed int e_int;
typedef unsigned int e_uint;
@ -215,4 +214,3 @@ EMU2413_API e_uint32 OPLL_toggleMask(OPLL *, e_uint32 mask) ;
}
#endif
#endif

View File

@ -1,5 +1,4 @@
#ifndef EMU2413_STATE_H
#define EMU2413_STATE_H
#pragma once
#include "emu2413.h"
@ -32,6 +31,4 @@ void OPLL_state_byteswap(OPLL_STATE *state);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -7,7 +7,7 @@
#include "Nes_Mapper.h"
#include "blargg_endian.h"
#include "Nes_Namco_Apu.h"
#include "audio/namco/apu.h"
/* Copyright (C) 2004-2006 Shay Green. This module is free software; you
can redistribute it and/or modify it under the terms of the GNU Lesser

View File

@ -6,7 +6,7 @@
#include "Nes_Mapper.h"
#include <string.h>
#include "Nes_Vrc6_Apu.h"
#include "audio/vrc6/apu.h"
#include "blargg_endian.h"
/* Copyright (C) 2004-2006 Shay Green. This module is free software; you

View File

@ -5,9 +5,8 @@
// Nes_Emu 0.7.0. http://www.slack.net/~ant/libs/
#include "Nes_Mapper.h"
#include "blargg_endian.h"
#include "Nes_Fme7_Apu.h"
#include "audio/fme7/apu.h"
/* Copyright (C) 2005 Chris Moeller */
/* Copyright (C) 2005-2006 Shay Green. This module is free software; you

View File

@ -1,11 +1,11 @@
#pragma once
// Nes_Emu 0.5.4. http://www.slack.net/~ant/
#include "Nes_Mapper.h"
#include "Nes_Vrc7.h"
#include "audio/vrc7/apu.h"
#include "blargg_endian.h"
#include <string.h>
#pragma once
#include <cstring>
/* Copyright (C) 2004-2005 Shay Green. This module is free software; you
can redistribute it and/or modify it under the terms of the GNU Lesser

View File

@ -1,27 +1,15 @@
# quickerNES Core sources
quickerNESSrc = [
'Nes_Apu.cpp',
'Nes_Oscs.cpp',
'Nes_Buffer.cpp',
'Nes_Fme7_Apu.cpp',
subdir('audio')
quickerNESSrc = quickerNESAudioSrc + [
'Nes_Ppu.cpp',
'Blip_Buffer.cpp',
'Nes_Ppu_Impl.cpp',
'Nes_Ppu_Rendering.cpp',
'Effects_Buffer.cpp',
'emu2413.cpp',
'emu2413_state.cpp',
'Nes_Effects_Buffer.cpp',
'Nes_Namco_Apu.cpp',
'Nes_Vrc6_Apu.cpp',
'Multi_Buffer.cpp',
'Nes_Emu.cpp',
'nes_ntsc.cpp',
'Nes_Vrc7.cpp',
'Nes_Mapper.cpp',
'Nes_Cpu.cpp',
'quickerNESInstance.hpp'
'Nes_Cpu.cpp'
]
# quickerNES Core Configuration