mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-24 23:22:25 +01:00
byuu says: Changelog: - processor/spc700: restored fetch/load/store/pull/push shorthand functions - processor/spc700: split functions that tested the algorithm used (`op != &SPC700:...`) to separate instructions - mostly for code clarity over code size: it was awkward having cycle counts change based on a function parameter - processor/spc700: implemented Overload's new findings on which cycles are truly internal (no bus reads) - sfc/smp: TEST register emulation has been vastly improved¹ ¹: it turns out that TEST.d4,d5 is the external clock divider (used when accessing RAM through the DSP), and TEST.d6,d7 is the internal clock divider (used when accessing IPLROM, IO registers, or during idle cycles.) The DSP (24576khz) feeds its clock / 12 through to the SMP (2048khz). The clock divider setting further divides the clock by 2, 4, 8, or 16. Since 8 and 16 are not cleanly divislbe by 12, the SMP cycle count glitches out and seems to take 10 and 2 clocks instead of 8 or 16. This can on real hardware either cause the SMP to run very slowly, or more likely, crash the SMP completely until reset. What's even stranger is the timers aren't affected by this. They still clock by 2, 4, 8, or 16. Note that technically I could divide my own clock counters by 24 and reduce these to {1,2,5,10} and {1,2,4,8}, I instead chose to divide by 12 to better illustrate this hardware issue and better model that the SMP clock runs at 2048khz and not 1024khz. Further, note that things aren't 100% perfect yet. This seems to throw off some tests, such as blargg's `test_timer_speed`. I can't tell how far off I am because blargg's test tragically doesn't print out fail values. But you can see the improvements in that higan is now passing all of Revenant's tests that were obviously completely wrong before.
41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <nall/nall.hpp>
|
|
#include <nall/vfs.hpp>
|
|
using namespace nall;
|
|
|
|
#include "types.hpp"
|
|
#include <libco/libco.h>
|
|
#include <audio/audio.hpp>
|
|
#include <video/video.hpp>
|
|
#include <resource/resource.hpp>
|
|
|
|
namespace Emulator {
|
|
static const string Name = "higan";
|
|
static const string Version = "103.06";
|
|
static const string Author = "byuu";
|
|
static const string License = "GPLv3";
|
|
static const string Website = "http://byuu.org/";
|
|
|
|
//incremented only when serialization format changes
|
|
static const string SerializerVersion = "103";
|
|
|
|
namespace Constants {
|
|
namespace Colorburst {
|
|
static constexpr double NTSC = 315.0 / 88.0 * 1'000'000.0;
|
|
static constexpr double PAL = 283.75 * 15'625.0 + 25.0;
|
|
}
|
|
}
|
|
|
|
//nall/vfs shorthand constants for open(), load()
|
|
namespace File {
|
|
static const auto Read = vfs::file::mode::read;
|
|
static const auto Write = vfs::file::mode::write;
|
|
static const auto Optional = false;
|
|
static const auto Required = true;
|
|
};
|
|
}
|
|
|
|
#include "platform.hpp"
|
|
#include "interface.hpp"
|