Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Z
zz9000-firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Amiga
zz9000-firmware
Commits
92a1c2de
Commit
92a1c2de
authored
3 years ago
by
minute
Browse files
Options
Downloads
Patches
Plain Diff
video_formatter: fix secondary palette access/display selection, clean up some fluff
parent
4d4bba9d
No related branches found
No related tags found
1 merge request
!10
FW1.9 and initial ZZ9000AX support
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
video_formatter.v
+50
-59
50 additions, 59 deletions
video_formatter.v
with
50 additions
and
59 deletions
video_formatter.v
+
50
−
59
View file @
92a1c2de
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* MNT ZZ9000 Amiga Graphics and Coprocessor Card Firmware
* MNT ZZ9000 Amiga Graphics and Coprocessor Card Firmware
* Video Stream Formatter
* Video Stream Formatter
*
*
* Copyright (C) 2019-202
0
, Lukas F. Hartmann <lukas@mntre.com>
* Copyright (C) 2019-202
1
, Lukas F. Hartmann <lukas@mntre.com>
* MNT Research GmbH, Berlin
* MNT Research GmbH, Berlin
* https://mntre.com
* https://mntre.com
*
*
...
@@ -55,15 +55,16 @@ localparam OP_SPRITE_ADDR=14;
...
@@ -55,15 +55,16 @@ localparam OP_SPRITE_ADDR=14;
localparam
OP_SPRITE_DATA
=
15
;
localparam
OP_SPRITE_DATA
=
15
;
localparam
OP_VIDEOCAP
=
16
;
// we ignore this here, it's snooped by MNTZorro
localparam
OP_VIDEOCAP
=
16
;
// we ignore this here, it's snooped by MNTZorro
localparam
OP_REPORT_LINE
=
17
;
localparam
OP_REPORT_LINE
=
17
;
localparam
OP_PALETTE_SEL
=
18
;
// access secondary 256 colors for screen split
localparam
OP_PALETTE_SEL
=
18
;
// switch display to secondary 256 color palette for screen split
localparam
OP_PALETTE_HI
=
19
;
// set values in secondary 256 color palette for screen split
localparam
CMODE_8BIT
=
0
;
localparam
CMODE_8BIT
=
0
;
localparam
CMODE_16BIT
=
1
;
localparam
CMODE_16BIT
=
1
;
localparam
CMODE_32BIT
=
2
;
localparam
CMODE_32BIT
=
2
;
localparam
CMODE_15BIT
=
4
;
localparam
CMODE_15BIT
=
4
;
reg
[
11
:
0
]
screen_width
;
// = 720;
reg
[
11
:
0
]
screen_width
;
reg
[
11
:
0
]
screen_height
;
// = 576;
reg
[
11
:
0
]
screen_height
;
reg
scale_x
=
0
;
reg
scale_x
=
0
;
reg
scale_y
=
1
;
// amiga boots in 640x256, so double the resolution vertically
reg
scale_y
=
1
;
// amiga boots in 640x256, so double the resolution vertically
reg
[
23
:
0
]
palette
[
511
:
0
];
reg
[
23
:
0
]
palette
[
511
:
0
];
...
@@ -72,12 +73,12 @@ reg vsync_request;
...
@@ -72,12 +73,12 @@ reg vsync_request;
reg
sync_polarity
=
1
;
// negative polarity
reg
sync_polarity
=
1
;
// negative polarity
reg
selected_palette
=
0
;
reg
selected_palette
=
0
;
reg
[
15
:
0
]
screen_h_max
;
//= 864;
reg
[
15
:
0
]
screen_h_max
;
reg
[
15
:
0
]
screen_v_max
;
//= 625;
reg
[
15
:
0
]
screen_v_max
;
reg
[
15
:
0
]
screen_h_sync_start
;
//= 732;
reg
[
15
:
0
]
screen_h_sync_start
;
reg
[
15
:
0
]
screen_h_sync_end
;
//= 796;
reg
[
15
:
0
]
screen_h_sync_end
;
reg
[
15
:
0
]
screen_v_sync_start
;
//= 581;
reg
[
15
:
0
]
screen_v_sync_start
;
reg
[
15
:
0
]
screen_v_sync_end
;
//= 586;
reg
[
15
:
0
]
screen_v_sync_end
;
localparam
MAXWIDTH
=
1280
;
localparam
MAXWIDTH
=
1280
;
reg
[
31
:
0
]
line_buffer
[
MAXWIDTH
-
1
:
0
];
reg
[
31
:
0
]
line_buffer
[
MAXWIDTH
-
1
:
0
];
...
@@ -221,7 +222,8 @@ begin
...
@@ -221,7 +222,8 @@ begin
end
end
case
(
control_op_in
)
case
(
control_op_in
)
OP_PALETTE:
palette
[
{
selected_palette
,
control_data_in
[
31
:
24
]
}
]
<=
control_data_in
[
23
:
0
];
OP_PALETTE:
palette
[
{
1'b0
,
control_data_in
[
31
:
24
]
}
]
<=
control_data_in
[
23
:
0
];
OP_PALETTE_HI:
palette
[
{
1'b1
,
control_data_in
[
31
:
24
]
}
]
<=
control_data_in
[
23
:
0
];
OP_PALETTE_SEL:
selected_palette
<=
control_data_in
[
0
];
OP_PALETTE_SEL:
selected_palette
<=
control_data_in
[
0
];
OP_DIMENSIONS:
begin
OP_DIMENSIONS:
begin
screen_height
<=
control_data_in
[
31
:
16
];
screen_height
<=
control_data_in
[
31
:
16
];
...
@@ -252,18 +254,7 @@ begin
...
@@ -252,18 +254,7 @@ begin
sync_polarity
<=
control_data_in
[
0
];
sync_polarity
<=
control_data_in
[
0
];
end
end
OP_RESET:
begin
OP_RESET:
begin
/*sync_polarity <= 1;
/* currently a NOP */
screen_h_max <= 864;
screen_v_max <= 625;
screen_h_sync_start <= 732;
screen_h_sync_end <= 796;
screen_v_sync_start <= 581;
screen_v_sync_end <= 586;
scale_x <= 0;
scale_y <= 1;
screen_width <= 720;
screen_height <= 576;
colormode <= CMODE_32BIT;*/
end
end
OP_SPRITEXY:
begin
OP_SPRITEXY:
begin
sprite_y
<=
control_data_in
[
31
:
16
];
sprite_y
<=
control_data_in
[
31
:
16
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment