mirror of https://github.com/bsnes-emu/bsnes.git
Update to bsnes v038r08? release.
Another WIP, but nothing visible to end users. Still get it if you don't have 07 for the nice speedup. Mostly source-cleaning stuff. - removed 'uint' type, replaced all instances with the proper unsigned int. - removed as many headers as I could from the global interface.hpp file, including only in the cores that need each of them. Should help compile time. Though I still have a lot of global header includes due to needing ultra-hot sections of code inlined. - added include protection bumpers to the CPU+SMP opcode core generated files - added const-correctness to a few more classes. - updated S-RTC and SPC7110 time to handle time_t overflow: it's now Y2K38 proof even on 32-bit signed time_t systems, and the file format remains unchanged. But it adds one limitation that you'll lose your time if you wait ~34 years before loading your last save game. I think that's reasonable for now. Once 64-bit time_t systems are ubiquitous, we should be able to trivially expand that without breaking old saves. Relevant code (I tested with int16_t, uint16_t, int32_t, uint32_t, int64_t and uint64_t): time_t diff = (current_time >= rtc_time) ? (current_time - rtc_time) : (std::numeric_limits<time_t>::max() - rtc_time + current_time + 1); //compensate for overflow if(diff > std::numeric_limits<time_t>::max() / 2) diff = 0; //compensate for underflow Avoided the obvious (y-x)&<time_t>::max() just in case there's some crazy platform where the value != (some power of 2)-1. Modulus (max()+1) won't work there either, as it'll overflow if sizeof(unsigned) == sizeof(time_t). The +1 might throw it off by a second on one's complement system, but I don't really care :P Anyone with GCC 4.3 want to try something for me? Try modifying src/lib/nall/platform.hpp and change #define alwaysinline __attribute__((always_inline)) to: #define alwaysinline __attribute__((always_inline)) __attribute__((hot)) ... and let me know the FPS difference you get in some arbitrary game, please :D It's supposed to be like manual-PGO. [No archive available]
This commit is contained in:
parent
3908890072
commit
c63df7e009