mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-24 15:12:23 +01:00
byuu says: Changelog: - gba/apu: fixed wave RAM nibble ordering (fixes audio in Castlevania, PocketNES) - emulator: restructured video information to just a single videoResolution() → VideoResolution function - returns "projected size" (between 160x144 and 320x240) - "internal buffer size" (up to 1280x480) - returns aspect correction multiplier that is to be applied to the width field - the value could be < 1.0 to handle systems with taller pixels; although higan doesn't emulate such a system - tomoko: all calculations for scaling and overscan masking are done by the GUI now - tomoko: aspect correction can be enabled in either windowed or fullscreen mode separately; moved to Video settings panel - tomoko: video scaling multipliers (against 320x240) can now me modified from the default (2,3,4) via the configuration file - use this as a really barebones way of supporting high DPI monitors; although the GUI elements won't scale nicely - if you set a value less than two, or greater than your resolution divided by 320x240, it's your own fault when things blow up. I'm not babysitting anyone with advanced config-file only options. - tomoko: added new adaptive windowed mode - when enabled, the window will shrink to eliminate any black borders when loading a game or changing video settings. The window will not reposition itself. - tomoko: added new adaptive fullscreen mode - when enabled, the integral scaling will be disabled for fullscreen mode, forcing the video to fill at least one direction of the video monitor completely. I expect we will be bikeshedding for the next month on how to describe the new video options, where they should appear in the GUI, changes people want, etc ... but suffice to say, I'm happy with the functionality, so I don't intend to make changes to -what- things do, but I will entertain better ways to name things.
90 lines
2.0 KiB
C++
90 lines
2.0 KiB
C++
#pragma once
|
|
|
|
namespace Emulator {
|
|
|
|
struct Interface {
|
|
struct Information {
|
|
string manufacturer;
|
|
string name;
|
|
bool overscan;
|
|
} information;
|
|
|
|
struct Region {
|
|
string name;
|
|
};
|
|
vector<Region> regions;
|
|
|
|
struct Medium {
|
|
uint id;
|
|
string name;
|
|
string type; //extension
|
|
};
|
|
vector<Medium> media;
|
|
|
|
struct Device {
|
|
uint id;
|
|
string name;
|
|
struct Input {
|
|
uint type; //0 = digital, 1 = analog (relative), 2 = rumble
|
|
string name;
|
|
};
|
|
vector<Input> inputs;
|
|
};
|
|
|
|
struct Port {
|
|
uint id;
|
|
string name;
|
|
vector<Device> devices;
|
|
};
|
|
vector<Port> ports;
|
|
|
|
//information
|
|
virtual auto manifest() -> string = 0;
|
|
virtual auto title() -> string = 0;
|
|
|
|
//video information
|
|
struct VideoResolution {
|
|
uint width;
|
|
uint height;
|
|
uint internalWidth;
|
|
uint internalHeight;
|
|
double aspectCorrection;
|
|
};
|
|
virtual auto videoResolution() -> VideoResolution = 0;
|
|
virtual auto videoColors() -> uint32 = 0;
|
|
virtual auto videoColor(uint32 color) -> uint64 = 0;
|
|
|
|
//media interface
|
|
virtual auto loaded() -> bool { return false; }
|
|
virtual auto sha256() -> string { return ""; }
|
|
virtual auto load(uint id) -> bool { return false; }
|
|
virtual auto save() -> void {}
|
|
virtual auto unload() -> void {}
|
|
|
|
//system interface
|
|
virtual auto connect(uint port, uint device) -> void {}
|
|
virtual auto power() -> void {}
|
|
virtual auto run() -> void {}
|
|
|
|
//time functions
|
|
virtual auto rtc() -> bool { return false; }
|
|
virtual auto rtcSynchronize() -> void {}
|
|
|
|
//state functions
|
|
virtual auto serialize() -> serializer = 0;
|
|
virtual auto unserialize(serializer&) -> bool = 0;
|
|
|
|
//cheat functions
|
|
virtual auto cheatSet(const string_vector& = {}) -> void {}
|
|
|
|
//settings
|
|
virtual auto cap(const string& name) -> bool { return false; }
|
|
virtual auto get(const string& name) -> any { return {}; }
|
|
virtual auto set(const string& name, const any& value) -> bool { return false; }
|
|
|
|
//shared functions
|
|
auto videoColor(uint16 r, uint16 g, uint16 b) -> uint32;
|
|
};
|
|
|
|
}
|