Skip to content
Snippets Groups Projects
Commit 92a1c2de authored by minute's avatar minute
Browse files

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!10FW1.9 and initial ZZ9000AX support
...@@ -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-2020, Lukas F. Hartmann <lukas@mntre.com> * Copyright (C) 2019-2021, 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];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment