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
f73bdd59
Commit
f73bdd59
authored
Nov 26, 2010
by
GnoStiC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
puae 2.3.1
parent
f1a95459
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
605 additions
and
517 deletions
+605
-517
filesys.c
src/filesys.c
+4
-4
filesys_bootrom.c
src/filesys_bootrom.c
+449
-443
sdlgfx.c
src/gfx-sdl/sdlgfx.c
+11
-34
picasso96.h
src/include/picasso96.h
+32
-0
m68k.h
src/md-amd64-gcc/m68k.h
+11
-11
misc.c
src/misc.c
+3
-0
picasso96.c
src/picasso96.c
+92
-22
uaelib.c
src/uaelib.c
+3
-3
No files found.
src/filesys.c
View file @
f73bdd59
...
@@ -2306,8 +2306,6 @@ static void free_key (Unit *unit, Key *k)
...
@@ -2306,8 +2306,6 @@ static void free_key (Unit *unit, Key *k)
{
{
Key
*
k1
;
Key
*
k1
;
Key
*
prev
=
0
;
Key
*
prev
=
0
;
struct
lockrecord
*
lr
;
for
(
k1
=
unit
->
keys
;
k1
;
k1
=
k1
->
next
)
{
for
(
k1
=
unit
->
keys
;
k1
;
k1
=
k1
->
next
)
{
if
(
k
==
k1
)
{
if
(
k
==
k1
)
{
if
(
prev
)
if
(
prev
)
...
@@ -2319,6 +2317,8 @@ static void free_key (Unit *unit, Key *k)
...
@@ -2319,6 +2317,8 @@ static void free_key (Unit *unit, Key *k)
prev
=
k1
;
prev
=
k1
;
}
}
struct
lockrecord
*
lr
;
for
(
lr
=
k
->
record
;
lr
;)
{
for
(
lr
=
k
->
record
;
lr
;)
{
struct
lockrecord
*
next
=
lr
->
next
;
struct
lockrecord
*
next
=
lr
->
next
;
xfree
(
lr
);
xfree
(
lr
);
...
@@ -5346,8 +5346,6 @@ void filesys_cleanup (void)
...
@@ -5346,8 +5346,6 @@ void filesys_cleanup (void)
void
filesys_free_handles
(
void
)
void
filesys_free_handles
(
void
)
{
{
Unit
*
u
,
*
u1
;
Unit
*
u
,
*
u1
;
struct
lockrecord
*
lr
;
for
(
u
=
units
;
u
;
u
=
u1
)
{
for
(
u
=
units
;
u
;
u
=
u1
)
{
Key
*
k1
,
*
knext
;
Key
*
k1
,
*
knext
;
u1
=
u
->
next
;
u1
=
u
->
next
;
...
@@ -5359,6 +5357,8 @@ void filesys_free_handles (void)
...
@@ -5359,6 +5357,8 @@ void filesys_free_handles (void)
}
}
u
->
keys
=
NULL
;
u
->
keys
=
NULL
;
struct
lockrecord
*
lrnext
;
struct
lockrecord
*
lrnext
;
struct
lockrecord
*
lr
;
for
(
lr
=
u
->
waitingrecords
;
lr
;
lr
=
lrnext
)
{
for
(
lr
=
u
->
waitingrecords
;
lr
;
lr
=
lrnext
)
{
lrnext
=
lr
->
next
;
lrnext
=
lr
->
next
;
xfree
(
lr
);
xfree
(
lr
);
...
...
src/filesys_bootrom.c
View file @
f73bdd59
This diff is collapsed.
Click to expand it.
src/gfx-sdl/sdlgfx.c
View file @
f73bdd59
...
@@ -1717,38 +1717,6 @@ int DX_Blit (int srcx, int srcy, int dstx, int dsty, int width, int height, BLIT
...
@@ -1717,38 +1717,6 @@ int DX_Blit (int srcx, int srcy, int dstx, int dsty, int width, int height, BLIT
*/
*/
static
void
add_p96_mode
(
int
width
,
int
height
,
int
emulate_chunky
,
int
*
count
)
static
void
add_p96_mode
(
int
width
,
int
height
,
int
emulate_chunky
,
int
*
count
)
{
{
unsigned
int
i
;
struct
MultiDisplay
*
md1
;
md1
=
Displays
;
struct
MultiDisplay
*
md
=
(
struct
MultiDisplay
*
)
md1
;
md1
->
DisplayModes
=
xmalloc
(
struct
PicassoResolution
,
MAX_PICASSO_MODES
);
md1
->
DisplayModes
[
0
].
depth
=
-
1
;
md1
->
disabled
=
1
;
for
(
i
=
0
;
i
<=
(
emulate_chunky
?
1
:
0
);
i
++
)
{
if
(
*
count
<
MAX_PICASSO_MODES
)
{
DisplayModes
[
*
count
].
res
.
width
=
width
;
DisplayModes
[
*
count
].
res
.
height
=
height
;
DisplayModes
[
*
count
].
depth
=
(
i
==
1
)
?
1
:
bit_unit
>>
3
;
DisplayModes
[
*
count
].
refresh
[
0
]
=
75
;
(
*
count
)
++
;
write_log
(
"SDLGFX: Added P96 mode: %dx%dx%d
\n
"
,
width
,
height
,
(
i
==
1
)
?
8
:
bitdepth
);
addmode
(
md
,
width
,
height
,
bitdepth
,
75
,
0
);
}
}
md1
=
Displays
;
if
(
md1
->
DisplayModes
[
0
].
depth
>=
0
)
md1
->
disabled
=
0
;
i
=
0
;
while
(
md1
->
DisplayModes
[
i
].
depth
>
0
)
i
++
;
//write_log ("'%s', %d display modes (%s)\n", md1->name, i, md1->disabled ? "disabled" : "enabled");
md1
++
;
return
;
return
;
}
}
...
@@ -1795,10 +1763,19 @@ int DX_FillResolutions (uae_u16 *ppixel_format)
...
@@ -1795,10 +1763,19 @@ int DX_FillResolutions (uae_u16 *ppixel_format)
emulate_chunky
=
1
;
emulate_chunky
=
1
;
}
}
struct
MultiDisplay
*
md
=
getdisplay
(
&
currprefs
);
struct
PicassoResolution
*
DisplayModes
=
md
->
DisplayModes
;
md
->
DisplayModes
=
xmalloc
(
struct
PicassoResolution
,
MAX_PICASSO_MODES
);
md
->
DisplayModes
[
0
].
depth
=
-
1
;
md
->
disabled
=
1
;
/* Check list of standard P96 screenmodes */
/* Check list of standard P96 screenmodes */
for
(
i
=
0
;
i
<
MAX_SCREEN_MODES
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_SCREEN_MODES
;
i
++
)
{
if
(
SDL_VideoModeOK
(
x_size_table
[
i
],
y_size_table
[
i
],
bitdepth
,
SDL_HWSURFACE
|
SDL_FULLSCREEN
))
{
if
(
SDL_VideoModeOK
(
x_size_table
[
i
],
y_size_table
[
i
],
bitdepth
,
SDL_HWSURFACE
|
SDL_FULLSCREEN
))
{
add_p96_mode
(
x_size_table
[
i
],
y_size_table
[
i
],
emulate_chunky
,
&
count
);
//add_p96_mode (x_size_table[i], y_size_table[i], emulate_chunky, &count);
addmode
(
md
,
x_size_table
[
i
],
y_size_table
[
i
],
bitdepth
,
75
,
0
);
write_log
(
"SDLGFX: Added P96 mode: %dx%dx%d
\n
"
,
x_size_table
[
i
],
y_size_table
[
i
],
bitdepth
);
}
}
}
}
...
@@ -1816,7 +1793,7 @@ int DX_FillResolutions (uae_u16 *ppixel_format)
...
@@ -1816,7 +1793,7 @@ int DX_FillResolutions (uae_u16 *ppixel_format)
/* If SDL mode is not a standard P96 mode (and thus already added to the
/* If SDL mode is not a standard P96 mode (and thus already added to the
* list, above) then add it */
* list, above) then add it */
if
(
!
found
)
if
(
!
found
)
add
_p96_mode
(
screenmode
[
i
].
w
,
screenmode
[
i
].
h
,
emulate_chunky
,
&
count
);
add
mode
(
screenmode
[
i
].
w
,
screenmode
[
i
].
h
,
bitdepth
,
75
,
0
);
}
}
return
count
;
return
count
;
...
...
src/include/picasso96.h
View file @
f73bdd59
...
@@ -388,6 +388,38 @@ struct Template {
...
@@ -388,6 +388,38 @@ struct Template {
uae_u32
BgPen
;
uae_u32
BgPen
;
};
};
#define PSSO_Line_X 0
#define PSSO_Line_Y 2
#define PSSO_Line_Length 4
#define PSSO_Line_dX 6
#define PSSO_Line_dY 8
#define PSSO_Line_sDelta 10
#define PSSO_Line_lDelta 12
#define PSSO_Line_twoSDminusLD 14
#define PSSO_Line_LinePtrn 16
#define PSSO_Line_PatternShift 18
#define PSSO_Line_FgPen 20
#define PSSO_Line_BgPen 24
#define PSSO_Line_Horizontal 28
#define PSSO_Line_DrawMode 30
#define PSSO_Line_pad 31
#define PSSO_Line_Xorigin 32
#define PSSO_Line_Yorigin 34
struct
Line
{
uae_u16
X
,
Y
;
uae_u16
Length
;
uae_s16
dX
,
dY
;
uae_s16
sDelta
,
lDelta
,
twoSDminusLD
;
uae_u16
LinePtrn
;
uae_u16
PatternShift
;
uae_u32
FgPen
,
BgPen
;
uae_u16
Horizontal
;
uae_u8
DrawMode
;
uae_s8
pad
;
uae_u16
Xorigin
,
Yorigin
;
};
#define PSSO_BitMapExtra_BoardNode 0
#define PSSO_BitMapExtra_BoardNode 0
#define PSSO_BitMapExtra_HashChain 8
/* BoardNode is 8-bytes */
#define PSSO_BitMapExtra_HashChain 8
/* BoardNode is 8-bytes */
#define PSSO_BitMapExtra_Match 12
#define PSSO_BitMapExtra_Match 12
...
...
src/md-amd64-gcc/m68k.h
View file @
f73bdd59
/*
/*
* UAE - The Un*x Amiga Emulator
* UAE - The Un*x Amiga Emulator
*
*
* MC68000 emulation - machine dependent bits
* MC68000 emulation - machine dependent bits
*
*
* Copyright 1996 Bernd Schmidt
* Copyright 1996 Bernd Schmidt
* Copyright 2004-2007 Richard Drummond
* Copyright 2004-2007 Richard Drummond
*/
*/
/*
/*
* Machine dependent structure for holding the 68k CCR flags
* Machine dependent structure for holding the 68k CCR flags
...
@@ -24,7 +24,7 @@ extern struct flag_struct regflags;
...
@@ -24,7 +24,7 @@ extern struct flag_struct regflags;
* with a setto %AL instr and the other flags copied to AH with an
* with a setto %AL instr and the other flags copied to AH with an
* lahf instr).
* lahf instr).
*
*
* The 68k CZNV flags are thus assi
ng
ed in cznv as:
* The 68k CZNV flags are thus assi
gn
ed in cznv as:
*
*
* <--AL--> <--AH-->
* <--AL--> <--AH-->
* 76543210 FEDCBA98 --------- ---------
* 76543210 FEDCBA98 --------- ---------
...
@@ -60,13 +60,13 @@ extern struct flag_struct regflags;
...
@@ -60,13 +60,13 @@ extern struct flag_struct regflags;
#define IOR_CZNV(X) (regflags.cznv |= (X))
#define IOR_CZNV(X) (regflags.cznv |= (X))
#define SET_CZNV(X) (regflags.cznv = (X))
#define SET_CZNV(X) (regflags.cznv = (X))
#define COPY_CARRY (regflags.x = regflags.cznv)
#define COPY_CARRY
()
(regflags.x = regflags.cznv)
/*
/*
* Test CCR condition
* Test CCR condition
*/
*/
STATIC_INLINE
int
cctrue
(
int
cc
)
STATIC_INLINE
int
cctrue
(
int
cc
)
{
{
uae_u32
cznv
=
regflags
.
cznv
;
uae_u32
cznv
=
regflags
.
cznv
;
...
...
src/misc.c
View file @
f73bdd59
...
@@ -1259,6 +1259,7 @@ void addmode (struct MultiDisplay *md, int w, int h, int d, int rate, int nondx)
...
@@ -1259,6 +1259,7 @@ void addmode (struct MultiDisplay *md, int w, int h, int d, int rate, int nondx)
ct
=
RGBMASK_32BIT
;
ct
=
RGBMASK_32BIT
;
if
(
ct
==
0
)
if
(
ct
==
0
)
return
;
return
;
d
/=
8
;
d
/=
8
;
i
=
0
;
i
=
0
;
while
(
md
->
DisplayModes
[
i
].
depth
>=
0
)
{
while
(
md
->
DisplayModes
[
i
].
depth
>=
0
)
{
...
@@ -1276,9 +1277,11 @@ void addmode (struct MultiDisplay *md, int w, int h, int d, int rate, int nondx)
...
@@ -1276,9 +1277,11 @@ void addmode (struct MultiDisplay *md, int w, int h, int d, int rate, int nondx)
}
}
i
++
;
i
++
;
}
}
i
=
0
;
i
=
0
;
while
(
md
->
DisplayModes
[
i
].
depth
>=
0
)
while
(
md
->
DisplayModes
[
i
].
depth
>=
0
)
i
++
;
i
++
;
if
(
i
>=
MAX_PICASSO_MODES
-
1
)
if
(
i
>=
MAX_PICASSO_MODES
-
1
)
return
;
return
;
md
->
DisplayModes
[
i
].
nondx
=
nondx
;
md
->
DisplayModes
[
i
].
nondx
=
nondx
;
...
...
src/picasso96.c
View file @
f73bdd59
...
@@ -58,7 +58,8 @@ int p96hack_vpos, p96hack_vpos2, p96refresh_active;
...
@@ -58,7 +58,8 @@ int p96hack_vpos, p96hack_vpos2, p96refresh_active;
#define NOBLITTER 0
#define NOBLITTER 0
#define NOBLITTER_BLIT 0
#define NOBLITTER_BLIT 0
#define P96TRACING_ENABLED 0
#define USE_HARDWARESPRITE 1
#define P96TRACING_ENABLED 1
#define P96SPRTRACING_ENABLED 0
#define P96SPRTRACING_ENABLED 0
static
int
hwsprite
=
0
;
static
int
hwsprite
=
0
;
...
@@ -124,6 +125,8 @@ static uaecptr boardinfo, ABI_interrupt;
...
@@ -124,6 +125,8 @@ static uaecptr boardinfo, ABI_interrupt;
static
int
interrupt_enabled
;
static
int
interrupt_enabled
;
int
p96vblank
;
int
p96vblank
;
static
int
uaegfx_old
,
uaegfx_active
;
static
uae_u32
reserved_gfxmem
;
static
uaecptr
uaegfx_resname
,
static
uaecptr
uaegfx_resname
,
uaegfx_resid
,
uaegfx_resid
,
uaegfx_init
,
uaegfx_init
,
...
@@ -307,12 +310,12 @@ static void ShowSupportedResolutions (void)
...
@@ -307,12 +310,12 @@ static void ShowSupportedResolutions (void)
{
{
int
i
=
0
;
int
i
=
0
;
write_log
(
"--
-------------
--
\n
"
);
write_log
(
"--
P96: Show Supported Resolutions
--
\n
"
);
while
(
newmodes
[
i
].
depth
>=
0
)
{
while
(
newmodes
[
i
].
depth
>=
0
)
{
write_log
(
"%s
\n
"
,
newmodes
[
i
].
name
);
write_log
(
"%s
\n
"
,
newmodes
[
i
].
name
);
i
++
;
i
++
;
}
}
write_log
(
"-----------------
\n
"
);
write_log
(
"-----------------
--------------------
\n
"
);
}
}
#endif
#endif
...
@@ -1425,18 +1428,23 @@ static uae_u32 REGPARAM2 picasso_SetSprite (TrapContext *ctx)
...
@@ -1425,18 +1428,23 @@ static uae_u32 REGPARAM2 picasso_SetSprite (TrapContext *ctx)
* BoardInfo struct supplied by the caller, the rtg.library, for example
* BoardInfo struct supplied by the caller, the rtg.library, for example
* the MemoryBase, MemorySize and RegisterBase fields.
* the MemoryBase, MemorySize and RegisterBase fields.
*/
*/
static
void
picasso96_alloc2
(
TrapContext
*
ctx
);
static
uae_u32
REGPARAM2
picasso_FindCard
(
TrapContext
*
ctx
)
static
uae_u32
REGPARAM2
picasso_FindCard
(
TrapContext
*
ctx
)
{
{
uaecptr
AmigaBoardInfo
=
m68k_areg
(
regs
,
0
);
uaecptr
AmigaBoardInfo
=
m68k_areg
(
regs
,
0
);
/* NOTES: See BoardInfo struct definition in Picasso96 dev info */
/* NOTES: See BoardInfo struct definition in Picasso96 dev info */
if
(
!
uaegfx_
bas
e
)
if
(
!
uaegfx_
activ
e
)
return
0
;
return
0
;
put_long
(
uaegfx_base
+
CARD_BOARDINFO
,
AmigaBoardInfo
);
if
(
uaegfx_base
)
{
put_long
(
uaegfx_base
+
CARD_BOARDINFO
,
AmigaBoardInfo
);
}
else
if
(
uaegfx_old
)
{
picasso96_alloc2
(
ctx
);
}
boardinfo
=
AmigaBoardInfo
;
boardinfo
=
AmigaBoardInfo
;
if
(
allocated_gfxmem
&&
!
picasso96_state
.
CardFound
)
{
if
(
allocated_gfxmem
&&
!
picasso96_state
.
CardFound
)
{
/* Fill in MemoryBase, MemorySize */
/* Fill in MemoryBase, MemorySize */
put_long
(
AmigaBoardInfo
+
PSSO_BoardInfo_MemoryBase
,
gfxmem_start
);
put_long
(
AmigaBoardInfo
+
PSSO_BoardInfo_MemoryBase
,
gfxmem_start
);
put_long
(
AmigaBoardInfo
+
PSSO_BoardInfo_MemorySize
,
allocated_gfxmem
);
put_long
(
AmigaBoardInfo
+
PSSO_BoardInfo_MemorySize
,
allocated_gfxmem
-
reserved_gfxmem
);
picasso96_state
.
CardFound
=
1
;
/* mark our "card" as being found */
picasso96_state
.
CardFound
=
1
;
/* mark our "card" as being found */
return
-
1
;
return
-
1
;
}
else
}
else
...
@@ -1595,16 +1603,18 @@ static void CopyLibResolutionStructureU2A (struct LibResolution *libres, uaecptr
...
@@ -1595,16 +1603,18 @@ static void CopyLibResolutionStructureU2A (struct LibResolution *libres, uaecptr
put_long
(
amigamemptr
+
PSSO_LibResolution_BoardInfo
,
libres
->
BoardInfo
);
put_long
(
amigamemptr
+
PSSO_LibResolution_BoardInfo
,
libres
->
BoardInfo
);
}
}
static
void
init_alloc
(
void
)
static
void
init_alloc
(
TrapContext
*
ctx
,
int
size
)
{
{
picasso96_amem
=
picasso96_amemend
=
0
;
picasso96_amem
=
picasso96_amemend
=
0
;
if
(
uaegfx_base
)
{
if
(
uaegfx_base
)
{
int
size
=
get_long
(
uaegfx_base
+
CARD_RESLISTSIZE
);
int
size
=
get_long
(
uaegfx_base
+
CARD_RESLISTSIZE
);
picasso96_amem
=
get_long
(
uaegfx_base
+
CARD_RESLIST
);
picasso96_amem
=
get_long
(
uaegfx_base
+
CARD_RESLIST
);
picasso96_amemend
=
picasso96_amem
+
size
;
}
else
if
(
uaegfx_active
)
{
write_log
(
"P96 RESINFO: %08X-%08X (%d,%d)
\n
"
,
picasso96_amem
,
picasso96_amemend
,
size
/
PSSO_ModeInfo_sizeof
,
size
);
reserved_gfxmem
=
size
;
picasso96_amem
=
gfxmem_start
+
allocated_gfxmem
-
size
;
}
}
picasso96_amemend
=
picasso96_amem
+
size
;
write_log
(
"P96 RESINFO: %08X-%08X (%d,%d)
\n
"
,
picasso96_amem
,
picasso96_amemend
,
size
/
PSSO_ModeInfo_sizeof
,
size
);
xfree
(
gwwbuf
);
xfree
(
gwwbuf
);
gwwpagesize
=
getpagesize
();
gwwpagesize
=
getpagesize
();
gwwbufsize
=
allocated_gfxmem
/
gwwpagesize
+
1
;
gwwbufsize
=
allocated_gfxmem
/
gwwpagesize
+
1
;
...
@@ -1634,14 +1644,13 @@ static int missmodes[] = { 320, 200, 320, 240, 320, 256, 640, 400, 640, 480, 640
...
@@ -1634,14 +1644,13 @@ static int missmodes[] = { 320, 200, 320, 240, 320, 256, 640, 400, 640, 480, 640
static
uaecptr
uaegfx_card_install
(
TrapContext
*
ctx
,
uae_u32
size
);
static
uaecptr
uaegfx_card_install
(
TrapContext
*
ctx
,
uae_u32
size
);
void
picasso96_alloc
(
TrapContext
*
ctx
)
static
void
picasso96_alloc2
(
TrapContext
*
ctx
)
{
{
int
i
,
j
,
size
,
cnt
;
int
i
,
j
,
size
,
cnt
;
int
misscnt
,
depths
;
int
misscnt
,
depths
;
struct
MultiDisplay
*
md
=
getdisplay
(
&
currprefs
);
struct
MultiDisplay
*
md
=
getdisplay
(
&
currprefs
);
struct
PicassoResolution
*
DisplayModes
=
md
->
DisplayModes
;
struct
PicassoResolution
*
DisplayModes
=
md
->
DisplayModes
;
uaegfx_resname
=
ds
(
"uaegfx.card"
);
xfree
(
newmodes
);
xfree
(
newmodes
);
newmodes
=
NULL
;
newmodes
=
NULL
;
picasso96_amem
=
picasso96_amemend
=
0
;
picasso96_amem
=
picasso96_amemend
=
0
;
...
@@ -1752,11 +1761,19 @@ void picasso96_alloc (TrapContext *ctx)
...
@@ -1752,11 +1761,19 @@ void picasso96_alloc (TrapContext *ctx)
}
}
}
}
}
}
#if
0
#if
P96TRACING_ENABLED
ShowSupportedResolutions
();
ShowSupportedResolutions
();
#endif
#endif
uaegfx_card_install
(
ctx
,
size
);
uaegfx_card_install
(
ctx
,
size
);
init_alloc
();
init_alloc
(
ctx
,
size
);
}
void
picasso96_alloc
(
TrapContext
*
ctx
)
{
if
(
uaegfx_old
)
return
;
uaegfx_resname
=
ds
(
"uaegfx.card"
);
picasso96_alloc2
(
ctx
);
}
}
static
uaecptr
inituaegfxfuncs
(
uaecptr
start
,
uaecptr
ABI
);
static
uaecptr
inituaegfxfuncs
(
uaecptr
start
,
uaecptr
ABI
);
...
@@ -1799,7 +1816,7 @@ static void inituaegfx (uaecptr ABI)
...
@@ -1799,7 +1816,7 @@ static void inituaegfx (uaecptr ABI)
flags
&=
0xffff0000
;
flags
&=
0xffff0000
;
flags
|=
BIF_BLITTER
|
BIF_NOMEMORYMODEMIX
;
flags
|=
BIF_BLITTER
|
BIF_NOMEMORYMODEMIX
;
flags
&=
~
BIF_HARDWARESPRITE
;
flags
&=
~
BIF_HARDWARESPRITE
;
if
(
currprefs
.
gfx_api
&&
D3D_goodenough
())
{
if
(
currprefs
.
gfx_api
&&
D3D_goodenough
()
&&
USE_HARDWARESPRITE
)
{
hwsprite
=
1
;
hwsprite
=
1
;
flags
|=
BIF_HARDWARESPRITE
;
flags
|=
BIF_HARDWARESPRITE
;
write_log
(
"P96: Hardware sprite support enabled
\n
"
);
write_log
(
"P96: Hardware sprite support enabled
\n
"
);
...
@@ -1809,7 +1826,7 @@ static void inituaegfx (uaecptr ABI)
...
@@ -1809,7 +1826,7 @@ static void inituaegfx (uaecptr ABI)
}
}
if
(
flags
&
BIF_NOBLITTER
)
if
(
flags
&
BIF_NOBLITTER
)
write_log
(
"P96: Blitter disabled in devs:monitors/uaegfx!
\n
"
);
write_log
(
"P96: Blitter disabled in devs:monitors/uaegfx!
\n
"
);
if
(
currprefs
.
win32_rtgvblankrate
>=
-
1
)
if
(
currprefs
.
win32_rtgvblankrate
>=
-
1
&&
!
uaegfx_old
)
flags
|=
BIF_VBLANKINTERRUPT
;
flags
|=
BIF_VBLANKINTERRUPT
;
if
(
!
(
flags
&
BIF_INDISPLAYCHAIN
))
{
if
(
!
(
flags
&
BIF_INDISPLAYCHAIN
))
{
write_log
(
"P96: BIF_INDISPLAYCHAIN force-enabled!
\n
"
);
write_log
(
"P96: BIF_INDISPLAYCHAIN force-enabled!
\n
"
);
...
@@ -1871,7 +1888,7 @@ static void addmode (uaecptr AmigaBoardInfo, uaecptr *amem, struct LibResolution
...
@@ -1871,7 +1888,7 @@ static void addmode (uaecptr AmigaBoardInfo, uaecptr *amem, struct LibResolution
static
uae_u32
REGPARAM2
picasso_InitCard
(
TrapContext
*
ctx
)
static
uae_u32
REGPARAM2
picasso_InitCard
(
TrapContext
*
ctx
)
{
{
int
LibResolutionStructureCount
=
0
;
int
LibResolutionStructureCount
=
0
;
int
i
,
j
,
unkcnt
;
int
i
,
j
,
unkcnt
,
cnt
;
uaecptr
amem
;
uaecptr
amem
;
uaecptr
AmigaBoardInfo
=
m68k_areg
(
regs
,
0
);
uaecptr
AmigaBoardInfo
=
m68k_areg
(
regs
,
0
);
...
@@ -1884,13 +1901,13 @@ static uae_u32 REGPARAM2 picasso_InitCard (TrapContext *ctx)
...
@@ -1884,13 +1901,13 @@ static uae_u32 REGPARAM2 picasso_InitCard (TrapContext *ctx)
inituaegfx
(
AmigaBoardInfo
);
inituaegfx
(
AmigaBoardInfo
);
i
=
0
;
i
=
0
;
unkcnt
=
0
;
unkcnt
=
cnt
=
0
;
while
(
newmodes
[
i
].
depth
>=
0
)
{
while
(
newmodes
[
i
].
depth
>=
0
)
{
struct
LibResolution
res
=
{
0
};
struct
LibResolution
res
=
{
0
};
TCHAR
*
s
;
TCHAR
*
s
;
j
=
i
;
j
=
i
;
addmode
(
AmigaBoardInfo
,
&
amem
,
&
res
,
newmodes
[
i
].
res
.
width
,
newmodes
[
i
].
res
.
height
,
NULL
,
0
,
&
unkcnt
);
addmode
(
AmigaBoardInfo
,
&
amem
,
&
res
,
newmodes
[
i
].
res
.
width
,
newmodes
[
i
].
res
.
height
,
NULL
,
0
,
&
unkcnt
);
write_log
(
"%
08X %4dx%4d %s
\n
"
,
res
.
DisplayID
,
res
.
Width
,
res
.
Height
,
res
.
Name
);
write_log
(
"%
2d: %08X %4dx%4d %s
\n
"
,
++
cnt
,
res
.
DisplayID
,
res
.
Width
,
res
.
Height
,
res
.
Name
);
while
(
newmodes
[
i
].
depth
>=
0
while
(
newmodes
[
i
].
depth
>=
0
&&
newmodes
[
i
].
res
.
width
==
newmodes
[
j
].
res
.
width
&&
newmodes
[
i
].
res
.
width
==
newmodes
[
j
].
res
.
width
&&
newmodes
[
i
].
res
.
height
==
newmodes
[
j
].
res
.
height
)
&&
newmodes
[
i
].
res
.
height
==
newmodes
[
j
].
res
.
height
)
...
@@ -2896,8 +2913,7 @@ static uae_u32 REGPARAM2 picasso_CalculateBytesPerRow (TrapContext *ctx)
...
@@ -2896,8 +2913,7 @@ static uae_u32 REGPARAM2 picasso_CalculateBytesPerRow (TrapContext *ctx)
uae_u16
width
=
m68k_dreg
(
regs
,
0
);
uae_u16
width
=
m68k_dreg
(
regs
,
0
);
uae_u32
type
=
m68k_dreg
(
regs
,
7
);
uae_u32
type
=
m68k_dreg
(
regs
,
7
);
width
=
GetBytesPerPixel
(
type
)
*
width
;
width
=
GetBytesPerPixel
(
type
)
*
width
;
P96TRACE
((
"CalculateBytesPerRow() = %d
\n
"
,
width
));
P96TRACE
((
"CalculateBytesPerRow() = %d
\n
"
,
width
));
return
width
;
return
width
;
}
}
...
@@ -3840,6 +3856,8 @@ static uaecptr inituaegfxfuncs (uaecptr start, uaecptr ABI)
...
@@ -3840,6 +3856,8 @@ static uaecptr inituaegfxfuncs (uaecptr start, uaecptr ABI)
uaecptr
old
=
here
();
uaecptr
old
=
here
();
uaecptr
ptr
;
uaecptr
ptr
;
if
(
uaegfx_old
)
return
0
;
org
(
start
);
org
(
start
);
dw
(
RTS
);
dw
(
RTS
);
...
@@ -4001,7 +4019,10 @@ static uaecptr inituaegfxfuncs (uaecptr start, uaecptr ABI)
...
@@ -4001,7 +4019,10 @@ static uaecptr inituaegfxfuncs (uaecptr start, uaecptr ABI)
void
picasso_reset
(
void
)
void
picasso_reset
(
void
)
{
{
uaegfx_base
=
0
;
uaegfx_base
=
0
;
uaegfx_old
=
0
;
uaegfx_active
=
0
;
interrupt_enabled
=
0
;
interrupt_enabled
=
0
;
reserved_gfxmem
=
0
;
}
}
void
uaegfx_install_code
(
void
)
void
uaegfx_install_code
(
void
)
...
@@ -4036,6 +4057,9 @@ static uaecptr uaegfx_card_install (TrapContext *ctx, uae_u32 extrasize)
...
@@ -4036,6 +4057,9 @@ static uaecptr uaegfx_card_install (TrapContext *ctx, uae_u32 extrasize)
uaecptr
findcardfunc
,
initcardfunc
;
uaecptr
findcardfunc
,
initcardfunc
;
uaecptr
exec
=
get_long
(
4
);
uaecptr
exec
=
get_long
(
4
);
if
(
uaegfx_old
)
return
NULL
;
uaegfx_resid
=
ds
(
"UAE Graphics Card 3.3"
);
uaegfx_resid
=
ds
(
"UAE Graphics Card 3.3"
);
uaegfx_vblankname
=
ds
(
"UAE Graphics Card VBLANK"
);
uaegfx_vblankname
=
ds
(
"UAE Graphics Card VBLANK"
);
uaegfx_portsname
=
ds
(
"UAE Graphics Card PORTS"
);
uaegfx_portsname
=
ds
(
"UAE Graphics Card PORTS"
);
...
@@ -4095,13 +4119,59 @@ static uaecptr uaegfx_card_install (TrapContext *ctx, uae_u32 extrasize)
...
@@ -4095,13 +4119,59 @@ static uaecptr uaegfx_card_install (TrapContext *ctx, uae_u32 extrasize)
initvblankirq
(
ctx
,
uaegfx_base
);
initvblankirq
(
ctx
,
uaegfx_base
);
write_log
(
"uaegfx.card %d.%d init @%08X
\n
"
,
UAEGFX_VERSION
,
UAEGFX_REVISION
,
uaegfx_base
);
write_log
(
"uaegfx.card %d.%d init @%08X
\n
"
,
UAEGFX_VERSION
,
UAEGFX_REVISION
,
uaegfx_base
);
uaegfx_active
=
1
;
return
uaegfx_base
;
return
uaegfx_base
;
}
}
uae_u32
picasso_demux
(
uae_u32
arg
,
TrapContext
*
ctx
)
{
uae_u32
num
=
get_long
(
m68k_areg
(
regs
,
7
)
+
4
);
if
(
uaegfx_base
)
{
if
(
num
>=
16
&&
num
<=
39
)
{
write_log
(
"uaelib: obsolete Picasso96 uaelib hook called, call ignored
\n
"
);
return
0
;
}
}
if
(
!
uaegfx_old
)
{
write_log
(
"uaelib: uaelib hook in use
\n
"
);
uaegfx_old
=
1
;
uaegfx_active
=
1
;
}
switch
(
num
)
{
case
16
:
return
picasso_FindCard
(
ctx
);
case
17
:
return
picasso_FillRect
(
ctx
);
case
18
:
return
picasso_SetSwitch
(
ctx
);
case
19
:
return
picasso_SetColorArray
(
ctx
);
case
20
:
return
picasso_SetDAC
(
ctx
);
case
21
:
return
picasso_SetGC
(
ctx
);
case
22
:
return
picasso_SetPanning
(
ctx
);
case
23
:
return
picasso_CalculateBytesPerRow
(
ctx
);
case
24
:
return
picasso_BlitPlanar2Chunky
(
ctx
);
case
25
:
return
picasso_BlitRect
(
ctx
);
case
26
:
return
picasso_SetDisplay
(
ctx
);
case
27
:
return
picasso_BlitTemplate
(
ctx
);
case
28
:
return
picasso_BlitRectNoMaskComplete
(
ctx
);
case
29
:
return
picasso_InitCard
(
ctx
);
case
30
:
return
picasso_BlitPattern
(
ctx
);
case
31
:
return
picasso_InvertRect
(
ctx
);
case
32
:
return
picasso_BlitPlanar2Direct
(
ctx
);
//case 34: return picasso_WaitVerticalSync (ctx);
case
35
:
return
allocated_gfxmem
?
1
:
0
;
case
36
:
return
picasso_SetSprite
(
ctx
);
case
37
:
return
picasso_SetSpritePosition
(
ctx
);
case
38
:
return
picasso_SetSpriteImage
(
ctx
);
case
39
:
return
picasso_SetSpriteColor
(
ctx
);
}
return
0
;
}
#ifdef SAVESTATE
#ifdef SAVESTATE
void
restore_p96_finish
(
void
)
void
restore_p96_finish
(
void
)
{
{
init_alloc
();
init_alloc
(
NULL
,
0
);
if
(
uaegfx_rom
&&
boardinfo
)
if
(
uaegfx_rom
&&
boardinfo
)
inituaegfxfuncs
(
uaegfx_rom
,
boardinfo
);
inituaegfxfuncs
(
uaegfx_rom
,
boardinfo
);
if
(
set_gc_called
)
{
if
(
set_gc_called
)
{
...
...
src/uaelib.c
View file @
f73bdd59
...
@@ -368,8 +368,8 @@ static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context)
...
@@ -368,8 +368,8 @@ static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context)
#define ARG5 (get_long (m68k_areg (regs, 7) + 24))
#define ARG5 (get_long (m68k_areg (regs, 7) + 24))
#ifndef UAEGFX_INTERNAL
#ifndef UAEGFX_INTERNAL
//
if (ARG0 >= 16 && ARG0 <= 39)
if
(
ARG0
>=
16
&&
ARG0
<=
39
)
//
return picasso_demux (ARG0, context);
return
picasso_demux
(
ARG0
,
context
);
#endif
#endif
switch
(
ARG0
)
switch
(
ARG0
)
...
@@ -423,7 +423,7 @@ static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context)
...
@@ -423,7 +423,7 @@ static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context)
return
0
;
return
0
;
}
}
int
uaelib_debug
;
extern
int
uaelib_debug
;
static
uae_u32
REGPARAM2
uaelib_demux
(
TrapContext
*
context
)
static
uae_u32
REGPARAM2
uaelib_demux
(
TrapContext
*
context
)
{
{
uae_u32
v
;
uae_u32
v
;
...
...
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