diff --git a/VERSION b/VERSION index dcf4cba6..fd6c0240 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1-Δ15ε2 \ No newline at end of file +1-Δ15ε3 \ No newline at end of file diff --git a/manual.lyx b/manual.lyx index 81032846..7ad0e533 100644 --- a/manual.lyx +++ b/manual.lyx @@ -7279,5 +7279,69 @@ Cleanup bsnes debugger logic Fix resets in presence of save every frame \end_layout +\begin_layout Subsection +rr1-delta15epsilon3 +\end_layout + +\begin_layout Itemize +Lua: input.lcid_to_pcid +\end_layout + +\begin_layout Itemize +Fix off-by-one bug with slot hashes +\end_layout + +\begin_layout Itemize +Fix crashes on certain memory watch expressions +\end_layout + +\begin_layout Itemize +Lua: memory.read_expr +\end_layout + +\begin_layout Itemize +Lua: Fix memory.read_expr on nil argument +\end_layout + +\begin_layout Itemize +Fix the code to compile on G++ 4.7 +\end_layout + +\begin_layout Itemize +Change button_id to be a function pointer field, not a virtual method +\end_layout + +\begin_layout Itemize +Add bsnes patches to fix libsnes to compile on GCC 4.7 +\end_layout + +\begin_layout Itemize +Gambatte: Always use legacy lag counting +\end_layout + +\begin_layout Itemize +Memory commands: Memory addresses are up to 16 hex digits, not up to 8 +\end_layout + +\begin_layout Itemize +Fix analog controllers +\end_layout + +\begin_layout Itemize +Fix autohold menus +\end_layout + +\begin_layout Itemize +Fix button symbols in input display +\end_layout + +\begin_layout Itemize +Compensate for nuts bsnes superscope/justifier handling +\end_layout + +\begin_layout Itemize +Lua: Fix bit.extract boolean handling +\end_layout + \end_body \end_document diff --git a/manual.txt b/manual.txt index aaf47657..6ff912e4 100644 --- a/manual.txt +++ b/manual.txt @@ -1797,7 +1797,7 @@ type. • Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword. -8.9.23 memory.watch_expr(string expr) +8.9.23 memory.read_expr(string expr) Evaluate specified watch expression and return result @@ -3582,3 +3582,37 @@ set-axis joystick0axis19 disabled • Fix resets in presence of save every frame +18.75 rr1-delta15epsilon3 + +• Lua: input.lcid_to_pcid + +• Fix off-by-one bug with slot hashes + +• Fix crashes on certain memory watch expressions + +• Lua: memory.read_expr + +• Lua: Fix memory.read_expr on nil argument + +• Fix the code to compile on G++ 4.7 + +• Change button_id to be a function pointer field, not a virtual + method + +• Add bsnes patches to fix libsnes to compile on GCC 4.7 + +• Gambatte: Always use legacy lag counting + +• Memory commands: Memory addresses are up to 16 hex digits, not + up to 8 + +• Fix analog controllers + +• Fix autohold menus + +• Fix button symbols in input display + +• Compensate for nuts bsnes superscope/justifier handling + +• Lua: Fix bit.extract boolean handling + diff --git a/src/lua/bit.cpp b/src/lua/bit.cpp index eafc25b1..cb06bc93 100644 --- a/src/lua/bit.cpp +++ b/src/lua/bit.cpp @@ -106,12 +106,12 @@ namespace uint64_t num = L.get_numeric_argument(1, fname.c_str()); uint64_t ret = 0; for(size_t i = 0;; i++) { - if(L.isnumber(i + 2)) { - uint8_t bit = L.get_numeric_argument(i + 2, fname.c_str()); - ret |= (((num >> bit) & 1) << i); - } else if(L.isboolean(i + 2)) { + if(L.isboolean(i + 2)) { if(L.toboolean(i + 2)) ret |= (1ULL << i); + } else if(L.isnumber(i + 2)) { + uint8_t bit = L.get_numeric_argument(i + 2, fname.c_str()); + ret |= (((num >> bit) & 1) << i); } else break; }