mirror of https://github.com/bsnes-emu/bsnes.git
bb1dd8c609
byuu says: So this turned out to be a rather unproductive ten-hour rabbit hole, but ... I reworked nall/primitives.hpp a lot. And because the changes are massive, testing of this WIP for regressions is critically important. I really can't stress that enough, we're almost certainly going to have some hidden regressions here ... We now have a nall/primitives/ subfolder that splits up the classes into manageable components. The bit-field support is now shared between both Natural and Integer. All of the assignment operator overloads are now templated and take references instead of values. Things like the GSU::Register class are non-copyable on account of the function<> object inside of it, and previously only operator= would work with classes like that. The big change is nall/primitives/operators.hpp, which is a really elaborate system to compute the minimum number of bits needed for any operation, and to return a Natural<T> or Integer<T> when one or both of the arguments are such a type. Unfortunately, it doesn't really work yet ... Kirby's Dream Land 3 breaks if we include operators.hpp. Zelda 3 runs fine with this, but I had to make a huge amount of core changes, including introducing a new ternary(bool, lhs, rhs) function to nall/algorithm to get past Natural<X> and Natural<Y> not being equivalent (is_integral types get a special exemption to ternary ?: type equivalence, yet it's impossible to simulate with our own classes, which is bullshit.) The horrifying part is that ternary() will evaluate both lhs and rhs, unlike ?: I converted some of the functions to test ? uint(x) : uint(y), and others to ternary(test, x, y) ... I don't have a strong preference either way yet. But the part where things may have gotten broken is in the changes to where ternary() was placed. Some cases like in the GBA PPU renderer, it was rather unclear the order of evaluations, so I may have made a mistake somewhere. So again, please please test this if you can. Or even better, look over the diff. Longer-term, I'd really like the enable nall/primitives/operators.hpp, but right now I'm not sure why Kirby's Dream Land 3 is breaking. Help would be appreciated, but ... it's gonna be really complex and difficult to debug, so I'm probably gonna be on my own here ... sigh. |
||
---|---|---|
docs | ||
genius | ||
higan | ||
hiro | ||
icarus | ||
libco | ||
nall | ||
ruby | ||
shaders | ||
.gitignore | ||
.gitlab-ci.yml | ||
CONTRIBUTING.md | ||
GPLv3.txt | ||
LICENSE.txt | ||
README.md | ||
README.txt | ||
mkdocs.yml |
README.md
The unofficial higan repository
higan emulates a number of classic video-game consoles of the 1980s and 1990s, allowing you to play classic games on a modern general-purpose computer.
This repository includes the source-code for stable and WIP releases of higan, starting during the development of v068. It also includes community-maintained documentation.
Basically,
apart from .gitignore
files,
anything in the
higan,
hiro,
icarus,
libco,
nall,
ruby,
or shaders
directories should be exactly as it appeared in official releases.
Everything else has been added for various reasons.
Official higan resources
Unofficial higan resources
- Unofficial forum
- Documentation for the current stable version
- Source code repository archives official higan releases and WIP snapshots since approximately v067r21
- Latest WIP build for Windows
- Documentation for the latest WIP version