NES: make it C++
so we can submit to chan osc buffer
This commit is contained in:
parent
1d60bb03cc
commit
5df3e1f030
|
@ -554,9 +554,9 @@ src/engine/platform/sound/segapcm.cpp
|
|||
src/engine/platform/sound/gb/apu.c
|
||||
src/engine/platform/sound/gb/timing.c
|
||||
src/engine/platform/sound/pce_psg.cpp
|
||||
src/engine/platform/sound/nes/apu.c
|
||||
src/engine/platform/sound/nes/fds.c
|
||||
src/engine/platform/sound/nes/mmc5.c
|
||||
src/engine/platform/sound/nes/apu.cpp
|
||||
src/engine/platform/sound/nes/fds.cpp
|
||||
src/engine/platform/sound/nes/mmc5.cpp
|
||||
src/engine/platform/sound/vera_psg.c
|
||||
src/engine/platform/sound/vera_pcm.c
|
||||
src/engine/platform/sound/ymf278b/ymf278.cpp
|
||||
|
|
|
@ -376,5 +376,4 @@ void apu_turn_on(struct NESAPU* a, BYTE apu_type) {
|
|||
a->S2.timer=2048;
|
||||
a->TR.timer=2048;
|
||||
a->NS.timer=0x0FE4;
|
||||
//a->DMC.=0x01AC;
|
||||
}
|
|
@ -406,20 +406,14 @@ typedef struct _apuDMC {
|
|||
BYTE tick_type;
|
||||
} _apuDMC;
|
||||
|
||||
#if defined (__cplusplus)
|
||||
#define EXTERNC extern "C"
|
||||
#else
|
||||
#define EXTERNC
|
||||
#endif
|
||||
|
||||
EXTERNC struct _nla_table {
|
||||
struct _nla_table {
|
||||
SWORD pulse[32];
|
||||
SWORD tnd[203];
|
||||
};
|
||||
|
||||
extern struct _nla_table nla_table;
|
||||
|
||||
EXTERNC struct NESAPU {
|
||||
struct NESAPU {
|
||||
_apu apu;
|
||||
_r4011 r4011;
|
||||
_r4015 r4015;
|
||||
|
@ -538,9 +532,7 @@ static const WORD dmc_rate[3][16] = {
|
|||
}
|
||||
};
|
||||
|
||||
EXTERNC void apu_tick(struct NESAPU* a, int len);
|
||||
EXTERNC void apu_turn_on(struct NESAPU* a, BYTE apu_type);
|
||||
|
||||
#undef EXTERNC
|
||||
void apu_tick(struct NESAPU* a, int len);
|
||||
void apu_turn_on(struct NESAPU* a, BYTE apu_type);
|
||||
|
||||
#endif /* APU_H_ */
|
||||
|
|
|
@ -23,13 +23,7 @@
|
|||
|
||||
enum fds_operations { FDS_OP_NONE, FDS_OP_READ, FDS_OP_WRITE };
|
||||
|
||||
#if defined (__cplusplus)
|
||||
#define EXTERNC extern "C"
|
||||
#else
|
||||
#define EXTERNC
|
||||
#endif
|
||||
|
||||
EXTERNC struct _fds {
|
||||
struct _fds {
|
||||
// snd
|
||||
BYTE enabled_snd_reg;
|
||||
struct _fds_snd {
|
||||
|
@ -86,8 +80,8 @@ EXTERNC struct _fds {
|
|||
} snd;
|
||||
};
|
||||
|
||||
EXTERNC void extcl_apu_tick_FDS(struct _fds* fds);
|
||||
EXTERNC void fds_reset(struct _fds* fds);
|
||||
void extcl_apu_tick_FDS(struct _fds* fds);
|
||||
void fds_reset(struct _fds* fds);
|
||||
|
||||
#undef EXTERNC
|
||||
|
||||
|
|
|
@ -21,13 +21,7 @@
|
|||
|
||||
#include "apu.h"
|
||||
|
||||
#if defined (__cplusplus)
|
||||
#define EXTERNC extern "C"
|
||||
#else
|
||||
#define EXTERNC
|
||||
#endif
|
||||
|
||||
EXTERNC struct _mmc5 {
|
||||
struct _mmc5 {
|
||||
BYTE prg_mode;
|
||||
BYTE chr_mode;
|
||||
BYTE ext_mode;
|
||||
|
@ -69,12 +63,10 @@ EXTERNC struct _mmc5 {
|
|||
/* ------------------------------------------------------- */
|
||||
};
|
||||
|
||||
EXTERNC void map_init_MMC5(struct _mmc5* mmc5);
|
||||
EXTERNC void extcl_cpu_wr_mem_MMC5(struct _mmc5* mmc5, WORD address, BYTE value);
|
||||
EXTERNC void extcl_length_clock_MMC5(struct _mmc5* mmc5);
|
||||
EXTERNC void extcl_envelope_clock_MMC5(struct _mmc5* mmc5);
|
||||
EXTERNC void extcl_apu_tick_MMC5(struct _mmc5* mmc5);
|
||||
|
||||
#undef EXTERNC
|
||||
void map_init_MMC5(struct _mmc5* mmc5);
|
||||
void extcl_cpu_wr_mem_MMC5(struct _mmc5* mmc5, WORD address, BYTE value);
|
||||
void extcl_length_clock_MMC5(struct _mmc5* mmc5);
|
||||
void extcl_envelope_clock_MMC5(struct _mmc5* mmc5);
|
||||
void extcl_apu_tick_MMC5(struct _mmc5* mmc5);
|
||||
|
||||
#endif /* MAPPER_MMC5_H_ */
|
||||
|
|
Loading…
Reference in a new issue