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
Hide 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
...
...
@@ -1436,7 +1436,7 @@ static void audio_state_channel2 (int nr, bool perfin)
#ifdef DEBUG_AUDIO
if
(
debugchannel
(
nr
))
write_log
(
"%d: IDLE
\n
"
,
nr
);
#endif
#endif
zerostate
(
nr
);
return
;
}
...
...
@@ -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.
...
...
@@ -73,12 +87,12 @@ static void check_sound_buffers (void)
STATIC_INLINE
void
clear_sound_buffers
(
void
)
{
memset
(
paula_sndbuffer
,
0
,
paula_sndbufsize
);
paula_sndbufpt
=
paula_sndbuffer
;
memset
(
paula_sndbuffer
,
0
,
paula_sndbufsize
);
paula_sndbufpt
=
paula_sndbuffer
;
}
STATIC_INLINE
void
set_sound_buffers
(
void
)
{
{
}
#define PUT_SOUND_WORD(b) do { *(uae_u16 *)paula_sndbufpt = b; paula_sndbufpt = (uae_u16 *)(((uae_u8 *)paula_sndbufpt) + 2); } while (0)
...
...
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
*
* Copyright 1997 Bernd Schmidt
* Copyright 2003-2006 Richard Drummond
* Copyright 2009-2010 Mustafa TUFAN
*/
/*
* UAE - The Un*x Amiga Emulator
*
* Support for SDL sound
*
* Copyright 1997 Bernd Schmidt
* Copyright 2003-2006 Richard Drummond
* Copyright 2009-2010 Mustafa TUFAN
*/
#include "sysconfig.h"
#include "sysdeps.h"
...
...
@@ -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
)
...
...
@@ -43,26 +47,25 @@ static void clearbuffer (void)
/* This shouldn't be necessary . . . */
static
void
dummy_callback
(
void
*
userdata
,
Uint8
*
stream
,
int
len
)
{
return
;
return
;
}
static
void
sound_callback
(
void
*
userdata
,
Uint8
*
stream
,
int
len
)
{
if
(
closing_sound
)
if
(
closing_sound
)
return
;
in_callback
=
1
;
in_callback
=
1
;
/* Wait for data to finish. */
uae_sem_wait
(
&
data_available_sem
);
/* Wait for data to finish. */
uae_sem_wait
(
&
data_available_sem
);
if
(
!
closing_sound
)
{
if
(
!
closing_sound
)
{
memcpy
(
stream
,
paula_sndbuffer
,
paula_sndbufsize
);
/* Notify writer that we're done. */
uae_sem_post
(
&
callback_done_sem
);
}
in_callback
=
0
;
}
in_callback
=
0
;
}
void
finish_sound_buffer
(
void
)
...
...
@@ -81,16 +84,16 @@ void finish_sound_buffer (void)
}
if
(
gui_data
.
sndbuf_status
==
3
)
gui_data
.
sndbuf_status
=
0
;
uae_sem_post
(
&
data_available_sem
);
uae_sem_wait
(
&
callback_done_sem
);
uae_sem_post
(
&
data_available_sem
);
uae_sem_wait
(
&
callback_done_sem
);
}
/* Try to determine whether sound is available. */
int
setup_sound
(
void
)
{
int
success
=
0
;
int
success
=
0
;
if
(
SDL_InitSubSystem
(
SDL_INIT_AUDIO
)
==
0
)
{
if
(
SDL_InitSubSystem
(
SDL_INIT_AUDIO
)
==
0
)
{
spec
.
freq
=
currprefs
.
sound_freq
;
spec
.
format
=
AUDIO_S16SYS
;
spec
.
channels
=
currprefs
.
sound_stereo
?
2
:
1
;
...
...
@@ -106,11 +109,10 @@ int setup_sound (void)
success
=
1
;
SDL_CloseAudio
();
}
}
sound_available
=
success
;
}
return
sound_available
;
sound_available
=
success
;
return
sound_available
;
}
static
int
open_sound
(
void
)
...
...
@@ -119,27 +121,27 @@ static int open_sound (void)
return
0
;
config_changed
=
1
;
spec
.
freq
=
currprefs
.
sound_freq
;
spec
.
format
=
AUDIO_S16SYS
;
spec
.
channels
=
currprefs
.
sound_stereo
?
2
:
1
;
spec
.
samples
=
spec
.
freq
*
currprefs
.
sound_latency
/
1000
;
spec
.
callback
=
sound_callback
;
spec
.
userdata
=
0
;
spec
.
freq
=
currprefs
.
sound_freq
;
spec
.
format
=
AUDIO_S16SYS
;
spec
.
channels
=
currprefs
.
sound_stereo
?
2
:
1
;
spec
.
samples
=
spec
.
freq
*
currprefs
.
sound_latency
/
1000
;
spec
.
callback
=
sound_callback
;
spec
.
userdata
=
0
;
clearbuffer
();
if
(
SDL_OpenAudio
(
&
spec
,
NULL
)
<
0
)
{
clearbuffer
();
if
(
SDL_OpenAudio
(
&
spec
,
NULL
)
<
0
)
{
write_log
(
"SDL: Couldn't open audio: %s
\n
"
,
SDL_GetError
());
return
0
;
}
}
init_sound_table16
();
sample_handler
=
currprefs
.
sound_stereo
?
sample16s_handler
:
sample16_handler
;
init_sound_table16
();
sample_handler
=
currprefs
.
sound_stereo
?
sample16s_handler
:
sample16_handler
;
obtainedfreq
=
currprefs
.
sound_freq
;
write_log
(
"SDL: sound driver found and configured at %d Hz, buffer is %d ms (%d bytes).
\n
"
,
spec
.
freq
,
spec
.
samples
*
1000
/
spec
.
freq
,
paula_sndbufsize
);
obtainedfreq
=
currprefs
.
sound_freq
;
write_log
(
"SDL: sound driver found and configured at %d Hz, buffer is %d ms (%d bytes).
\n
"
,
spec
.
freq
,
spec
.
samples
*
1000
/
spec
.
freq
,
paula_sndbufsize
);
have_sound
=
1
;
sound_available
=
1
;
have_sound
=
1
;
sound_available
=
1
;
update_sound
(
fake_vblank_hz
,
1
,
currprefs
.
ntscmode
);
paula_sndbufsize
=
spec
.
samples
*
2
*
spec
.
channels
;
paula_sndbufpt
=
paula_sndbuffer
;
...
...
@@ -147,24 +149,24 @@ static int open_sound (void)
driveclick_init
();
#endif
return
1
;
return
1
;
}
static
void
*
sound_thread
(
void
*
dummy
)
{
for
(;;)
{
for
(;;)
{
int
cmd
=
read_comm_pipe_int_blocking
(
&
to_sound_pipe
);
switch
(
cmd
)
{
case
0
:
open_sound
();
uae_sem_post
(
&
sound_init_sem
);
break
;
open_sound
();
uae_sem_post
(
&
sound_init_sem
);
break
;
case
1
:
uae_sem_post
(
&
sound_init_sem
);
return
0
;
uae_sem_post
(
&
sound_init_sem
);
return
0
;
}
}
}
}
/* We need a thread for this, since communication between finish_sound_buffer
...
...
@@ -173,13 +175,13 @@ static void *sound_thread (void *dummy)
* context. But we don't want to depend on SDL's internals too much. */
static
void
init_sound_thread
(
void
)
{
uae_thread_id
tid
;
uae_thread_id
tid
;
init_comm_pipe
(
&
to_sound_pipe
,
20
,
1
);
uae_sem_init
(
&
data_available_sem
,
0
,
0
);
uae_sem_init
(
&
callback_done_sem
,
0
,
0
);
uae_sem_init
(
&
sound_init_sem
,
0
,
0
);
uae_start_thread
(
"Sound"
,
sound_thread
,
NULL
,
&
tid
);
init_comm_pipe
(
&
to_sound_pipe
,
20
,
1
);
uae_sem_init
(
&
data_available_sem
,
0
,
0
);
uae_sem_init
(
&
callback_done_sem
,
0
,
0
);
uae_sem_init
(
&
sound_init_sem
,
0
,
0
);
uae_start_thread
(
"Sound"
,
sound_thread
,
NULL
,
&
tid
);
}
void
close_sound
(
void
)
...
...
@@ -187,22 +189,23 @@ void close_sound (void)
config_changed
=
1
;
gui_data
.
sndbuf
=
0
;
gui_data
.
sndbuf_status
=
3
;
if
(
!
have_sound
)
if
(
!
have_sound
)
return
;
SDL_PauseAudio
(
1
);
clearbuffer
();
if
(
in_callback
)
{
SDL_PauseAudio
(
1
);
clearbuffer
();
if
(
in_callback
)
{
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
();
uae_sem_destroy
(
&
data_available_sem
);
uae_sem_destroy
(
&
sound_init_sem
);
uae_sem_destroy
(
&
callback_done_sem
);
have_sound
=
0
;
}
write_comm_pipe_int
(
&
to_sound_pipe
,
1
,
1
);
uae_sem_wait
(
&
sound_init_sem
);
SDL_CloseAudio
();
uae_sem_destroy
(
&
data_available_sem
);
uae_sem_destroy
(
&
sound_init_sem
);
uae_sem_destroy
(
&
callback_done_sem
);
have_sound
=
0
;
}
int
init_sound
(
void
)
...
...
@@ -216,38 +219,38 @@ int init_sound (void)
if
(
have_sound
)
return
1
;
in_callback
=
0
;
closing_sound
=
0
;
in_callback
=
0
;
closing_sound
=
0
;
init_sound_thread
();
write_comm_pipe_int
(
&
to_sound_pipe
,
0
,
1
);
uae_sem_wait
(
&
sound_init_sem
);
SDL_PauseAudio
(
0
);
init_sound_thread
();
write_comm_pipe_int
(
&
to_sound_pipe
,
0
,
1
);
uae_sem_wait
(
&
sound_init_sem
);
SDL_PauseAudio
(
0
);
#ifdef DRIVESOUND
driveclick_reset
();
#endif
return
have_sound
;
return
have_sound
;
}
void
pause_sound
(
void
)
{
if
(
!
have_sound
)
return
;
SDL_PauseAudio
(
1
);
SDL_PauseAudio
(
1
);
}
void
resume_sound
(
void
)
{
if
(
!
have_sound
)
return
;
clearbuffer
();
SDL_PauseAudio
(
0
);
clearbuffer
();
SDL_PauseAudio
(
0
);
}
void
reset_sound
(
void
)
{
clearbuffer
();
return
;
clearbuffer
();
return
;
}
void
sound_volume
(
int
dir
)
...
...
@@ -272,5 +275,68 @@ void audio_save_options (FILE *f, const struct uae_prefs *p)
int
audio_parse_option
(
struct
uae_prefs
*
p
,
const
char
*
option
,
const
char
*
value
)
{
return
0
;
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