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
c3278222
Commit
c3278222
authored
May 19, 2010
by
Mustafa 'GnoStiC' TUFAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
19.05.2010
parent
1de3885c
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1181 additions
and
1132 deletions
+1181
-1132
cfgfile.c
src/cfgfile.c
+481
-445
custom.c
src/custom.c
+58
-58
gencpu.c
src/gencpu.c
+0
-1
sdlgfx.c
src/gfx-sdl/sdlgfx.c
+28
-11
misc.c
src/misc.c
+1
-0
newcpu.c
src/newcpu.c
+450
-450
Info.plist
src/od-macosx/Info.plist
+2
-2
savestate.c
src/savestate.c
+1
-1
scsidev.c
src/scsidev.c
+128
-130
scsiemul.c
src/scsiemul.c
+25
-25
sysconfig.h
src/sysconfig.h
+3
-3
config.log
src/tools/config.log
+3
-3
traps.c
src/traps.c
+0
-2
uaeexe.c
src/uaeexe.c
+1
-1
No files found.
src/cfgfile.c
View file @
c3278222
...
...
@@ -1720,6 +1720,18 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
return
1
;
#endif
if
(
cfgfile_strval
(
option
,
value
,
"chipset_compatible"
,
&
p
->
cs_compatible
,
cscompa
,
0
)
||
cfgfile_strval
(
option
,
value
,
"rtc"
,
&
p
->
cs_rtc
,
rtctype
,
0
)
||
cfgfile_strval
(
option
,
value
,
"ciaatod"
,
&
p
->
cs_ciaatod
,
ciaatodmode
,
0
)
||
cfgfile_strval
(
option
,
value
,
"ide"
,
&
p
->
cs_ide
,
idemode
,
0
)
||
cfgfile_strval
(
option
,
value
,
"scsi"
,
&
p
->
scsi
,
scsimode
,
0
)
||
cfgfile_strval
(
option
,
value
,
"comp_trustword"
,
&
p
->
comptrustword
,
compmode
,
0
)
||
cfgfile_strval
(
option
,
value
,
"comp_trustlong"
,
&
p
->
comptrustlong
,
compmode
,
0
)
||
cfgfile_strval
(
option
,
value
,
"comp_trustnaddr"
,
&
p
->
comptrustnaddr
,
compmode
,
0
)
||
cfgfile_strval
(
option
,
value
,
"collision_level"
,
&
p
->
collision_level
,
collmode
,
0
)
||
cfgfile_strval
(
option
,
value
,
"parallel_matrix_emulation"
,
&
p
->
parallel_matrix_emulation
,
epsonprinter
,
0
))
return
1
;
if
(
cfgfile_string
(
option
,
value
,
"kickstart_rom_file"
,
p
->
romfile
,
sizeof
p
->
romfile
/
sizeof
(
char
))
||
cfgfile_string
(
option
,
value
,
"kickstart_ext_rom_file"
,
p
->
romextfile
,
sizeof
p
->
romextfile
/
sizeof
(
char
))
||
cfgfile_string
(
option
,
value
,
"amax_rom_file"
,
p
->
amaxromfile
,
sizeof
p
->
amaxromfile
/
sizeof
(
char
))
...
...
@@ -1858,8 +1870,25 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
return
1
;
}
if
(
strcasecmp
(
option
,
"quickstart"
)
==
0
)
{
int
model
=
0
;
TCHAR
*
tmpp
=
_tcschr
(
value
,
','
);
if
(
tmpp
)
{
*
tmpp
++
=
0
;
TCHAR
*
tmpp2
=
_tcschr
(
value
,
','
);
if
(
tmpp2
)
*
tmpp2
=
0
;
cfgfile_strval
(
option
,
value
,
option
,
&
model
,
qsmodes
,
0
);
if
(
model
>=
0
)
{
int
config
=
_tstol
(
tmpp
);
built_in_prefs
(
p
,
model
,
config
,
0
,
0
);
}
}
return
1
;
}
for
(
i
=
0
;
i
<
MAX_FILESYSTEM_UNITS
;
i
++
)
{
char
tmp
[
100
];
TCHAR
tmp
[
100
];
_stprintf
(
tmp
,
"uaehf%d"
,
i
);
if
(
_tcscmp
(
option
,
tmp
)
==
0
)
return
1
;
...
...
@@ -1868,10 +1897,11 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
if
(
_tcscmp
(
option
,
"filesystem"
)
==
0
||
_tcscmp
(
option
,
"hardfile"
)
==
0
)
{
int
secs
,
heads
,
reserved
,
bs
,
ro
;
char
*
aname
,
*
root
;
char
*
tmpp
=
_tcschr
(
value
,
','
);
char
*
str
;
int
secs
,
heads
,
reserved
,
bs
;
bool
ro
;
TCHAR
*
aname
,
*
root
;
TCHAR
*
tmpp
=
_tcschr
(
value
,
','
);
TCHAR
*
str
;
if
(
config_newfilesystem
)
return
1
;
...
...
@@ -1883,11 +1913,11 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
if
(
strcmp
(
value
,
"1"
)
==
0
||
strcasecmp
(
value
,
"ro"
)
==
0
||
strcasecmp
(
value
,
"readonly"
)
==
0
||
strcasecmp
(
value
,
"read-only"
)
==
0
)
ro
=
1
;
ro
=
true
;
else
if
(
strcmp
(
value
,
"0"
)
==
0
||
strcasecmp
(
value
,
"rw"
)
==
0
||
strcasecmp
(
value
,
"readwrite"
)
==
0
||
strcasecmp
(
value
,
"read-write"
)
==
0
)
ro
=
0
;
ro
=
false
;
else
goto
invalid_fs
;
secs
=
0
;
heads
=
0
;
reserved
=
0
;
bs
=
0
;
...
...
@@ -1936,10 +1966,11 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons
if
(
_tcscmp
(
option
,
"filesystem2"
)
==
0
||
_tcscmp
(
option
,
"hardfile2"
)
==
0
)
{
int
secs
,
heads
,
reserved
,
bs
,
ro
,
bp
,
hdcv
;
char
*
dname
=
NULL
,
*
aname
=
""
,
*
root
=
NULL
,
*
fs
=
NULL
,
*
hdc
;
char
*
tmpp
=
_tcschr
(
value
,
','
);
char
*
str
=
NULL
;
int
secs
,
heads
,
reserved
,
bs
,
bp
,
hdcv
;
bool
ro
;
TCHAR
*
dname
=
NULL
,
*
aname
=
""
,
*
root
=
NULL
,
*
fs
=
NULL
,
*
hdc
;
TCHAR
*
tmpp
=
_tcschr
(
value
,
','
);
TCHAR
*
str
=
NULL
;
config_newfilesystem
=
1
;
if
(
tmpp
==
0
)
...
...
@@ -1947,9 +1978,9 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons
*
tmpp
++
=
'\0'
;
if
(
strcasecmp
(
value
,
"ro"
)
==
0
)
ro
=
1
;
ro
=
true
;
else
if
(
strcasecmp
(
value
,
"rw"
)
==
0
)
ro
=
0
;
ro
=
false
;
else
goto
invalid_fs
;
secs
=
0
;
heads
=
0
;
reserved
=
0
;
bs
=
0
;
bp
=
0
;
...
...
@@ -2101,7 +2132,7 @@ static int cfgfile_separate_linea (char *line, char *line1b, char *line2b)
static
int
cfgfile_separate_line
(
char
*
line
,
char
*
line1b
,
char
*
line2b
)
{
char
*
line1
,
*
line2
;
TCHAR
*
line1
,
*
line2
;
int
i
;
line1
=
line
;
...
...
@@ -2127,7 +2158,7 @@ static int cfgfile_separate_line (char *line, char *line1b, char *line2b)
_tcscpy
(
line1b
,
line
);
if
(
line2b
[
0
]
==
'"'
||
line2b
[
0
]
==
'\"'
)
{
char
c
=
line2b
[
0
];
TCHAR
c
=
line2b
[
0
];
int
i
=
0
;
memmove
(
line2b
,
line2b
+
1
,
(
_tcslen
(
line2b
)
+
1
)
*
sizeof
(
char
));
while
(
line2b
[
i
]
!=
0
&&
line2b
[
i
]
!=
c
)
...
...
@@ -2163,7 +2194,7 @@ static int isobsolete (char *s)
static
void
cfgfile_parse_separated_line
(
struct
uae_prefs
*
p
,
char
*
line1b
,
char
*
line2b
,
int
type
)
{
char
line3b
[
CONFIG_BLEN
],
line4b
[
CONFIG_BLEN
];
TCHAR
line3b
[
CONFIG_BLEN
],
line4b
[
CONFIG_BLEN
];
struct
strlist
*
sl
;
int
ret
;
...
...
@@ -2188,9 +2219,9 @@ static void cfgfile_parse_separated_line (struct uae_prefs *p, char *line1b, cha
}
}
void
cfgfile_parse_line
(
struct
uae_prefs
*
p
,
char
*
line
,
int
type
)
void
cfgfile_parse_line
(
struct
uae_prefs
*
p
,
TCHAR
*
line
,
int
type
)
{
char
line1b
[
CONFIG_BLEN
],
line2b
[
CONFIG_BLEN
];
TCHAR
line1b
[
CONFIG_BLEN
],
line2b
[
CONFIG_BLEN
];
if
(
!
cfgfile_separate_line
(
line
,
line1b
,
line2b
))
return
;
...
...
@@ -2198,10 +2229,10 @@ void cfgfile_parse_line (struct uae_prefs *p, char *line, int type)
return
;
}
static
void
subst
(
const
char
*
p
,
char
*
f
,
int
n
)
static
void
subst
(
TCHAR
*
p
,
TCHAR
*
f
,
int
n
)
{
char
*
str
=
cfgfile_subst_path
(
UNEXPANDED
,
p
,
f
);
str
ncpy
(
f
,
str
,
n
-
1
);
TCHAR
*
str
=
cfgfile_subst_path
(
UNEXPANDED
,
p
,
f
);
_tcs
ncpy
(
f
,
str
,
n
-
1
);
f
[
n
-
1
]
=
'\0'
;
free
(
str
);
}
...
...
@@ -2209,9 +2240,9 @@ static void subst (const char *p, char *f, int n)
static
char
*
cfg_fgets
(
char
*
line
,
int
max
,
FILE
*
fh
)
{
#ifdef SINGLEFILE
extern
char
singlefile_config
[];
static
char
*
sfile_ptr
;
char
*
p
;
extern
TCHAR
singlefile_config
[];
static
TCHAR
*
sfile_ptr
;
TCHAR
*
p
;
#endif
if
(
fh
)
...
...
@@ -2231,7 +2262,7 @@ static char *cfg_fgets (char *line, int max, FILE *fh)
p
=
sfile_ptr
;
while
(
*
p
!=
13
&&
*
p
!=
10
&&
*
p
!=
0
)
p
++
;
memset
(
line
,
0
,
max
);
memcpy
(
line
,
sfile_ptr
,
p
-
sfile_ptr
);
memcpy
(
line
,
sfile_ptr
,
(
p
-
sfile_ptr
)
*
sizeof
(
TCHAR
)
);
sfile_ptr
=
p
+
1
;
if
(
*
sfile_ptr
==
13
)
sfile_ptr
++
;
...
...
@@ -2247,9 +2278,10 @@ static int cfgfile_load_2 (struct uae_prefs *p, const char *filename, int real,
int
i
;
FILE
*
fh
;
char
linea
[
CONFIG_BLEN
];
char
line
[
CONFIG_BLEN
],
line1b
[
CONFIG_BLEN
],
line2b
[
CONFIG_BLEN
];
TCHAR
line
[
CONFIG_BLEN
],
line1b
[
CONFIG_BLEN
],
line2b
[
CONFIG_BLEN
];
struct
strlist
*
sl
;
int
type1
=
0
,
type2
=
0
,
askedtype
=
0
;
bool
type1
=
false
,
type2
=
false
;
int
askedtype
=
0
;
if
(
type
)
{
askedtype
=
*
type
;
...
...
@@ -2258,7 +2290,7 @@ static int cfgfile_load_2 (struct uae_prefs *p, const char *filename, int real,
if
(
real
)
{
p
->
config_version
=
0
;
config_newfilesystem
=
0
;
reset_inputdevice_config
(
p
);
//
reset_inputdevice_config (p);
}
write_log
(
"Opening cfgfile '%s': "
,
filename
);
...
...
@@ -2384,13 +2416,13 @@ void cfgfile_show_usage (void)
is far less annoying to use. */
static
void
parse_gfx_specs
(
struct
uae_prefs
*
p
,
char
*
spec
)
{
char
*
x0
=
my_strdup
(
spec
);
char
*
x1
,
*
x2
;
TCHAR
*
x0
=
my_strdup
(
spec
);
TCHAR
*
x1
,
*
x2
;
x1
=
str
chr
(
x0
,
':'
);
x1
=
_tcs
chr
(
x0
,
':'
);
if
(
x1
==
0
)
goto
argh
;
x2
=
str
chr
(
x1
+
1
,
':'
);
x2
=
_tcs
chr
(
x1
+
1
,
':'
);
if
(
x2
==
0
)
goto
argh
;
*
x1
++
=
0
;
*
x2
++
=
0
;
...
...
@@ -2414,7 +2446,7 @@ static void parse_gfx_specs (struct uae_prefs *p, char *spec)
free
(
x0
);
return
;
argh:
argh:
write_log
(
"Bad display mode specification.
\n
"
);
write_log
(
"The format to use is:
\"
width:height:modifiers
\"\n
"
);
write_log
(
"Type
\"
uae -h
\"
for detailed help.
\n
"
);
...
...
@@ -2423,8 +2455,8 @@ static void parse_gfx_specs (struct uae_prefs *p, char *spec)
static
void
parse_sound_spec
(
struct
uae_prefs
*
p
,
char
*
spec
)
{
char
*
x0
=
my_strdup
(
spec
);
char
*
x1
,
*
x2
=
NULL
,
*
x3
=
NULL
,
*
x4
=
NULL
,
*
x5
=
NULL
;
TCHAR
*
x0
=
my_strdup
(
spec
);
TCHAR
*
x1
,
*
x2
=
NULL
,
*
x3
=
NULL
,
*
x4
=
NULL
,
*
x5
=
NULL
;
x1
=
_tcschr
(
x0
,
':'
);
if
(
x1
!=
NULL
)
{
...
...
@@ -2503,8 +2535,8 @@ bad:
static
void
parse_filesys_spec
(
int
readonly
,
const
char
*
spec
)
{
char
buf
[
256
];
char
*
s2
;
TCHAR
buf
[
256
];
TCHAR
*
s2
;
_tcsncpy
(
buf
,
spec
,
255
);
buf
[
255
]
=
0
;
s2
=
_tcschr
(
buf
,
':'
);
...
...
@@ -2541,8 +2573,8 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons
static
void
parse_hardfile_spec
(
char
*
spec
)
{
char
*
x0
=
my_strdup
(
spec
);
char
*
x1
,
*
x2
,
*
x3
,
*
x4
;
TCHAR
*
x0
=
my_strdup
(
spec
);
TCHAR
*
x1
,
*
x2
,
*
x3
,
*
x4
;
x1
=
_tcschr
(
x0
,
':'
);
if
(
x1
==
NULL
)
...
...
@@ -2578,7 +2610,7 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons
free
(
x0
);
return
;
argh:
argh:
free
(
x0
);
write_log
(
"Bad hardfile parameter specified - type
\"
uae -h
\"
for help.
\n
"
);
return
;
...
...
@@ -2623,17 +2655,17 @@ static void parse_cpu_specs (struct uae_prefs *p, char *spec)
int
parse_cmdline_option
(
struct
uae_prefs
*
p
,
char
c
,
char
*
arg
)
{
struct
strlist
*
u
=
xcalloc
(
struct
strlist
,
1
);
const
char
arg_required
[]
=
"0123rKpImWSAJwNCZUFcblOdHRv"
;
const
TCHAR
arg_required
[]
=
"0123rKpImWSAJwNCZUFcblOdHRv"
;
if
(
str
chr
(
arg_required
,
c
)
&&
!
arg
)
{
if
(
_tcs
chr
(
arg_required
,
c
)
&&
!
arg
)
{
write_log
(
"Missing argument for option `-%c'!
\n
"
,
c
);
return
0
;
}
u
->
option
=
xmalloc
(
char
,
2
);
u
->
option
=
xmalloc
(
TCHAR
,
2
);
u
->
option
[
0
]
=
c
;
u
->
option
[
1
]
=
0
;
u
->
value
=
arg
?
my_strdup
(
arg
)
:
NULL
;
u
->
value
=
my_strdup
(
arg
)
;
u
->
next
=
p
->
all_lines
;
p
->
all_lines
=
u
;
...
...
@@ -2674,12 +2706,12 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
#endif
case
'n'
:
if
(
str
chr
(
arg
,
'i'
)
!=
0
)
if
(
_tcs
chr
(
arg
,
'i'
)
!=
0
)
p
->
immediate_blits
=
1
;
break
;
case
'v'
:
set_chipset_mask
(
p
,
a
toi
(
arg
));
set_chipset_mask
(
p
,
_ts
toi
(
arg
));
break
;
case
'C'
:
...
...
@@ -2687,23 +2719,23 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
break
;
case
'Z'
:
p
->
z3fastmem_size
=
a
toi
(
arg
)
*
0x100000
;
p
->
z3fastmem_size
=
_ts
toi
(
arg
)
*
0x100000
;
break
;
case
'U'
:
p
->
gfxmem_size
=
a
toi
(
arg
)
*
0x100000
;
p
->
gfxmem_size
=
_ts
toi
(
arg
)
*
0x100000
;
break
;
case
'F'
:
p
->
fastmem_size
=
a
toi
(
arg
)
*
0x100000
;
p
->
fastmem_size
=
_ts
toi
(
arg
)
*
0x100000
;
break
;
case
'b'
:
p
->
bogomem_size
=
a
toi
(
arg
)
*
0x40000
;
p
->
bogomem_size
=
_ts
toi
(
arg
)
*
0x40000
;
break
;
case
'c'
:
p
->
chipmem_size
=
a
toi
(
arg
)
*
0x80000
;
p
->
chipmem_size
=
_ts
toi
(
arg
)
*
0x80000
;
break
;
case
'l'
:
...
...
@@ -2725,11 +2757,11 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
case
'O'
:
parse_gfx_specs
(
p
,
arg
);
break
;
case
'd'
:
if
(
strchr
(
arg
,
'S'
)
!=
NULL
||
str
chr
(
arg
,
's'
))
{
if
(
_tcschr
(
arg
,
'S'
)
!=
NULL
||
_tcs
chr
(
arg
,
's'
))
{
write_log
(
" Serial on demand.
\n
"
);
p
->
serial_demand
=
1
;
}
if
(
strchr
(
arg
,
'P'
)
!=
NULL
||
str
chr
(
arg
,
'p'
))
{
if
(
_tcschr
(
arg
,
'P'
)
!=
NULL
||
_tcs
chr
(
arg
,
'p'
))
{
write_log
(
" Parallel on demand.
\n
"
);
p
->
parallel_demand
=
1
;
}
...
...
@@ -2755,13 +2787,13 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
write_log
(
"Unknown option `-%c'!
\n
"
,
c
);
break
;
}
return
!!
str
chr
(
arg_required
,
c
);
return
!!
_tcs
chr
(
arg_required
,
c
);
}
void
cfgfile_addcfgparam
(
char
*
line
)
{
struct
strlist
*
u
;
char
line1b
[
CONFIG_BLEN
],
line2b
[
CONFIG_BLEN
];
TCHAR
line1b
[
CONFIG_BLEN
],
line2b
[
CONFIG_BLEN
];
if
(
!
line
)
{
struct
strlist
**
ps
=
&
temp_lines
;
...
...
@@ -2778,8 +2810,8 @@ void cfgfile_addcfgparam (char *line)
if
(
!
cfgfile_separate_line
(
line
,
line1b
,
line2b
))
return
;
u
=
xcalloc
(
struct
strlist
,
1
);
u
->
option
=
my_strdup
(
line1b
);
u
->
value
=
my_strdup
(
line2b
);
u
->
option
=
my_strdup
(
line1b
);
u
->
value
=
my_strdup
(
line2b
);
u
->
next
=
temp_lines
;
temp_lines
=
u
;
}
...
...
@@ -2790,15 +2822,16 @@ unsigned int cmdlineparser (const char *s, char *outp[], unsigned int max)
unsigned
int
cnt
=
0
;
int
slash
=
0
;
int
quote
=
0
;
char
tmp1
[
MAX_DPATH
];
TCHAR
tmp1
[
MAX_DPATH
];
const
char
*
prev
;
int
doout
;
doout
=
0
;
prev
=
s
;
j
=
0
;
outp
[
0
]
=
0
;
while
(
cnt
<
max
)
{
char
c
=
*
s
++
;
TCHAR
c
=
*
s
++
;
if
(
!
c
)
break
;
if
(
c
<
32
)
...
...
@@ -2825,15 +2858,17 @@ unsigned int cmdlineparser (const char *s, char *outp[], unsigned int max)
}
if
(
doout
)
{
outp
[
cnt
++
]
=
my_strdup
(
tmp1
);
outp
[
cnt
]
=
0
;
tmp1
[
0
]
=
0
;
doout
=
0
;
j
=
0
;
}
slash
=
0
;
}
if
(
j
>
0
&&
cnt
<
max
)
if
(
j
>
0
&&
cnt
<
max
)
{
outp
[
cnt
++
]
=
my_strdup
(
tmp1
);
outp
[
cnt
]
=
0
;
}
return
cnt
;
}
...
...
@@ -2841,13 +2876,13 @@ unsigned int cmdlineparser (const char *s, char *outp[], unsigned int max)
uae_u32
cfgfile_modify
(
uae_u32
index
,
char
*
parms
,
uae_u32
size
,
char
*
out
,
uae_u32
outsize
)
{
char
*
p
;
char
*
argc
[
UAELIB_MAX_PARSE
];
TCHAR
*
p
;
TCHAR
*
argc
[
UAELIB_MAX_PARSE
];
unsigned
int
argv
,
i
;
uae_u32
err
;
uae_u8
zero
=
0
;
TCHAR
zero
=
0
;
static
FILE
*
configstore
=
0
;
static
char
*
configsearch
;
static
TCHAR
*
configsearch
;
static
int
configsearchfound
;
config_changed
=
1
;
...
...
@@ -2860,9 +2895,9 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
goto
end
;
}
if
(
configsearch
)
{
char
tmp
[
CONFIG_BLEN
];
TCHAR
tmp
[
CONFIG_BLEN
];
unsigned
int
j
=
0
;
char
*
in
=
configsearch
;
TCHAR
*
in
=
configsearch
;
unsigned
int
inlen
=
strlen
(
configsearch
);
int
joker
=
0
;
...
...
@@ -2882,8 +2917,8 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
err
=
0
;
goto
end
;
}
if
(
j
>=
sizeof
(
tmp
)
/
sizeof
(
char
)
-
1
)
j
=
sizeof
(
tmp
)
/
sizeof
(
char
)
-
1
;
if
(
j
>=
sizeof
(
tmp
)
/
sizeof
(
TCHAR
)
-
1
)
j
=
sizeof
(
tmp
)
/
sizeof
(
TCHAR
)
-
1
;
if
(
b
==
0
)
{
err
=
10
;
if
(
configsearch
)
...
...
@@ -2893,16 +2928,16 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
goto
end
;
}
if
(
b
==
'\n'
)
{
if
(
configsearch
&&
!
str
ncmp
(
tmp
,
in
,
inlen
)
&&
((
inlen
>
0
&&
str
len
(
tmp
)
>
inlen
&&
tmp
[
inlen
]
==
'='
)
||
(
joker
)))
{
char
*
p
;
if
(
configsearch
&&
!
_tcs
ncmp
(
tmp
,
in
,
inlen
)
&&
((
inlen
>
0
&&
_tcs
len
(
tmp
)
>
inlen
&&
tmp
[
inlen
]
==
'='
)
||
(
joker
)))
{
TCHAR
*
p
;
if
(
joker
)
p
=
tmp
-
1
;
else
p
=
str
chr
(
tmp
,
'='
);
p
=
_tcs
chr
(
tmp
,
'='
);
if
(
p
)
{
for
(
i
=
0
;
i
<
outsize
-
1
;
i
++
)
{
uae_u8
b
=
*++
p
;
for
(
i
=
0
;
out
&&
i
<
outsize
-
1
;
i
++
)
{
TCHAR
b
=
*++
p
;
out
[
i
]
=
b
;
out
[
i
+
1
]
=
0
;
if
(
!
b
)
...
...
@@ -2922,9 +2957,9 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
}
}
err
=
0xffffffff
;
for
(
i
=
0
;
i
<
outsize
-
1
;
i
++
)
{
for
(
i
=
0
;
out
&&
i
<
outsize
-
1
;
i
++
)
{
uae_u8
b
=
0
;
if
(
fread
(
&
b
,
1
,
1
,
configstore
)
!=
1
)
if
(
zfile_
fread
(
&
b
,
1
,
1
,
configstore
)
!=
1
)
err
=
0
;
if
(
b
==
0
)
err
=
0
;
...
...
@@ -2951,7 +2986,7 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
configstore
=
fopen
(
"configstore"
,
"w+"
);
configsearch
=
NULL
;
if
(
argv
>
0
&&
str
len
(
argc
[
0
])
>
0
)
if
(
argv
>
0
&&
_tcs
len
(
argc
[
0
])
>
0
)
configsearch
=
my_strdup
(
argc
[
0
]);
if
(
!
configstore
)
{
err
=
20
;
...
...
@@ -2980,8 +3015,8 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
}
end:
for
(
i
=
0
;
i
<
argv
;
i
++
)
free
(
argc
[
i
]);
free
(
p
);
x
free
(
argc
[
i
]);
x
free
(
p
);
return
err
;
}
...
...
@@ -3003,7 +3038,7 @@ uae_u32 cfgfile_uaelib_modify (uae_u32 index, uae_u32 parms, uae_u32 size, uae_u
goto
end
;
}
if
(
out
)
{
out_p
=
xmalloc
(
char
,
outsize
+
1
);
out_p
=
xmalloc
(
TCHAR
,
outsize
+
1
);
if
(
!
out_p
)
{
ret
=
10
;
goto
end
;
...
...
@@ -3037,19 +3072,19 @@ end:
uae_u32
cfgfile_uaelib
(
int
mode
,
uae_u32
name
,
uae_u32
dst
,
uae_u32
maxlen
)
{
char
tmp
[
CONFIG_BLEN
];
unsigned
int
i
;
TCHAR
tmp
[
CONFIG_BLEN
];
int
i
;
struct
strlist
*
sl
;
if
(
mode
)
return
0
;
for
(
i
=
0
;
i
<
sizeof
(
tmp
);
i
++
)
{
for
(
i
=
0
;
i
<
sizeof
(
tmp
)
/
sizeof
(
TCHAR
);
i
++
)
{
tmp
[
i
]
=
get_byte
(
name
+
i
);
if
(
tmp
[
i
]
==
0
)
break
;
}
tmp
[
sizeof
(
tmp
)
-
1
]
=
0
;
tmp
[
sizeof
(
tmp
)
/
sizeof
(
TCHAR
)
-
1
]
=
0
;
if
(
tmp
[
0
]
==
0
)
return
0
;
for
(
sl
=
currprefs
.
all_lines
;
sl
;
sl
=
sl
->
next
)
{
...
...
@@ -3086,7 +3121,7 @@ uae_u8 *save_configuration (int *len)
dstbak
=
dst
=
xmalloc
(
uae_u8
,
tmpsize
);
p
=
dst
;
for
(;;)
{
char
tmpout
[
256
];
TCHAR
tmpout
[
256
];
int
ret
;
tmpout
[
0
]
=
0
;
ret
=
cfgfile_modify
(
index
,
"*"
,
1
,
tmpout
,
sizeof
(
tmpout
)
/
sizeof
(
char
));
...
...
@@ -3127,11 +3162,12 @@ void default_prefs (struct uae_prefs *p, int type)
{
int
i
;
int
roms
[]
=
{
6
,
7
,
8
,
9
,
10
,
14
,
5
,
4
,
3
,
2
,
1
,
-
1
};
uae_u8
zero
=
0
;
TCHAR
zero
=
0
;
struct
zfile
*
f
;
reset_inputdevice_config
(
p
);
memset
(
p
,
0
,
sizeof
(
*
p
));
str
cpy
(
p
->
description
,
"UAE default configuration"
);
_tcs
cpy
(
p
->
description
,
"UAE default configuration"
);
p
->
config_hardware_path
[
0
]
=
0
;
p
->
config_host_path
[
0
]
=
0
;
...
...
@@ -3877,8 +3913,8 @@ static int bip_super (struct uae_prefs *p, int config, int compa, int romcheck)
p
->
produce_sound
=
2
;
#ifdef JIT
p
->
cachesize
=
8192
;
#endif
p->dfxtype[0] = DRV_35_HD;
#endif
p
->
dfxtype
[
0
]
=
DRV_35_HD
;
p
->
dfxtype
[
1
]
=
DRV_35_HD
;
p
->
floppy_speed
=
0
;
p
->
cpu_idle
=
150
;
...
...
src/custom.c
View file @
c3278222
...
...
@@ -3036,7 +3036,7 @@ STATIC_INLINE uae_u16 VPOSR (void)
vp
|=
lol
?
0x80
:
0
;
#if 0
if (M68K_GETPC < 0x00f00000 || M68K_GETPC >= 0x10000000)
write_log (
L"VPOSR %04x at %08x\n", vp, M68K_GETPC);
write_log (
"VPOSR %04x at %08x\n", vp, M68K_GETPC);
#endif
if
(
currprefs
.
cpu_model
>=
68020
)
hsyncdelay
();
...
...
@@ -5782,7 +5782,7 @@ void customreset (int hardreset)
CLXCON
(
clxcon
);
CLXCON2
(
clxcon2
);
calcdiw
();
write_log
(
L
"CPU=%d Chipset=%s %s
\n
"
,
write_log
(
"CPU=%d Chipset=%s %s
\n
"
,
currprefs
.
cpu_model
,
(
currprefs
.
chipset_mask
&
CSMASK_AGA
)
?
"AGA"
:
(
currprefs
.
chipset_mask
&
CSMASK_ECS_AGNUS
|
CSMASK_ECS_DENISE
)
==
(
CSMASK_ECS_AGNUS
|
CSMASK_ECS_DENISE
)
?
"Full ECS"
:
...
...
src/gencpu.c
View file @
c3278222
...
...
@@ -3809,7 +3809,6 @@ int main (int argc, char **argv)
* I don't dare to touch the 68k version. */
headerfile
=
fopen
(
"cputbl.h"
,
"wb"
);
stblfile
=
fopen
(
"cpustbl.c"
,
"wb"
);
generate_includes
(
stblfile
);
...
...
src/gfx-sdl/sdlgfx.c
View file @
c3278222
...
...
@@ -123,13 +123,13 @@ static int mousegrab;
static
int
mousehack
;
static
int
is_hwsurface
;
static
int
have_rawkeys
;
static
int
refresh_necessary
;
static
int
last_state
=
-
1
;
int
alt_pressed
;
unsigned
int
mouse_capture
;
/*
* Set window title with some useful status info.
*/
...
...
@@ -1330,6 +1330,23 @@ void handle_events (void)
int
keycode
;
int
ievent
;
// Hack -- Alt + Tab
/*
if (rEvent.key.keysym.sym == SDLK_LALT) alt_pressed = rEvent.key.type;
if (rEvent.key.keysym.sym == SDLK_RALT) alt_pressed = rEvent.key.type;
if ((rEvent.key.keysym.sym == SDLK_TAB) && (alt_pressed == SDL_KEYDOWN)) {
alt_pressed = SDL_KEYUP;
if (mouse_capture) {
SDL_WM_GrabInput(SDL_GRAB_ON);
SDL_ShowCursor(SDL_DISABLE);
} else {
SDL_WM_GrabInput(SDL_GRAB_OFF);
SDL_ShowCursor(SDL_ENABLE);
}
break;
}
*/
if
(
currprefs
.
map_raw_keys
)
{
keycode
=
rEvent
.
key
.
keysym
.
scancode
;
// Hack - OS4 keyup events have bit 7 set.
...
...
src/misc.c
View file @
c3278222
...
...
@@ -836,3 +836,4 @@ int input_get_default_joystick_analog (struct uae_input_device *uid, int i, int
return
0
;
}
//
src/newcpu.c
View file @
c3278222
...
...
@@ -4254,9 +4254,9 @@ void write_dcache030 (uaecptr addr, uae_u32 val, int size)
#if 0
uaecptr a = 0x1db0c;
if (addr - (1 << size) + 1 <= a && addr + (1 << size) >= a) {
write_log (
L"%08x %d %d %08x %08x %d\n", addr, aligned, size, val, tag1, lws1);
write_log (
"%08x %d %d %08x %08x %d\n", addr, aligned, size, val, tag1, lws1);
if (aligned == 2)
write_log (
L"*\n");
write_log (
"*\n");
}
#endif
...
...
@@ -4330,7 +4330,7 @@ uae_u32 read_dcache030 (uaecptr addr, int size)
}
else
{
v1
=
c1
->
data
[
lws1
];
if
(
get_long
(
addr
)
!=
v1
)
{
write_log
(
L"data cache mismatch %d %d %08x %08x != %08x %08x %d PC=%08x
\n
"
,
write_log
(
"data cache mismatch %d %d %08x %08x != %08x %08x %d PC=%08x
\n
"
,
size
,
aligned
,
addr
,
get_long
(
addr
),
v1
,
tag1
,
lws1
,
M68K_GETPC
);
v1
=
get_long
(
addr
);
}
...
...
@@ -4354,7 +4354,7 @@ uae_u32 read_dcache030 (uaecptr addr, int size)
}
else
{
v2
=
c2
->
data
[
lws2
];
if
(
get_long
(
addr
)
!=
v2
)
{
write_log
(
L"data cache mismatch %d %d %08x %08x != %08x %08x %d PC=%08x
\n
"
,
write_log
(
"data cache mismatch %d %d %08x %08x != %08x %08x %d PC=%08x
\n
"
,
size
,
aligned
,
addr
,
get_long
(
addr
),
v2
,
tag2
,
lws2
,
M68K_GETPC
);
v2
=
get_long
(
addr
);
}
...
...
@@ -4368,7 +4368,7 @@ uae_u32 read_dcache030 (uaecptr addr, int size)
else
if
(
size
==
2
&&
aligned
==
3
)
return
(
v1
<<
24
)
|
(
v2
>>
8
);
write_log
(
L"dcache030 weirdness!?
\n
"
);
write_log
(
"dcache030 weirdness!?
\n
"
);
return
0
;
}
...
...
src/od-macosx/Info.plist
View file @
c3278222
...
...
@@ -28,8 +28,8 @@
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
PUAE
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string
>
2.
1
.0
<
/string
>
<
string
>
2.
2
.0
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
2.
1
.0
<
/string
>
<
string
>
2.
2
.0
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
src/savestate.c
View file @
c3278222
src/scsidev.c
View file @
c3278222
...
...
@@ -47,7 +47,7 @@ static int scsierr(SCSI *scgp)
{
register
struct
scg_cmd
*
cp
=
scgp
->
scmd
;
if
(
cp
->
error
!=
SCG_NO_ERROR
||
if
(
cp
->
error
!=
SCG_NO_ERROR
||
cp
->
ux_errno
!=
0
||
*
(
u_char
*
)
&
cp
->
scb
!=
0
)
return
-
1
;
return
0
;
...
...
@@ -219,8 +219,7 @@ static uae_u32 scsidev_open (void)
#endif
/* Check unit number */
if
((
sdd
=
get_scsidev_data
(
unit
))
&&
start_thread
(
sdd
))
{
if
((
sdd
=
get_scsidev_data
(
unit
))
&&
start_thread
(
sdd
))
{
opencount
++
;
put_word
(
m68k_areg
(
regs
,
6
)
+
32
,
get_word
(
m68k_areg
(
regs
,
6
)
+
32
)
+
1
);
put_long
(
tmp1
+
24
,
unit
);
/* io_Unit */
...
...
@@ -320,8 +319,7 @@ static void scsidev_do_scsi (struct scsidevdata *sdd, uaecptr request)
addrbank
*
bank_cmd
=
&
get_mem_bank
(
scsi_cmd
);
/* do transfer directly to and from Amiga memory */
if
(
!
bank_data
||
!
bank_data
->
check
(
scsi_data
,
scsi_len
)
||
!
bank_cmd
||
!
bank_cmd
->
check
(
scsi_cmd
,
scsi_cmd_len
))
{
if
(
!
bank_data
||
!
bank_data
->
check
(
scsi_data
,
scsi_len
)
||
!
bank_cmd
||
!
bank_cmd
->
check
(
scsi_cmd
,
scsi_cmd_len
))
{
put_byte
(
request
+
31
,
(
uae_u8
)
-
5
);
/* IOERR_BADADDRESS */
return
;
}
...
...
src/scsiemul.c
View file @
c3278222
src/sysconfig.h
View file @
c3278222
...
...
@@ -293,7 +293,7 @@
#define PACKAGE_NAME "PUAE"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "PUAE 2.
1
.0"
#define PACKAGE_STRING "PUAE 2.
2
.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "puae"
...
...
@@ -302,7 +302,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "2.
1
.0"
#define PACKAGE_VERSION "2.
2
.0"
/* Define to the necessary symbol if this constant uses a non-standard name on
your system. */
...
...
@@ -395,7 +395,7 @@
/* Version number of package */
#define VERSION "2.
1
.0"
#define VERSION "2.
2
.0"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
...
...
src/tools/config.log
View file @
c3278222
...
...
@@ -445,7 +445,7 @@ configure:4344: $? = 0
configure:4344: result: yes
configure:4350: checking for _doprnt
configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
SMtDaE
.o: In function `main':
/tmp/cc
duySMn
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt'
collect2: ld returned 1 exit status
configure:4350: $? = 1
...
...
@@ -533,7 +533,7 @@ configure:4364: $? = 0
configure:4364: result: yes
configure:4364: checking for strcmpi
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
MreunT
.o: In function `main':
/tmp/cc
gpaTxE
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi'
collect2: ld returned 1 exit status
configure:4364: $? = 1
...
...
@@ -613,7 +613,7 @@ configure: failed program was:
configure:4364: result: no
configure:4364: checking for stricmp
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
fHXHOY
.o: In function `main':
/tmp/cc
AjejvH
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp'
collect2: ld returned 1 exit status
configure:4364: $? = 1
...
...
src/traps.c
View file @
c3278222
...
...
@@ -227,8 +227,6 @@ static void *trap_thread (void *arg)
{
TrapContext
*
context
=
(
TrapContext
*
)
arg
;
uae_set_thread_priority
(
2
);
/* Wait until main thread is ready to switch to the
* this trap context. */
uae_sem_wait
(
&
context
->
switch_to_trap_sem
);
...
...
src/uaeexe.c
View file @
c3278222
...
...
@@ -19,7 +19,7 @@
static
struct
uae_xcmd
*
first
=
NULL
;
static
struct
uae_xcmd
*
last
=
NULL
;
static
TCHAR
running
=
0
;
static
uae_u32
uaeexe_server
(
TrapContext
*
context
)
REGPARAM
;
static
uae_u32
REGPARAM3
uaeexe_server
(
TrapContext
*
context
)
REGPARAM
;
/*
* Install the server
...
...
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