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
6ef16d06
Commit
6ef16d06
authored
Jan 10, 2011
by
GnoStiC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
puae 2.3.1
parent
b8648662
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
69 additions
and
18 deletions
+69
-18
blkdev.c
src/blkdev.c
+14
-3
custom.c
src/custom.c
+2
-1
debug.c
src/debug.c
+14
-5
disk.c
src/disk.c
+2
-2
drawing.c
src/drawing.c
+1
-1
filesys.asm
src/filesys.asm
+4
-0
filesys.c
src/filesys.c
+2
-2
inputdevice.c
src/inputdevice.c
+3
-3
memory.c
src/memory.c
+5
-0
newcpu.c
src/newcpu.c
+22
-1
No files found.
src/blkdev.c
View file @
6ef16d06
...
@@ -334,7 +334,7 @@ static int getunitinfo (int unitnum, int drive, unsigned int csu, int *isaudio)
...
@@ -334,7 +334,7 @@ static int getunitinfo (int unitnum, int drive, unsigned int csu, int *isaudio)
}
}
uae_u8
buffer
[
2048
];
uae_u8
buffer
[
2048
];
if
(
sys_command_cd_read
(
unitnum
,
buffer
,
16
,
1
))
{
if
(
sys_command_cd_read
(
unitnum
,
buffer
,
16
,
1
))
{
if
(
!
memcmp
(
buffer
+
8
,
"CDTV"
,
4
)
||
!
memcmp
(
buffer
+
8
,
"CD32"
,
4
))
{
if
(
!
memcmp
(
buffer
+
8
,
"CDTV"
,
4
)
||
!
memcmp
(
buffer
+
8
,
"CD32"
,
4
)
||
!
memcmp
(
buffer
+
8
,
"COMM"
,
4
)
)
{
uae_u32
crc
;
uae_u32
crc
;
write_log
(
"CD32 or CDTV"
);
write_log
(
"CD32 or CDTV"
);
if
(
sys_command_cd_read
(
unitnum
,
buffer
,
21
,
1
))
{
if
(
sys_command_cd_read
(
unitnum
,
buffer
,
21
,
1
))
{
...
@@ -413,6 +413,9 @@ int get_standard_cd_unit (unsigned int csu)
...
@@ -413,6 +413,9 @@ int get_standard_cd_unit (unsigned int csu)
int
unitnum
=
get_standard_cd_unit2
(
csu
);
int
unitnum
=
get_standard_cd_unit2
(
csu
);
if
(
unitnum
<
0
)
if
(
unitnum
<
0
)
return
-
1
;
return
-
1
;
#ifdef RETROPLATFORM
rp_cd_device_enable
(
unitnum
,
true
);
#endif
delayed
[
unitnum
]
=
0
;
delayed
[
unitnum
]
=
0
;
if
(
currprefs
.
cdslots
[
unitnum
].
delayed
)
{
if
(
currprefs
.
cdslots
[
unitnum
].
delayed
)
{
delayed
[
unitnum
]
=
PRE_INSERT_DELAY
;
delayed
[
unitnum
]
=
PRE_INSERT_DELAY
;
...
@@ -433,11 +436,20 @@ int sys_command_isopen (int unitnum)
...
@@ -433,11 +436,20 @@ int sys_command_isopen (int unitnum)
int
sys_command_open
(
int
unitnum
)
int
sys_command_open
(
int
unitnum
)
{
{
waspaused
[
unitnum
]
=
0
;
waspaused
[
unitnum
]
=
0
;
return
sys_command_open_internal
(
unitnum
,
currprefs
.
cdslots
[
unitnum
].
name
[
0
]
?
currprefs
.
cdslots
[
unitnum
].
name
:
NULL
,
CD_STANDARD_UNIT_DEFAULT
);
int
v
=
sys_command_open_internal
(
unitnum
,
currprefs
.
cdslots
[
unitnum
].
name
[
0
]
?
currprefs
.
cdslots
[
unitnum
].
name
:
NULL
,
CD_STANDARD_UNIT_DEFAULT
);
if
(
!
v
)
return
0
;
#ifdef RETROPLATFORM
rp_cd_device_enable
(
unitnum
,
true
);
#endif
return
v
;
}
}
void
sys_command_close
(
int
unitnum
)
void
sys_command_close
(
int
unitnum
)
{
{
#ifdef RETROPLATFORM
rp_cd_device_enable
(
unitnum
,
false
);
#endif
sys_command_close_internal
(
unitnum
);
sys_command_close_internal
(
unitnum
);
}
}
...
@@ -446,7 +458,6 @@ void blkdev_cd_change (int unitnum, const TCHAR *name)
...
@@ -446,7 +458,6 @@ void blkdev_cd_change (int unitnum, const TCHAR *name)
struct
device_info
di
;
struct
device_info
di
;
sys_command_info
(
unitnum
,
&
di
,
1
);
sys_command_info
(
unitnum
,
&
di
,
1
);
#ifdef RETROPLATFORM
#ifdef RETROPLATFORM
rp_cd_change
(
unitnum
,
di
.
media_inserted
);
rp_cd_image_change
(
unitnum
,
name
);
rp_cd_image_change
(
unitnum
,
name
);
#endif
#endif
}
}
...
...
src/custom.c
View file @
6ef16d06
...
@@ -4748,7 +4748,8 @@ STATIC_INLINE void do_sprites_1 (int num, int cycle, int hpos)
...
@@ -4748,7 +4748,8 @@ STATIC_INLINE void do_sprites_1 (int num, int cycle, int hpos)
struct
sprite
*
s
=
&
spr
[
num
];
struct
sprite
*
s
=
&
spr
[
num
];
int
dma
,
posctl
=
0
;
int
dma
,
posctl
=
0
;
uae_u16
data
;
uae_u16
data
;
int
isdma
=
dmaen
(
DMA_SPRITE
);
// fetch both sprite pairs even if DMA was switched off between sprites
int
isdma
=
dmaen
(
DMA_SPRITE
)
||
((
num
&
1
)
&&
spr
[
num
&
~
1
].
dmacycle
);
if
(
isdma
&&
vpos
==
sprite_vblank_endline
)
if
(
isdma
&&
vpos
==
sprite_vblank_endline
)
spr_arm
(
num
,
0
);
spr_arm
(
num
,
0
);
...
...
src/debug.c
View file @
6ef16d06
...
@@ -3363,6 +3363,7 @@ static bool debug_line (TCHAR *input)
...
@@ -3363,6 +3363,7 @@ static bool debug_line (TCHAR *input)
case
'H'
:
case
'H'
:
{
{
int
count
,
temp
,
badly
,
skip
;
int
count
,
temp
,
badly
,
skip
;
uae_u32
addr
=
0
;
uae_u32
oldpc
=
m68k_getpc
();
uae_u32
oldpc
=
m68k_getpc
();
struct
regstruct
save_regs
=
regs
;
struct
regstruct
save_regs
=
regs
;
...
@@ -3376,6 +3377,10 @@ static bool debug_line (TCHAR *input)
...
@@ -3376,6 +3377,10 @@ static bool debug_line (TCHAR *input)
count
=
readint
(
&
inptr
);
count
=
readint
(
&
inptr
);
else
else
count
=
10
;
count
=
10
;
if
(
count
>
1000
)
{
addr
=
count
;
count
=
MAX_HIST
;
}
if
(
count
<
0
)
if
(
count
<
0
)
break
;
break
;
skip
=
count
;
skip
=
count
;
...
@@ -3391,11 +3396,15 @@ static bool debug_line (TCHAR *input)
...
@@ -3391,11 +3396,15 @@ static bool debug_line (TCHAR *input)
}
}
while
(
temp
!=
lasthist
)
{
while
(
temp
!=
lasthist
)
{
regs
=
history
[
temp
];
regs
=
history
[
temp
];
m68k_setpc
(
history
[
temp
].
pc
);
if
(
history
[
temp
].
pc
==
addr
||
addr
==
0
)
{
if
(
badly
)
m68k_setpc
(
history
[
temp
].
pc
);
m68k_dumpstate
(
stdout
,
NULL
);
if
(
badly
)
else
m68k_dumpstate
(
stdout
,
NULL
);
m68k_disasm
(
stdout
,
history
[
temp
].
pc
,
NULL
,
1
);
else
m68k_disasm
(
stdout
,
history
[
temp
].
pc
,
NULL
,
1
);
if
(
addr
&&
history
[
temp
].
pc
==
addr
)
break
;
}
if
(
skip
--
<
0
)
if
(
skip
--
<
0
)
break
;
break
;
if
(
++
temp
==
MAX_HIST
)
if
(
++
temp
==
MAX_HIST
)
...
...
src/disk.c
View file @
6ef16d06
...
@@ -2382,7 +2382,7 @@ static void DISK_check_change (void)
...
@@ -2382,7 +2382,7 @@ static void DISK_check_change (void)
currprefs
.
floppyslots
[
i
].
dfxtype
=
changed_prefs
.
floppyslots
[
i
].
dfxtype
;
currprefs
.
floppyslots
[
i
].
dfxtype
=
changed_prefs
.
floppyslots
[
i
].
dfxtype
;
reset_drive
(
i
);
reset_drive
(
i
);
#ifdef RETROPLATFORM
#ifdef RETROPLATFORM
rp_floppy
drive_change
(
i
,
currprefs
.
floppyslots
[
i
].
dfxtype
>=
0
?
1
:
0
);
rp_floppy
_device_enable
(
i
,
currprefs
.
floppyslots
[
i
].
dfxtype
>=
0
);
#endif
#endif
}
}
}
}
...
@@ -3024,7 +3024,7 @@ static void DISK_start (void)
...
@@ -3024,7 +3024,7 @@ static void DISK_start (void)
unsigned
int
dr
,
i
;
unsigned
int
dr
,
i
;
for
(
i
=
0
;
i
<
3
;
i
++
)
for
(
i
=
0
;
i
<
3
;
i
++
)
fifo_inuse
[
0
]
=
0
;
fifo_inuse
[
i
]
=
0
;
fifo_filled
=
0
;
fifo_filled
=
0
;
for
(
dr
=
0
;
dr
<
MAX_FLOPPY_DRIVES
;
dr
++
)
{
for
(
dr
=
0
;
dr
<
MAX_FLOPPY_DRIVES
;
dr
++
)
{
drive
*
drv
=
&
floppy
[
dr
];
drive
*
drv
=
&
floppy
[
dr
];
...
...
src/drawing.c
View file @
6ef16d06
...
@@ -2232,7 +2232,7 @@ static void center_image (void)
...
@@ -2232,7 +2232,7 @@ static void center_image (void)
thisframe_y_adjust
=
minfirstline
;
thisframe_y_adjust
=
minfirstline
;
thisframe_y_adjust_real
=
thisframe_y_adjust
<<
linedbl
;
thisframe_y_adjust_real
=
thisframe_y_adjust
<<
linedbl
;
tmp
=
(
maxvpos_nom
-
thisframe_y_adjust
)
<<
linedbl
;
tmp
=
(
maxvpos_nom
-
thisframe_y_adjust
+
1
)
<<
linedbl
;
if
(
tmp
!=
max_ypos_thisframe
)
{
if
(
tmp
!=
max_ypos_thisframe
)
{
last_max_ypos
=
tmp
;
last_max_ypos
=
tmp
;
if
(
last_max_ypos
<
0
)
if
(
last_max_ypos
<
0
)
...
...
src/filesys.asm
View file @
6ef16d06
...
@@ -241,6 +241,10 @@ filesys_dev_storeinfo
...
@@ -241,6 +241,10 @@ filesys_dev_storeinfo
FSIN_ksold
FSIN_ksold
; add >2MB-6MB chip RAM to memory list
; add >2MB-6MB chip RAM to memory list
lea
$
210000
,
a1
jsr
-
$
216
(
a6
)
; TypeOfMem
tst
.
l
d0
bne
.
s
FSIN_chip_done
move
.
w
#$
FF80
,
d0
move
.
w
#$
FF80
,
d0
bsr
.
w
getrtbase
bsr
.
w
getrtbase
jsr
(
a0
)
jsr
(
a0
)
...
...
src/filesys.c
View file @
6ef16d06
...
@@ -4103,10 +4103,10 @@ static void
...
@@ -4103,10 +4103,10 @@ static void
if
(
mode
<
0
)
if
(
mode
<
0
)
whence
=
SEEK_SET
;
whence
=
SEEK_SET
;
TRACE
((
"ACTION_SEEK(%s,%d,%d)
\n
"
,
k
->
aino
->
nname
,
pos
,
mode
));
old
=
fs_lseek
(
k
->
fd
,
0
,
SEEK_CUR
);
TRACE
((
"ACTION_SEEK(%s,%d,%d)=%d
\n
"
,
k
->
aino
->
nname
,
pos
,
mode
,
old
));
gui_flicker_led
(
LED_HD
,
unit
->
unit
,
1
);
gui_flicker_led
(
LED_HD
,
unit
->
unit
,
1
);
old
=
fs_lseek
(
k
->
fd
,
0
,
SEEK_CUR
);
{
{
uae_s64
temppos
;
uae_s64
temppos
;
uae_s64
filesize
=
fs_lseek64
(
k
->
fd
,
0
,
SEEK_END
);
uae_s64
filesize
=
fs_lseek64
(
k
->
fd
,
0
,
SEEK_END
);
...
...
src/inputdevice.c
View file @
6ef16d06
...
@@ -3092,7 +3092,7 @@ static int switchdevice (struct uae_input_device *id, int num, int button)
...
@@ -3092,7 +3092,7 @@ static int switchdevice (struct uae_input_device *id, int num, int button)
if
(
num
==
0
&&
otherbuttonpressed
)
if
(
num
==
0
&&
otherbuttonpressed
)
newport
=
newport
?
0
:
1
;
newport
=
newport
?
0
:
1
;
if
(
currprefs
.
input_selected_setting
==
GAMEPORT_INPUT_SETTINGS
)
{
if
(
currprefs
.
input_selected_setting
==
GAMEPORT_INPUT_SETTINGS
)
{
if
(
num
==
0
||
num
==
1
)
{
if
(
(
num
==
0
||
num
==
1
)
&&
currprefs
.
jports
[
newport
].
id
!=
JPORT_CUSTOM
)
{
int
om
=
jsem_ismouse
(
num
,
&
currprefs
);
int
om
=
jsem_ismouse
(
num
,
&
currprefs
);
int
om1
=
jsem_ismouse
(
0
,
&
currprefs
);
int
om1
=
jsem_ismouse
(
0
,
&
currprefs
);
int
om2
=
jsem_ismouse
(
1
,
&
currprefs
);
int
om2
=
jsem_ismouse
(
1
,
&
currprefs
);
...
@@ -4301,8 +4301,8 @@ static void compatibility_copy (struct uae_prefs *prefs, bool gameports)
...
@@ -4301,8 +4301,8 @@ static void compatibility_copy (struct uae_prefs *prefs, bool gameports)
if
(
gameports
)
if
(
gameports
)
cleardev
(
joysticks
,
joy
);
cleardev
(
joysticks
,
joy
);
input_get_default_joystick
(
joysticks
,
joy
,
i
,
af
,
0
);
input_get_default_joystick
(
joysticks
,
joy
,
i
,
af
,
0
);
_tcsncpy
(
prefs
->
jports
[
i
].
name
,
idev
[
IDTYPE_
MOUSE
].
get_friendlyname
(
joy
),
MAX_JPORTNAME
-
1
);
_tcsncpy
(
prefs
->
jports
[
i
].
name
,
idev
[
IDTYPE_
JOYSTICK
].
get_friendlyname
(
joy
),
MAX_JPORTNAME
-
1
);
_tcsncpy
(
prefs
->
jports
[
i
].
configname
,
idev
[
IDTYPE_
MOUSE
].
get_uniquename
(
joy
),
MAX_JPORTNAME
-
1
);
_tcsncpy
(
prefs
->
jports
[
i
].
configname
,
idev
[
IDTYPE_
JOYSTICK
].
get_uniquename
(
joy
),
MAX_JPORTNAME
-
1
);
used
[
joy
]
=
1
;
used
[
joy
]
=
1
;
joymodes
[
i
]
=
JSEM_MODE_JOYSTICK
;
joymodes
[
i
]
=
JSEM_MODE_JOYSTICK
;
}
}
...
...
src/memory.c
View file @
6ef16d06
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
* (c) 1995 Bernd Schmidt
* (c) 1995 Bernd Schmidt
*/
*/
#define DEBUG_STUPID 0
#include "sysconfig.h"
#include "sysconfig.h"
#include "sysdeps.h"
#include "sysdeps.h"
...
@@ -1246,6 +1248,9 @@ uae_u8 *REGPARAM2 default_xlate (uaecptr a)
...
@@ -1246,6 +1248,9 @@ uae_u8 *REGPARAM2 default_xlate (uaecptr a)
uaecptr
a2
=
a
-
32
;
uaecptr
a2
=
a
-
32
;
uaecptr
a3
=
m68k_getpc
()
-
32
;
uaecptr
a3
=
m68k_getpc
()
-
32
;
write_log
(
"Your Amiga program just did something terribly stupid %08X PC=%08X
\n
"
,
a
,
M68K_GETPC
);
write_log
(
"Your Amiga program just did something terribly stupid %08X PC=%08X
\n
"
,
a
,
M68K_GETPC
);
#if DEBUG_STUPID
// activate_debugger();
#endif
m68k_dumpstate
(
0
,
0
);
m68k_dumpstate
(
0
,
0
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
for
(
i
=
0
;
i
<
10
;
i
++
)
{
write_log
(
"%08X "
,
i
>=
5
?
a3
:
a2
);
write_log
(
"%08X "
,
i
>=
5
?
a3
:
a2
);
...
...
src/newcpu.c
View file @
6ef16d06
...
@@ -3232,6 +3232,27 @@ STATIC_INLINE int do_specialties (int cycles)
...
@@ -3232,6 +3232,27 @@ STATIC_INLINE int do_specialties (int cycles)
}
}
while
(
regs
.
spcflags
&
SPCFLAG_STOP
)
{
while
(
regs
.
spcflags
&
SPCFLAG_STOP
)
{
if
(
uae_int_requested
)
{
INTREQ_f
(
0x8008
);
set_special
(
SPCFLAG_INT
);
}
#ifdef UAENET
{
extern
int
volatile
uaenet_int_requested
;
if
(
uaenet_int_requested
)
{
INTREQ_f
(
0x8000
|
0x2000
);
set_special
(
SPCFLAG_INT
);
}
}
#endif
{
extern
void
bsdsock_fake_int_handler
(
void
);
extern
int
volatile
bsd_int_requested
;
if
(
bsd_int_requested
)
bsdsock_fake_int_handler
();
}
if
(
cpu_tracer
>
0
)
{
if
(
cpu_tracer
>
0
)
{
cputrace
.
stopped
=
regs
.
stopped
;
cputrace
.
stopped
=
regs
.
stopped
;
cputrace
.
intmask
=
regs
.
intmask
;
cputrace
.
intmask
=
regs
.
intmask
;
...
@@ -3267,7 +3288,7 @@ STATIC_INLINE int do_specialties (int cycles)
...
@@ -3267,7 +3288,7 @@ STATIC_INLINE int do_specialties (int cycles)
return
1
;
return
1
;
}
}
if
(
currprefs
.
cpu_idle
&&
currprefs
.
m68k_speed
!=
0
&&
((
regs
.
spcflags
&
SPCFLAG_STOP
))
==
SPCFLAG_STOP
)
{
if
(
!
uae_int_requested
&&
currprefs
.
cpu_idle
&&
currprefs
.
m68k_speed
!=
0
&&
((
regs
.
spcflags
&
SPCFLAG_STOP
))
==
SPCFLAG_STOP
)
{
/* sleep 1ms if STOP-instruction is executed */
/* sleep 1ms if STOP-instruction is executed */
if
(
1
)
{
if
(
1
)
{
static
int
sleepcnt
,
lvpos
,
zerocnt
;
static
int
sleepcnt
,
lvpos
,
zerocnt
;
...
...
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