summaryrefslogtreecommitdiffstatshomepage
path: root/ctrlr
diff options
context:
space:
mode:
Diffstat (limited to 'ctrlr')
-rw-r--r--ctrlr/hotrod.cfg11
-rw-r--r--ctrlr/hotrodse.cfg11
-rw-r--r--ctrlr/scorpionxg.cfg11
-rw-r--r--ctrlr/slikstik.cfg21
-rw-r--r--ctrlr/xarcade.cfg11
5 files changed, 55 insertions, 10 deletions
diff --git a/ctrlr/hotrod.cfg b/ctrlr/hotrod.cfg
index ccbbe0ac0dc..93d44424a46 100644
--- a/ctrlr/hotrod.cfg
+++ b/ctrlr/hotrod.cfg
@@ -25,12 +25,21 @@
<newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
</port>
- <port type="UI_CONFIGURE">
+ <port type="UI_MENU">
<newseq type="standard">KEYCODE_TAB OR KEYCODE_1 KEYCODE_3</newseq>
</port>
+ <port type="UI_BACK">
+ <newseq type="standard">KEYCODE_ESC OR KEYCODE_LALT OR JOYCODE_1_BUTTON2</newseq>
+ </port>
<port type="UI_CANCEL">
<newseq type="standard">KEYCODE_ESC OR KEYCODE_2 KEYCODE_4</newseq>
</port>
+ <port type="UI_CLEAR">
+ <newseq type="standard">KEYCODE_DEL OR KEYCODE_SPACE OR JOYCODE_1_BUTTON3</newseq>
+ </port>
+ <port type="UI_HELP">
+ <newseq type="standard">KEYCODE_F1 OR KEYCODE_LSHIFT OR JOYCODE_1_BUTTON4</newseq>
+ </port>
<port type="START1">
<newseq type="standard">KEYCODE_1</newseq>
diff --git a/ctrlr/hotrodse.cfg b/ctrlr/hotrodse.cfg
index 9a01517d10d..f91a45dfde4 100644
--- a/ctrlr/hotrodse.cfg
+++ b/ctrlr/hotrodse.cfg
@@ -25,12 +25,21 @@
<newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
</port>
- <port type="UI_CONFIGURE">
+ <port type="UI_MENU">
<newseq type="standard">KEYCODE_TAB OR KEYCODE_1 KEYCODE_3</newseq>
</port>
+ <port type="UI_BACK">
+ <newseq type="standard">KEYCODE_ESC OR KEYCODE_LALT OR JOYCODE_1_BUTTON2</newseq>
+ </port>
<port type="UI_CANCEL">
<newseq type="standard">KEYCODE_ESC OR KEYCODE_2 KEYCODE_4</newseq>
</port>
+ <port type="UI_CLEAR">
+ <newseq type="standard">KEYCODE_DEL OR KEYCODE_SPACE OR JOYCODE_1_BUTTON3</newseq>
+ </port>
+ <port type="UI_HELP">
+ <newseq type="standard">KEYCODE_F1 OR KEYCODE_LSHIFT OR JOYCODE_1_BUTTON4</newseq>
+ </port>
<port type="START1">
<newseq type="standard">KEYCODE_1</newseq>
diff --git a/ctrlr/scorpionxg.cfg b/ctrlr/scorpionxg.cfg
index faa48c816e7..cf7d544981c 100644
--- a/ctrlr/scorpionxg.cfg
+++ b/ctrlr/scorpionxg.cfg
@@ -27,12 +27,21 @@
<newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
</port>
- <port type="UI_CONFIGURE">
+ <port type="UI_MENU">
<newseq type="standard">KEYCODE_TAB</newseq>
</port>
+ <port type="UI_BACK">
+ <newseq type="standard">KEYCODE_ESC OR KEYCODE_LALT OR JOYCODE_1_BUTTON2</newseq>
+ </port>
<port type="UI_CANCEL">
<newseq type="standard">KEYCODE_ESC</newseq>
</port>
+ <port type="UI_CLEAR">
+ <newseq type="standard">KEYCODE_DEL OR KEYCODE_SPACE OR JOYCODE_1_BUTTON3</newseq>
+ </port>
+ <port type="UI_HELP">
+ <newseq type="standard">KEYCODE_F1 OR KEYCODE_C OR JOYCODE_1_BUTTON4</newseq>
+ </port>
<port type="START1">
<newseq type="standard">KEYCODE_1</newseq>
diff --git a/ctrlr/slikstik.cfg b/ctrlr/slikstik.cfg
index 42456f31d80..d1ffe4c46b4 100644
--- a/ctrlr/slikstik.cfg
+++ b/ctrlr/slikstik.cfg
@@ -32,12 +32,21 @@
<newseq type="standard">KEYCODE_7 OR KEYCODE_ENTER OR JOYCODE_1_BUTTON1</newseq>
</port>
- <port type="UI_CONFIGURE">
+ <port type="UI_MENU">
<newseq type="standard">KEYCODE_TAB OR KEYCODE_1 KEYCODE_5</newseq>
</port>
+ <port type="UI_BACK">
+ <newseq type="standard">KEYCODE_ESC OR KEYCODE_H OR JOYCODE_1_BUTTON2 OR KEYCODE_L</newseq>
+ </port>
<port type="UI_CANCEL">
<newseq type="standard">KEYCODE_ESC OR KEYCODE_2 KEYCODE_6</newseq>
</port>
+ <port type="UI_CLEAR">
+ <newseq type="standard">KEYCODE_DEL OR KEYCODE_9 OR JOYCODE_1_BUTTON3</newseq>
+ </port>
+ <port type="UI_HELP">
+ <newseq type="standard">KEYCODE_F1 OR KEYCODE_0 OR JOYCODE_1_BUTTON4</newseq>
+ </port>
<port type="START1">
<newseq type="standard">KEYCODE_1 OR JOYCODE_1_START</newseq>
@@ -176,19 +185,19 @@
-->
<input>
- <port type="P1_JOYSTICK_LEFT">
+ <port tag=":IN1" type="P1_BUTTON1" mask="128">
<newseq type="standard">KEYCODE_LEFT OR JOYCODE_1_XAXIS_LEFT_SWITCH OR KEYCODE_0</newseq>
</port>
- <port type="P1_JOYSTICK_RIGHT">
+ <port tag=":IN1" type="P1_BUTTON2" mask="64">
<newseq type="standard">KEYCODE_RIGHT OR JOYCODE_1_XAXIS_RIGHT_SWITCH OR KEYCODE_Z</newseq>
</port>
- <port type="P1_BUTTON1">
+ <port tag=":IN0" type="P1_BUTTON3" mask="16">
<newseq type="standard">KEYCODE_H OR JOYCODE_1_BUTTON1 OR MOUSECODE_1_BUTTON1</newseq>
</port>
- <port type="P1_BUTTON2">
+ <port tag=":IN1" type="P1_BUTTON4" mask="32">
<newseq type="standard">KEYCODE_7 OR JOYCODE_1_BUTTON2 OR KEYCODE_L</newseq>
</port>
- <port type="P1_BUTTON3">
+ <port tag=":IN0" type="P1_BUTTON5" mask="8">
<newseq type="standard">KEYCODE_9 OR JOYCODE_1_BUTTON3 OR MOUSECODE_1_BUTTON2</newseq>
</port>
</input>
diff --git a/ctrlr/xarcade.cfg b/ctrlr/xarcade.cfg
index 92bbbbeec9e..b05fce74b1d 100644
--- a/ctrlr/xarcade.cfg
+++ b/ctrlr/xarcade.cfg
@@ -25,12 +25,21 @@
<newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
</port>
- <port type="UI_CONFIGURE">
+ <port type="UI_MENU">
<newseq type="standard">KEYCODE_TAB OR KEYCODE_1 KEYCODE_3</newseq>
</port>
+ <port type="UI_BACK">
+ <newseq type="standard">KEYCODE_ESC OR KEYCODE_LALT OR JOYCODE_1_BUTTON2</newseq>
+ </port>
<port type="UI_CANCEL">
<newseq type="standard">KEYCODE_ESC OR KEYCODE_2 KEYCODE_4</newseq>
</port>
+ <port type="UI_CLEAR">
+ <newseq type="standard">KEYCODE_DEL OR KEYCODE_SPACE OR JOYCODE_1_BUTTON3</newseq>
+ </port>
+ <port type="UI_HELP">
+ <newseq type="standard">KEYCODE_F1 OR KEYCODE_LSHIFT OR JOYCODE_1_BUTTON4</newseq>
+ </port>
<port type="START1">
<newseq type="standard">KEYCODE_1</newseq>
pan class="w"> "nld_solver.h" #include <algorithm> namespace netlist { namespace solver { template <typename FT, int SIZE> class matrix_solver_SOR_mat_t: public matrix_solver_direct_t<FT, SIZE> { friend class matrix_solver_t; public: using float_type = FT; matrix_solver_SOR_mat_t(netlist_state_t &anetlist, const pstring &name, const analog_net_t::list_t &nets, const solver_parameters_t *params, std::size_t size) : matrix_solver_direct_t<FT, SIZE>(anetlist, name, nets, params, size) , m_Vdelta(*this, "m_Vdelta", std::vector<float_type>(size)) , m_omega(*this, "m_omega", params->m_gs_sor) , m_lp_fact(*this, "m_lp_fact", 0) { } unsigned vsolve_non_dynamic(const bool newton_raphson) override; private: //state_var<float_type[storage_N]> m_Vdelta; state_var<std::vector<float_type>> m_Vdelta; state_var<float_type> m_omega; state_var<float_type> m_lp_fact; }; // ---------------------------------------------------------------------------------------- // matrix_solver - Gauss - Seidel // ---------------------------------------------------------------------------------------- #if 0 //FIXME: move to solve_base template <unsigned m_N, unsigned storage_N> float_type matrix_solver_SOR_mat_t<m_N, storage_N>::vsolve() { /* * enable linear prediction on first newton pass */ if (this->m_params->use_linear_prediction) for (unsigned k = 0; k < this->size(); k++) { this->m_last_V[k] = this->m_nets[k]->m_cur_Analog; this->m_nets[k]->m_cur_Analog = this->m_nets[k]->m_cur_Analog + this->m_Vdelta[k] * this->current_timestep() * m_lp_fact; } else for (unsigned k = 0; k < this->size(); k++) { this->m_last_V[k] = this->m_nets[k]->m_cur_Analog; } this->solve_base(this); if (this->m_params->use_linear_prediction) { float_type sq = 0; float_type sqo = 0; const float_type rez_cts = 1.0 / this->current_timestep(); for (unsigned k = 0; k < this->size(); k++) { const analog_net_t *n = this->m_nets[k]; const float_type nv = (n->Q_Analog() - this->m_last_V[k]) * rez_cts ; sq += nv * nv; sqo += this->m_Vdelta[k] * this->m_Vdelta[k]; this->m_Vdelta[k] = nv; } // FIXME: used to be 1e90, but this would not be compatible with float if (sqo > NL_FCONST(1e-20)) m_lp_fact = std::min(std::sqrt(sq/sqo), (float_type) 2.0); else m_lp_fact = NL_FCONST(0.0); } return this->compute_next_timestep(); } #endif template <typename FT, int SIZE> unsigned matrix_solver_SOR_mat_t<FT, SIZE>::vsolve_non_dynamic(const bool newton_raphson) { /* The matrix based code looks a lot nicer but actually is 30% slower than * the optimized code which works directly on the data structures. * Need something like that for gaussian elimination as well. */ const std::size_t iN = this->size(); this->clear_square_mat(this->m_A); this->fill_matrix(this->m_RHS); bool resched = false; unsigned resched_cnt = 0; #if 0 static int ws_cnt = 0; ws_cnt++; if (1 && ws_cnt % 200 == 0) { // update omega float_type lambdaN = 0; float_type lambda1 = 1e9; for (int k = 0; k < iN; k++) { #if 0 float_type akk = std::abs(this->m_A[k][k]); if ( akk > lambdaN) lambdaN = akk; if (akk < lambda1) lambda1 = akk; #else float_type akk = std::abs(this->m_A[k][k]); float_type s = 0.0; for (int i=0; i<iN; i++) s = s + std::abs(this->m_A[k][i]); akk = s / akk - 1.0; if ( akk > lambdaN) lambdaN = akk; if (akk < lambda1) lambda1 = akk; #endif } //ws = 2.0 / (2.0 - lambdaN - lambda1); m_omega = 2.0 / (2.0 - lambda1); } #endif for (std::size_t k = 0; k < iN; k++) this->m_new_V[k] = this->m_terms[k].getV(); do { resched = false; float_type cerr = 0.0; for (std::size_t k = 0; k < iN; k++) { float_type Idrive = 0; const auto *p = this->m_terms[k].m_nz.data(); const std::size_t e = this->m_terms[k].m_nz.size(); for (std::size_t i = 0; i < e; i++) Idrive = Idrive + this->m_A[k][p[i]] * this->m_new_V[p[i]]; FT w = m_omega / this->m_A[k][k]; if (this->m_params.m_use_gabs) { FT gabs_t = 0.0; for (std::size_t i = 0; i < e; i++) if (p[i] != k) gabs_t = gabs_t + std::abs(this->m_A[k][p[i]]); gabs_t *= plib::constants<FT>::one(); // derived by try and error if (gabs_t > this->m_A[k][k]) { w = plib::constants<FT>::one() / (this->m_A[k][k] + gabs_t); } } const float_type delta = w * (this->m_RHS[k] - Idrive) ; cerr = std::max(cerr, std::abs(delta)); this->m_new_V[k] += delta; } if (cerr > this->m_params.m_accuracy) { resched = true; } resched_cnt++; } while (resched && (resched_cnt < this->m_params.m_gs_loops)); this->m_stat_calculations++; this->m_iterative_total += resched_cnt; if (resched) { this->m_iterative_fail++; return matrix_solver_direct_t<FT, SIZE>::solve_non_dynamic(newton_raphson); } const float_type err = (newton_raphson ? this->delta(this->m_new_V) : 0.0); this->store(this->m_new_V); return (err > this->m_params.m_accuracy) ? 2 : 1; } } // namespace solver } // namespace netlist #endif /* NLD_MS_GAUSS_SEIDEL_H_ */