mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-03-30 16:32:51 +02:00
byuu says: I added (imperfect) memory conflict timing to the SA1. Before: - WRAM↔↔ROM ran 7% too fast - ROM↔↔ROM ran 100% too fast - WRAM↔↔IRAM ran 7% too fast - ROM↔↔IRAM ran 7% too fast - IRAM↔↔IRAM ran 287% too fast - BWRAM↔↔BWRAM ran 100% too fast - HDMA ROM↔↔ROM ran 15% too fast - HDMA WRAM↔↔ROM ran 15% too fast - DMA ROM↔↔ROM ran 100% too fast After: - ROM↔↔ROM runs 14% too fast - HDMA WRAM↔↔ROM runs 7% too fast - DMA ROM↔↔ROM runs 4% too fast If you enable this with the fast PPU + DSP, your framerate in SA1 games will drop by 51%. And even if you disable it, you'll still lose 9% speed in SA1 games, and 2% speed in non-SA1 games, because of changes needed to make this support possible. By default, I'm leaving this off. Compile with `-DACCURATE_SA1` (or uncomment the line in sfc/sfc.hpp) if you want to try it out. This'll almost certainly cause some SA1 regressions, so I guess we'll tackle those as they arise.
59 lines
1.3 KiB
C++
59 lines
1.3 KiB
C++
#pragma once
|
|
|
|
namespace nall {
|
|
|
|
template<typename T> vector<T>::vector(Literal::Capacity capacity) {
|
|
reserve(capacity.value);
|
|
}
|
|
|
|
template<typename T> vector<T>::vector(Literal::Size size) {
|
|
resize(size.value);
|
|
}
|
|
|
|
template<typename T> vector<T>::vector(const initializer_list<T>& values) {
|
|
reserveRight(values.size());
|
|
for(auto& value : values) append(value);
|
|
}
|
|
|
|
template<typename T> vector<T>::vector(const vector<T>& source) {
|
|
operator=(source);
|
|
}
|
|
|
|
template<typename T> vector<T>::vector(vector<T>&& source) {
|
|
operator=(move(source));
|
|
}
|
|
|
|
template<typename T> vector<T>::~vector() {
|
|
reset();
|
|
}
|
|
|
|
template<typename T> vector<T>::operator bool() const {
|
|
return _size;
|
|
}
|
|
|
|
template<typename T> vector<T>::operator array_span<T>() {
|
|
return {data(), size()};
|
|
}
|
|
|
|
template<typename T> vector<T>::operator array_view<T>() const {
|
|
return {data(), size()};
|
|
}
|
|
|
|
template<typename T> template<typename Cast> auto vector<T>::capacity() const -> uint {
|
|
return (_left + _size + _right) * sizeof(T) / sizeof(Cast);
|
|
}
|
|
|
|
template<typename T> template<typename Cast> auto vector<T>::size() const -> uint {
|
|
return _size * sizeof(T) / sizeof(Cast);
|
|
}
|
|
|
|
template<typename T> template<typename Cast> auto vector<T>::data() -> Cast* {
|
|
return (Cast*)_pool;
|
|
}
|
|
|
|
template<typename T> template<typename Cast> auto vector<T>::data() const -> const Cast* {
|
|
return (const Cast*)_pool;
|
|
}
|
|
|
|
}
|