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
62e45398
Commit
62e45398
authored
Jun 07, 2011
by
mtufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
puae 2.3.2
parent
1bb6c131
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
190 additions
and
72 deletions
+190
-72
lha.h
src/archivers/lha/lha.h
+1
-1
unzip.c
src/archivers/zip/unzip.c
+6
-6
audio.c
src/audio.c
+15
-7
cfgfile.c
src/cfgfile.c
+21
-6
custom.c
src/custom.c
+12
-8
expansion.c
src/expansion.c
+17
-17
fsdb.c
src/fsdb.c
+1
-1
audio.h
src/include/audio.h
+2
-2
memory.h
src/include/memory.h
+0
-2
sysdeps.h
src/include/sysdeps.h
+1
-0
zfile.h
src/include/zfile.h
+5
-6
main.c
src/main.c
+16
-15
memory.c
src/memory.c
+1
-0
zfile.c
src/zfile.c
+92
-1
No files found.
src/archivers/lha/lha.h
View file @
62e45398
...
...
@@ -73,7 +73,7 @@ typedef struct LzHeader {
unsigned
char
header_level
;
char
name
[
256
];
unsigned
short
crc
;
bool
has_crc
;
bool
has_crc
;
unsigned
char
extend_type
;
unsigned
char
minor_version
;
...
...
src/archivers/zip/unzip.c
View file @
62e45398
...
...
@@ -25,7 +25,6 @@
# include <errno.h>
#endif
#ifndef local
# define local static
#endif
...
...
@@ -373,8 +372,7 @@ extern unzFile ZEXPORT unzOpen (struct zfile *fin)
if
(
unzlocal_getShort
(
fin
,
&
number_entry_CD
)
!=
UNZ_OK
)
err
=
UNZ_ERRNO
;
if
((
number_entry_CD
!=
us
.
gi
.
number_entry
)
||
(
number_disk_with_CD
!=
0
)
||
if
((
number_disk_with_CD
!=
0
)
||
(
number_disk
!=
0
))
err
=
UNZ_BADZIPFILE
;
...
...
@@ -791,11 +789,11 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (unz_s *s, uInt *piSizeVar,
err
=
UNZ_ERRNO
;
else
if
((
err
==
UNZ_OK
)
&&
(
uData
!=
s
->
cur_file_info
.
compression_method
))
err
=
UNZ_BADZIPFILE
;
/*
if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
(s->cur_file_info.compression_method!=Z_DEFLATED))
err=UNZ_BADZIPFILE;
*/
if
(
unzlocal_getLong
(
s
->
file
,
&
uData
)
!=
UNZ_OK
)
/* date/time */
err
=
UNZ_ERRNO
;
...
...
@@ -882,8 +880,10 @@ extern int ZEXPORT unzOpenCurrentFile (unzFile file)
pfile_in_zip_read_info
->
stream_initialised
=
0
;
if
((
s
->
cur_file_info
.
compression_method
!=
0
)
&&
(
s
->
cur_file_info
.
compression_method
!=
Z_DEFLATED
))
(
s
->
cur_file_info
.
compression_method
!=
Z_DEFLATED
))
{
write_log
(
"ZIP: unknown compression method %d
\n
"
,
s
->
cur_file_info
.
compression_method
);
err
=
UNZ_BADZIPFILE
;
}
Store
=
s
->
cur_file_info
.
compression_method
==
0
;
pfile_in_zip_read_info
->
crc32_wait
=
s
->
cur_file_info
.
crc
;
...
...
src/audio.c
View file @
62e45398
...
...
@@ -1221,7 +1221,7 @@ STATIC_INLINE void setdr (int nr)
}
}
static
void
loaddat
(
int
nr
,
bool
modper
)
static
void
loaddat
_modper
(
int
nr
,
bool
modper
)
{
struct
audio_channel_data
*
cdp
=
audio_channel
+
nr
;
int
audav
=
adkcon
&
(
0x01
<<
nr
);
...
...
@@ -1257,6 +1257,10 @@ static void loaddat (int nr, bool modper)
cdp
->
dat2
=
cdp
->
dat
;
}
}
static
void
loaddat
(
int
nr
)
{
loaddat_modper
(
nr
,
false
);
}
STATIC_INLINE
void
loadper
(
int
nr
)
{
...
...
@@ -1332,7 +1336,7 @@ static void audio_state_channel2 (int nr, bool perfin)
}
else
if
(
cdp
->
dat_written
&&
!
isirq
(
nr
))
{
cdp
->
state
=
2
;
setirq
(
nr
,
0
);
loaddat
(
nr
,
false
);
loaddat
(
nr
);
if
(
usehacks
()
&&
cdp
->
per
<
10
*
CYCLE_UNIT
)
{
// make sure audio.device AUDxDAT startup returns to idle state before DMA is enabled
newsample
(
nr
,
(
cdp
->
dat2
>>
0
)
&
0xff
);
...
...
@@ -1378,7 +1382,7 @@ static void audio_state_channel2 (int nr, bool perfin)
if
(
debugchannel
(
nr
))
write_log
(
"%d:>5: LEN=%d PT=%08X PC=%08X
\n
"
,
nr
,
cdp
->
wlen
,
cdp
->
pt
,
M68K_GETPC
);
#endif
loaddat
(
nr
,
false
);
loaddat
(
nr
);
if
(
napnav
)
setdr
(
nr
);
cdp
->
state
=
2
;
...
...
@@ -1400,7 +1404,7 @@ static void audio_state_channel2 (int nr, bool perfin)
if
(
!
perfin
)
return
;
if
(
audap
)
loaddat
(
nr
,
true
);
loaddat
_modper
(
nr
,
true
);
if
(
chan_ena
)
{
if
(
audap
)
setdr
(
nr
);
...
...
@@ -1428,7 +1432,7 @@ static void audio_state_channel2 (int nr, bool perfin)
if
(
!
perfin
)
return
;
if
(
chan_ena
)
{
loaddat
(
nr
,
false
);
loaddat
(
nr
);
if
(
cdp
->
intreq2
&&
napnav
)
setirq
(
nr
,
31
);
if
(
napnav
)
...
...
@@ -1442,7 +1446,7 @@ static void audio_state_channel2 (int nr, bool perfin)
zerostate
(
nr
);
return
;
}
loaddat
(
nr
,
false
);
loaddat
(
nr
);
if
(
napnav
)
setirq
(
nr
,
32
);
}
...
...
@@ -1816,7 +1820,7 @@ void audio_hsync (void)
update_audio
();
}
void
AUDxDAT
(
int
nr
,
uae_u16
v
,
uaecptr
addr
)
void
AUDxDAT
_addr
(
int
nr
,
uae_u16
v
,
uaecptr
addr
)
{
struct
audio_channel_data
*
cdp
=
audio_channel
+
nr
;
int
chan_ena
=
(
dmacon
&
DMA_MASTER
)
&&
(
dmacon
&
(
1
<<
nr
));
...
...
@@ -1857,6 +1861,10 @@ void AUDxDAT (int nr, uae_u16 v, uaecptr addr)
}
cdp
->
dat_written
=
false
;
}
void
AUDxDAT
(
int
nr
,
uae_u16
v
)
{
AUDxDAT_addr
(
nr
,
v
,
0xffffffff
);
}
uaecptr
audio_getpt
(
int
nr
,
bool
reset
)
{
...
...
src/cfgfile.c
View file @
62e45398
...
...
@@ -1004,7 +1004,17 @@ int cfgfile_yesno (const TCHAR *option, const TCHAR *value, const TCHAR *name, b
return
1
;
}
int
cfgfile_intval2
(
const
TCHAR
*
option
,
const
TCHAR
*
value
,
const
TCHAR
*
name
,
unsigned
int
*
location
,
int
scale
)
int
cfgfile_doubleval
(
const
TCHAR
*
option
,
const
TCHAR
*
value
,
const
TCHAR
*
name
,
double
*
location
)
{
int
base
=
10
;
TCHAR
*
endptr
;
if
(
_tcscmp
(
option
,
name
)
!=
0
)
return
0
;
*
location
=
_tcstod
(
value
,
&
endptr
);
return
1
;
}
int
cfgfile_intval_unsigned
(
const
TCHAR
*
option
,
const
TCHAR
*
value
,
const
TCHAR
*
name
,
unsigned
int
*
location
,
int
scale
)
{
int
base
=
10
;
TCHAR
*
endptr
;
...
...
@@ -1033,7 +1043,7 @@ int cfgfile_intval2 (const TCHAR *option, const TCHAR *value, const TCHAR *name,
int
cfgfile_intval
(
const
TCHAR
*
option
,
const
TCHAR
*
value
,
const
TCHAR
*
name
,
int
*
location
,
int
scale
)
{
unsigned
int
v
=
0
;
int
r
=
cfgfile_intval
2
(
option
,
value
,
name
,
&
v
,
scale
);
int
r
=
cfgfile_intval
_unsigned
(
option
,
value
,
name
,
&
v
,
scale
);
if
(
!
r
)
return
0
;
*
location
=
(
int
)
v
;
...
...
@@ -1075,7 +1085,7 @@ int cfgfile_string (const TCHAR *option, const TCHAR *value, const TCHAR *name,
return
1
;
}
int
cfgfile_path
(
const
TCHAR
*
option
,
const
TCHAR
*
value
,
const
TCHAR
*
name
,
TCHAR
*
location
,
int
maxsz
)
int
cfgfile_path
_mp
(
const
TCHAR
*
option
,
const
TCHAR
*
value
,
const
TCHAR
*
name
,
TCHAR
*
location
,
int
maxsz
,
struct
multipath
*
mp
)
{
if
(
!
cfgfile_string
(
option
,
value
,
name
,
location
,
maxsz
))
return
0
;
...
...
@@ -1085,6 +1095,10 @@ int cfgfile_path (const TCHAR *option, const TCHAR *value, const TCHAR *name, TC
//xfree (s);
return
1
;
}
int
cfgfile_path
(
const
TCHAR
*
option
,
const
TCHAR
*
value
,
const
TCHAR
*
name
,
TCHAR
*
location
,
int
maxsz
)
{
return
cfgfile_path_mp
(
option
,
value
,
name
,
location
,
maxsz
,
NULL
);
}
int
cfgfile_multipath
(
const
TCHAR
*
option
,
const
TCHAR
*
value
,
const
TCHAR
*
name
,
struct
multipath
*
mp
)
{
...
...
@@ -1723,8 +1737,8 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
||
(
l
=
KBD_LANG_SE
,
strcasecmp
(
value
,
"se"
)
==
0
)
||
(
l
=
KBD_LANG_US
,
strcasecmp
(
value
,
"us"
)
==
0
)
||
(
l
=
KBD_LANG_FR
,
strcasecmp
(
value
,
"fr"
)
==
0
)
||
(
l
=
KBD_LANG_ES
,
strcasecmp
(
value
,
"es"
)
==
0
)
||
(
l
=
KBD_LANG_IT
,
strcasecmp
(
value
,
"it"
)
==
0
)
||
(
l
=
KBD_LANG_ES
,
strcasecmp
(
value
,
"es"
)
==
0
)
||
(
l
=
KBD_LANG_FI
,
strcasecmp
(
value
,
"fi"
)
==
0
)
||
(
l
=
KBD_LANG_TR
,
strcasecmp
(
value
,
"tr"
)
==
0
))
p
->
keyboard_lang
=
l
;
...
...
@@ -2030,7 +2044,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
||
cfgfile_yesno
(
option
,
value
,
"comp_nf"
,
&
p
->
compnf
)
||
cfgfile_yesno
(
option
,
value
,
"comp_constjump"
,
&
p
->
comp_constjump
)
||
cfgfile_yesno
(
option
,
value
,
"comp_oldsegv"
,
&
p
->
comp_oldsegv
)
||
cfgfile_yesno
(
option
,
value
,
"compforcesettings"
,
&
dummy
int
)
||
cfgfile_yesno
(
option
,
value
,
"compforcesettings"
,
&
dummy
bool
)
||
cfgfile_yesno
(
option
,
value
,
"compfpu"
,
&
p
->
compfpu
)
#endif
#ifdef FPU
...
...
@@ -2050,7 +2064,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
||
cfgfile_intval
(
option
,
value
,
"cdtvramcard"
,
&
p
->
cs_cdtvcard
,
1
)
||
cfgfile_intval
(
option
,
value
,
"fatgary"
,
&
p
->
cs_fatgaryrev
,
1
)
||
cfgfile_intval
(
option
,
value
,
"ramsey"
,
&
p
->
cs_ramseyrev
,
1
)
||
cfgfile_
intval
(
option
,
value
,
"chipset_refreshrate"
,
&
p
->
chipset_refreshrate
,
1
)
||
cfgfile_
doubleval
(
option
,
value
,
"chipset_refreshrate"
,
&
p
->
chipset_refreshrate
)
||
cfgfile_intval
(
option
,
value
,
"fastmem_size"
,
&
p
->
fastmem_size
,
0x100000
)
||
cfgfile_intval
(
option
,
value
,
"a3000mem_size"
,
&
p
->
mbresmem_low_size
,
0x100000
)
||
cfgfile_intval
(
option
,
value
,
"mbresmem_size"
,
&
p
->
mbresmem_high_size
,
0x100000
)
...
...
@@ -2757,6 +2771,7 @@ int cfgfile_load (struct uae_prefs *p, const TCHAR *filename, int *type, int ign
}
end:
recursive
--
;
write_log
(
"cfgfile--"
);
fixup_prefs
(
p
);
return
v
;
}
...
...
src/custom.c
View file @
62e45398
...
...
@@ -2734,7 +2734,7 @@ int current_maxvpos (void)
}
/* set PAL/NTSC or custom timing variables */
void
init_hz
(
bool
fullinit
)
void
init_hz
_fullinit
(
bool
fullinit
)
{
int
isntsc
;
int
odbl
=
doublescan
,
omaxvpos
=
maxvpos
;
...
...
@@ -2879,9 +2879,13 @@ void init_hz (bool fullinit)
config_changed
=
1
;
}
void
init_hz
(
void
)
{
init_hz_fullinit
(
false
);
}
void
init_hz_full
(
void
)
{
init_hz
(
true
);
init_hz
_fullinit
(
true
);
}
static
void
calcdiw
(
void
)
...
...
@@ -5149,7 +5153,7 @@ static void vsync_handler_post (void)
vtotal
=
vpos_count
;
}
if
((
beamcon0
&
(
0x20
|
0x80
))
!=
(
new_beamcon0
&
(
0x20
|
0x80
))
||
(
abs
(
vpos_count
-
vpos_count_prev
)
>
1
))
init_hz
(
false
);
init_hz
();
if
(
lof_changed
)
compute_vsynctime
();
vpos_count_prev
=
vpos_count
;
...
...
@@ -5312,7 +5316,7 @@ static void dmal_emu (uae_u32 v)
record_dma
(
0xaa
+
nr
*
16
,
dat
,
pt
,
hpos
,
vpos
,
DMARECORD_AUDIO
);
#endif
last_custom_value1
=
dat
;
AUDxDAT
(
nr
,
dat
,
pt
);
AUDxDAT
_addr
(
nr
,
dat
,
pt
);
}
else
{
uae_u16
dat
;
int
w
=
v
&
1
;
...
...
@@ -6290,28 +6294,28 @@ static int REGPARAM2 custom_wput_1 (int hpos, uaecptr addr, uae_u32 value, int n
case
0x0A4
:
AUDxLEN
(
0
,
value
);
break
;
case
0x0A6
:
AUDxPER
(
0
,
value
);
break
;
case
0x0A8
:
AUDxVOL
(
0
,
value
);
break
;
case
0x0AA
:
AUDxDAT
(
0
,
value
,
0xffffffff
);
break
;
case
0x0AA
:
AUDxDAT
(
0
,
value
);
break
;
case
0x0B0
:
AUDxLCH
(
1
,
value
);
break
;
case
0x0B2
:
AUDxLCL
(
1
,
value
);
break
;
case
0x0B4
:
AUDxLEN
(
1
,
value
);
break
;
case
0x0B6
:
AUDxPER
(
1
,
value
);
break
;
case
0x0B8
:
AUDxVOL
(
1
,
value
);
break
;
case
0x0BA
:
AUDxDAT
(
1
,
value
,
0xffffffff
);
break
;
case
0x0BA
:
AUDxDAT
(
1
,
value
);
break
;
case
0x0C0
:
AUDxLCH
(
2
,
value
);
break
;
case
0x0C2
:
AUDxLCL
(
2
,
value
);
break
;
case
0x0C4
:
AUDxLEN
(
2
,
value
);
break
;
case
0x0C6
:
AUDxPER
(
2
,
value
);
break
;
case
0x0C8
:
AUDxVOL
(
2
,
value
);
break
;
case
0x0CA
:
AUDxDAT
(
2
,
value
,
0xffffffff
);
break
;
case
0x0CA
:
AUDxDAT
(
2
,
value
);
break
;
case
0x0D0
:
AUDxLCH
(
3
,
value
);
break
;
case
0x0D2
:
AUDxLCL
(
3
,
value
);
break
;
case
0x0D4
:
AUDxLEN
(
3
,
value
);
break
;
case
0x0D6
:
AUDxPER
(
3
,
value
);
break
;
case
0x0D8
:
AUDxVOL
(
3
,
value
);
break
;
case
0x0DA
:
AUDxDAT
(
3
,
value
,
0xffffffff
);
break
;
case
0x0DA
:
AUDxDAT
(
3
,
value
);
break
;
case
0x0E0
:
BPLxPTH
(
hpos
,
value
,
0
);
break
;
case
0x0E2
:
BPLxPTL
(
hpos
,
value
,
0
);
break
;
...
...
src/expansion.c
View file @
62e45398
...
...
@@ -230,7 +230,7 @@ static uae_u32 REGPARAM2 expamem_bget (uaecptr addr)
{
uae_u8
b
;
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_READ
;
special_mem
|=
S_READ
;
#endif
addr
&=
0xFFFF
;
b
=
expamem
[
addr
];
...
...
@@ -240,7 +240,7 @@ static uae_u32 REGPARAM2 expamem_bget (uaecptr addr)
static
void
REGPARAM2
expamem_write
(
uaecptr
addr
,
uae_u32
value
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_WRITE
;
special_mem
|=
S_WRITE
;
#endif
addr
&=
0xffff
;
if
(
addr
==
00
||
addr
==
02
||
addr
==
0x40
||
addr
==
0x42
)
{
...
...
@@ -260,7 +260,7 @@ static int REGPARAM2 expamem_type (void)
static
void
REGPARAM2
expamem_lput
(
uaecptr
addr
,
uae_u32
value
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_WRITE
;
special_mem
|=
S_WRITE
;
#endif
write_log
(
"warning: WRITE.L to address $%lx : value $%lx
\n
"
,
addr
,
value
);
}
...
...
@@ -268,7 +268,7 @@ static void REGPARAM2 expamem_lput (uaecptr addr, uae_u32 value)
static
void
REGPARAM2
expamem_wput
(
uaecptr
addr
,
uae_u32
value
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_WRITE
;
special_mem
|=
S_WRITE
;
#endif
value
&=
0xffff
;
if
(
ecard
>=
cardno
)
...
...
@@ -320,7 +320,7 @@ static void REGPARAM2 expamem_wput (uaecptr addr, uae_u32 value)
static
void
REGPARAM2
expamem_bput
(
uaecptr
addr
,
uae_u32
value
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_WRITE
;
special_mem
|=
S_WRITE
;
#endif
if
(
ecard
>=
cardno
)
return
;
...
...
@@ -505,7 +505,7 @@ static uae_u32 catweasel_start;
static
uae_u32
REGPARAM2
catweasel_lget
(
uaecptr
addr
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_READ
;
special_mem
|=
S_READ
;
#endif
write_log
(
"catweasel_lget @%08X!
\n
"
,
addr
);
return
0
;
...
...
@@ -514,7 +514,7 @@ static uae_u32 REGPARAM2 catweasel_lget (uaecptr addr)
static
uae_u32
REGPARAM2
catweasel_wget
(
uaecptr
addr
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_READ
;
special_mem
|=
S_READ
;
#endif
write_log
(
"catweasel_wget @%08X!
\n
"
,
addr
);
return
0
;
...
...
@@ -523,7 +523,7 @@ static uae_u32 REGPARAM2 catweasel_wget (uaecptr addr)
static
uae_u32
REGPARAM2
catweasel_bget
(
uaecptr
addr
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_READ
;
special_mem
|=
S_READ
;
#endif
addr
-=
catweasel_start
&
catweasel_mask
;
addr
&=
catweasel_mask
;
...
...
@@ -533,7 +533,7 @@ static uae_u32 REGPARAM2 catweasel_bget (uaecptr addr)
static
void
REGPARAM2
catweasel_lput
(
uaecptr
addr
,
uae_u32
l
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_WRITE
;
special_mem
|=
S_WRITE
;
#endif
write_log
(
"catweasel_lput @%08X=%08X!
\n
"
,
addr
,
l
);
}
...
...
@@ -541,7 +541,7 @@ static void REGPARAM2 catweasel_lput (uaecptr addr, uae_u32 l)
static
void
REGPARAM2
catweasel_wput
(
uaecptr
addr
,
uae_u32
w
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_WRITE
;
special_mem
|=
S_WRITE
;
#endif
write_log
(
"catweasel_wput @%08X=%04X!
\n
"
,
addr
,
w
);
}
...
...
@@ -549,7 +549,7 @@ static void REGPARAM2 catweasel_wput (uaecptr addr, uae_u32 w)
static
void
REGPARAM2
catweasel_bput
(
uaecptr
addr
,
uae_u32
b
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_WRITE
;
special_mem
|=
S_WRITE
;
#endif
addr
-=
catweasel_start
&
catweasel_mask
;
addr
&=
catweasel_mask
;
...
...
@@ -633,7 +633,7 @@ static uae_u32 REGPARAM2 filesys_lget (uaecptr addr)
{
uae_u8
*
m
;
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_READ
;
special_mem
|=
S_READ
;
#endif
addr
-=
filesys_start
&
65535
;
addr
&=
65535
;
...
...
@@ -645,7 +645,7 @@ static uae_u32 REGPARAM2 filesys_wget (uaecptr addr)
{
uae_u8
*
m
;
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_READ
;
special_mem
|=
S_READ
;
#endif
addr
-=
filesys_start
&
65535
;
addr
&=
65535
;
...
...
@@ -656,7 +656,7 @@ static uae_u32 REGPARAM2 filesys_wget (uaecptr addr)
static
uae_u32
REGPARAM2
filesys_bget
(
uaecptr
addr
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_READ
;
special_mem
|=
S_READ
;
#endif
addr
-=
filesys_start
&
65535
;
addr
&=
65535
;
...
...
@@ -666,7 +666,7 @@ static uae_u32 REGPARAM2 filesys_bget (uaecptr addr)
static
void
REGPARAM2
filesys_lput
(
uaecptr
addr
,
uae_u32
l
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_WRITE
;
special_mem
|=
S_WRITE
;
#endif
write_log
(
"filesys_lput called PC=%p
\n
"
,
M68K_GETPC
);
}
...
...
@@ -674,7 +674,7 @@ static void REGPARAM2 filesys_lput (uaecptr addr, uae_u32 l)
static
void
REGPARAM2
filesys_wput
(
uaecptr
addr
,
uae_u32
w
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_WRITE
;
special_mem
|=
S_WRITE
;
#endif
write_log
(
"filesys_wput called PC=%p
\n
"
,
M68K_GETPC
);
}
...
...
@@ -682,7 +682,7 @@ static void REGPARAM2 filesys_wput (uaecptr addr, uae_u32 w)
static
void
REGPARAM2
filesys_bput
(
uaecptr
addr
,
uae_u32
b
)
{
#ifdef JIT
special_mem
|=
S
PECIAL_MEM
_WRITE
;
special_mem
|=
S_WRITE
;
#endif
}
...
...
src/fsdb.c
View file @
62e45398
...
...
@@ -200,7 +200,7 @@ a_inode *fsdb_lookup_aino_nname (a_inode *base, const TCHAR *nname)
uae_u8
buf
[
1
+
4
+
257
+
257
+
81
];
if
(
fread
(
buf
,
1
,
sizeof
buf
,
f
)
<
sizeof
buf
)
break
;
if
(
buf
[
0
]
!=
0
&&
strcmp
(
buf
+
5
+
257
,
nname
)
==
0
)
{
if
(
buf
[
0
]
!=
0
&&
strcmp
(
(
char
*
)
buf
+
5
+
257
,
nname
)
==
0
)
{
long
pos
=
ftell
(
f
)
-
sizeof
buf
;
fclose
(
f
);
return
aino_from_buf
(
base
,
buf
,
pos
);
...
...
src/include/audio.h
View file @
62e45398
...
...
@@ -13,7 +13,8 @@ extern void aud1_handler (void);
extern
void
aud2_handler
(
void
);
extern
void
aud3_handler
(
void
);
extern
void
AUDxDAT
(
int
nr
,
uae_u16
value
,
uaecptr
addr
);
extern
void
AUDxDAT
(
int
nr
,
uae_u16
value
);
extern
void
AUDxDAT_addr
(
int
nr
,
uae_u16
value
,
uaecptr
addr
);
extern
void
AUDxVOL
(
int
nr
,
uae_u16
value
);
extern
void
AUDxPER
(
int
nr
,
uae_u16
value
);
extern
void
AUDxLCH
(
int
nr
,
uae_u16
value
);
...
...
@@ -38,7 +39,6 @@ extern int audio_activate (void);
extern
void
audio_vsync
(
void
);
void
switch_audio_interpol
(
void
);
extern
int
sound_available
;
extern
void
audio_sampleripper
(
int
);
...
...
src/include/memory.h
View file @
62e45398
...
...
@@ -11,8 +11,6 @@ extern void a1000_reset (void);
#ifdef JIT
extern
int
special_mem
;
#define SPECIAL_MEM_READ 1
#define SPECIAL_MEM_WRITE 2
#define S_READ 1
#define S_WRITE 2
...
...
src/include/sysdeps.h
View file @
62e45398
...
...
@@ -428,4 +428,5 @@ extern void xfree (const void*);
#define false 0
#define _vsntprintf vsnprintf
#define max(a,b) ((a) > (b) ? (a) : (b))
#define _tcstod strtod
#endif
src/include/zfile.h
View file @
62e45398
...
...
@@ -104,17 +104,16 @@ extern const TCHAR *uae_ignoreextensions[];
extern
const
TCHAR
*
uae_diskimageextensions
[];
extern
struct
zvolume
*
zfile_fopen_archive
(
const
TCHAR
*
filename
);
extern
struct
zvolume
*
zfile_fopen_archive
2
(
const
TCHAR
*
filename
,
int
flags
);
extern
struct
zvolume
*
zfile_fopen_archive
_flags
(
const
TCHAR
*
filename
,
int
flags
);
extern
struct
zvolume
*
zfile_fopen_archive_root
(
const
TCHAR
*
filename
,
int
flags
);
extern
struct
zvolume
*
zvolume_alloc_nofile
(
const
TCHAR
*
name
,
unsigned
int
id
,
void
*
handle
,
const
TCHAR
*
volumename
);
extern
void
zfile_fclose_archive
(
struct
zvolume
*
zv
);
extern
int
zfile_fs_usage_archive
(
const
TCHAR
*
path
,
const
TCHAR
*
disk
,
struct
fs_usage
*
fsp
);
extern
int
zfile_stat_archive
(
const
TCHAR
*
path
,
struct
_stat64
*
statbuf
);
//
extern int zfile_fs_usage_archive (const TCHAR *path, const TCHAR *disk, struct fs_usage *fsp);
//
extern int zfile_stat_archive (const TCHAR *path, struct _stat64 *statbuf);
extern
struct
zdirectory
*
zfile_opendir_archive
(
const
TCHAR
*
path
);
extern
struct
zdirectory
*
zfile_opendir_archive
2
(
const
TCHAR
*
path
,
int
flags
);
extern
struct
zdirectory
*
zfile_opendir_archive
_flags
(
const
TCHAR
*
path
,
int
flags
);
extern
void
zfile_closedir_archive
(
struct
zdirectory
*
);
extern
int
zfile_readdir_archive
(
struct
zdirectory
*
,
TCHAR
*
);
extern
int
zfile_readdir_archive
2
(
struct
zdirectory
*
,
TCHAR
*
,
bool
fullpath
);
extern
int
zfile_readdir_archive
_fullpath
(
struct
zdirectory
*
,
TCHAR
*
,
bool
fullpath
);
extern
void
zfile_resetdir_archive
(
struct
zdirectory
*
);
extern
int
zfile_fill_file_attrs_archive
(
const
TCHAR
*
path
,
int
*
isdir
,
int
*
flags
,
TCHAR
**
comment
);
extern
uae_s64
zfile_lseek_archive
(
struct
zfile
*
d
,
uae_s64
offset
,
int
whence
);
...
...
src/main.c
View file @
62e45398
...
...
@@ -464,7 +464,7 @@ void fixup_prefs (struct uae_prefs *p)
p
->
m68k_speed
=
0
;
}
#endif
if
(
p
->
maprom
&&
!
p
->
address_space_24
)
if
(
p
->
maprom
&&
!
p
->
address_space_24
)
p
->
maprom
=
0x0f000000
;
if
(
p
->
tod_hack
&&
p
->
cs_ciaatod
==
0
)
p
->
cs_ciaatod
=
p
->
ntscmode
?
2
:
1
;
...
...
@@ -575,6 +575,13 @@ static TCHAR *parsetext (const TCHAR *s)
return
my_strdup
(
s
);
}
}
static
TCHAR
*
parsetextpath
(
const
TCHAR
*
s
)
{
TCHAR
*
s3
=
parsetext
(
s
);
//TCHAR *s3 = target_expand_environment (s2);
//xfree (s2);
return
s3
;
}
static
void
parse_cmdline
(
int
argc
,
TCHAR
**
argv
)
{
...
...
@@ -582,7 +589,7 @@ static void parse_cmdline (int argc, TCHAR **argv)
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
!
_tcsncmp
(
argv
[
i
],
"-diskswapper="
,
13
))
{
TCHAR
*
txt
=
parsetext
(
argv
[
i
]
+
13
);
TCHAR
*
txt
=
parsetext
path
(
argv
[
i
]
+
13
);
parse_diskswapper
(
txt
);
xfree
(
txt
);
}
else
if
(
_tcsncmp
(
argv
[
i
],
"-cfgparam="
,
10
)
==
0
)
{
...
...
@@ -591,12 +598,12 @@ static void parse_cmdline (int argc, TCHAR **argv)
if
(
i
+
1
<
argc
)
i
++
;
}
else
if
(
_tcsncmp
(
argv
[
i
],
"-config="
,
8
)
==
0
)
{
TCHAR
*
txt
=
parsetext
(
argv
[
i
]
+
8
);
TCHAR
*
txt
=
parsetext
path
(
argv
[
i
]
+
8
);
currprefs
.
mountitems
=
0
;
target_cfgfile_load
(
&
currprefs
,
txt
,
-
1
,
0
);
xfree
(
txt
);
}
else
if
(
_tcsncmp
(
argv
[
i
],
"-statefile="
,
11
)
==
0
)
{
TCHAR
*
txt
=
parsetext
(
argv
[
i
]
+
11
);
TCHAR
*
txt
=
parsetext
path
(
argv
[
i
]
+
11
);
savestate_state
=
STATE_DORESTORE
;
_tcscpy
(
savestate_fname
,
txt
);
xfree
(
txt
);
...
...
@@ -605,7 +612,7 @@ static void parse_cmdline (int argc, TCHAR **argv)
if
(
i
+
1
==
argc
)
{
write_log
(
"Missing argument for '-f' option.
\n
"
);
}
else
{
TCHAR
*
txt
=
parsetext
(
argv
[
++
i
]);
TCHAR
*
txt
=
parsetext
path
(
argv
[
++
i
]);
currprefs
.
mountitems
=
0
;
target_cfgfile_load
(
&
currprefs
,
txt
,
-
1
,
0
);
xfree
(
txt
);
...
...
@@ -619,7 +626,7 @@ static void parse_cmdline (int argc, TCHAR **argv)
usage
();
exit
(
0
);
}
else
if
(
_tcsncmp
(
argv
[
i
],
"-cdimage="
,
9
)
==
0
)
{
TCHAR
*
txt
=
parsetext
(
argv
[
i
]
+
9
);
TCHAR
*
txt
=
parsetext
path
(
argv
[
i
]
+
9
);
TCHAR
*
txt2
=
xmalloc
(
TCHAR
,
_tcslen
(
txt
)
+
2
);
_tcscpy
(
txt2
,
txt
);
if
(
_tcsrchr
(
txt2
,
','
)
!=
NULL
)
...
...
@@ -665,14 +672,8 @@ static void parse_cmdline_and_init_file (int argc, TCHAR **argv)
write_log
(
"failed to load config '%s'
\n
"
,
optionsfile
);
#ifdef OPTIONS_IN_HOME
/* sam: if not found in $HOME then look in current directory */
char
*
saved_path
=
strdup
(
optionsfile
);
strcpy
(
optionsfile
,
OPTIONSFILENAME
);
if
(
!
target_cfgfile_load
(
&
currprefs
,
optionsfile
,
0
)
)
{
/* If not in current dir either, change path back to home
* directory - so that a GUI can save a new config file there */
strcpy
(
optionsfile
,
saved_path
);
}
free
(
saved_path
);
_tcscpy
(
optionsfile
,
restart_config
);
target_cfgfile_load
(
&
currprefs
,
optionsfile
,
0
);
#endif
}
fixup_prefs
(
&
currprefs
);
...
...
@@ -801,7 +802,7 @@ void do_leave_program (void)
void
start_program
(
void
)
{
//TODO: remove
here!
//TODO: remove
gui_display
(
-
1
);
do_start_program
();
}
...
...
src/memory.c
View file @
62e45398
...
...
@@ -2065,6 +2065,7 @@ static void add_shmmaps (uae_u32 start, addrbank *what)
else
if
(
errno
==
13
)
write_log
(
"(Permission denied)
\n
"
);
else
if
(
errno
==
22
)
write_log
(
"(Invalid argument)
\n
"
);
else
if
(
errno
==
24
)
write_log
(
"(Too many open files)
\n
"
);
else
write_log
(
"
\n
"
);
dumplist
();
nocanbang
();
return
;
...
...
src/zfile.c
View file @
62e45398
...
...
@@ -1593,7 +1593,6 @@ int zfile_zopen (const TCHAR *name, zfile_callback zc, void *user)
return
1
;
}
/*
* fopen() for a compressed file
*/
...
...
@@ -2788,6 +2787,22 @@ struct znode *zvolume_addfile_abs (struct zvolume *zv, struct zarchive_info *zai
return
zn
;
}
struct
zvolume
*
zfile_fopen_directory
(
const
TCHAR
*
dirname
)
{
}
struct
zvolume
*
zfile_fopen_archive_flags
(
const
TCHAR
*
filename
,
int
flags
)
{
}
struct
zvolume
*
zfile_fopen_archive
(
const
TCHAR
*
filename
)
{
return
zfile_fopen_archive_flags
(
filename
,
ZFD_ALL
);
}
struct
zvolume
*
zfile_fopen_archive_root
(
const
TCHAR
*
filename
,
int
flags
)
{
}
void
zfile_fclose_archive
(
struct
zvolume
*
zv
)
{
struct
znode
*
zn
;
...
...
@@ -2836,11 +2851,87 @@ struct zdirectory {
TCHAR
**
filenames
;
};
struct
zdirectory
*
zfile_opendir_archive_flags
(
const
TCHAR
*
path
,
int
flags
)
{
}
struct
zdirectory
*
zfile_opendir_archive
(
const
TCHAR
*
path
)
{
return
zfile_opendir_archive_flags
(
path
,
ZFD_ALL
|
ZFD_NORECURSE
);
}
void
zfile_closedir_archive
(
struct
zdirectory
*
zd
)
{
if
(
!
zd
)
return
;
zfile_fclose_archive
(
zd
->
zv
);
xfree
(
zd
->
parentpath
);
xfree
(
zd
->
filenames
);
xfree
(
zd
);
}
int
zfile_readdir_archive_fullpath
(
struct
zdirectory
*
zd
,
TCHAR
*
out
,
bool
fullpath
)
{
if
(
out
)
out
[
0
]
=
0
;
return
1
;
}
int
zfile_readdir_archive
(
struct
zdirectory
*
zd
,
TCHAR
*
out
)
{
return
zfile_readdir_archive_fullpath
(
zd
,
out
,
false
);
}
void
zfile_resetdir_archive
(
struct
zdirectory
*
zd
)
{
zd
->
offset
=
0
;
zd
->
n
=
zd
->
first
;
}
int
zfile_fill_file_attrs_archive
(
const
TCHAR
*
path
,
int
*
isdir
,
int
*
flags
,
TCHAR
**
comment
)
{
return
1
;
}
int
zfile_fs_usage_archive
(
const
TCHAR
*
path
,
const
TCHAR
*
disk
,
struct
fs_usage
*
fsp
)
{
return
0
;
}
int
zfile_stat_archive
(
const
TCHAR
*
path
,
struct
_stat64
*
s
)
{
return
1
;
}
uae_s64
zfile_lseek_archive
(
struct
zfile
*
d
,
uae_s64
offset
,
int
whence
)
{
if
(
zfile_fseek
(
d
,
offset
,
whence
))
return
-
1
;
return
zfile_ftell
(
d
);
}
unsigned
int
zfile_read_archive
(
struct
zfile
*
d
,
void
*
b
,
unsigned
int
size
)
{
return
zfile_fread
(
b
,
1
,
size
,
d
);
}
void
zfile_close_archive
(
struct
zfile
*
d
)
{
/* do nothing, keep file cached */
}
struct
zfile
*
zfile_open_archive
(
const
TCHAR
*
path
,
int
flags
)
{
return
0
;
}
int
zfile_exists_archive
(
const
TCHAR
*
path
,
const
TCHAR
*
rel
)
{
}
int
zfile_convertimage
(
const
TCHAR
*
src
,
const
TCHAR
*
dst
)
{
struct
zfile
*
s
,
*
d
;
int
ret
=
0
;
return
ret
;
}
#ifdef _CONSOLE
static
TCHAR
*
zerror
;
#define WRITE_LOG_BUF_SIZE 4096
...
...
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