Add some parameters for K5295

1. Double height mode: supports x2 height sprites.
2. Save framebuffer capacity: Konami used 1Mb buffer for the unused, unknown interlaced mode. It's enough for 512kb. This will save huge resources.
This commit is contained in:
Raki
2021-12-08 10:32:47 +09:00
parent cd271ce63f
commit 90f1da9420
2 changed files with 10 additions and 13 deletions

View File

@@ -3,6 +3,10 @@
*/
module K005295
#(
parameter __ENABLE_DOUBLE_HEIGHT_MODE = 1'b0,
parameter __SAVE_FRAMEBUFFER_CAPACITY = 1'b1
)
(
//emulator
input wire i_EMU_MCLK,
@@ -59,8 +63,6 @@ module K005295
////// GLOBAL SIGNALS
////
reg __ENABLE_DOUBLE_HEIGHT_MODE = 1'b0;
reg hsize_parity = 1'b0;
reg pixellatch_wait_n;
@@ -1556,7 +1558,7 @@ begin
if(i_VBLANK_n == 1'b0 && prev_vblank == 1'b1) //async reset by VBLANK
begin
buffer_frame_parity <= ~buffer_frame_parity;
buffer_frame_parity <= ~buffer_frame_parity | __SAVE_FRAMEBUFFER_CAPACITY;
end
end
end

View File

@@ -805,15 +805,9 @@ SRAM2k8 OBJTABLE
);
///////////////////////////////////////////////////////////
////// K005295
////
//
// asic section
//
wire [7:0] OCA;
wire CHAOV;
@@ -832,7 +826,8 @@ wire [2:0] PIXELSEL;
//declare K005295 core
K005295 K005295_main
K005295 #(.__ENABLE_DOUBLE_HEIGHT_MODE(1'b0), .__SAVE_FRAMEBUFFER_CAPACITY(1'b1))
K005295_main
(
.i_EMU_MCLK (i_EMU_MCLK ),
.i_EMU_CLK6MPCEN_n (o_EMU_CLK6MPCEN_n ),