Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
RACE
Commits
b5f9c0a3
Commit
b5f9c0a3
authored
Oct 03, 2020
by
Libretro-Admin
Browse files
Convert neopopsound to C
parent
1f5f9e76
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile.common
View file @
b5f9c0a3
...
...
@@ -7,9 +7,11 @@ ifneq (,$(findstring msvc2003,$(platform)))
INCFLAGS
+=
-I
$(LIBRETRO_COMM_DIR)
/include/compat/msvc
endif
SOURCES_C
:=
ifeq
($(WANT_ZIP),1)
INCFLAGS
+=
-I
$(DEPS_DIR)
/zlib-1.2.8
SOURCES_C
:
=
\
SOURCES_C
+
=
\
$(CORE_DIR)
/unzip.c
\
$(CORE_DIR)
/ioapi.c
endif
...
...
@@ -33,7 +35,6 @@ endif
SOURCES_CXX
:=
\
$(CORE_DIR)
/input.cpp
\
$(CORE_DIR)
/neopopsound.cpp
\
$(CORE_DIR)
/ngpBios.cpp
\
$(CORE_DIR)
/tlcs900h.cpp
\
$(CORE_DIR)
/memory.cpp
\
...
...
@@ -45,6 +46,8 @@ SOURCES_CXX := \
$(CORE_DIR)
/libretro/libretro.cpp
\
$(CORE_DIR)
/libretro/log.cpp
SOURCES_C
+=
\
$(CORE_DIR)
/neopopsound.c
ifeq
($(DRZ80),1)
FLAGS
+=
-DDRZ80
...
...
neopopsound.c
pp
→
neopopsound.c
View file @
b5f9c0a3
...
...
@@ -29,12 +29,9 @@
#include "StdAfx.h"
#include "neopopsound.h"
#include "main.h"
#include "memory.h"
#include <string.h>
#include "neopopsound.h"
/* ============================================================================= */
...
...
@@ -546,6 +543,3 @@ int sound_system_init(void)
void
system_sound_update
(
int
nframes
)
{
}
neopopsound.h
View file @
b5f9c0a3
// Flavor modified sound.c and sound.h from NEOPOP
// which was originally based on sn76496.c from MAME
// some ideas also taken from NeoPop-SDL code
//---------------------------------------------------------------------------
// Originally from
// NEOPOP : Emulator as in Dreamland
//
// Copyright (c) 2001-2002 by neopop_uk
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version. See also the license.txt file for
// additional informations.
//---------------------------------------------------------------------------
/* Flavor modified sound.c and sound.h from NEOPOP
* which was originally based on sn76496.c from MAME
* some ideas also taken from NeoPop-SDL code
*/
/*---------------------------------------------------------------------------
* Originally from
* NEOPOP : Emulator as in Dreamland
*
* Copyright (c) 2001-2002 by neopop_uk
*---------------------------------------------------------------------------
*/
/*---------------------------------------------------------------------------
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. See also the license.txt file for
* additional informations.
*---------------------------------------------------------------------------
*/
#ifndef __NEOPOPSOUND__
#define __NEOPOPSOUND__
//=============================================================================
#include "StdAfx.h"
...
...
@@ -38,31 +39,25 @@ typedef struct
}
SoundChip
;
//=============================================================================
extern
SoundChip
toneChip
;
extern
SoundChip
noiseChip
;
#ifdef __cplusplus
extern
"C"
{
#endif
void
WriteSoundChip
(
SoundChip
*
chip
,
_u8
data
);
int
sound_system_init
();
int
sound_system_init
(
void
);
BOOL
system_sound_init
(
void
);
void
system_sound_chipreset
(
void
);
//void system_sound_update(void);
void
system_sound_update
(
int
nframes
);
void
system_VBL
(
void
);
#define Write_SoundChipTone(VALUE) (WriteSoundChip(&toneChip, VALUE))
#define Write_SoundChipNoise(VALUE) (WriteSoundChip(&noiseChip, VALUE))
//=============================================================================
//void dac_writeL(unsigned char);
//void dac_writeR(unsigned char);
void
sound_init
(
int
SampleRate
);
extern
BOOL
mute
;
...
...
@@ -73,11 +68,11 @@ void sound_update(_u16* chip_buffer, int length_bytes);
void
increaseVolume
(
void
);
void
decreaseVolume
(
void
);
//#define dac_writeL dac_write
//#define dac_writeR dac_write
void
dac_writeL
(
unsigned
char
);
//void dac_writeR(unsigned char);
void
dac_write
(
unsigned
char
);
void
dac_writeL
(
unsigned
char
a
);
void
dac_write
(
unsigned
char
a
);
#ifdef __cplusplus
}
#endif
//=============================================================================
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment