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
cadc4ee6
Commit
cadc4ee6
authored
Aug 23, 2010
by
Mustafa 'GnoStiC' TUFAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syncing 2.3.0
parent
8f059ce4
Changes
21
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
497 additions
and
494 deletions
+497
-494
blkdev.c
src/blkdev.c
+193
-78
blkdev_cdimage.c
src/blkdev_cdimage.c
+178
-123
cfgfile.c
src/cfgfile.c
+7
-7
cia.c
src/cia.c
+1
-5
disk.c
src/disk.c
+14
-13
cocoaui.m
src/gui-cocoa/cocoaui.m
+1
-1
gtkui.c
src/gui-gtk/gtkui.c
+1
-1
nogui.c
src/gui-none/nogui.c
+1
-1
disk.h
src/include/disk.h
+1
-1
drawing.h
src/include/drawing.h
+0
-1
execio.h
src/include/execio.h
+21
-21
gui.h
src/include/gui.h
+1
-1
inputdevice.h
src/include/inputdevice.h
+2
-2
romlist.h
src/include/romlist.h
+0
-69
rommgr.h
src/include/rommgr.h
+5
-1
inputdevice.c
src/inputdevice.c
+35
-15
misc.c
src/misc.c
+25
-144
ncr_scsi.c
src/ncr_scsi.c
+1
-0
rommgr.c
src/rommgr.c
+4
-4
scsiemul.c
src/scsiemul.c
+3
-3
config.log
src/tools/config.log
+3
-3
No files found.
src/blkdev.c
View file @
cadc4ee6
This diff is collapsed.
Click to expand it.
src/blkdev_cdimage.c
View file @
cadc4ee6
This diff is collapsed.
Click to expand it.
src/cfgfile.c
View file @
cadc4ee6
...
...
@@ -1769,9 +1769,9 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
return
0
;
}
static
void
decode_rom_ident
(
TCHAR
*
romfile
,
int
maxlen
,
TCHAR
*
ident
)
static
void
decode_rom_ident
(
TCHAR
*
romfile
,
int
maxlen
,
const
TCHAR
*
ident
,
int
romflags
)
{
TCHAR
*
p
;
const
TCHAR
*
p
;
int
ver
,
rev
,
subver
,
subrev
,
round
,
i
;
TCHAR
model
[
64
],
*
modelp
;
struct
romlist
**
rl
;
...
...
@@ -1796,7 +1796,7 @@ static void decode_rom_ident (TCHAR *romfile, int maxlen, TCHAR *ident)
pp1
=
&
subver
;
pp2
=
&
subrev
;
}
else
if
(
!
_istdigit
(
c
)
&&
c
!=
' '
)
{
_tcsncpy
(
model
,
p
-
1
,
(
sizeof
model
)
-
1
);
_tcsncpy
(
model
,
p
-
1
,
(
sizeof
model
)
/
sizeof
(
TCHAR
)
-
1
);
p
+=
_tcslen
(
model
);
modelp
=
model
;
}
...
...
@@ -1811,7 +1811,7 @@ static void decode_rom_ident (TCHAR *romfile, int maxlen, TCHAR *ident)
}
}
if
(
*
p
==
0
||
*
p
==
';'
)
{
rl
=
getromlistbyident
(
ver
,
rev
,
subver
,
subrev
,
modelp
,
ro
und
);
rl
=
getromlistbyident
(
ver
,
rev
,
subver
,
subrev
,
modelp
,
ro
mflags
,
round
>
0
);
if
(
rl
)
{
for
(
i
=
0
;
rl
[
i
];
i
++
)
{
if
(
round
)
{
...
...
@@ -2102,15 +2102,15 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, TCHAR *option, TCHAR *va
return
1
;
}
if
(
cfgfile_string
(
option
,
value
,
"kickstart_rom"
,
p
->
romident
,
sizeof
p
->
romident
/
sizeof
(
TCHAR
)))
{
decode_rom_ident
(
p
->
romfile
,
sizeof
p
->
romfile
/
sizeof
(
TCHAR
),
p
->
romident
);
decode_rom_ident
(
p
->
romfile
,
sizeof
p
->
romfile
/
sizeof
(
TCHAR
),
p
->
romident
,
ROMTYPE_ALL_KICK
);
return
1
;
}
if
(
cfgfile_string
(
option
,
value
,
"kickstart_ext_rom"
,
p
->
romextident
,
sizeof
p
->
romextident
/
sizeof
(
TCHAR
)))
{
decode_rom_ident
(
p
->
romextfile
,
sizeof
p
->
romextfile
/
sizeof
(
TCHAR
),
p
->
romextident
);
decode_rom_ident
(
p
->
romextfile
,
sizeof
p
->
romextfile
/
sizeof
(
TCHAR
),
p
->
romextident
,
ROMTYPE_ALL_EXT
);
return
1
;
}
if
(
cfgfile_string
(
option
,
value
,
"cart"
,
p
->
cartident
,
sizeof
p
->
cartident
/
sizeof
(
TCHAR
)))
{
decode_rom_ident
(
p
->
cartfile
,
sizeof
p
->
cartfile
/
sizeof
(
TCHAR
),
p
->
cartident
);
decode_rom_ident
(
p
->
cartfile
,
sizeof
p
->
cartfile
/
sizeof
(
TCHAR
),
p
->
cartident
,
ROMTYPE_ALL_CART
);
return
1
;
}
...
...
src/cia.c
View file @
cadc4ee6
...
...
@@ -635,12 +635,8 @@ static uae_u8 ReadCIAA (unsigned int addr)
action_replay_ciaread
();
#endif
tmp
=
DISK_status
()
&
0x3c
;
tmp
|=
handle_joystick_buttons
(
ciaadra
);
tmp
|=
handle_joystick_buttons
(
ciaa
pra
,
ciaa
dra
);
tmp
|=
(
ciaapra
|
(
ciaadra
^
3
))
&
0x03
;
if
(
ciaadra
&
0x40
)
tmp
=
(
tmp
&
~
0x40
)
|
(
ciaapra
&
0x40
);
if
(
ciaadra
&
0x80
)
tmp
=
(
tmp
&
~
0x80
)
|
(
ciaapra
&
0x80
);
tmp
=
dongle_cia_read
(
0
,
reg
,
tmp
);
#if DONGLE_DEBUG > 0
if
(
notinrom
())
...
...
src/disk.c
View file @
cadc4ee6
...
...
@@ -888,7 +888,6 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR
int
canauto
;
const
TCHAR
*
ext
;
gui_disk_image_change
(
dnum
,
fname
);
drive_image_free
(
drv
);
DISK_validate_filename
(
fname
,
1
,
&
drv
->
wrprot
,
&
drv
->
crc32
,
&
drv
->
diskfile
);
drv
->
ddhd
=
1
;
...
...
@@ -898,6 +897,8 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR
drv
->
useturbo
=
0
;
drv
->
indexoffset
=
0
;
gui_disk_image_change
(
dnum
,
fname
,
drv
->
wrprot
);
canauto
=
0
;
ext
=
_tcsrchr
(
fname
,
'.'
);
if
(
ext
)
{
...
...
@@ -2023,7 +2024,7 @@ static void drive_eject (drive * drv)
#ifdef DRIVESOUND
driveclick_insert
(
drv
-
floppy
,
1
);
#endif
gui_disk_image_change
(
drv
-
floppy
,
NULL
);
gui_disk_image_change
(
drv
-
floppy
,
NULL
,
drv
->
wrprot
);
drive_image_free
(
drv
);
drv
->
dskchange
=
1
;
drv
->
ddhd
=
1
;
...
...
@@ -2187,7 +2188,7 @@ void DISK_reinsert (int num)
setdskchangetime
(
&
floppy
[
num
],
20
);
}
int
disk_setwriteprotect
(
int
num
,
const
TCHAR
*
name
,
int
protect
)
int
disk_setwriteprotect
(
int
num
,
const
TCHAR
*
name
,
bool
writeprotected
)
{
int
needwritefile
,
oldprotect
;
struct
zfile
*
zf1
,
*
zf2
;
...
...
@@ -2209,7 +2210,7 @@ int disk_setwriteprotect (int num, const TCHAR *name, int protect)
if
(
needwritefile
&&
zf2
==
0
)
disk_creatediskfile
(
name2
,
1
,
drvtype
,
NULL
);
zfile_fclose
(
zf2
);
if
(
protect
&&
iswritefileempty
(
name
))
{
if
(
writeprotected
&&
iswritefileempty
(
name
))
{
for
(
i
=
0
;
i
<
MAX_FLOPPY_DRIVES
;
i
++
)
{
if
(
!
_tcscmp
(
name
,
floppy
[
i
].
newname
))
drive_eject
(
&
floppy
[
i
]);
...
...
@@ -2218,8 +2219,8 @@ int disk_setwriteprotect (int num, const TCHAR *name, int protect)
}
if
(
!
needwritefile
)
diskfile_readonly
(
name
,
protect
);
diskfile_readonly
(
name2
,
protect
);
diskfile_readonly
(
name
,
writeprotected
);
diskfile_readonly
(
name2
,
writeprotected
);
DISK_reinsert
(
num
);
return
1
;
}
...
...
@@ -2234,7 +2235,7 @@ void disk_eject (int num)
update_drive_gui
(
num
);
}
int
DISK_history_add
(
const
char
*
name
,
int
idx
,
int
type
,
int
donotcheck
)
int
DISK_history_add
(
const
TCHAR
*
name
,
int
idx
,
int
type
,
int
donotcheck
)
{
int
i
;
...
...
@@ -2288,14 +2289,14 @@ int DISK_history_add (const char *name, int idx, int type, int donotcheck)
return
1
;
}
char
*
DISK_history_get
(
int
idx
,
int
type
)
TCHAR
*
DISK_history_get
(
int
idx
,
int
type
)
{
if
(
idx
>=
MAX_PREVIOUS_FLOPPIES
)
return
NULL
;
return
dfxhistory
[
type
][
idx
];
}
static
void
disk_insert_2
(
int
num
,
const
char
*
name
,
int
forced
)
static
void
disk_insert_2
(
int
num
,
const
TCHAR
*
name
,
int
forced
)
{
drive
*
drv
=
floppy
+
num
;
...
...
@@ -2322,13 +2323,13 @@ static void disk_insert_2 (int num, const char *name, int forced)
}
}
void
disk_insert
(
int
num
,
const
char
*
name
)
void
disk_insert
(
int
num
,
const
TCHAR
*
name
)
{
config_changed
=
1
;
// target_addtorecent (name, 0);
disk_insert_2
(
num
,
name
,
0
);
}
void
disk_insert_force
(
int
num
,
const
char
*
name
)
void
disk_insert_force
(
int
num
,
const
TCHAR
*
name
)
{
disk_insert_2
(
num
,
name
,
1
);
}
...
...
@@ -2379,10 +2380,10 @@ int disk_empty (int num)
return
drive_empty
(
floppy
+
num
);
}
static
char
*
tobin
(
uae_u8
v
)
static
TCHAR
*
tobin
(
uae_u8
v
)
{
int
i
;
static
char
buf
[
10
];
static
TCHAR
buf
[
10
];
for
(
i
=
7
;
i
>=
0
;
i
--
)
buf
[
7
-
i
]
=
v
&
(
1
<<
i
)
?
'1'
:
'0'
;
buf
[
i
]
=
0
;
...
...
src/gui-cocoa/cocoaui.m
View file @
cadc4ee6
...
...
@@ -650,7 +650,7 @@ void gui_message (const char *format,...)
restoreFullscreen
();
}
void
gui_disk_image_change
(
int
unitnum
,
const
TCHAR
*
name
)
{}
void
gui_disk_image_change
(
int
unitnum
,
const
TCHAR
*
name
,
bool
writeprotected
)
{}
void
gui_lock
(
void
)
{}
void
gui_unlock
(
void
)
{}
src/gui-gtk/gtkui.c
View file @
cadc4ee6
...
...
@@ -2725,7 +2725,7 @@ int gui_init (void)
return
1
;
}
void
gui_disk_image_change
(
int
unitnum
,
const
TCHAR
*
name
)
{}
void
gui_disk_image_change
(
int
unitnum
,
const
TCHAR
*
name
,
bool
writeprotected
)
{}
void
gui_lock
(
void
)
{}
void
gui_unlock
(
void
)
{}
src/gui-none/nogui.c
View file @
cadc4ee6
...
...
@@ -63,7 +63,7 @@ void gui_message (const char *format,...)
write_log
(
msg
);
}
void
gui_disk_image_change
(
int
unitnum
,
const
TCHAR
*
name
)
{}
void
gui_disk_image_change
(
int
unitnum
,
const
TCHAR
*
name
,
bool
writeprotected
)
{}
void
gui_lock
(
void
)
{}
void
gui_unlock
(
void
)
{}
src/include/disk.h
View file @
cadc4ee6
...
...
@@ -27,7 +27,7 @@ extern void DISK_update_adkcon (unsigned int hpos, uae_u16 v);
extern
void
DISK_hsync
(
void
);
extern
void
DISK_reset
(
void
);
extern
int
disk_getwriteprotect
(
const
TCHAR
*
name
);
extern
int
disk_setwriteprotect
(
int
num
,
const
TCHAR
*
name
,
int
protect
);
extern
int
disk_setwriteprotect
(
int
num
,
const
TCHAR
*
name
,
bool
writeprotected
);
extern
void
disk_creatediskfile
(
TCHAR
*
name
,
int
type
,
drive_type
adftype
,
TCHAR
*
disk_name
);
extern
void
dumpdisk
(
void
);
extern
int
DISK_history_add
(
const
TCHAR
*
name
,
int
idx
,
int
type
,
int
donotcheck
);
...
...
src/include/drawing.h
View file @
cadc4ee6
...
...
@@ -244,7 +244,6 @@ struct draw_info {
extern
int
next_sprite_entry
;
extern
struct
decision
line_decisions
[
2
*
(
MAXVPOS
+
2
)
+
1
];
extern
struct
draw_info
line_drawinfo
[
2
][
2
*
(
MAXVPOS
+
2
)
+
1
];
extern
uae_u8
line_data
[(
MAXVPOS
+
2
)
*
2
][
MAX_PLANES
*
MAX_WORDS_PER_LINE
*
2
];
...
...
src/include/execio.h
View file @
cadc4ee6
...
...
@@ -7,27 +7,27 @@
#define IOERR_UNITBUSY -6
#define IOERR_SELFTEST -7
#define
CD
ERR_NotSpecified 20
/* general catchall */
#define
CD
ERR_NoSecHdr 21
/* couldn't even find a sector */
#define
CD
ERR_BadSecPreamble 22
/* sector looked wrong */
#define
CD
ERR_BadSecID 23
/* ditto */
#define
CD
ERR_BadHdrSum 24
/* header had incorrect checksum */
#define
CD
ERR_BadSecSum 25
/* data had incorrect checksum */
#define
CD
ERR_TooFewSecs 26
/* couldn't find enough sectors */
#define
CD
ERR_BadSecHdr 27
/* another "sector looked wrong" */
#define
CD
ERR_WriteProt 28
/* can't write to a protected disk */
#define
CD
ERR_NoDisk 29
/* no disk in the drive */
#define
CD
ERR_SeekError 30
/* couldn't find track 0 */
#define
CDERR_NoMem
31
/* ran out of memory */
#define
CD
ERR_BadUnitNum 32
/* asked for a unit > NUMUNITS */
#define
CD
ERR_BadDriveType 33
/* not a drive cd.device understands */
#define
CD
ERR_DriveInUse 34
/* someone else allocated the drive */
#define
CD
ERR_PostReset 35
/* user hit reset; awaiting doom */
#define
CD
ERR_BadDataType 36
/* data on disk is wrong type */
#define
CD
ERR_InvalidState 37
/* invalid cmd under current conditions */
#define
CDERR_Phase
42
/* illegal or unexpected SCSI phase */
#define
CDERR_NoBoard
50
/* open failed for non-existant board */
#define
IO
ERR_NotSpecified 20
/* general catchall */
#define
IO
ERR_NoSecHdr 21
/* couldn't even find a sector */
#define
IO
ERR_BadSecPreamble 22
/* sector looked wrong */
#define
IO
ERR_BadSecID 23
/* ditto */
#define
IO
ERR_BadHdrSum 24
/* header had incorrect checksum */
#define
IO
ERR_BadSecSum 25
/* data had incorrect checksum */
#define
IO
ERR_TooFewSecs 26
/* couldn't find enough sectors */
#define
IO
ERR_BadSecHdr 27
/* another "sector looked wrong" */
#define
IO
ERR_WriteProt 28
/* can't write to a protected disk */
#define
IO
ERR_NoDisk 29
/* no disk in the drive */
#define
IO
ERR_SeekError 30
/* couldn't find track 0 */
#define
IOERR_NoMem
31
/* ran out of memory */
#define
IO
ERR_BadUnitNum 32
/* asked for a unit > NUMUNITS */
#define
IO
ERR_BadDriveType 33
/* not a drive cd.device understands */
#define
IO
ERR_DriveInUse 34
/* someone else allocated the drive */
#define
IO
ERR_PostReset 35
/* user hit reset; awaiting doom */
#define
IO
ERR_BadDataType 36
/* data on disk is wrong type */
#define
IO
ERR_InvalidState 37
/* invalid cmd under current conditions */
#define IOERR_BadStatus 45
#define
IOERR_Phase
42
/* illegal or unexpected SCSI phase */
#define
IOERR_NoBoard
50
/* open failed for non-existant board */
#define TDERR_DiskChanged 29
...
...
src/include/gui.h
View file @
cadc4ee6
...
...
@@ -17,7 +17,7 @@ extern void gui_changesettings (void);
extern
void
gui_lock
(
void
);
extern
void
gui_unlock
(
void
);
extern
void
gui_flicker_led
(
int
,
int
,
int
);
extern
void
gui_disk_image_change
(
int
,
const
TCHAR
*
);
extern
void
gui_disk_image_change
(
int
,
const
TCHAR
*
,
bool
writeprotected
);
extern
unsigned
int
gui_ledstate
;
extern
void
gui_display
(
int
shortcut
);
...
...
src/include/inputdevice.h
View file @
cadc4ee6
...
...
@@ -106,7 +106,7 @@ INPUTEVENT_END
extern
void
handle_cd32_joystick_cia
(
uae_u8
,
uae_u8
);
extern
uae_u8
handle_parport_joystick
(
int
port
,
uae_u8
pra
,
uae_u8
dra
);
extern
uae_u8
handle_joystick_buttons
(
uae_u8
);
extern
uae_u8
handle_joystick_buttons
(
uae_u8
,
uae_u8
);
extern
int
getbuttonstate
(
int
joy
,
int
button
);
extern
int
getjoystate
(
int
joy
);
...
...
@@ -162,7 +162,7 @@ extern void inputdevice_hsync (void);
extern
void
inputdevice_reset
(
void
);
//extern void write_inputdevice_config (struct uae_prefs *p, struct zfile *f);
extern
void
read_inputdevice_config
(
struct
uae_prefs
*
p
,
TCHAR
*
option
,
TCHAR
*
value
);
extern
void
read_inputdevice_config
(
struct
uae_prefs
*
p
,
const
TCHAR
*
option
,
TCHAR
*
value
);
extern
void
reset_inputdevice_config
(
struct
uae_prefs
*
pr
);
extern
int
inputdevice_joyport_config
(
struct
uae_prefs
*
p
,
TCHAR
*
value
,
int
portnum
,
int
mode
,
int
type
);
extern
int
inputdevice_getjoyportdevice
(
int
port
,
int
val
);
...
...
src/include/romlist.h
deleted
100644 → 0
View file @
8f059ce4
#define ROMTYPE_KICK 1
#define ROMTYPE_KICKCD32 2
#define ROMTYPE_EXTCD32 4
#define ROMTYPE_EXTCDTV 8
#define ROMTYPE_A2091BOOT 16
#define ROMTYPE_A4091BOOT 32
#define ROMTYPE_AR 64
#define ROMTYPE_SUPERIV 128
#define ROMTYPE_KEY 256
#define ROMTYPE_ARCADIABIOS 512
#define ROMTYPE_ARCADIAGAME 1024
#define ROMTYPE_HRTMON 2048
struct
romheader
{
char
*
name
;
int
id
;
};
/* Mask to determine CPU type required by the ROM. */
#define ROMREQ_CPUMASK 3
#define ROMREQ_68EC020 1
#define ROMREQ_68020 2
#define ROMREQ_68030 3
#define ROMREQ_A4000MB 4
#define ROMREQ_A4000 (ROMREQ_A4000MB | ROMREQ_68020)
#define ROMREQ_A1000 8
struct
romdata
{
char
*
name
;
int
ver
,
rev
;
int
subver
,
subrev
;
char
*
model
;
uae_u32
size
;
int
id
;
int
cpu
;
int
cloanto
;
int
type
;
int
title
;
uae_u32
crc32
;
uae_u32
sha1
[
5
];
char
*
configname
;
};
/* Used to tag a romlist elt with the location where it was found.
That way, we can quickly remove everything from a user path when
that changes, leaving the system ROMs intact. */
#define ROMLOC_SYSTEM 1
#define ROMLOC_USER 2
struct
romlist
{
char
*
path
;
struct
romdata
*
rd
;
int
loc
;
};
extern
struct
romdata
*
getromdatabycrc
(
uae_u32
crc32
);
extern
struct
romdata
*
getromdatabydata
(
uae_u8
*
rom
,
int
size
);
extern
struct
romdata
*
getromdatabyid
(
int
id
);
extern
struct
romdata
*
getarcadiarombyname
(
char
*
name
);
extern
void
getromname
(
struct
romdata
*
,
char
*
);
extern
struct
romdata
*
getromdatabyname
(
char
*
);
extern
void
romlist_add
(
char
*
path
,
struct
romdata
*
rd
,
int
loc
);
extern
char
*
romlist_get
(
struct
romdata
*
rd
);
extern
void
romlist_clear
(
int
mask
);
extern
int
decode_cloanto_rom
(
uae_u8
*
,
int
,
int
,
int
);
extern
struct
romlist
*
romlist_from_idx
(
int
idx
,
int
type
,
int
need_crc32
);
extern
void
scan_roms
(
const
char
*
path
,
int
loc
);
src/include/rommgr.h
View file @
cadc4ee6
...
...
@@ -24,6 +24,10 @@ extern int decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size);
#define ROMTYPE_CD32 0x200000
#define ROMTYPE_SCRAMBLED 0x400000
#define ROMTYPE_ALL_KICK (ROMTYPE_KICK | ROMTYPE_KICKCD32 | ROMTYPE_CD32)
#define ROMTYPE_ALL_EXT (ROMTYPE_EXTCD32 | ROMTYPE_EXTCDTV)
#define ROMTYPE_ALL_CART (ROMTYPE_AR | ROMTYPE_HRTMON | ROMTYPE_NORDIC | ROMTYPE_XPOWER | ROMTYPE_CD32CART)
struct
romheader
{
TCHAR
*
name
;
int
id
;
...
...
@@ -60,7 +64,7 @@ extern struct romdata *getromdatabyidgroup (int id, int group, int subitem);
//extern struct romdata *getromdatabyzfile (struct zfile *f);
extern
struct
romlist
**
getarcadiaroms
(
void
);
extern
struct
romdata
*
getarcadiarombyname
(
const
TCHAR
*
name
);
extern
struct
romlist
**
getromlistbyident
(
int
ver
,
int
rev
,
int
subver
,
int
subrev
,
const
TCHAR
*
model
,
int
all
);
extern
struct
romlist
**
getromlistbyident
(
int
ver
,
int
rev
,
int
subver
,
int
subrev
,
const
TCHAR
*
model
,
int
romflags
,
bool
all
);
extern
void
getromname
(
const
struct
romdata
*
,
TCHAR
*
);
//extern struct romdata *getromdatabyname (const TCHAR*);
extern
struct
romlist
*
getromlistbyids
(
const
int
*
ids
);
...
...
src/inputdevice.c
View file @
cadc4ee6
...
...
@@ -982,12 +982,13 @@ static struct inputevent *readevent (TCHAR *name, TCHAR **customp)
return
&
events
[
0
];
}
void
read_inputdevice_config
(
struct
uae_prefs
*
pr
,
TCHAR
*
option
,
TCHAR
*
value
)
void
read_inputdevice_config
(
struct
uae_prefs
*
pr
,
const
TCHAR
*
option
,
TCHAR
*
value
)
{
struct
uae_input_device
*
id
=
0
;
struct
inputevent
*
ie
;
int
devnum
,
num
,
button
,
joystick
,
subnum
,
idnum
,
keynum
;
TCHAR
*
p
,
*
p2
,
*
custom
;
const
TCHAR
*
p
;
TCHAR
*
p2
,
*
custom
;
option
+=
6
;
/* "input." */
p
=
getstring
(
&
option
);
...
...
@@ -2116,12 +2117,13 @@ static void cap_check (void)
int
isbutton
=
getbuttonstate
(
joy
,
i
==
0
?
JOYBUTTON_3
:
JOYBUTTON_2
);
if
(
cd32_pad_enabled
[
joy
])
{
if
(
i
==
0
)
// 3rd button?
continue
;
if
(
cd32padmode
(
p5dir
,
p5dat
))
continue
;
// only red and blue can be read if CD32 pad and only if it is in normal pad mode
isbutton
|=
getbuttonstate
(
joy
,
JOYBUTTON_CD32_BLUE
);
// CD32 pad 3rd button line (P5) is always floating
if
(
i
==
0
)
isbutton
=
0
;
if
(
cd32padmode
(
p5dir
,
p5dat
))
continue
;
}
dong
=
dongle_analogjoy
(
joy
,
i
);
...
...
@@ -2176,6 +2178,10 @@ static void cap_check (void)
if
(
!
(
potgo_value
&
pdir
)
&&
i
==
1
&&
charge
==
0
)
charge
=
2
;
}
// CD32 pad in 2-button mode: blue button is not floating
if
(
cd32_pad_enabled
[
joy
]
&&
i
==
1
&&
charge
==
0
)
charge
=
2
;
/* official Commodore mouse has pull-up resistors in button lines
* NOTE: 3rd party mice may not have pullups! */
if
(
dong
<
0
&&
(
mouse_pullup
&&
mouse_port
[
joy
]
&&
digital_port
[
joy
][
i
])
&&
charge
==
0
)
...
...
@@ -2193,7 +2199,7 @@ static void cap_check (void)
}
uae_u8
handle_joystick_buttons
(
uae_u8
dra
)
uae_u8
handle_joystick_buttons
(
uae_u8
pra
,
uae_u8
dra
)
{
uae_u8
but
=
0
;
int
i
;
...
...
@@ -2204,9 +2210,9 @@ uae_u8 handle_joystick_buttons (uae_u8 dra)
if
(
cd32_pad_enabled
[
i
])
{
uae_u16
p5dir
=
0x0200
<<
(
i
*
4
);
uae_u16
p5dat
=
0x0100
<<
(
i
*
4
);
but
|=
0x40
<<
i
;
but
|=
mask
;
if
(
!
cd32padmode
(
p5dir
,
p5dat
))
{
if
(
getbuttonstate
(
i
,
JOYBUTTON_CD32_RED
))
if
(
getbuttonstate
(
i
,
JOYBUTTON_CD32_RED
)
||
getbuttonstate
(
i
,
JOYBUTTON_1
)
)
but
&=
~
mask
;
}
}
else
{
...
...
@@ -2217,11 +2223,11 @@ uae_u8 handle_joystick_buttons (uae_u8 dra)
if
(
uaerand
()
&
1
)
but
|=
mask
;
}
if
(
dra
&
mask
)
but
=
(
but
&
~
mask
)
|
(
pra
&
mask
);
}
}
if
(
inputdevice_logging
&
4
)
write_log
(
"BFE001: %02X:%02X %x
\n
"
,
dra
,
but
,
M68K_GETPC
);
return
but
;
...
...
@@ -2878,10 +2884,17 @@ int handle_input_event (int nr, int state, int max, int autofire)
if
(
ie
->
type
&
4
)
{
int
old
=
joybutton
[
joy
]
&
(
1
<<
ie
->
data
);
if
(
state
)
if
(
state
)
{
joybutton
[
joy
]
|=
1
<<
ie
->
data
;
else
#ifdef RETROPLATFORM
rp_update_gameport
(
joy
,
RP_JOYSTICK_BUTTON1
<<
ie
->
data
,
1
);
#endif
}
else
{
joybutton
[
joy
]
&=
~
(
1
<<
ie
->
data
);
#ifdef RETROPLATFORM
rp_update_gameport
(
joy
,
RP_JOYSTICK_BUTTON1
<<
ie
->
data
,
0
);
#endif
}
if
(
ie
->
data
==
0
&&
old
!=
(
joybutton
[
joy
]
&
(
1
<<
ie
->
data
))
&&
currprefs
.
cpu_cycle_exact
)
{
// emulate contact bounce, 1st button only, others have capacitors
...
...
@@ -3013,7 +3026,12 @@ int handle_input_event (int nr, int state, int max, int autofire)
joydir
[
joy
]
|=
DIR_UP
;
if
(
bot
)
joydir
[
joy
]
|=
DIR_DOWN
;
#ifdef RETROPLATFORM
rp_update_gameport
(
joy
,
RP_JOYSTICK_LEFT
,
left
);
rp_update_gameport
(
joy
,
RP_JOYSTICK_RIGHT
,
right
);
rp_update_gameport
(
joy
,
RP_JOYSTICK_DOWN
,
bot
);
rp_update_gameport
(
joy
,
RP_JOYSTICK_UP
,
top
);
#endif
}
break
;
case
0
:
/* ->KEY */
...
...
@@ -4504,6 +4522,8 @@ void inputdevice_updateconfig (struct uae_prefs *prefs)
rp_input_change
(
1
);
rp_input_change
(
2
);
rp_input_change
(
3
);
for
(
i
=
0
;
i
<
MAX_JPORTS
;
i
++
)
rp_update_gameport
(
i
,
-
1
,
0
);
#endif
joybutton
[
0
]
=
joybutton
[
1
]
=
0
;
...
...
@@ -5526,7 +5546,7 @@ void setjoystickstate (int joy, int axis, int state, int max)
return
;
}
for
(
i
=
0
;
i
<
MAX_INPUT_SUB_EVENT
;
i
++
)
handle_input_event
(
id
->
eventid
[
ID_AXIS_OFFSET
+
axis
][
i
],
state
,
max
,
id
->
flags
[
ID_AXIS_OFFSET
+
axis
][
i
]);
handle_input_event
(
id
->
eventid
[
ID_AXIS_OFFSET
+
axis
][
i
],
state
,
max
,
id
->
flags
[
ID_AXIS_OFFSET
+
axis
][
i
]
&
ID_FLAG_AUTOFIRE
);
id2
->
states
[
axis
]
=
state
;
}
int
getjoystickstate
(
int
joy
)
...
...
src/misc.c
View file @
cadc4ee6
...
...
@@ -62,116 +62,15 @@ static int data_in_serdatr; /* new data received */
// --- dinput.cpp START ---
int
rawkeyboard
=
-
1
;
int
no_rawinput
;
// --- dinput.cpp END -----
static
uae_u32
REGPARAM2
gfxmem_lgetx
(
uaecptr
addr
)
{
uae_u32
*
m
;
addr
-=
gfxmem_start
&
gfxmem_mask
;
addr
&=
gfxmem_mask
;
m
=
(
uae_u32
*
)(
gfxmemory
+
addr
);
return
do_get_mem_long
(
m
);
}
static
uae_u32
REGPARAM2
gfxmem_wgetx
(
uaecptr
addr
)
{
uae_u16
*
m
;
addr
-=
gfxmem_start
&
gfxmem_mask
;
addr
&=
gfxmem_mask
;
m
=
(
uae_u16
*
)(
gfxmemory
+
addr
);
return
do_get_mem_word
(
m
);
}
static
uae_u32
REGPARAM2
gfxmem_bgetx
(
uaecptr
addr
)
{
addr
-=
gfxmem_start
&
gfxmem_mask
;
addr
&=
gfxmem_mask
;
return
gfxmemory
[
addr
];
}
static
void
REGPARAM2
gfxmem_lputx
(
uaecptr
addr
,
uae_u32
l
)
{
uae_u32
*
m
;
addr
-=
gfxmem_start
&
gfxmem_mask
;
addr
&=
gfxmem_mask
;
m
=
(
uae_u32
*
)(
gfxmemory
+
addr
);
do_put_mem_long
(
m
,
l
);
}
static
void
REGPARAM2
gfxmem_wputx
(
uaecptr
addr
,
uae_u32
w
)
{
uae_u16
*
m
;
addr
-=
gfxmem_start
&
gfxmem_mask
;
addr
&=
gfxmem_mask
;
m
=
(
uae_u16
*
)(
gfxmemory
+
addr
);
do_put_mem_word
(
m
,
(
uae_u16
)
w
);
}
static
void
REGPARAM2
gfxmem_bputx
(
uaecptr
addr
,
uae_u32
b
)
{
addr
-=
gfxmem_start
&
gfxmem_mask
;
addr
&=
gfxmem_mask
;
gfxmemory
[
addr
]
=
b
;
}
static
int
REGPARAM2
gfxmem_check
(
uaecptr
addr
,
uae_u32
size
)
{
addr
-=
gfxmem_start
&
gfxmem_mask
;
addr
&=
gfxmem_mask
;
return
(
addr
+
size
)
<
allocated_gfxmem
;
}
static
uae_u8
*
REGPARAM2
gfxmem_xlate
(
uaecptr
addr
)
{
addr
-=
gfxmem_start
&
gfxmem_mask
;
addr
&=
gfxmem_mask
;
return
gfxmemory
+
addr
;
}
addrbank
gfxmem_bankx
=
{
gfxmem_lgetx
,
gfxmem_wgetx
,
gfxmem_bgetx
,
gfxmem_lputx
,
gfxmem_wputx
,
gfxmem_bputx
,
gfxmem_xlate
,
gfxmem_check
,
NULL
,
"RTG RAM"
,
dummy_lgeti
,
dummy_wgeti
,
ABFLAG_RAM
};
void
getgfxoffset
(
int
*
dxp
,
int
*
dyp
,
int
*
mxp
,
int
*
myp
)
{
*
dxp
=
0
;
*
dyp
=
0
;
*
mxp
=
0
;
*
myp
=
0
;
/*
int dx, dy;
getfilteroffset (&dx, &dy, mxp, myp);
*dxp = dx;
*dyp = dy;
if (picasso_on) {
dx = picasso_offset_x;
dy = picasso_offset_y;
*mxp = picasso_offset_mx;
*myp = picasso_offset_my;
}
*dxp = dx;
*dyp = dy;
if (currentmode->flags & DM_W_FULLSCREEN) {
if (scalepicasso && screen_is_picasso)
return;
if (usedfilter && !screen_is_picasso)
return;
if (currentmode->fullfill && (currentmode->current_width > currentmode->native_width || currentmode->current_height > currentmode->native_height))
return;
dx += (currentmode->native_width - currentmode->current_width) / 2;
dy += (currentmode->native_height - currentmode->current_height) / 2;
}
*dxp = dx;
*dyp = dy;
*/
*
dxp
=
0
;
*
dyp
=
0
;
*
mxp
=
0
;
*
myp
=
0
;
}
int
is_tablet
(
void
)
{
return
tablet
?
1
:
0
;
...
...
@@ -332,6 +231,7 @@ static int driveclick_fdrawcmd_open_2(int drive)
return 0;
return 1;
*/
return
0
;
}
int
driveclick_fdrawcmd_open
(
int
drive
)
...
...
@@ -342,6 +242,7 @@ int driveclick_fdrawcmd_open(int drive)
driveclick_fdrawcmd_init(drive);
return 1;
*/
return
0
;
}
void
driveclick_fdrawcmd_detect
(
void
)
...
...
@@ -406,7 +307,7 @@ static int driveclick_fdrawcmd_init(int drive)
uae_u32
emulib_target_getcpurate
(
uae_u32
v
,
uae_u32
*
low
)
{
/*
#ifdef _WIN32
*
low
=
0
;
if
(
v
==
1
)
{
LARGE_INTEGER
pf
;
...
...
@@ -421,40 +322,21 @@ uae_u32 emulib_target_getcpurate (uae_u32 v, uae_u32 *low)
*
low
=
pf
.
LowPart
;
return
pf
.
HighPart
;
}
*/
return
0
;
}
#else
/*
int isfat (uae_u8 *p)
{
int i, b;
static struct timeval _tstart, _tend;
static struct timezone tz;
if ((p[0x15] & 0xf0) != 0xf0)
return 0;
if (p[0x0b] != 0x00 || p[0x0c] != 0x02)
return 0;
b = 0;
for (i = 0; i < 8; i++) {
if (p[0x0d] & (1 << i))
b++;
*low = 0;
if (v == 1) {
gettimeofday (&_tstart, &tz);
} else if (v == 2) {
gettimeofday (&_tend, &tz);
}
if (b != 1)
return 0;
if (p[0x0f] != 0)
return 0;
if (p[0x0e] > 8 || p[0x0e] == 0)
return 0;
if (p[0x10] == 0 || p[0x10] > 8)
return 0;
b = (p[0x12] << 8) | p[0x11];
if (b > 8192 || b <= 0)
return 0;
b = p[0x16] | (p[0x17] << 8);
if (b == 0 || b > 8192)
return 0;
return 1;
}
*/
#endif
}
void
setmouseactivexy
(
int
x
,
int
y
,
int
dir
)
{
/* int diff = 8;
...
...
@@ -531,11 +413,10 @@ int my_getvolumeinfo (const char *root)
return
-
1
;
if
(
!
S_ISDIR
(
sonuc
.
st_mode
))
return
-
1
;
//------------
return
ret
;
}
//
--- clipboard.c --- temporary here ---
//
clipboard.c
static
uaecptr
clipboard_data
;
static
int
vdelay
,
signaling
,
initialized
;
...
...
@@ -744,7 +625,7 @@ uae_u8 *save_log (int bootlog, int *len)
return
dst
;
}
//
---
win32gui.c
// win32gui.c
#define MAX_ROM_PATHS 10
int
scan_roms
(
int
show
)
{
...
...
@@ -768,7 +649,7 @@ end:
return
ret
;
}
//
--
dinput.c
// dinput.c
int
input_get_default_lightpen
(
struct
uae_input_device
*
uid
,
int
i
,
int
port
,
int
af
)
{
/* struct didata *did;
...
...
@@ -962,18 +843,18 @@ void debugger_change (int mode)
// regsetint (NULL, "DebuggerType", debugger_type);
openconsole
();
}
//unicode.c
//
unicode.c
char
*
ua
(
const
TCHAR
*
s
)
{
return
s
;
}
//keyboard.c
//
keyboard.c
void
clearallkeys
(
void
)
{
inputdevice_updateconfig
(
&
currprefs
);
}
//fsdb_mywin32.c
//
fsdb_mywin32.c
FILE
*
my_opentext
(
const
TCHAR
*
name
)
{
FILE
*
f
;
...
...
src/ncr_scsi.c
View file @
cadc4ee6
...
...
@@ -503,4 +503,5 @@ void ncr_init (void)
}
map_banks
(
&
ncr_bank
,
0xe80000
>>
16
,
65536
>>
16
,
0
);
}
#endif //ncr
\ No newline at end of file
src/rommgr.c
View file @
cadc4ee6
...
...
@@ -379,7 +379,7 @@ static void romlist_cleanup (void)
}
}
struct
romlist
**
getromlistbyident
(
int
ver
,
int
rev
,
int
subver
,
int
subrev
,
const
TCHAR
*
model
,
int
all
)
struct
romlist
**
getromlistbyident
(
int
ver
,
int
rev
,
int
subver
,
int
subrev
,
const
TCHAR
*
model
,
int
romflags
,
bool
all
)
{
int
i
,
j
,
ok
,
out
,
max
;
struct
romdata
*
rd
;
...
...
@@ -406,7 +406,7 @@ struct romlist **getromlistbyident (int ver, int rev, int subver, int subrev, co
continue
;
if
(
model
&&
!
_tcsicmp
(
model
,
rd
->
name
))
ok
=
2
;
if
(
rd
->
ver
==
ver
&&
(
rev
<
0
||
rd
->
rev
==
rev
))
{
if
(
(
ver
<
0
||
rd
->
ver
==
ver
)
&&
(
rev
<
0
||
rd
->
rev
==
rev
))
{
if
(
subver
>=
0
)
{
if
(
rd
->
subver
==
subver
&&
(
subrev
<
0
||
rd
->
subrev
==
subrev
)
&&
rd
->
subver
>
0
)
ok
=
1
;
...
...
@@ -419,7 +419,7 @@ struct romlist **getromlistbyident (int ver, int rev, int subver, int subrev, co
if
(
model
&&
ok
<
2
)
{
TCHAR
*
p
=
rd
->
model
;
ok
=
0
;
while
(
*
p
)
{
while
(
p
&&
*
p
)
{
if
(
!
_tcscmp
(
rd
->
model
,
model
))
{
ok
=
1
;
break
;
...
...
@@ -427,7 +427,7 @@ struct romlist **getromlistbyident (int ver, int rev, int subver, int subrev, co
p
=
p
+
_tcslen
(
p
)
+
1
;
}
}
if
(
!
model
&&
rd
->
type
!=
ROMTYPE_KICK
)
if
(
romflags
&&
(
rd
->
type
&
romflags
)
==
0
)
ok
=
0
;
if
(
ok
)
{
if
(
all
)
{
...
...
src/scsiemul.c
View file @
cadc4ee6
...
...
@@ -709,7 +709,7 @@ static int dev_do_io (struct devstruct *dev, uaecptr request)
}
}
}
else
{
io_error
=
CD
ERR_NotSpecified
;
io_error
=
IO
ERR_NotSpecified
;
}
}
break
;
...
...
@@ -848,7 +848,7 @@ static int dev_do_io (struct devstruct *dev, uaecptr request)
put_long
(
io_data
+
8
,
diskpos
);
io_actual
=
12
;
}
else
{
io_error
=
CD
ERR_InvalidState
;
io_error
=
IO
ERR_InvalidState
;
}
}
else
{
io_error
=
IOERR_BADADDRESS
;
...
...
@@ -1006,7 +1006,7 @@ static uae_u32 REGPARAM2 dev_abortio (TrapContext *context)
}
put_byte
(
request
+
31
,
IOERR_ABORTED
);
if
(
log_scsi
)
write_log
(
"abortio %s unit=%d, request=%08
.8
X
\n
"
,
getdevname
(
pdev
->
type
),
pdev
->
unit
,
request
);
write_log
(
"abortio %s unit=%d, request=%08X
\n
"
,
getdevname
(
pdev
->
type
),
pdev
->
unit
,
request
);
abort_async
(
dev
,
request
,
IOERR_ABORTED
,
0
);
return
0
;
}
...
...
src/tools/config.log
View file @
cadc4ee6
...
...
@@ -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
a25XDN
.o: In function `main':
/tmp/cc
fiu6rL
.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
fgVok2
.o: In function `main':
/tmp/cc
bxgm14
.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
Y0iee7
.o: In function `main':
/tmp/cc
9wD849
.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
...
...
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