From 823e8ef78da805b2bace66d60ae111cd73bb40ae Mon Sep 17 00:00:00 2001 From: Gyorgy Szombathelyi Date: Sat, 12 Feb 2022 20:45:15 +0100 Subject: [PATCH] Qbert: fix some DIPs, add Argus and Knightmare --- Arcade_MiST/Gottlieb Qbert/meta/Argus.mra | 51 ++++++++++++ .../Gottlieb Qbert/meta/Curve Ball.mra | 7 +- Arcade_MiST/Gottlieb Qbert/meta/Insector.mra | 2 +- .../Gottlieb Qbert/meta/Knightmare.mra | 73 +++++++++++++++++ Arcade_MiST/Gottlieb Qbert/meta/Krull.mra | 5 +- .../Gottlieb Qbert/meta/QBert Qubes.mra | 9 +-- Arcade_MiST/Gottlieb Qbert/rtl/Qbert_MiST.sv | 79 +++++++++++++++++-- .../Gottlieb Qbert/rtl/mylstar_board.v | 5 +- Arcade_MiST/Gottlieb Qbert/rtl/spinner.vhd | 4 +- 9 files changed, 215 insertions(+), 20 deletions(-) create mode 100644 Arcade_MiST/Gottlieb Qbert/meta/Argus.mra create mode 100644 Arcade_MiST/Gottlieb Qbert/meta/Knightmare.mra diff --git a/Arcade_MiST/Gottlieb Qbert/meta/Argus.mra b/Arcade_MiST/Gottlieb Qbert/meta/Argus.mra new file mode 100644 index 00000000..40c8a3be --- /dev/null +++ b/Arcade_MiST/Gottlieb Qbert/meta/Argus.mra @@ -0,0 +1,51 @@ + + + Argus + 0228 + argusg + 20201231150731 + 1983 + Gottlieb + Platform + qbert + + + + + + + + 7 + + + + + + + + + + + + + + + + + + + + + 00 + + + + + + + + + + + + \ No newline at end of file diff --git a/Arcade_MiST/Gottlieb Qbert/meta/Curve Ball.mra b/Arcade_MiST/Gottlieb Qbert/meta/Curve Ball.mra index 74d1cfc2..75719df9 100644 --- a/Arcade_MiST/Gottlieb Qbert/meta/Curve Ball.mra +++ b/Arcade_MiST/Gottlieb Qbert/meta/Curve Ball.mra @@ -10,9 +10,10 @@ qbert - - - + + + + 4 diff --git a/Arcade_MiST/Gottlieb Qbert/meta/Insector.mra b/Arcade_MiST/Gottlieb Qbert/meta/Insector.mra index cbf8ff85..e42d9cfb 100644 --- a/Arcade_MiST/Gottlieb Qbert/meta/Insector.mra +++ b/Arcade_MiST/Gottlieb Qbert/meta/Insector.mra @@ -10,7 +10,7 @@ qbert - + diff --git a/Arcade_MiST/Gottlieb Qbert/meta/Knightmare.mra b/Arcade_MiST/Gottlieb Qbert/meta/Knightmare.mra new file mode 100644 index 00000000..9f39766a --- /dev/null +++ b/Arcade_MiST/Gottlieb Qbert/meta/Knightmare.mra @@ -0,0 +1,73 @@ + + Knightmare + USA + no + no + Set 1 + + + + 1982 + Gottlieb + Platform - Climb + + kngtmare + qbert + 0198 + qbert + + + 15kHz + vertical (ccw) + yes + + 2 (alternating) + 4-way diagonal + + 0 + + + + + + + + 8 + + + + + + + + + 00 + + + + 00 + + + + + + + + + + + + + + + + + + + + + + + + 20210430005030 + diff --git a/Arcade_MiST/Gottlieb Qbert/meta/Krull.mra b/Arcade_MiST/Gottlieb Qbert/meta/Krull.mra index f3e86cfb..55b57ff8 100644 --- a/Arcade_MiST/Gottlieb Qbert/meta/Krull.mra +++ b/Arcade_MiST/Gottlieb Qbert/meta/Krull.mra @@ -10,8 +10,11 @@ qbert - + + + + 3 diff --git a/Arcade_MiST/Gottlieb Qbert/meta/QBert Qubes.mra b/Arcade_MiST/Gottlieb Qbert/meta/QBert Qubes.mra index c420c554..e9ed30db 100644 --- a/Arcade_MiST/Gottlieb Qbert/meta/QBert Qubes.mra +++ b/Arcade_MiST/Gottlieb Qbert/meta/QBert Qubes.mra @@ -10,11 +10,10 @@ qbert - - - - - + + + + 1 diff --git a/Arcade_MiST/Gottlieb Qbert/rtl/Qbert_MiST.sv b/Arcade_MiST/Gottlieb Qbert/rtl/Qbert_MiST.sv index 792b51bb..44d9ef96 100644 --- a/Arcade_MiST/Gottlieb Qbert/rtl/Qbert_MiST.sv +++ b/Arcade_MiST/Gottlieb Qbert/rtl/Qbert_MiST.sv @@ -55,7 +55,7 @@ wire flip = status[7]; wire service = status[8]; wire diagonal = status[9]; -wire [1:0] orientation = {flip, core_mod != mod_tylz && core_mod != mod_insector}; +wire [1:0] orientation = {flip, core_mod != mod_tylz && core_mod != mod_insector && core_mod != mod_kngtmare && core_mod != mod_argus}; wire [7:0] dip_sw = status[23:16]; assign LED = ~ioctl_downl; @@ -105,9 +105,12 @@ localparam mod_krull = 3; localparam mod_curvebal = 4; localparam mod_tylz = 5; localparam mod_insector = 6; +localparam mod_argus = 7; +localparam mod_kngtmare = 8; -wire [7:0] spinner_pos; wire spinner_reset; +// Mad Planets spinner +wire [7:0] spinner_pos; spinner spinner ( .clock_40(clk_sys), .reset(spinner_reset), @@ -117,14 +120,36 @@ spinner spinner ( .spin_angle(spinner_pos) ); +// Argus trackball +wire [15:0] trackball_pos; +spinner spinnerX ( + .clock_40(clk_sys), + .reset(spinner_reset), + .btn_left(m_left), + .btn_right(m_right), + .btn_acc(1'b1), + .ctc_zc_to_2(vb), + .spin_angle(trackball_pos[15:8]) +); + +spinner spinnerY ( + .clock_40(clk_sys), + .reset(spinner_reset), + .btn_left(m_up), + .btn_right(m_down), + .btn_acc(1'b1), + .ctc_zc_to_2(vb), + .spin_angle(trackball_pos[7:0]) +); + reg [5:0] OP2720; reg [7:0] IP1710; reg [7:0] IP4740; -reg [7:0] IPA1J2; +reg [15:0] IPA1J2; always @(*) begin - IPA1J2 = 8'd0; + IPA1J2 = 16'd0; IP4740 = 8'd0; IP1710 = { @@ -193,7 +218,7 @@ always @(*) begin m_up }; - IPA1J2 = spinner_pos; + IPA1J2 = {spinner_pos, spinner_pos}; end mod_krull: @@ -289,6 +314,48 @@ always @(*) begin m_up }; end + + mod_argus: + begin + IP1710 = { // IN1 + 4'h0, + m_coin2, + m_coin1, + m_fireA, + ~service + }; + + IP4740 = { // IN4 + 4'h0, + m_fire2A, + m_fire2B, + m_fireA, + m_fireB + }; + IPA1J2 = trackball_pos; + end + + mod_kngtmare: + begin + IP1710 = { // IN1 + 4'h0, + m_coin2, + m_coin1, + 2'b00 + }; + + IP4740 = { // IN4 + m_two_players, + m_one_player, + m_fireB, + m_fireA, + m_rightB | m_right2, + m_left, + m_leftB | m_left2, + m_right + }; + end + default: begin end @@ -465,7 +532,7 @@ mylstar_board mylstar_board .rom_init_address(ioctl_addr), .rom_init_data(ioctl_dout), .nvram_data(ioctl_din), - .bgram(core_mod == mod_krull), + .bgram(core_mod == mod_krull || core_mod == mod_argus), .vflip(flip), .hflip(flip), diff --git a/Arcade_MiST/Gottlieb Qbert/rtl/mylstar_board.v b/Arcade_MiST/Gottlieb Qbert/rtl/mylstar_board.v index 9bc27385..7e4bb36b 100644 --- a/Arcade_MiST/Gottlieb Qbert/rtl/mylstar_board.v +++ b/Arcade_MiST/Gottlieb Qbert/rtl/mylstar_board.v @@ -21,7 +21,7 @@ module mylstar_board input [7:0] IP1710, input [7:0] IP4740, - input [7:0] IPA1J2, + input [15:0] IPA1J2, output [5:0] OP2720, output [4:0] OP3337, output [7:0] OP4740, @@ -129,7 +129,8 @@ end // CPU/RAM/ROM // //////////////////////// -wire [7:0] A1J2 = (trackball0_sel | trackball1_sel) ? IPA1J2 : 8'd0; +wire [7:0] A1J2 = trackball0_sel ? IPA1J2[15:8] : + trackball1_sel ? IPA1J2[7:0] : 8'd0; wire [7:0] ram_dout = C5_Q | C6_Q | C7_Q | C9_10_Q | C8_9_Q | C10_11_Q; wire [7:0] rom_dout; diff --git a/Arcade_MiST/Gottlieb Qbert/rtl/spinner.vhd b/Arcade_MiST/Gottlieb Qbert/rtl/spinner.vhd index bc841af7..cbf6c60a 100644 --- a/Arcade_MiST/Gottlieb Qbert/rtl/spinner.vhd +++ b/Arcade_MiST/Gottlieb Qbert/rtl/spinner.vhd @@ -36,8 +36,8 @@ begin if btn_left = '1' then spin_count <= spin_count - 3; end if; -- left if btn_right = '1' then spin_count <= spin_count + 3; end if; -- right else - if btn_left = '1' then spin_count <= spin_count - 55; end if; - if btn_right = '1' then spin_count <= spin_count + 55; end if; + if btn_left = '1' then spin_count <= spin_count - 15; end if; + if btn_right = '1' then spin_count <= spin_count + 15; end if; end if; end if; end if;