From 6485cd0b97a5ffccc35f555ca7ae7a5f6d27cf47 Mon Sep 17 00:00:00 2001 From: UzixLS Date: Fri, 18 Jun 2021 22:58:24 +0300 Subject: [PATCH] magic rom: swap panning abc and acb positions --- fpga/rtl/magic.sv | 6 +++--- fpga/rtl/mixer.sv | 14 +++++++------- fpga/rtl/top.sv | 6 +++--- rom_src/config.asm | 2 +- rom_src/menu.asm | 2 +- rom_src/menu_structure.asm | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/fpga/rtl/magic.sv b/fpga/rtl/magic.sv index 1b02693..7f3c102 100755 --- a/fpga/rtl/magic.sv +++ b/fpga/rtl/magic.sv @@ -21,7 +21,7 @@ module magic( output reg joy_sinclair, output reg rom_plus3, output reg rom_alt48, - output reg mix_abc, + output reg mix_acb, output reg mix_mono, output reg divmmc_en ); @@ -72,7 +72,7 @@ always @(posedge clk28 or negedge rst_n) begin magic_beeper <= 0; timings <= TIMINGS_PENT; turbo <= TURBO_NONE; - mix_abc <= 1'b1; + mix_acb <= 0; mix_mono <= 0; ram_mode <= RAM_512; rom_plus3 <= 0; @@ -85,7 +85,7 @@ always @(posedge clk28 or negedge rst_n) begin 8'h01: magic_beeper <= bus.d_reg[0]; 8'h02: timings <= timings_t'(bus.d_reg[1:0]); 8'h03: turbo <= turbo_t'(bus.d_reg[1:0]); - 8'h04: {mix_mono, mix_abc} <= bus.d_reg[1:0]; + 8'h04: {mix_mono, mix_acb} <= bus.d_reg[1:0]; 8'h05: rom_plus3 <= bus.d_reg[0]; 8'h06: rom_alt48 <= bus.d_reg[0]; 8'h07: joy_sinclair <= bus.d_reg[0]; diff --git a/fpga/rtl/mixer.sv b/fpga/rtl/mixer.sv index 9595534..9c7649c 100755 --- a/fpga/rtl/mixer.sv +++ b/fpga/rtl/mixer.sv @@ -16,7 +16,7 @@ module mixer( input [7:0] sd_r0, input [7:0] sd_r1, - input ay_abc, + input ay_acb, input mono, output dac_l, @@ -34,17 +34,17 @@ wire [WIDTH-1:0] dac_next_l = {sd_l1, 1'b0} + {ay_a0, 1'b0} + {ay_a1, 1'b0} + - (ay_abc? ay_b0 : ay_c0) + - (ay_abc? ay_b1 : ay_c1) + + (ay_acb? ay_c0 : ay_b0) + + (ay_acb? ay_c1 : ay_b1) + {beeper, tape_out, tape_in, 7'b000000} ; wire [WIDTH-1:0] dac_next_r = {sd_r0, 1'b0} + {sd_r1, 1'b0} + - (ay_abc? {ay_c0, 1'b0} : {ay_b0, 1'b0}) + - (ay_abc? {ay_c1, 1'b0} : {ay_b1, 1'b0}) + - (ay_abc? ay_b0 : ay_c0) + - (ay_abc? ay_b1 : ay_c1) + + (ay_acb? {ay_b0, 1'b0} : {ay_c0, 1'b0}) + + (ay_acb? {ay_b1, 1'b0} : {ay_c1, 1'b0}) + + (ay_acb? ay_c0 : ay_b0) + + (ay_acb? ay_c1 : ay_b1) + {beeper, tape_out, tape_in, 7'b000000} ; wire [WIDTH-1:0] dac_next_mono = diff --git a/fpga/rtl/top.sv b/fpga/rtl/top.sv index 4f664d6..890686a 100755 --- a/fpga/rtl/top.sv +++ b/fpga/rtl/top.sv @@ -229,7 +229,7 @@ cpucontrol cpucontrol0( /* MAGIC */ wire magic_mode, magic_map; -wire divmmc_en, joy_sinclair, rom_plus3, rom_alt48, mix_abc, mix_mono; +wire divmmc_en, joy_sinclair, rom_plus3, rom_alt48, mix_acb, mix_mono; magic magic0( .rst_n(usrrst_n), .clk28(clk28), @@ -252,7 +252,7 @@ magic magic0( .joy_sinclair(joy_sinclair), .rom_plus3(rom_plus3), .rom_alt48(rom_alt48), - .mix_abc(mix_abc), + .mix_acb(mix_acb), .mix_mono(mix_mono), .divmmc_en(divmmc_en) ); @@ -365,7 +365,7 @@ mixer mixer0( .sd_r0(soundrive_r0), .sd_r1(soundrive_r1), - .ay_abc(mix_abc), + .ay_acb(mix_acb), .mono(mix_mono), .dac_l(snd_l), diff --git a/rom_src/config.asm b/rom_src/config.asm index f96a854..58159be 100644 --- a/rom_src/config.asm +++ b/rom_src/config.asm @@ -19,7 +19,7 @@ _reserv0 DB 0 _reserv1 DB 0 timings DB 0 clock DB 0 -panning DB 1 +panning DB 0 plus3 DB 0 rom48 DB 0 joystick DB 0 diff --git a/rom_src/menu.asm b/rom_src/menu.asm index 8ff2db9..d889a91 100644 --- a/rom_src/menu.asm +++ b/rom_src/menu.asm @@ -38,7 +38,7 @@ menu_animate_logo: .animate: ; ld (var_menu_animate_cnt), a ; and a, #1F ; if (cnt[7:5] was not changed) - exit - jr nz, .return ; ... + jr nz, .return ; ... ld a, (var_menu_animate_cnt) ; srl a ; cnt[7:5] -> cnt[2:0] srl a ; ... diff --git a/rom_src/menu_structure.asm b/rom_src/menu_structure.asm index d3982cf..8a32740 100644 --- a/rom_src/menu_structure.asm +++ b/rom_src/menu_structure.asm @@ -43,8 +43,8 @@ menu_panning_value_cb: ld a, (cfg.panning) jp menu_value_get .values_table: - DW str_panning_acb_end-2 DW str_panning_abc_end-2 + DW str_panning_acb_end-2 DW str_panning_mono_end-2 menu_joystick_value_cb: