2017-01-13 01:15:45 +00:00
|
|
|
MasterSystemInterface::MasterSystemInterface() {
|
|
|
|
information.manufacturer = "Sega";
|
|
|
|
information.name = "Master System";
|
|
|
|
information.overscan = true;
|
|
|
|
|
|
|
|
media.append({ID::MasterSystem, "Master System", "ms"});
|
|
|
|
|
|
|
|
Port hardware{ID::Port::Hardware, "Hardware"};
|
|
|
|
Port controllerPort1{ID::Port::Controller1, "Controller Port 1"};
|
|
|
|
Port controllerPort2{ID::Port::Controller2, "Controller Port 2"};
|
|
|
|
|
|
|
|
{ Device device{ID::Device::MasterSystemControls, "Controls"};
|
|
|
|
device.inputs.append({0, "Reset"});
|
2017-01-13 23:59:38 +00:00
|
|
|
device.inputs.append({0, "Pause"});
|
2017-01-13 01:15:45 +00:00
|
|
|
hardware.devices.append(device);
|
|
|
|
}
|
|
|
|
|
|
|
|
{ Device device{ID::Device::None, "None"};
|
|
|
|
controllerPort1.devices.append(device);
|
|
|
|
controllerPort2.devices.append(device);
|
|
|
|
}
|
|
|
|
|
|
|
|
{ Device device{ID::Device::Gamepad, "Gamepad"};
|
|
|
|
device.inputs.append({0, "Up"});
|
|
|
|
device.inputs.append({0, "Down"});
|
|
|
|
device.inputs.append({0, "Left"});
|
|
|
|
device.inputs.append({0, "Right"});
|
|
|
|
device.inputs.append({0, "1"});
|
|
|
|
device.inputs.append({0, "2"});
|
|
|
|
controllerPort1.devices.append(device);
|
|
|
|
controllerPort2.devices.append(device);
|
|
|
|
}
|
|
|
|
|
|
|
|
ports.append(move(hardware));
|
|
|
|
ports.append(move(controllerPort1));
|
|
|
|
ports.append(move(controllerPort2));
|
|
|
|
}
|
|
|
|
|
Update to v103r09 release.
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.
2017-07-06 08:29:12 +00:00
|
|
|
auto MasterSystemInterface::videoResolution() -> VideoResolution {
|
|
|
|
return {256, 240, 256, 240, 8.0 / 7.0};
|
2017-01-13 01:15:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
auto MasterSystemInterface::videoColors() -> uint32 {
|
|
|
|
return 1 << 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto MasterSystemInterface::videoColor(uint32 color) -> uint64 {
|
|
|
|
uint2 B = color >> 4;
|
|
|
|
uint2 G = color >> 2;
|
|
|
|
uint2 R = color >> 0;
|
|
|
|
|
|
|
|
uint64 r = image::normalize(R, 2, 16);
|
|
|
|
uint64 g = image::normalize(G, 2, 16);
|
|
|
|
uint64 b = image::normalize(B, 2, 16);
|
|
|
|
|
|
|
|
return r << 32 | g << 16 | b << 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto MasterSystemInterface::load(uint id) -> bool {
|
2017-02-21 11:07:33 +00:00
|
|
|
if(id == ID::MasterSystem) return system.load(this, System::Model::MasterSystem);
|
2017-01-13 01:15:45 +00:00
|
|
|
return false;
|
|
|
|
}
|
Update to v103r05 release.
byuu says:
Changelog:
- fc/controller: added ControllerPort class; removed Peripherals class
- md/controller/gamepad: removed X,Y,Z buttons since this isn't a
6-button controller
- ms/controller: added ControllerPort class (not used in Game Gear
mode); removed Peripherals class
- pce/controller: added ControllerPort class; removed Peripherals
class
- processor/spc700: idle(address) is part of SMP class again, contains
flag to detect mov (x)+ edge case
- sfc/controller/super-scope,justifier: use CPU frequency instead of
hard-coding NTSC frequency
- sfc/cpu: move 4x8-bit SMP ports to SMP class
- sfc/smp: move APU RAM to DSP class
- sfc/smp: improved emulation of TEST registers bits 4-7 [information
from nocash]
- d4,d5 is RAM wait states (1,2,5,10)
- d6,d7 is ROM/IO wait states (1,2,5,10)
- sfc/smp: code cleanup to new style (order from lowest to highest
bits; use .bit(s) functions)
- sfc/smp: $00f8,$00f9 are P4/P5 auxiliary ports; named the registers
better
2017-07-01 06:15:27 +00:00
|
|
|
|
|
|
|
auto MasterSystemInterface::connect(uint port, uint device) -> void {
|
|
|
|
if(port == ID::Port::Controller1) controllerPort1.connect(settings.controllerPort1 = device);
|
|
|
|
if(port == ID::Port::Controller2) controllerPort2.connect(settings.controllerPort2 = device);
|
|
|
|
}
|