Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PUAE
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
PUAE
Commits
757e2ea2
Commit
757e2ea2
authored
Nov 29, 2010
by
GnoStiC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
puae 2.3.1
parent
f73bdd59
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
274 additions
and
113 deletions
+274
-113
build_linux_nojit.sh
build_linux_nojit.sh
+14
-1
audio.c
src/audio.c
+1
-7
audio.h
src/include/audio.h
+0
-7
inputdevice.c
src/inputdevice.c
+8
-6
main.c
src/main.c
+1
-1
memory.c
src/memory.c
+0
-2
newcpu.c
src/newcpu.c
+0
-1
sound.c
src/sd-alsa/sound.c
+67
-0
sound.h
src/sd-alsa/sound.h
+17
-3
sound.c
src/sd-none/sound.c
+8
-0
sound.c
src/sd-sdl/sound.c
+146
-80
uaeexe.c
src/uaeexe.c
+4
-2
uaelib.c
src/uaelib.c
+8
-3
No files found.
build_linux_nojit.sh
View file @
757e2ea2
# P-UAE
#
# 2010 Mustafa TUFAN (aka GnoStiC/BRONX)
#
#
#
base
=
" --with-sdl --with-sdl-gl --with-sdl-gfx --with-sdl-sound --enable-drvsnd "
cd32
=
" --enable-cd32 "
a600
=
" --enable-gayle "
scsi
=
" --enable-scsi-device --enable-ncr --enable-a2091 "
other
=
" --with-caps --enable-amax --disable-jit"
#
#
./bootstrap.sh
./configure
--with-sdl
--with-sdl-gl
--with-sdl-gfx
--with-sdl-sound
--with-caps
--enable-drvsnd
--enable-amax
--enable-cd32
--enable-scsi-device
--enable-a2091
--enable-gayle
--enable-ncr
--disable-jit
./configure
$base
$cd32
$a600
$scsi
$other
make clean
make
src/audio.c
View file @
757e2ea2
...
...
@@ -2016,12 +2016,6 @@ void audio_vsync (void)
#endif
}
int
audio_setup
(
void
)
{
return
setup_sound
();
}
void
audio_close
(
void
)
{
close_sound
();
}
void
audio_pause
(
void
)
{
pause_sound
();
}
void
audio_resume
(
void
)
{
resume_sound
();
}
void
audio_volume
(
int
volume
)
{
sound_volume
(
volume
);
}
#ifdef SAVESTATE
void
restore_audio_finish
(
void
)
{
...
...
src/include/audio.h
View file @
757e2ea2
...
...
@@ -37,13 +37,6 @@ extern void set_audio (void);
extern
int
audio_activate
(
void
);
extern
void
audio_vsync
(
void
);
extern
int
audio_setup
(
void
);
extern
void
audio_close
(
void
);
extern
void
audio_reset
(
void
);
extern
void
audio_pause
(
void
);
extern
void
audio_resume
(
void
);
extern
void
audio_volume
(
int
);
void
switch_audio_interpol
(
void
);
extern
int
sound_available
;
...
...
src/inputdevice.c
View file @
757e2ea2
...
...
@@ -781,6 +781,8 @@ void read_inputdevice_config (struct uae_prefs *pr, const TCHAR *option, TCHAR *
pr
->
input_analog_joystick_mult
=
_tstol
(
value
);
if
(
!
strcasecmp
(
p
,
"analog_joystick_offset"
))
pr
->
input_analog_joystick_offset
=
_tstol
(
value
);
if
(
!
strcasecmp
(
p
,
"contact_bounce"
))
pr
->
input_contact_bounce
=
_tstol
(
value
);
idnum
=
_tstol
(
p
);
if
(
idnum
<=
0
||
idnum
>
MAX_INPUT_SETTINGS
)
...
...
@@ -2451,16 +2453,16 @@ void inputdevice_handle_inputcode (void)
sound_volume
(
1
);
break
;
case
AKS_VOLMUTE
:
//
sound_mute (-1);
sound_mute
(
-
1
);
break
;
case
AKS_MVOLDOWN
:
//
master_sound_volume (-1);
master_sound_volume
(
-
1
);
break
;
case
AKS_MVOLUP
:
//
master_sound_volume (1);
master_sound_volume
(
1
);
break
;
case
AKS_MVOLMUTE
:
//
master_sound_volume (0);
master_sound_volume
(
0
);
break
;
case
AKS_QUIT
:
uae_quit
();
...
...
@@ -5618,9 +5620,9 @@ void warpmode (int mode)
if
(
currprefs
.
turbo_emulation
)
{
if
(
!
currprefs
.
cpu_cycle_exact
&&
!
currprefs
.
blitter_cycle_exact
)
changed_prefs
.
gfx_framerate
=
currprefs
.
gfx_framerate
=
10
;
audio_pause
();
pause_sound
();
}
else
{
audio_resume
();
resume_sound
();
}
compute_vsynctime
();
#ifdef RETROPLATFORM
...
...
src/main.c
View file @
757e2ea2
...
...
@@ -853,7 +853,7 @@ static int real_main2 (int argc, TCHAR **argv)
fixup_prefs
(
&
currprefs
);
}
if
(
!
audio_setup
())
{
if
(
!
setup_sound
())
{
write_log
(
"Sound driver unavailable: Sound output disabled
\n
"
);
currprefs
.
produce_sound
=
0
;
}
...
...
src/memory.c
View file @
757e2ea2
...
...
@@ -171,8 +171,6 @@ static int REGPARAM3 dummy_check (uaecptr addr, uae_u32 size) REGPARAM;
static
void
dummylog
(
int
rw
,
uaecptr
addr
,
int
size
,
uae_u32
val
,
int
ins
)
{
if
(
M68K_GETPC
==
0xf81a16
)
activate_debugger
();
if
(
illegal_count
>=
MAX_ILG
)
return
;
/* ignore Zorro3 expansion space */
...
...
src/newcpu.c
View file @
757e2ea2
...
...
@@ -37,7 +37,6 @@
#define f_out fprintf
#define console_out printf
#ifdef JIT
//extern uae_u8* compiled_code;
#include "compemu.h"
#else
/* Need to have these somewhere */
...
...
src/sd-alsa/sound.c
View file @
757e2ea2
...
...
@@ -19,6 +19,7 @@
#include "options.h"
#include "gensound.h"
#include "sounddep/sound.h"
#include "driveclick.h"
#include <alsa/asoundlib.h>
...
...
@@ -34,6 +35,8 @@ int paula_sndbufsize;
snd_pcm_t
*
alsa_playback_handle
=
0
;
int
bytes_per_frame
;
static
struct
sound_data
sdpaula
;
static
struct
sound_data
*
sdp
=
&
sdpaula
;
void
close_sound
(
void
)
{
...
...
@@ -299,3 +302,67 @@ int audio_parse_option (struct uae_prefs *p, const char *option, const char *val
return
(
cfgfile_string
(
option
,
value
,
"device"
,
alsa_device
,
256
)
||
cfgfile_yesno
(
option
,
value
,
"verbose"
,
&
alsa_verbose
));
}
void
set_volume_sound_device
(
struct
sound_data
*
sd
,
int
volume
,
int
mute
)
{
}
void
set_volume
(
int
volume
,
int
mute
)
{
set_volume_sound_device
(
sdp
,
volume
,
mute
);
config_changed
=
1
;
}
static
int
setget_master_volume_linux
(
int
setvolume
,
int
*
volume
,
int
*
mute
)
{
unsigned
int
ok
=
0
;
if
(
setvolume
)
{
;
//set
}
else
{
;
//get
}
return
ok
;
}
static
int
set_master_volume
(
int
volume
,
int
mute
)
{
return
setget_master_volume_linux
(
1
,
&
volume
,
&
mute
);
}
static
int
get_master_volume
(
int
*
volume
,
int
*
mute
)
{
*
volume
=
0
;
*
mute
=
0
;
return
setget_master_volume_linux
(
0
,
volume
,
mute
);
}
void
master_sound_volume
(
int
dir
)
{
int
vol
,
mute
,
r
;
r
=
get_master_volume
(
&
vol
,
&
mute
);
if
(
!
r
)
return
;
if
(
dir
==
0
)
mute
=
mute
?
0
:
1
;
vol
+=
dir
*
(
65536
/
10
);
if
(
vol
<
0
)
vol
=
0
;
if
(
vol
>
65535
)
vol
=
65535
;
set_master_volume
(
vol
,
mute
);
config_changed
=
1
;
}
void
sound_mute
(
int
newmute
)
{
if
(
newmute
<
0
)
sdp
->
mute
=
sdp
->
mute
?
0
:
1
;
else
sdp
->
mute
=
newmute
;
set_volume
(
currprefs
.
sound_volume
,
sdp
->
mute
);
config_changed
=
1
;
}
src/sd-alsa/sound.h
View file @
757e2ea2
...
...
@@ -19,6 +19,20 @@ extern int paula_sndbufsize;
extern
snd_pcm_t
*
alsa_playback_handle
;
extern
int
bytes_per_frame
;
struct
sound_data
{
int
waiting_for_buffer
;
int
devicetype
;
int
obtainedfreq
;
int
paused
;
int
mute
;
int
channels
;
int
freq
;
int
samplesize
;
int
sndbufsize
;
struct
sound_dp
*
data
;
};
/* alsa_xrun_recovery() function is copied from ALSA manual. why the hell did
they make ALSA this hard?! i bet 95% of ALSA programmers would like a
simpler way to do error handling.. let the 5% use tricky APIs.
...
...
src/sd-none/sound.c
View file @
757e2ea2
...
...
@@ -61,3 +61,11 @@ int audio_parse_option (struct uae_prefs *p, const char *option, const char *val
{
return
0
;
}
void
master_sound_volume
(
int
dir
)
{
}
void
sound_mute
(
int
newmute
)
{
}
src/sd-sdl/sound.c
View file @
757e2ea2
/*
/*
* UAE - The Un*x Amiga Emulator
*
* Support for SDL sound
...
...
@@ -18,6 +18,7 @@
#include "custom.h"
#include "gui.h"
#include "gensound.h"
#include "driveclick.h"
#include "sounddep/sound.h"
#include "threaddep/thread.h"
#include <SDL_audio.h>
...
...
@@ -33,6 +34,9 @@ static SDL_AudioSpec spec;
static
smp_comm_pipe
to_sound_pipe
;
static
uae_sem_t
data_available_sem
,
callback_done_sem
,
sound_init_sem
;
static
struct
sound_data
sdpaula
;
static
struct
sound_data
*
sdp
=
&
sdpaula
;
static
int
in_callback
,
closing_sound
;
static
void
clearbuffer
(
void
)
...
...
@@ -61,7 +65,6 @@ static void sound_callback (void *userdata, Uint8 *stream, int len)
/* Notify writer that we're done. */
uae_sem_post
(
&
callback_done_sem
);
}
in_callback
=
0
;
}
...
...
@@ -109,7 +112,6 @@ int setup_sound (void)
}
sound_available
=
success
;
return
sound_available
;
}
...
...
@@ -196,6 +198,7 @@ void close_sound (void)
closing_sound
=
1
;
uae_sem_post
(
&
data_available_sem
);
}
write_comm_pipe_int
(
&
to_sound_pipe
,
1
,
1
);
uae_sem_wait
(
&
sound_init_sem
);
SDL_CloseAudio
();
...
...
@@ -274,3 +277,66 @@ int audio_parse_option (struct uae_prefs *p, const char *option, const char *val
{
return
0
;
}
void
set_volume_sound_device
(
struct
sound_data
*
sd
,
int
volume
,
int
mute
)
{
}
void
set_volume
(
int
volume
,
int
mute
)
{
set_volume_sound_device
(
sdp
,
volume
,
mute
);
config_changed
=
1
;
}
static
int
setget_master_volume_linux
(
int
setvolume
,
int
*
volume
,
int
*
mute
)
{
unsigned
int
ok
=
0
;
if
(
setvolume
)
{
;
//set
}
else
{
;
//get
}
return
ok
;
}
static
int
set_master_volume
(
int
volume
,
int
mute
)
{
return
setget_master_volume_linux
(
1
,
&
volume
,
&
mute
);
}
static
int
get_master_volume
(
int
*
volume
,
int
*
mute
)
{
*
volume
=
0
;
*
mute
=
0
;
return
setget_master_volume_linux
(
0
,
volume
,
mute
);
}
void
master_sound_volume
(
int
dir
)
{
int
vol
,
mute
,
r
;
r
=
get_master_volume
(
&
vol
,
&
mute
);
if
(
!
r
)
return
;
if
(
dir
==
0
)
mute
=
mute
?
0
:
1
;
vol
+=
dir
*
(
65536
/
10
);
if
(
vol
<
0
)
vol
=
0
;
if
(
vol
>
65535
)
vol
=
65535
;
set_master_volume
(
vol
,
mute
);
config_changed
=
1
;
}
void
sound_mute
(
int
newmute
)
{
if
(
newmute
<
0
)
sdp
->
mute
=
sdp
->
mute
?
0
:
1
;
else
sdp
->
mute
=
newmute
;
set_volume
(
currprefs
.
sound_volume
,
sdp
->
mute
);
config_changed
=
1
;
}
src/uaeexe.c
View file @
757e2ea2
...
...
@@ -107,7 +107,7 @@ static uae_u32 REGPARAM2 uaeexe_server (TrapContext *context)
{
int
len
;
TCHAR
*
cmd
;
char
*
dst
;
char
*
dst
,
*
s
;
if
(
ARG
(
0
)
&&
!
running
)
{
running
=
1
;
...
...
@@ -124,8 +124,10 @@ static uae_u32 REGPARAM2 uaeexe_server (TrapContext *context)
dst
=
(
char
*
)
get_real_address
(
ARG
(
0
));
len
=
ARG
(
1
);
strncpy
(
dst
,
cmd
,
len
);
s
=
ua
(
cmd
);
strncpy
(
dst
,
s
,
len
);
write_log
(
"Sending '%s' to remote cli
\n
"
,
cmd
);
xfree
(
s
);
xfree
(
cmd
);
return
ARG
(
0
);
}
src/uaelib.c
View file @
757e2ea2
...
...
@@ -246,8 +246,10 @@ static uae_u32 emulib_GetUaeConfig (uaecptr place)
put_byte
(
place
+
35
,
1
);
for
(
j
=
0
;
j
<
4
;
j
++
)
{
char
*
s
=
ua
(
currprefs
.
floppyslots
[
j
].
df
);
for
(
i
=
0
;
i
<
256
;
i
++
)
put_byte
(
place
+
36
+
i
+
j
*
256
,
currprefs
.
floppyslots
[
j
].
df
[
i
]);
put_byte
(
place
+
36
+
i
+
j
*
256
,
s
[
i
]);
xfree
(
s
);
}
return
1
;
}
...
...
@@ -338,6 +340,7 @@ static uae_u32 emulib_Minimize (void)
static
int
native_dos_op
(
uae_u32
mode
,
uae_u32
p1
,
uae_u32
p2
,
uae_u32
p3
)
{
TCHAR
tmp
[
MAX_DPATH
];
char
*
s
;
int
v
,
i
;
if
(
mode
)
...
...
@@ -348,10 +351,12 @@ static int native_dos_op (uae_u32 mode, uae_u32 p1, uae_u32 p2, uae_u32 p3)
v
=
get_native_path
(
p1
,
tmp
);
if
(
v
)
return
v
;
for
(
i
=
0
;
i
<=
strlen
(
tmp
)
&&
i
<
p3
-
1
;
i
++
)
{
put_byte
(
p2
+
i
,
tmp
[
i
]);
s
=
ua
(
tmp
);
for
(
i
=
0
;
i
<=
strlen
(
s
)
&&
i
<
p3
-
1
;
i
++
)
{
put_byte
(
p2
+
i
,
s
[
i
]);
put_byte
(
p2
+
i
+
1
,
0
);
}
xfree
(
s
);
return
0
;
}
#ifndef UAEGFX_INTERNAL
...
...
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