Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
nexus-am
提交
c90a5adf
N
nexus-am
项目概览
OpenXiangShan
/
nexus-am
10 个月 前同步成功
通知
0
Star
21
Fork
25
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nexus-am
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c90a5adf
编写于
7月 06, 2020
作者:
Z
Zihao Yu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix-audio' into 'master'
Fix audio See merge request projectn/nexus-am!45
上级
63f9d378
794ae5e9
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
30 addition
and
7 deletion
+30
-7
am/arch/platform/navy.mk
am/arch/platform/navy.mk
+1
-0
am/arch/platform/sdi.mk
am/arch/platform/sdi.mk
+1
-0
am/arch/riscv64-noop.mk
am/arch/riscv64-noop.mk
+1
-0
am/src/dummy/audio.c
am/src/dummy/audio.c
+12
-0
am/src/nemu/include/nemu.h
am/src/nemu/include/nemu.h
+5
-5
apps/fceux/src/config.h
apps/fceux/src/config.h
+1
-1
apps/fceux/src/drivers/sdl/sdl-sound.cpp
apps/fceux/src/drivers/sdl/sdl-sound.cpp
+9
-1
未找到文件。
am/arch/platform/navy.mk
浏览文件 @
c90a5adf
...
...
@@ -2,6 +2,7 @@ AM_SRCS := navy/trm.c \
navy/ioe.c
\
navy/dev/input.c
\
navy/dev/timer.c
\
dummy/audio.c
\
navy/dev/video.c
NAVY_MAKEFILE
=
Makefile.navy
...
...
am/arch/platform/sdi.mk
浏览文件 @
c90a5adf
...
...
@@ -4,6 +4,7 @@ AM_SRCS += sdi/trm.c \
nemu/common/input.c
\
nemu/common/timer.c
\
nemu/common/video.c
\
dummy/audio.c
\
dummy/cte.c
\
dummy/vme.c
\
dummy/mpe.c
\
...
...
am/arch/riscv64-noop.mk
浏览文件 @
c90a5adf
...
...
@@ -13,6 +13,7 @@ AM_SRCS := noop/isa/riscv/trm.c \
noop/common/input.c
\
noop/common/timer.c
\
nemu/common/video.c
\
dummy/audio.c
\
noop/isa/riscv/instr.c
\
dummy/mpe.c
\
nemu/isa/riscv/boot/start.S
...
...
am/src/dummy/audio.c
0 → 100644
浏览文件 @
c90a5adf
#include <am.h>
void
__am_audio_init
()
{
}
size_t
__am_audio_write
(
uintptr_t
reg
,
void
*
buf
,
size_t
size
)
{
return
0
;
}
size_t
__am_audio_read
(
uintptr_t
reg
,
void
*
buf
,
size_t
size
)
{
return
0
;
}
am/src/nemu/include/nemu.h
浏览文件 @
c90a5adf
...
...
@@ -20,11 +20,11 @@
# define AUDIO_COUNT_ADDR 0x214
# define AUDIO_SBUF_ADDR 0xa0800000
#elif defined(__ARCH_RISCV64_NOOP) || defined(__ARCH_RISCV32_NOOP)
# define KBD_ADDR 0x40900000
# define RTC_ADDR 0x
4
800bff8
# define SCREEN_ADDR 0x40
800
000
# define SYNC_ADDR 0x40
800
004
# define FB_ADDR 0x
41
000000
//
# define KBD_ADDR 0x40900000
# define RTC_ADDR 0x
3
800bff8
# define SCREEN_ADDR 0x40
001
000
# define SYNC_ADDR 0x40
001
004
# define FB_ADDR 0x
50
000000
#else
# define SERIAL_PORT 0xa10003f8
# define KBD_ADDR 0xa1000060
...
...
apps/fceux/src/config.h
浏览文件 @
c90a5adf
...
...
@@ -8,7 +8,7 @@
#if defined(__PLATFORM_NEMU__)
# define NR_FRAMESKIP 1
# define SOUND_CONFIG SOUND_LQ
#elif defined(__PLATFORM_NOOP__)
#elif defined(__PLATFORM_NOOP__)
|| defined(__PLATFORM_SDI__) || defined(__PLATFORM_NAVY__)
# define NR_FRAMESKIP 2
# define SOUND_CONFIG SOUND_NONE
#else
...
...
apps/fceux/src/drivers/sdl/sdl-sound.cpp
浏览文件 @
c90a5adf
...
...
@@ -45,7 +45,6 @@ InitSound()
const
int
soundrate
=
11025
;
const
int
soundq
=
0
;
#endif
const
int
soundbufsize
=
128
;
const
int
soundvolume
=
150
;
const
int
soundtrianglevolume
=
256
;
const
int
soundsquare1volume
=
256
;
...
...
@@ -53,6 +52,8 @@ InitSound()
const
int
soundnoisevolume
=
256
;
const
int
soundpcmvolume
=
256
;
#if SOUND_CONFIG != SOUND_NONE
const
int
soundbufsize
=
128
;
_DEV_AUDIO_INIT_t
init
;
init
.
freq
=
soundrate
;
init
.
channels
=
1
;
...
...
@@ -64,6 +65,7 @@ InitSound()
s_BufferSize
=
init
.
bufsize
;
init
.
bufsize
*=
sizeof
(
int16_t
);
_io_write
(
_DEV_AUDIO
,
_DEVREG_AUDIO_INIT
,
&
init
,
sizeof
(
init
));
#endif
FCEUI_SetSoundVolume
(
soundvolume
);
FCEUI_SetSoundQuality
(
soundq
);
...
...
@@ -92,10 +94,14 @@ GetMaxSound(void)
uint32
GetWriteSound
(
void
)
{
#if SOUND_CONFIG != SOUND_NONE
_DEV_AUDIO_SBSTAT_t
audio
;
_io_read
(
_DEV_AUDIO
,
_DEVREG_AUDIO_SBSTAT
,
&
audio
,
sizeof
(
audio
));
audio
.
count
/=
sizeof
(
int16_t
);
return
s_BufferSize
-
audio
.
count
;
#else
return
0
;
#endif
}
/**
...
...
@@ -105,6 +111,7 @@ GetWriteSound(void)
WriteSound
(
int32
*
buf
,
int
Count
)
{
#if SOUND_CONFIG != SOUND_NONE
extern
int
EmulationPaused
;
if
(
EmulationPaused
==
0
)
{
// FECUX stores each PCM sample as 32-bit data,
...
...
@@ -125,6 +132,7 @@ WriteSound(int32 *buf,
_io_write
(
_DEV_AUDIO
,
_DEVREG_AUDIO_SBCTRL
,
&
audio
,
sizeof
(
audio
));
free
(
buf16
);
}
#endif
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录