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
shanshe
zz9000-firmware
Commits
b6109010
Commit
b6109010
authored
Mar 02, 2020
by
Bjorn Astrom
Browse files
[Super WIP] Framebuffer transfer register for DoomAttack
parent
0a4a1fce
Changes
2
Hide whitespace changes
Inline
Side-by-side
ZZ9000_proto.sdk/ZZ9000OS/src/gfx.c
View file @
b6109010
...
...
@@ -21,8 +21,8 @@
#include <math.h>
#include "gfx.h"
static
uint32_t
*
fb
=
0
;
static
uint32_t
fb_pitch
=
0
;
uint32_t
*
fb
=
0
;
uint32_t
fb_pitch
=
0
;
void
set_fb
(
uint32_t
*
fb_
,
uint32_t
pitch
)
{
fb
=
fb_
;
...
...
ZZ9000_proto.sdk/ZZ9000OS/src/main.c
View file @
b6109010
...
...
@@ -198,6 +198,12 @@ static u32 blitter_dst_offset = 0;
static
u32
blitter_src_offset
=
0
;
static
u32
vmode_hsize
=
800
,
vmode_vsize
=
600
,
vmode_hdiv
=
1
,
vmode_vdiv
=
2
;
extern
u32
fb_pitch
;
extern
u32
*
fb
;
//extern uint32_t* fb=0;
//extern uint32_t fb_pitch=0;
// 32bit: hdiv=1, 16bit: hdiv=2, 8bit: hdiv=4, ...
int
init_vdma
(
int
hsize
,
int
vsize
,
int
hdiv
,
int
vdiv
)
{
int
status
;
...
...
@@ -895,7 +901,7 @@ int main() {
uint16_t
rect_y1
=
0
;
uint16_t
rect_y2
=
0
;
uint16_t
rect_y3
=
0
;
uint16_t
blitter_dst_pitch
=
64
0
;
uint16_t
blitter_dst_pitch
=
0
;
uint32_t
rect_rgb
=
0
;
uint32_t
rect_rgb2
=
0
;
uint32_t
blitter_colormode
=
MNTVA_COLOR_32BIT
;
...
...
@@ -1287,6 +1293,16 @@ int main() {
break
;
}
case
0x50
:
{
// Copy crap from scratch area
for
(
int
i
=
0
;
i
<
rect_y1
;
i
++
)
{
memcpy
((
uint32_t
*
)
((
u32
)
framebuffer
+
framebuffer_pan_offset
+
(
i
*
rect_x1
)),
(
uint32_t
*
)
((
u32
)
0x33F0000
+
(
i
*
rect_x1
)),
rect_x1
);
}
Xil_DCacheFlush
();
break
;
}
case
REG_ZZ_P2C
:
{
uint8_t
draw_mode
=
blitter_colormode
>>
8
;
uint8_t
planes
=
(
zdata
&
0xFF00
)
>>
8
;
...
...
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