2016-01-27 11:31:39 +00:00
|
|
|
namespace WonderSwan {
|
|
|
|
|
|
|
|
struct ID {
|
|
|
|
enum : uint {
|
|
|
|
System,
|
|
|
|
WonderSwan,
|
|
|
|
WonderSwanColor,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum : uint {
|
|
|
|
SystemManifest,
|
2016-02-18 10:32:22 +00:00
|
|
|
SystemIPLROM,
|
|
|
|
SystemEEPROM,
|
2016-01-27 11:31:39 +00:00
|
|
|
|
|
|
|
Manifest,
|
|
|
|
ROM,
|
|
|
|
RAM,
|
2016-02-18 10:32:22 +00:00
|
|
|
EEPROM,
|
2016-01-27 11:31:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum : uint {
|
2016-01-28 11:39:49 +00:00
|
|
|
DeviceHorizontal = 1,
|
|
|
|
DeviceVertical = 2,
|
2016-01-27 11:31:39 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Interface : Emulator::Interface {
|
|
|
|
Interface();
|
|
|
|
|
|
|
|
auto manifest() -> string override;
|
|
|
|
auto title() -> string override;
|
|
|
|
auto videoFrequency() -> double override;
|
|
|
|
auto audioFrequency() -> double override;
|
|
|
|
|
|
|
|
auto loaded() -> bool override;
|
|
|
|
auto sha256() -> string override;
|
|
|
|
auto group(uint id) -> uint override;
|
|
|
|
auto load(uint id) -> void override;
|
|
|
|
auto save() -> void override;
|
|
|
|
auto load(uint id, const stream& stream) -> void override;
|
|
|
|
auto save(uint id, const stream& stream) -> void override;
|
|
|
|
auto unload() -> void override;
|
|
|
|
|
|
|
|
auto power() -> void override;
|
|
|
|
auto run() -> void override;
|
|
|
|
|
|
|
|
auto serialize() -> serializer override;
|
|
|
|
auto unserialize(serializer&) -> bool override;
|
|
|
|
|
|
|
|
auto cap(const string& name) -> bool override;
|
|
|
|
auto get(const string& name) -> any override;
|
|
|
|
auto set(const string& name, const any& value) -> bool override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
vector<Device> device;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Settings {
|
Update to v097r27 release.
byuu says:
Absolutely major improvements to the WS/C emulation today.
Changelog: (all WS/C related)
- fixed channel 3 sweep pitch adjustment
- fixed channel 3 sweep value sign extension
- removed errant channel 5 speed setting (not what's really going on)
- fixed sign extension on channel 5 samples
- improved DAC mixing of all five audio channels
- fixed r26 regression with PPU timing loop
- fixed sprite windowing behavior (sprite attribute flag is window mode;
not window enable)
- added per-scanline register latching to the PPU
- IRQs should terminate HLT even when the IRQ enable register bits are
clear
- fixed PALMONO reads
- added blur emulation
- added color emulation (based on GBA, so it heavily desaturates colors;
not entirely correct, but it helps a lot)
- no longer decimating audio to 24KHz; running at full 3.072MHz through
the windowed sinc filter [1]
- cleaned up PPU portRead / portWrite functions significantly
- emulated a weird quirk as mentioned by trap15 regarding timer
frequency writes enabling said timers [2]
- emulated LCD_CTRL sleep bit; screen can now be disabled (always draws
black in this case for now)
- improved OAM caching; but it's still disabled because it causes huge
amounts of sprite glitches (unsure why)
- fixed rendering of sprites that wrap around the screen edges back to
the top/left of the display
- emulated keypad interrupts
- icarus: detect orientation bit in game header
- higan: use orientation setting in manifest to set default screen
rotation
[1] the 24KHz -> 3.072MHz sound change is huge. Sound is substantially
improved over the previous WIPs. It does come at a pretty major speed
penalty, though. This is the highest frequency of any system in higan
running through an incredibly (amazing, yet) demanding sinc resampler.
Frame rate dropped from around 240fps to 150fps with the sinc filter on.
If you choose a different audio filter, you'll get most of that speed
back, but audio will sound worse again.
[2] we aren't sure if this is correct hardware behavior or not. It seems
to very slightly help Magical Drop, but not much.
The blur emulation is brutal. It's absolutely required for Riviera's
translucency simulation of selected menu items, but it causes serious
headaches due to the WS's ~75hz refresh rate running on ~60hz monitors
without vsync. It's probably best to leave it off and just deal with the
awful flickering on Riviera's menu options.
Overall, WS/C emulation is starting to get quite usable indeed. Couple
of major bugs that I'd really like to get fixed before releasing it,
though. But they're getting harder and harder to fix ...
Major Bugs:
- Final Fantasy battle background music is absent. Sound effects still
work. Very weird.
- Final Fantasy IV scrolling during airship flight opening sequence is
horribly broken. Scrolls one screen at a time.
- Magical Drop flickers like crazy in-game. Basically unplayable like
this.
- Star Hearts character names don't appear in the smaller dialog box
that pops up.
Minor Bugs:
- Occasional flickering during Riviera opening scenes.
- One-frame flicker of Leda's sprite at the start of the first stage.
2016-03-19 07:35:25 +00:00
|
|
|
bool blurEmulation = true;
|
|
|
|
bool colorEmulation = true;
|
2016-01-27 11:31:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern Interface* interface;
|
|
|
|
extern Settings settings;
|
|
|
|
|
|
|
|
}
|