Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dreamcast
vcdc
Commits
363d8c19
Commit
363d8c19
authored
May 26, 2024
by
Donald Haase
Browse files
Correct sq utilization to get correct output. Now things work and can play mpegs.
parent
86f0564f
Changes
1
Hide whitespace changes
Inline
Side-by-side
libvo/video_out_dc.c
View file @
363d8c19
...
...
@@ -153,62 +153,16 @@ psd_area_t *highlight; /* In Extended PSD Selection Lists, we'll need to highlig
(c)2001 Andrew Kieschnick */
static
void
vo_txr_load
(
void
*
src
)
{
/* dh - Pretty sure I rewrote this correctly. May be that it's open to optimization */
#if 1
size_t
count
=
g_width
*
2
*
g_height
;
count
+=
count
%
4
;
sq_cpy
(
vid_tex
[
tx_cur
],
src
,
count
);
sq_wait
();
#else
int
i
,
n
;
uint32
count
;
unsigned
int
*
d
,
*
s
;
/*got_new_video = 0;*/
/* It should be safe to say this while our mutex is locked--dc_draw_frame can't
set it back to 1 until we are done copying our data. */
/*unsigned int */
d
=
(
unsigned
int
*
)(
void
*
)
(
0xe0000000
|
(((
unsigned
long
)
vid_tex
[
tx_cur
])
&
0x03ffffe0
));
/*unsigned int */
s
=
src
;
//incoming_video;
size_t
count
=
g_width
*
2
;
count
+=
(
count
%
4
);
count
=
g_width
*
2
;
/* Set store queue memory area as desired */
QACR0
=
((((
unsigned
int
)
vid_tex
[
tx_cur
])
>>
26
)
<<
2
)
&
0x1c
;
QACR1
=
((((
unsigned
int
)
vid_tex
[
tx_cur
])
>>
26
)
<<
2
)
&
0x1c
;
if
(
count
%
4
)
count
=
(
count
&
0xfffffffc
)
+
4
;
for
(
i
=
0
;
i
<
g_height
;
i
++
){
d
=
(
unsigned
int
*
)(
void
*
)
(
0xe0000000
|
(((
unsigned
long
)
vid_tex
[
tx_cur
]
+
(
i
*
2048
))
&
0x03ffffe0
));
n
=
count
>>
5
;
while
(
n
--
)
{
asm
(
"pref @%0"
:
:
"r"
(
s
+
8
));
/* prefetch 32 bytes for next loop */
d
[
0
]
=
*
(
s
++
);
d
[
1
]
=
*
(
s
++
);
d
[
2
]
=
*
(
s
++
);
d
[
3
]
=
*
(
s
++
);
d
[
4
]
=
*
(
s
++
);
d
[
5
]
=
*
(
s
++
);
d
[
6
]
=
*
(
s
++
);
d
[
7
]
=
*
(
s
++
);
asm
(
"pref @%0"
:
:
"r"
(
d
));
d
+=
8
;
}
}
/* Wait for both store queues to complete */
d
=
(
unsigned
int
*
)
0xe0000000
;
d
[
0
]
=
d
[
8
]
=
0
;
#endif
for
(
int
i
=
0
;
i
<
g_height
;
i
++
)
sq_cpy
(
vid_tex
[
tx_cur
]
+
(
i
*
2048
),
src
+
(
i
*
count
),
count
);
sq_wait
();
}
extern
void
vidclock_handle_frame
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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