Update to v094r27 release.

byuu says:

Added AWJ's fixes for alt/cpu (Tetris Attack framelines issue) and
alt/dsp (Thread::clock reset)

Added fix so that the taskbar entry appears when the application first
starts on Windows.

Fixed checkbox toggling inside of list views on Windows.

Updated nall/image to properly protect variables that should not be
written externally.

New Object syntax for hiro is in.

Fixed the backwards-typing on Windows with the state manager.
NOTE: the list view isn't redrawing when you change the description
text. It does so on the cheat editor because of the resizeColumns call;
but that shouldn't be necessary. I'll try and fix this for the next WIP.
This commit is contained in:
Tim Allen
2015-06-18 20:48:53 +10:00
parent a21ff570ee
commit 20cc6148cb
62 changed files with 1580 additions and 1569 deletions

View File

@@ -31,7 +31,7 @@ void CPU::add_clocks(unsigned clocks) {
if(status.virq_enabled) {
unsigned cpu_time = vcounter() * 1364 + hcounter();
unsigned irq_time = status.vtime * 1364 + status.htime * 4;
unsigned framelines = (system.region() == System::Region::NTSC ? 262 : 312) + field();
unsigned framelines = (system.region() == System::Region::NTSC ? 262 : 312) + (ppu.interlace() && !field());
if(cpu_time > irq_time) irq_time += framelines * 1364;
bool irq_valid = status.irq_valid;
status.irq_valid = cpu_time <= irq_time && cpu_time + clocks > irq_time;

View File

@@ -50,6 +50,7 @@ void DSP::power() {
}
void DSP::reset() {
Thread::clock = 0;
spc_dsp.soft_reset();
spc_dsp.set_output(samplebuffer, 8192);
}

View File

@@ -11,7 +11,7 @@
namespace SuperFamicom {
namespace Info {
static const char Name[] = "bsnes";
static const string Name = "bsnes";
static const unsigned SerializerVersion = 28;
}
}
@@ -28,28 +28,25 @@ namespace SuperFamicom {
namespace SuperFamicom {
struct Thread {
cothread_t thread;
unsigned frequency;
int64 clock;
~Thread() {
if(thread) co_delete(thread);
}
inline void create(void (*entrypoint)(), unsigned frequency) {
auto create(void (*entrypoint)(), unsigned frequency) -> void {
if(thread) co_delete(thread);
thread = co_create(65536 * sizeof(void*), entrypoint);
this->frequency = frequency;
clock = 0;
}
inline void serialize(serializer& s) {
auto serialize(serializer& s) -> void {
s.integer(frequency);
s.integer(clock);
}
inline Thread() : thread(nullptr) {
}
inline ~Thread() {
if(thread) co_delete(thread);
}
cothread_t thread = nullptr;
unsigned frequency = 0;
int64 clock = 0;
};
#include <sfc/memory/memory.hpp>