Remove pause and fix charmap

This commit is contained in:
jimmystones
2022-01-29 11:55:37 +00:00
parent 55b1910366
commit de913867ad
10 changed files with 1446 additions and 1458 deletions

View File

@@ -213,10 +213,6 @@ localparam CONF_STR = {
"-;",
"RA,Open menu;",
"-;",
"P1,Pause options;",
"P1OP,Pause when OSD is open,On,Off;",
"P1OQ,Dim video after 10s,On,Off;",
"-;",
"F0,BIN,Load BIOS;",
"F3,BIN,Load Sprite ROM;",
"F4,YM,Load Music (YM5/6);",
@@ -355,6 +351,7 @@ jtframe_cen24 divider
wire hblank, vblank, hs, vs, hs_original, vs_original;
wire [7:0] r, g, b;
wire [23:0] rgb = {r,g,b};
wire rotate_ccw = status[7];
wire no_rotate = ~status[6];
wire flip = status[7];
@@ -363,7 +360,7 @@ arcade_video #(320,24) arcade_video
(
.*,
.clk_video(clk_sys),
.RGB_in(rgb_out),
.RGB_in(rgb),
.HBlank(hblank),
.VBlank(vblank),
.HSync(hs),
@@ -388,20 +385,9 @@ jtframe_resync jtframe_resync
.vs_out(vs)
);
/////////////////// PAUSE SYSTEM ///////////////////
wire m_pause = joystick_0[8];
wire pause_cpu;
wire [23:0] rgb_out;
pause #(8,8,8,24) pause (
.*,
.user_button(m_pause),
.pause_request(),
.options(~status[26:25])
);
/////////////////// MAIN CORE ////////////////////
wire rom_download = ioctl_download && (ioctl_index < 8'd2);
wire reset = (RESET | status[0] | buttons[1] | rom_download);
wire reset = (RESET | status[0] | rom_download);
assign LED_USER = rom_download;
system system(
@@ -409,7 +395,7 @@ system system(
.ce_6(ce_pix),
.ce_2(ce_2),
.reset(reset),
.pause(pause_cpu),
.pause(1'b0),
.menu(status[10] || buttons[1]),
.VGA_HS(hs_original),
.VGA_VS(vs_original),

View File

@@ -18,5 +18,4 @@ set_global_assignment -name VERILOG_FILE rtl/generic_timer.v
set_global_assignment -name VERILOG_FILE rtl/system.v
set_global_assignment -name VERILOG_FILE rtl/dpram.v
set_global_assignment -name VERILOG_FILE rtl/dpram_w1r2.v
set_global_assignment -name VERILOG_FILE rtl/spram.v
set_global_assignment -name VERILOG_FILE rtl/pause.v
set_global_assignment -name VERILOG_FILE rtl/spram.v

View File

@@ -44,11 +44,13 @@ wire [5:0] chram_x = hcnt[8:3];
wire [5:0] chram_y = vcnt[8:3];
assign chram_addr = {chram_y, chram_x};
assign chrom_addr = {1'b0, chmap_data_out[7:0], chpos_y};
assign a = chrom_data_out[chpos_x[2:0]];
wire char_a = chrom_data_out[chpos_x[2:0]];
wire [2:0] r_temp = a ? fgcolram_data_out[2:0] : bgcolram_data_out[2:0];
wire [2:0] g_temp = a ? fgcolram_data_out[5:3] : bgcolram_data_out[5:3];
wire [1:0] b_temp = a ? fgcolram_data_out[7:6] : bgcolram_data_out[7:6];
wire [2:0] r_temp = char_a ? fgcolram_data_out[2:0] : bgcolram_data_out[2:0];
wire [2:0] g_temp = char_a ? fgcolram_data_out[5:3] : bgcolram_data_out[5:3];
wire [1:0] b_temp = char_a ? fgcolram_data_out[7:6] : bgcolram_data_out[7:6];
assign a = char_a ? char_a : (bgcolram_data_out != 8'b11000111);
assign r = {{2{r_temp}},2'b0};
assign g = {{2{g_temp}},2'b0};

File diff suppressed because it is too large Load Diff

View File

@@ -100,7 +100,7 @@ jtframe_vtimer #(
// Millisecond timer
wire [15:0] timer;
generic_timer #(16,15,24) ms_timer
generic_timer #(16,15,15'd24000) ms_timer
(
.clk(clk_24),
.reset(reset || (timer_cs && !cpu_wr_n)),
@@ -191,7 +191,7 @@ always @(posedge clk_24) begin
// if(starfield1_cs) $display("starfield1 %b %b", cpu_addr, cpu_dout);
// if(starfield2_cs) $display("starfield2 %b %b", cpu_addr, cpu_dout);
// if(starfield3_cs) $display("starfield3 %b %b", cpu_addr, cpu_dout);
//if(!cpu_wr_n) $display("cpu_write %x %b",cpu_addr, cpu_dout);
if(timer_cs) $display("timer: %b %x %x", timer_cs, cpu_addr, cpu_dout);
//if(spritecollisionram_cs && !cpu_wr_n) $display("spritecollisionram %b %b %b", cpu_wr_n, cpu_addr, cpu_dout);
//if(spriteram_cs && !cpu_wr_n) $display("spriteram_cs %x %b", cpu_addr[SPRITE_RAM_WIDTH-1:0], cpu_dout);
//if(sound_cs && !cpu_wr_n) $display("sound_cs %b %b", cpu_addr, cpu_dout);

View File

@@ -729,7 +729,6 @@ void btntest_select()
{
if (HBLANK_RISING)
{
// If any of 1st 8 buttons is pressed
if (joystick[0] != 0)
{

View File

@@ -94,7 +94,7 @@ void loader(const char *title)
// Set charmap area
chram_size = chram_cols * chram_rows;
// Clear charmap
clear_bgcolor(0);
clear_bgcolor(transparent_char);
clear_chars(0);
// Reset sprites
clear_sprites();

View File

@@ -156,7 +156,7 @@ void update_scroller()
void intro_loop()
{
clear_bgcolor(0);
clear_bgcolor(transparent_char);
// Start intro music loop
play_music_if(const_music_maintheme, 1);

View File

@@ -24,6 +24,8 @@
extern char asc_0;
extern char asc_1;
#define transparent_char 0b11000111
#define char_corner_round_tl 149
#define char_corner_round_tr 137
#define char_corner_round_bl 138

View File

@@ -84,8 +84,8 @@ Size=984,834
Collapsed=0
[Window][BGCOLRAM Editor]
Pos=1007,573
Size=552,444
Pos=1007,48
Size=552,969
Collapsed=0
[Window][Palette ROM]