mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-19 04:21:55 +02:00
Update to v106r85 release.
byuu says: The bad instruction was due to the instruction before it fetching one too many bytes. Didn't notice right away as the disassembler got it right. The register map was incorrect on the active 16-bit flags. I fixed and improved some other things along those lines. Hooked up some basic KnGE (VPU) timings, made it print out VRAM and some of the WRAM onto the screen each frame, tried to drive Vblank and Hblank IRQs, but ... I don't know for sure what vector addresses they belong to. MAME says "INT4" for Vblank, and says nothing for Hblank. I am wildly guessing INT4==SWI 4==0xffff10, but ... I have no idea. I'm also not emulating the interrupts properly based on line levels, I'm just firing on the 0→1 transitions. Sounds like Vblank is more nuanced too, but I guess we'll see. Emulation is running further along now, even to the point of it successfully enabling the KnGE IRQs, but VRAM doesn't appear to get much useful stuff written into it yet. I reverted the nall/primitive changes, so request for testing is I guess rescinded, for whatever it was worth.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace nall {
|
||||
|
||||
template<uint Precision = 64> struct Real {
|
||||
template<uint Precision> struct Real {
|
||||
static_assert(Precision == 32 || Precision == 64);
|
||||
static inline constexpr auto bits() -> uint { return Precision; }
|
||||
using ftype =
|
||||
@@ -14,8 +14,7 @@ template<uint Precision = 64> struct Real {
|
||||
template<int Bits> inline Real(Real<Bits> value) : data((ftype)value) {}
|
||||
template<typename T> inline Real(const T& value) : data((ftype)value) {}
|
||||
|
||||
explicit inline operator bool() const { return data; }
|
||||
inline operator float64_t() const { return data; }
|
||||
inline operator ftype() const { return data; }
|
||||
|
||||
inline auto operator++(int) { auto value = *this; ++data; return value; }
|
||||
inline auto operator--(int) { auto value = *this; --data; return value; }
|
||||
@@ -36,14 +35,4 @@ private:
|
||||
ftype data;
|
||||
};
|
||||
|
||||
#define lhs (float64_t)(typename Real<LHS>::type)l
|
||||
#define rhs (typename Real<RHS>::type)r
|
||||
template<int LHS, int RHS> inline auto operator*(Real<LHS> l, Real<RHS> r) { return Real<>{lhs * rhs}; }
|
||||
template<int LHS, int RHS> inline auto operator/(Real<LHS> l, Real<RHS> r) { return Real<>{lhs / rhs}; }
|
||||
template<int LHS, int RHS> inline auto operator%(Real<LHS> l, Real<RHS> r) { return Real<>{lhs % rhs}; }
|
||||
template<int LHS, int RHS> inline auto operator+(Real<LHS> l, Real<RHS> r) { return Real<>{lhs + rhs}; }
|
||||
template<int LHS, int RHS> inline auto operator-(Real<LHS> l, Real<RHS> r) { return Real<>{lhs - rhs}; }
|
||||
#undef lhs
|
||||
#undef rhs
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user