saturn: hook up GL mode to user interface. in GL mode, one can choose resolutions like pcsx2: 1x, 2x, 3x, 4x, or user selected w*h
This commit is contained in:
parent
d3efbb6d3b
commit
a754aba126
|
@ -49,7 +49,8 @@ namespace BizHawk.Emulation.Consoles.Sega.Saturn
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// set video buffer
|
/// set video buffer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buff">704x512x32bit, should persist over time</param>
|
/// <param name="buff">32 bit color, should persist over time. must hold at least 704*512px in software mode, or (704*n*512*n)px
|
||||||
|
/// in hardware mode with native factor size, or w*hpx in gl mode with explicit size</param>
|
||||||
[DllImport("libyabause.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("libyabause.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void libyabause_setvidbuff(IntPtr buff);
|
public static extern void libyabause_setvidbuff(IntPtr buff);
|
||||||
|
|
||||||
|
@ -135,13 +136,21 @@ namespace BizHawk.Emulation.Consoles.Sega.Saturn
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// only works in GL mode
|
/// set the overall resolution. only works in gl mode and when nativefactor = 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="w">width</param>
|
/// <param name="w">width</param>
|
||||||
/// <param name="h">height</param>
|
/// <param name="h">height</param>
|
||||||
[DllImport("libyabause.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("libyabause.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void libyabause_glresize(int w, int h);
|
public static extern void libyabause_glresize(int w, int h);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// cause the overall resolution to automatically switch to a multiple of the original console resolution, as the original console resolution changes.
|
||||||
|
/// only applies in gl mode.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="n">factor, 1-4, 0 to disable.</param>
|
||||||
|
[DllImport("libyabause.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void libyabause_glsetnativefactor(int n);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -35,16 +35,16 @@ namespace BizHawk.Emulation.Consoles.Sega.Saturn
|
||||||
LibYabause.CDInterface.ReadSectorFAD ReadSectorFADH;
|
LibYabause.CDInterface.ReadSectorFAD ReadSectorFADH;
|
||||||
LibYabause.CDInterface.ReadAheadFAD ReadAheadFADH;
|
LibYabause.CDInterface.ReadAheadFAD ReadAheadFADH;
|
||||||
|
|
||||||
public Yabause(CoreComm CoreComm, DiscSystem.Disc CD, byte[] bios)
|
public Yabause(CoreComm CoreComm, DiscSystem.Disc CD, byte[] bios, bool GL = false)
|
||||||
{
|
{
|
||||||
CoreComm.RomStatusDetails = "Yeh";
|
CoreComm.RomStatusDetails = "Yeh";
|
||||||
this.CoreComm = CoreComm;
|
this.CoreComm = CoreComm;
|
||||||
this.CD = CD;
|
this.CD = CD;
|
||||||
ResetFrameCounter();
|
ResetFrameCounter();
|
||||||
Init(bios);
|
Init(bios, GL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Init(byte[] bios)
|
void Init(byte[] bios, bool GL = false)
|
||||||
{
|
{
|
||||||
if (AttachedCore != null)
|
if (AttachedCore != null)
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ namespace BizHawk.Emulation.Consoles.Sega.Saturn
|
||||||
string BiosPipe = fp.GetPipeNameNative();
|
string BiosPipe = fp.GetPipeNameNative();
|
||||||
fp.Offer(bios);
|
fp.Offer(bios);
|
||||||
|
|
||||||
if (!LibYabause.libyabause_init(ref CDInt, BiosPipe, false))
|
if (!LibYabause.libyabause_init(ref CDInt, BiosPipe, GL))
|
||||||
throw new Exception("libyabause_init() failed!");
|
throw new Exception("libyabause_init() failed!");
|
||||||
|
|
||||||
var e = fp.GetResults();
|
var e = fp.GetResults();
|
||||||
|
@ -77,11 +77,13 @@ namespace BizHawk.Emulation.Consoles.Sega.Saturn
|
||||||
LibYabause.libyabause_setsndbuff(SoundHandle.AddrOfPinnedObject());
|
LibYabause.libyabause_setsndbuff(SoundHandle.AddrOfPinnedObject());
|
||||||
AttachedCore = this;
|
AttachedCore = this;
|
||||||
|
|
||||||
// with or without GL, this is the guaranteed frame -1 size.
|
// with or without GL, this is the guaranteed frame -1 size; (unless you do a gl resize)
|
||||||
BufferWidth = 320;
|
BufferWidth = 320;
|
||||||
BufferHeight = 224;
|
BufferHeight = 224;
|
||||||
|
|
||||||
InitMemoryDomains();
|
InitMemoryDomains();
|
||||||
|
|
||||||
|
GLMode = GL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ControllerDefinition ControllerDefinition
|
public ControllerDefinition ControllerDefinition
|
||||||
|
@ -91,6 +93,42 @@ namespace BizHawk.Emulation.Consoles.Sega.Saturn
|
||||||
|
|
||||||
public IController Controller { get; set; }
|
public IController Controller { get; set; }
|
||||||
|
|
||||||
|
public bool GLMode { get; private set; }
|
||||||
|
|
||||||
|
public void SetGLRes(int factor, int width, int height)
|
||||||
|
{
|
||||||
|
if (!GLMode)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (factor < 0) factor = 0;
|
||||||
|
if (factor > 4) factor = 4;
|
||||||
|
|
||||||
|
int maxwidth, maxheight;
|
||||||
|
|
||||||
|
if (factor == 0)
|
||||||
|
{
|
||||||
|
maxwidth = width;
|
||||||
|
maxheight = height;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxwidth = 704 * factor;
|
||||||
|
maxheight = 512 * factor;
|
||||||
|
}
|
||||||
|
if (maxwidth * maxheight > VideoBuffer.Length)
|
||||||
|
{
|
||||||
|
VideoHandle.Free();
|
||||||
|
VideoBuffer = new int[maxwidth * maxheight];
|
||||||
|
VideoHandle = GCHandle.Alloc(VideoBuffer, GCHandleType.Pinned);
|
||||||
|
LibYabause.libyabause_setvidbuff(VideoHandle.AddrOfPinnedObject());
|
||||||
|
}
|
||||||
|
LibYabause.libyabause_glsetnativefactor(factor);
|
||||||
|
if (factor == 0)
|
||||||
|
LibYabause.libyabause_glresize(width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void FrameAdvance(bool render, bool rendersound = true)
|
public void FrameAdvance(bool render, bool rendersound = true)
|
||||||
{
|
{
|
||||||
int w, h, nsamp;
|
int w, h, nsamp;
|
||||||
|
|
|
@ -417,6 +417,12 @@
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="SATTools\SaturnPrefs.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SATTools\SaturnPrefs.Designer.cs">
|
||||||
|
<DependentUpon>SaturnPrefs.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="SNESTools\SNESGameGenie.cs">
|
<Compile Include="SNESTools\SNESGameGenie.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -631,6 +637,9 @@
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="SATTools\SaturnPrefs.resx">
|
||||||
|
<DependentUpon>SaturnPrefs.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="SMStools\SMSGraphicsConfig.resx">
|
<EmbeddedResource Include="SMStools\SMSGraphicsConfig.resx">
|
||||||
<DependentUpon>SMSGraphicsConfig.cs</DependentUpon>
|
<DependentUpon>SMSGraphicsConfig.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|
|
@ -577,6 +577,13 @@ namespace BizHawk.MultiClient
|
||||||
public bool SNES_ShowOBJ3 = true;
|
public bool SNES_ShowOBJ3 = true;
|
||||||
public bool SNES_ShowOBJ4 = true;
|
public bool SNES_ShowOBJ4 = true;
|
||||||
|
|
||||||
|
// SATURN GRAPHICS SETTINGS
|
||||||
|
public bool SaturnUseGL = false;
|
||||||
|
public int SaturnDispFactor = 1;
|
||||||
|
public bool SaturnDispFree = false;
|
||||||
|
public int SaturnGLW = 640;
|
||||||
|
public int SaturnGLH = 480;
|
||||||
|
|
||||||
// PCE Graphics settings
|
// PCE Graphics settings
|
||||||
public bool PCEDispBG1 = true;
|
public bool PCEDispBG1 = true;
|
||||||
public bool PCEDispOBJ1 = true;
|
public bool PCEDispOBJ1 = true;
|
||||||
|
|
|
@ -337,6 +337,8 @@
|
||||||
this.cmiScreenshotClipboard = new System.Windows.Forms.ToolStripMenuItem();
|
this.cmiScreenshotClipboard = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.cmiCloseRom = new System.Windows.Forms.ToolStripMenuItem();
|
this.cmiCloseRom = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.cmiShowMenu = new System.Windows.Forms.ToolStripMenuItem();
|
this.cmiShowMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.saturnToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.preferencesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
this.StatusSlot0.SuspendLayout();
|
this.StatusSlot0.SuspendLayout();
|
||||||
this.contextMenuStrip1.SuspendLayout();
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
|
@ -361,6 +363,7 @@
|
||||||
this.sNESToolStripMenuItem,
|
this.sNESToolStripMenuItem,
|
||||||
this.colecoToolStripMenuItem,
|
this.colecoToolStripMenuItem,
|
||||||
this.n64ToolStripMenuItem,
|
this.n64ToolStripMenuItem,
|
||||||
|
this.saturnToolStripMenuItem,
|
||||||
this.helpToolStripMenuItem});
|
this.helpToolStripMenuItem});
|
||||||
this.menuStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
|
this.menuStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
|
||||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
@ -1319,7 +1322,7 @@
|
||||||
//
|
//
|
||||||
this.controllersToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.GameController;
|
this.controllersToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.GameController;
|
||||||
this.controllersToolStripMenuItem.Name = "controllersToolStripMenuItem";
|
this.controllersToolStripMenuItem.Name = "controllersToolStripMenuItem";
|
||||||
this.controllersToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.controllersToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.controllersToolStripMenuItem.Text = "&Controllers...";
|
this.controllersToolStripMenuItem.Text = "&Controllers...";
|
||||||
this.controllersToolStripMenuItem.Click += new System.EventHandler(this.controllersToolStripMenuItem_Click);
|
this.controllersToolStripMenuItem.Click += new System.EventHandler(this.controllersToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -1327,7 +1330,7 @@
|
||||||
//
|
//
|
||||||
this.hotkeysToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.HotKeys;
|
this.hotkeysToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.HotKeys;
|
||||||
this.hotkeysToolStripMenuItem.Name = "hotkeysToolStripMenuItem";
|
this.hotkeysToolStripMenuItem.Name = "hotkeysToolStripMenuItem";
|
||||||
this.hotkeysToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.hotkeysToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.hotkeysToolStripMenuItem.Text = "&Hotkeys...";
|
this.hotkeysToolStripMenuItem.Text = "&Hotkeys...";
|
||||||
this.hotkeysToolStripMenuItem.Click += new System.EventHandler(this.hotkeysToolStripMenuItem_Click);
|
this.hotkeysToolStripMenuItem.Click += new System.EventHandler(this.hotkeysToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -1335,7 +1338,7 @@
|
||||||
//
|
//
|
||||||
this.messagesToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MessageConfig;
|
this.messagesToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MessageConfig;
|
||||||
this.messagesToolStripMenuItem.Name = "messagesToolStripMenuItem";
|
this.messagesToolStripMenuItem.Name = "messagesToolStripMenuItem";
|
||||||
this.messagesToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.messagesToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.messagesToolStripMenuItem.Text = "&Messages...";
|
this.messagesToolStripMenuItem.Text = "&Messages...";
|
||||||
this.messagesToolStripMenuItem.Click += new System.EventHandler(this.messagesToolStripMenuItem_Click);
|
this.messagesToolStripMenuItem.Click += new System.EventHandler(this.messagesToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -1343,7 +1346,7 @@
|
||||||
//
|
//
|
||||||
this.pathsToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.CopyFolderHS;
|
this.pathsToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.CopyFolderHS;
|
||||||
this.pathsToolStripMenuItem.Name = "pathsToolStripMenuItem";
|
this.pathsToolStripMenuItem.Name = "pathsToolStripMenuItem";
|
||||||
this.pathsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.pathsToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.pathsToolStripMenuItem.Text = "Paths...";
|
this.pathsToolStripMenuItem.Text = "Paths...";
|
||||||
this.pathsToolStripMenuItem.Click += new System.EventHandler(this.pathsToolStripMenuItem_Click);
|
this.pathsToolStripMenuItem.Click += new System.EventHandler(this.pathsToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -1351,7 +1354,7 @@
|
||||||
//
|
//
|
||||||
this.soundToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.AudioHS;
|
this.soundToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.AudioHS;
|
||||||
this.soundToolStripMenuItem.Name = "soundToolStripMenuItem";
|
this.soundToolStripMenuItem.Name = "soundToolStripMenuItem";
|
||||||
this.soundToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.soundToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.soundToolStripMenuItem.Text = "&Sound...";
|
this.soundToolStripMenuItem.Text = "&Sound...";
|
||||||
this.soundToolStripMenuItem.Click += new System.EventHandler(this.soundToolStripMenuItem_Click);
|
this.soundToolStripMenuItem.Click += new System.EventHandler(this.soundToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -1359,14 +1362,14 @@
|
||||||
//
|
//
|
||||||
this.autofireToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Lightning;
|
this.autofireToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Lightning;
|
||||||
this.autofireToolStripMenuItem.Name = "autofireToolStripMenuItem";
|
this.autofireToolStripMenuItem.Name = "autofireToolStripMenuItem";
|
||||||
this.autofireToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.autofireToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.autofireToolStripMenuItem.Text = "&Autofire...";
|
this.autofireToolStripMenuItem.Text = "&Autofire...";
|
||||||
this.autofireToolStripMenuItem.Click += new System.EventHandler(this.autofireToolStripMenuItem_Click);
|
this.autofireToolStripMenuItem.Click += new System.EventHandler(this.autofireToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator9
|
// toolStripSeparator9
|
||||||
//
|
//
|
||||||
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
||||||
this.toolStripSeparator9.Size = new System.Drawing.Size(149, 6);
|
this.toolStripSeparator9.Size = new System.Drawing.Size(147, 6);
|
||||||
//
|
//
|
||||||
// enableToolStripMenuItem
|
// enableToolStripMenuItem
|
||||||
//
|
//
|
||||||
|
@ -1379,7 +1382,7 @@
|
||||||
this.frameAdvanceSkipLagFramesToolStripMenuItem,
|
this.frameAdvanceSkipLagFramesToolStripMenuItem,
|
||||||
this.backupSaveramToolStripMenuItem});
|
this.backupSaveramToolStripMenuItem});
|
||||||
this.enableToolStripMenuItem.Name = "enableToolStripMenuItem";
|
this.enableToolStripMenuItem.Name = "enableToolStripMenuItem";
|
||||||
this.enableToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.enableToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.enableToolStripMenuItem.Text = "&Enable";
|
this.enableToolStripMenuItem.Text = "&Enable";
|
||||||
this.enableToolStripMenuItem.DropDownOpened += new System.EventHandler(this.enableToolStripMenuItem_DropDownOpened);
|
this.enableToolStripMenuItem.DropDownOpened += new System.EventHandler(this.enableToolStripMenuItem_DropDownOpened);
|
||||||
//
|
//
|
||||||
|
@ -1450,7 +1453,7 @@
|
||||||
this.toolStripSeparator23,
|
this.toolStripSeparator23,
|
||||||
this.logWindowAsConsoleToolStripMenuItem});
|
this.logWindowAsConsoleToolStripMenuItem});
|
||||||
this.gUIToolStripMenuItem.Name = "gUIToolStripMenuItem";
|
this.gUIToolStripMenuItem.Name = "gUIToolStripMenuItem";
|
||||||
this.gUIToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.gUIToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.gUIToolStripMenuItem.Text = "GUI";
|
this.gUIToolStripMenuItem.Text = "GUI";
|
||||||
this.gUIToolStripMenuItem.DropDownOpened += new System.EventHandler(this.gUIToolStripMenuItem_DropDownOpened);
|
this.gUIToolStripMenuItem.DropDownOpened += new System.EventHandler(this.gUIToolStripMenuItem_DropDownOpened);
|
||||||
//
|
//
|
||||||
|
@ -1575,7 +1578,7 @@
|
||||||
this.miSpeed150,
|
this.miSpeed150,
|
||||||
this.miSpeed200});
|
this.miSpeed200});
|
||||||
this.frameSkipToolStripMenuItem.Name = "frameSkipToolStripMenuItem";
|
this.frameSkipToolStripMenuItem.Name = "frameSkipToolStripMenuItem";
|
||||||
this.frameSkipToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.frameSkipToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.frameSkipToolStripMenuItem.Text = "Speed/Skip";
|
this.frameSkipToolStripMenuItem.Text = "Speed/Skip";
|
||||||
this.frameSkipToolStripMenuItem.DropDownOpened += new System.EventHandler(this.frameSkipToolStripMenuItem_DropDownOpened);
|
this.frameSkipToolStripMenuItem.DropDownOpened += new System.EventHandler(this.frameSkipToolStripMenuItem_DropDownOpened);
|
||||||
//
|
//
|
||||||
|
@ -1742,7 +1745,7 @@
|
||||||
this.inputOverridesHotkeysToolStripMenuItem,
|
this.inputOverridesHotkeysToolStripMenuItem,
|
||||||
this.hotkeysOverrideInputToolStripMenuItem});
|
this.hotkeysOverrideInputToolStripMenuItem});
|
||||||
this.keyPriorityToolStripMenuItem.Name = "keyPriorityToolStripMenuItem";
|
this.keyPriorityToolStripMenuItem.Name = "keyPriorityToolStripMenuItem";
|
||||||
this.keyPriorityToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.keyPriorityToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.keyPriorityToolStripMenuItem.Text = "Key Priority";
|
this.keyPriorityToolStripMenuItem.Text = "Key Priority";
|
||||||
this.keyPriorityToolStripMenuItem.DropDownOpened += new System.EventHandler(this.keyPriorityToolStripMenuItem_DropDownOpened);
|
this.keyPriorityToolStripMenuItem.DropDownOpened += new System.EventHandler(this.keyPriorityToolStripMenuItem_DropDownOpened);
|
||||||
//
|
//
|
||||||
|
@ -1774,41 +1777,41 @@
|
||||||
this.binaryToolStripMenuItem,
|
this.binaryToolStripMenuItem,
|
||||||
this.textToolStripMenuItem});
|
this.textToolStripMenuItem});
|
||||||
this.savestateTypeToolStripMenuItem.Name = "savestateTypeToolStripMenuItem";
|
this.savestateTypeToolStripMenuItem.Name = "savestateTypeToolStripMenuItem";
|
||||||
this.savestateTypeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.savestateTypeToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.savestateTypeToolStripMenuItem.Text = "Savestate Type";
|
this.savestateTypeToolStripMenuItem.Text = "Savestate Type";
|
||||||
this.savestateTypeToolStripMenuItem.DropDownOpened += new System.EventHandler(this.savestateTypeToolStripMenuItem_DropDownOpened);
|
this.savestateTypeToolStripMenuItem.DropDownOpened += new System.EventHandler(this.savestateTypeToolStripMenuItem_DropDownOpened);
|
||||||
//
|
//
|
||||||
// defaultToolStripMenuItem
|
// defaultToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.defaultToolStripMenuItem.Name = "defaultToolStripMenuItem";
|
this.defaultToolStripMenuItem.Name = "defaultToolStripMenuItem";
|
||||||
this.defaultToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.defaultToolStripMenuItem.Size = new System.Drawing.Size(109, 22);
|
||||||
this.defaultToolStripMenuItem.Text = "Default";
|
this.defaultToolStripMenuItem.Text = "Default";
|
||||||
this.defaultToolStripMenuItem.Click += new System.EventHandler(this.defaultToolStripMenuItem_Click);
|
this.defaultToolStripMenuItem.Click += new System.EventHandler(this.defaultToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// binaryToolStripMenuItem
|
// binaryToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.binaryToolStripMenuItem.Name = "binaryToolStripMenuItem";
|
this.binaryToolStripMenuItem.Name = "binaryToolStripMenuItem";
|
||||||
this.binaryToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.binaryToolStripMenuItem.Size = new System.Drawing.Size(109, 22);
|
||||||
this.binaryToolStripMenuItem.Text = "Binary";
|
this.binaryToolStripMenuItem.Text = "Binary";
|
||||||
this.binaryToolStripMenuItem.Click += new System.EventHandler(this.binaryToolStripMenuItem_Click);
|
this.binaryToolStripMenuItem.Click += new System.EventHandler(this.binaryToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// textToolStripMenuItem
|
// textToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.textToolStripMenuItem.Name = "textToolStripMenuItem";
|
this.textToolStripMenuItem.Name = "textToolStripMenuItem";
|
||||||
this.textToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.textToolStripMenuItem.Size = new System.Drawing.Size(109, 22);
|
||||||
this.textToolStripMenuItem.Text = "Text";
|
this.textToolStripMenuItem.Text = "Text";
|
||||||
this.textToolStripMenuItem.Click += new System.EventHandler(this.textToolStripMenuItem_Click);
|
this.textToolStripMenuItem.Click += new System.EventHandler(this.textToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator10
|
// toolStripSeparator10
|
||||||
//
|
//
|
||||||
this.toolStripSeparator10.Name = "toolStripSeparator10";
|
this.toolStripSeparator10.Name = "toolStripSeparator10";
|
||||||
this.toolStripSeparator10.Size = new System.Drawing.Size(149, 6);
|
this.toolStripSeparator10.Size = new System.Drawing.Size(147, 6);
|
||||||
//
|
//
|
||||||
// saveConfigToolStripMenuItem
|
// saveConfigToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.saveConfigToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Save;
|
this.saveConfigToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Save;
|
||||||
this.saveConfigToolStripMenuItem.Name = "saveConfigToolStripMenuItem";
|
this.saveConfigToolStripMenuItem.Name = "saveConfigToolStripMenuItem";
|
||||||
this.saveConfigToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.saveConfigToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.saveConfigToolStripMenuItem.Text = "Save Config";
|
this.saveConfigToolStripMenuItem.Text = "Save Config";
|
||||||
this.saveConfigToolStripMenuItem.Click += new System.EventHandler(this.saveConfigToolStripMenuItem_Click);
|
this.saveConfigToolStripMenuItem.Click += new System.EventHandler(this.saveConfigToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -1816,7 +1819,7 @@
|
||||||
//
|
//
|
||||||
this.loadConfigToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.LoadConfig;
|
this.loadConfigToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.LoadConfig;
|
||||||
this.loadConfigToolStripMenuItem.Name = "loadConfigToolStripMenuItem";
|
this.loadConfigToolStripMenuItem.Name = "loadConfigToolStripMenuItem";
|
||||||
this.loadConfigToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.loadConfigToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||||
this.loadConfigToolStripMenuItem.Text = "Load Config";
|
this.loadConfigToolStripMenuItem.Text = "Load Config";
|
||||||
this.loadConfigToolStripMenuItem.Click += new System.EventHandler(this.loadConfigToolStripMenuItem_Click);
|
this.loadConfigToolStripMenuItem.Click += new System.EventHandler(this.loadConfigToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
@ -2926,6 +2929,21 @@
|
||||||
this.cmiShowMenu.Text = "Show Menu";
|
this.cmiShowMenu.Text = "Show Menu";
|
||||||
this.cmiShowMenu.Click += new System.EventHandler(this.showMenuToolStripMenuItem_Click);
|
this.cmiShowMenu.Click += new System.EventHandler(this.showMenuToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
// saturnToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.saturnToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.preferencesToolStripMenuItem});
|
||||||
|
this.saturnToolStripMenuItem.Name = "saturnToolStripMenuItem";
|
||||||
|
this.saturnToolStripMenuItem.Size = new System.Drawing.Size(51, 17);
|
||||||
|
this.saturnToolStripMenuItem.Text = "Saturn";
|
||||||
|
//
|
||||||
|
// preferencesToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.preferencesToolStripMenuItem.Name = "preferencesToolStripMenuItem";
|
||||||
|
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||||
|
this.preferencesToolStripMenuItem.Text = "Preferences...";
|
||||||
|
this.preferencesToolStripMenuItem.Click += new System.EventHandler(this.preferencesToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
|
||||||
|
@ -3274,6 +3292,8 @@
|
||||||
private System.Windows.Forms.ToolStripMenuItem defaultToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem defaultToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem binaryToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem binaryToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem textToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem textToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem saturnToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem preferencesToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1789,6 +1789,7 @@ namespace BizHawk.MultiClient
|
||||||
sNESToolStripMenuItem.Visible = false;
|
sNESToolStripMenuItem.Visible = false;
|
||||||
colecoToolStripMenuItem.Visible = false;
|
colecoToolStripMenuItem.Visible = false;
|
||||||
n64ToolStripMenuItem.Visible = false;
|
n64ToolStripMenuItem.Visible = false;
|
||||||
|
saturnToolStripMenuItem.Visible = false;
|
||||||
|
|
||||||
switch (system)
|
switch (system)
|
||||||
{
|
{
|
||||||
|
@ -1840,6 +1841,9 @@ namespace BizHawk.MultiClient
|
||||||
case "N64":
|
case "N64":
|
||||||
n64ToolStripMenuItem.Visible = true;
|
n64ToolStripMenuItem.Visible = true;
|
||||||
break;
|
break;
|
||||||
|
case "SAT":
|
||||||
|
saturnToolStripMenuItem.Visible = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1881,6 +1885,26 @@ namespace BizHawk.MultiClient
|
||||||
NESSpeicalMenuAdd("Insert Coin 2", "VS Coin 2", "Coin 2 inserted.");
|
NESSpeicalMenuAdd("Insert Coin 2", "VS Coin 2", "Coin 2 inserted.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SaturnSetPrefs(Emulation.Consoles.Sega.Saturn.Yabause e = null)
|
||||||
|
{
|
||||||
|
if (e == null)
|
||||||
|
e = Global.Emulator as Emulation.Consoles.Sega.Saturn.Yabause;
|
||||||
|
|
||||||
|
if (Global.Config.SaturnUseGL != e.GLMode)
|
||||||
|
{
|
||||||
|
// theoretically possible; not coded. meh.
|
||||||
|
FlagNeedsReboot();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (e.GLMode && Global.Config.SaturnUseGL)
|
||||||
|
{
|
||||||
|
if (Global.Config.SaturnDispFree)
|
||||||
|
e.SetGLRes(0, Global.Config.SaturnGLW, Global.Config.SaturnGLH);
|
||||||
|
else
|
||||||
|
e.SetGLRes(Global.Config.SaturnDispFactor, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SyncControls()
|
void SyncControls()
|
||||||
{
|
{
|
||||||
if (Global.Game == null) return;
|
if (Global.Game == null) return;
|
||||||
|
@ -2098,8 +2122,9 @@ namespace BizHawk.MultiClient
|
||||||
MessageBox.Show("Saturn BIOS not found. Please check firmware configurations.");
|
MessageBox.Show("Saturn BIOS not found. Please check firmware configurations.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var saturn = new Emulation.Consoles.Sega.Saturn.Yabause(nextComm, disc, File.ReadAllBytes(biosPath));
|
var saturn = new Emulation.Consoles.Sega.Saturn.Yabause(nextComm, disc, File.ReadAllBytes(biosPath), Global.Config.SaturnUseGL);
|
||||||
nextEmulator = saturn;
|
nextEmulator = saturn;
|
||||||
|
SaturnSetPrefs(saturn);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -5534,5 +5559,17 @@ namespace BizHawk.MultiClient
|
||||||
Global.Config.SaveStateType = Config.SaveStateTypeE.Text;
|
Global.Config.SaveStateType = Config.SaveStateTypeE.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void preferencesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
using (var dlg = new SATTools.SaturnPrefs())
|
||||||
|
{
|
||||||
|
var result = dlg.ShowDialog(this);
|
||||||
|
if (result == System.Windows.Forms.DialogResult.OK)
|
||||||
|
{
|
||||||
|
SaturnSetPrefs();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,265 @@
|
||||||
|
namespace BizHawk.MultiClient.SATTools
|
||||||
|
{
|
||||||
|
partial class SaturnPrefs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.radioButtonSoft = new System.Windows.Forms.RadioButton();
|
||||||
|
this.radioButtonGL = new System.Windows.Forms.RadioButton();
|
||||||
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.radioButtonFactor = new System.Windows.Forms.RadioButton();
|
||||||
|
this.radioButtonFree = new System.Windows.Forms.RadioButton();
|
||||||
|
this.numericUpDownFactor = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.buttonOK = new System.Windows.Forms.Button();
|
||||||
|
this.buttonCancel = new System.Windows.Forms.Button();
|
||||||
|
this.groupBox1.SuspendLayout();
|
||||||
|
this.groupBox2.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDownFactor)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// groupBox1
|
||||||
|
//
|
||||||
|
this.groupBox1.Controls.Add(this.radioButtonGL);
|
||||||
|
this.groupBox1.Controls.Add(this.radioButtonSoft);
|
||||||
|
this.groupBox1.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.groupBox1.Name = "groupBox1";
|
||||||
|
this.groupBox1.Size = new System.Drawing.Size(111, 100);
|
||||||
|
this.groupBox1.TabIndex = 0;
|
||||||
|
this.groupBox1.TabStop = false;
|
||||||
|
this.groupBox1.Text = "Render Type";
|
||||||
|
//
|
||||||
|
// radioButtonSoft
|
||||||
|
//
|
||||||
|
this.radioButtonSoft.AutoSize = true;
|
||||||
|
this.radioButtonSoft.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.radioButtonSoft.Name = "radioButtonSoft";
|
||||||
|
this.radioButtonSoft.Size = new System.Drawing.Size(67, 17);
|
||||||
|
this.radioButtonSoft.TabIndex = 0;
|
||||||
|
this.radioButtonSoft.TabStop = true;
|
||||||
|
this.radioButtonSoft.Text = "Software";
|
||||||
|
this.radioButtonSoft.UseVisualStyleBackColor = true;
|
||||||
|
this.radioButtonSoft.CheckedChanged += new System.EventHandler(this.radioButtonSoft_CheckedChanged);
|
||||||
|
//
|
||||||
|
// radioButtonGL
|
||||||
|
//
|
||||||
|
this.radioButtonGL.AutoSize = true;
|
||||||
|
this.radioButtonGL.Location = new System.Drawing.Point(6, 42);
|
||||||
|
this.radioButtonGL.Name = "radioButtonGL";
|
||||||
|
this.radioButtonGL.Size = new System.Drawing.Size(68, 17);
|
||||||
|
this.radioButtonGL.TabIndex = 1;
|
||||||
|
this.radioButtonGL.TabStop = true;
|
||||||
|
this.radioButtonGL.Text = "Open GL";
|
||||||
|
this.radioButtonGL.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// groupBox2
|
||||||
|
//
|
||||||
|
this.groupBox2.Controls.Add(this.label1);
|
||||||
|
this.groupBox2.Controls.Add(this.numericUpDown2);
|
||||||
|
this.groupBox2.Controls.Add(this.numericUpDown1);
|
||||||
|
this.groupBox2.Controls.Add(this.numericUpDownFactor);
|
||||||
|
this.groupBox2.Controls.Add(this.radioButtonFree);
|
||||||
|
this.groupBox2.Controls.Add(this.radioButtonFactor);
|
||||||
|
this.groupBox2.Location = new System.Drawing.Point(129, 12);
|
||||||
|
this.groupBox2.Name = "groupBox2";
|
||||||
|
this.groupBox2.Size = new System.Drawing.Size(254, 100);
|
||||||
|
this.groupBox2.TabIndex = 1;
|
||||||
|
this.groupBox2.TabStop = false;
|
||||||
|
this.groupBox2.Text = "Render Resolution";
|
||||||
|
//
|
||||||
|
// radioButtonFactor
|
||||||
|
//
|
||||||
|
this.radioButtonFactor.AutoSize = true;
|
||||||
|
this.radioButtonFactor.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.radioButtonFactor.Name = "radioButtonFactor";
|
||||||
|
this.radioButtonFactor.Size = new System.Drawing.Size(107, 17);
|
||||||
|
this.radioButtonFactor.TabIndex = 0;
|
||||||
|
this.radioButtonFactor.TabStop = true;
|
||||||
|
this.radioButtonFactor.Text = "Multiple of Native";
|
||||||
|
this.radioButtonFactor.UseVisualStyleBackColor = true;
|
||||||
|
this.radioButtonFactor.CheckedChanged += new System.EventHandler(this.radioButtonFactor_CheckedChanged);
|
||||||
|
//
|
||||||
|
// radioButtonFree
|
||||||
|
//
|
||||||
|
this.radioButtonFree.AutoSize = true;
|
||||||
|
this.radioButtonFree.Location = new System.Drawing.Point(6, 42);
|
||||||
|
this.radioButtonFree.Name = "radioButtonFree";
|
||||||
|
this.radioButtonFree.Size = new System.Drawing.Size(63, 17);
|
||||||
|
this.radioButtonFree.TabIndex = 1;
|
||||||
|
this.radioButtonFree.TabStop = true;
|
||||||
|
this.radioButtonFree.Text = "Specific";
|
||||||
|
this.radioButtonFree.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// numericUpDownFactor
|
||||||
|
//
|
||||||
|
this.numericUpDownFactor.Location = new System.Drawing.Point(119, 19);
|
||||||
|
this.numericUpDownFactor.Maximum = new decimal(new int[] {
|
||||||
|
4,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.numericUpDownFactor.Minimum = new decimal(new int[] {
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.numericUpDownFactor.Name = "numericUpDownFactor";
|
||||||
|
this.numericUpDownFactor.Size = new System.Drawing.Size(64, 20);
|
||||||
|
this.numericUpDownFactor.TabIndex = 2;
|
||||||
|
this.numericUpDownFactor.Value = new decimal(new int[] {
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
//
|
||||||
|
// numericUpDown1
|
||||||
|
//
|
||||||
|
this.numericUpDown1.Increment = new decimal(new int[] {
|
||||||
|
8,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.numericUpDown1.Location = new System.Drawing.Point(75, 42);
|
||||||
|
this.numericUpDown1.Maximum = new decimal(new int[] {
|
||||||
|
2048,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.numericUpDown1.Minimum = new decimal(new int[] {
|
||||||
|
320,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.numericUpDown1.Name = "numericUpDown1";
|
||||||
|
this.numericUpDown1.Size = new System.Drawing.Size(67, 20);
|
||||||
|
this.numericUpDown1.TabIndex = 3;
|
||||||
|
this.numericUpDown1.Value = new decimal(new int[] {
|
||||||
|
320,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
//
|
||||||
|
// numericUpDown2
|
||||||
|
//
|
||||||
|
this.numericUpDown2.Increment = new decimal(new int[] {
|
||||||
|
8,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.numericUpDown2.Location = new System.Drawing.Point(166, 42);
|
||||||
|
this.numericUpDown2.Maximum = new decimal(new int[] {
|
||||||
|
1024,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.numericUpDown2.Minimum = new decimal(new int[] {
|
||||||
|
224,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.numericUpDown2.Name = "numericUpDown2";
|
||||||
|
this.numericUpDown2.Size = new System.Drawing.Size(76, 20);
|
||||||
|
this.numericUpDown2.TabIndex = 4;
|
||||||
|
this.numericUpDown2.Value = new decimal(new int[] {
|
||||||
|
224,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(148, 49);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(14, 13);
|
||||||
|
this.label1.TabIndex = 5;
|
||||||
|
this.label1.Text = "X";
|
||||||
|
//
|
||||||
|
// buttonOK
|
||||||
|
//
|
||||||
|
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
|
this.buttonOK.Location = new System.Drawing.Point(101, 118);
|
||||||
|
this.buttonOK.Name = "buttonOK";
|
||||||
|
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.buttonOK.TabIndex = 2;
|
||||||
|
this.buttonOK.Text = "OK";
|
||||||
|
this.buttonOK.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
|
this.buttonCancel.Location = new System.Drawing.Point(216, 118);
|
||||||
|
this.buttonCancel.Name = "buttonCancel";
|
||||||
|
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.buttonCancel.TabIndex = 3;
|
||||||
|
this.buttonCancel.Text = "Cancel";
|
||||||
|
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// SaturnPrefs
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(395, 273);
|
||||||
|
this.Controls.Add(this.buttonCancel);
|
||||||
|
this.Controls.Add(this.buttonOK);
|
||||||
|
this.Controls.Add(this.groupBox2);
|
||||||
|
this.Controls.Add(this.groupBox1);
|
||||||
|
this.Name = "SaturnPrefs";
|
||||||
|
this.Text = "SaturnPrefs";
|
||||||
|
this.groupBox1.ResumeLayout(false);
|
||||||
|
this.groupBox1.PerformLayout();
|
||||||
|
this.groupBox2.ResumeLayout(false);
|
||||||
|
this.groupBox2.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDownFactor)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.GroupBox groupBox1;
|
||||||
|
private System.Windows.Forms.RadioButton radioButtonGL;
|
||||||
|
private System.Windows.Forms.RadioButton radioButtonSoft;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox2;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.NumericUpDown numericUpDown2;
|
||||||
|
private System.Windows.Forms.NumericUpDown numericUpDown1;
|
||||||
|
private System.Windows.Forms.NumericUpDown numericUpDownFactor;
|
||||||
|
private System.Windows.Forms.RadioButton radioButtonFree;
|
||||||
|
private System.Windows.Forms.RadioButton radioButtonFactor;
|
||||||
|
private System.Windows.Forms.Button buttonOK;
|
||||||
|
private System.Windows.Forms.Button buttonCancel;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace BizHawk.MultiClient.SATTools
|
||||||
|
{
|
||||||
|
public partial class SaturnPrefs : Form
|
||||||
|
{
|
||||||
|
public SaturnPrefs()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
radioButtonGL.Checked = Global.Config.SaturnUseGL;
|
||||||
|
radioButtonSoft.Checked = !Global.Config.SaturnUseGL;
|
||||||
|
radioButtonFree.Checked = Global.Config.SaturnDispFree;
|
||||||
|
radioButtonFactor.Checked = !Global.Config.SaturnDispFree;
|
||||||
|
numericUpDownFactor.Value = Global.Config.SaturnDispFactor;
|
||||||
|
numericUpDown1.Value = Global.Config.SaturnGLW;
|
||||||
|
numericUpDown2.Value = Global.Config.SaturnGLH;
|
||||||
|
}
|
||||||
|
catch (ArgumentOutOfRangeException)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void radioButtonSoft_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
groupBox2.Enabled = radioButtonGL.Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void radioButtonFactor_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
numericUpDownFactor.Enabled = radioButtonFactor.Checked;
|
||||||
|
numericUpDown1.Enabled = numericUpDown2.Enabled = radioButtonFree.Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonOK_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Global.Config.SaturnUseGL = radioButtonGL.Checked;
|
||||||
|
Global.Config.SaturnDispFree = radioButtonFree.Checked;
|
||||||
|
Global.Config.SaturnDispFactor = (int)numericUpDownFactor.Value;
|
||||||
|
Global.Config.SaturnGLW = (int)numericUpDown1.Value;
|
||||||
|
Global.Config.SaturnGLH = (int)numericUpDown2.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
Binary file not shown.
|
@ -467,12 +467,39 @@ extern "C" __declspec(dllexport) void libyabause_setpads(u8 p11, u8 p12, u8 p21,
|
||||||
ctrl2->padbits[1] = p22;
|
ctrl2->padbits[1] = p22;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int glnativefactor = 0;
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void libyabause_glresize(int w, int h)
|
extern "C" __declspec(dllexport) void libyabause_glresize(int w, int h)
|
||||||
{
|
{
|
||||||
if (usinggl)
|
if (usinggl && !glnativefactor)
|
||||||
VIDCore->Resize(w, h, 0);
|
VIDCore->Resize(w, h, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" __declspec(dllexport) void libyabause_glsetnativefactor(int n)
|
||||||
|
{
|
||||||
|
if (!usinggl)
|
||||||
|
return;
|
||||||
|
if (n > 4)
|
||||||
|
n = 4;
|
||||||
|
if (n < 0)
|
||||||
|
n = 0;
|
||||||
|
glnativefactor = n;
|
||||||
|
if (n)
|
||||||
|
VIDCore->Resize(vdp2width_gl * n, vdp2height_gl * n, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void (*vdp2hookfcn)(u16 v) = NULL;
|
||||||
|
|
||||||
|
void vdp2newhook(u16 v)
|
||||||
|
{
|
||||||
|
vdp2hookfcn(v);
|
||||||
|
if (glnativefactor)
|
||||||
|
{
|
||||||
|
if (glwidth != vdp2width_gl * glnativefactor || glheight != vdp2height_gl * glnativefactor)
|
||||||
|
VIDCore->Resize(vdp2width_gl * glnativefactor, vdp2height_gl * glnativefactor, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) int libyabause_init(CDInterface *_CD, const char *biosfn, int usegl)
|
extern "C" __declspec(dllexport) int libyabause_init(CDInterface *_CD, const char *biosfn, int usegl)
|
||||||
{
|
{
|
||||||
usinggl = usegl;
|
usinggl = usegl;
|
||||||
|
@ -514,6 +541,13 @@ extern "C" __declspec(dllexport) int libyabause_init(CDInterface *_CD, const cha
|
||||||
yinit.netlinksetting = NULL;
|
yinit.netlinksetting = NULL;
|
||||||
yinit.videoformattype = VIDEOFORMATTYPE_NTSC;
|
yinit.videoformattype = VIDEOFORMATTYPE_NTSC;
|
||||||
|
|
||||||
|
if (usegl && !vdp2hookfcn)
|
||||||
|
{
|
||||||
|
// hook vdp2setresolution
|
||||||
|
vdp2hookfcn = VIDOGL.Vdp2SetResolution;
|
||||||
|
VIDOGL.Vdp2SetResolution = vdp2newhook;
|
||||||
|
}
|
||||||
|
|
||||||
if (YabauseInit(&yinit) != 0)
|
if (YabauseInit(&yinit) != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -127,8 +127,8 @@ int vdp1cor=0;
|
||||||
int vdp1cog=0;
|
int vdp1cog=0;
|
||||||
int vdp1cob=0;
|
int vdp1cob=0;
|
||||||
|
|
||||||
static int vdp2width;
|
int vdp2width_gl;
|
||||||
static int vdp2height;
|
int vdp2height_gl;
|
||||||
static int nbg0priority=0;
|
static int nbg0priority=0;
|
||||||
static int nbg1priority=0;
|
static int nbg1priority=0;
|
||||||
static int nbg2priority=0;
|
static int nbg2priority=0;
|
||||||
|
@ -910,24 +910,24 @@ static void Vdp2GenerateWindowInfo(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
// resize to fit resolusion
|
// resize to fit resolusion
|
||||||
if( m_vWindinfo0_size != vdp2height )
|
if( m_vWindinfo0_size != vdp2height_gl )
|
||||||
{
|
{
|
||||||
if(m_vWindinfo0 != NULL) free(m_vWindinfo0);
|
if(m_vWindinfo0 != NULL) free(m_vWindinfo0);
|
||||||
m_vWindinfo0 = (vdp2WindowInfo*)malloc(sizeof(vdp2WindowInfo)*(vdp2height+8));
|
m_vWindinfo0 = (vdp2WindowInfo*)malloc(sizeof(vdp2WindowInfo)*(vdp2height_gl+8));
|
||||||
|
|
||||||
for( i=0; i<vdp2height; i++ )
|
for( i=0; i<vdp2height_gl; i++ )
|
||||||
{
|
{
|
||||||
m_vWindinfo0[i].WinShowLine = 1;
|
m_vWindinfo0[i].WinShowLine = 1;
|
||||||
m_vWindinfo0[i].WinHStart = 0;
|
m_vWindinfo0[i].WinHStart = 0;
|
||||||
m_vWindinfo0[i].WinHEnd = 1024;
|
m_vWindinfo0[i].WinHEnd = 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_vWindinfo0_size = vdp2height;
|
m_vWindinfo0_size = vdp2height_gl;
|
||||||
m_b0WindowChg = 1;
|
m_b0WindowChg = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
HShift = 0;
|
HShift = 0;
|
||||||
if( vdp2width>=640 ) HShift = 0; else HShift = 1;
|
if( vdp2width_gl>=640 ) HShift = 0; else HShift = 1;
|
||||||
|
|
||||||
|
|
||||||
// Line Table mode
|
// Line Table mode
|
||||||
|
@ -940,7 +940,7 @@ static void Vdp2GenerateWindowInfo(void)
|
||||||
LineWinAddr = (u32)((( (Vdp2Regs->LWTA0.part.U & 0x07) << 15) | (Vdp2Regs->LWTA0.part.L >> 1) ) << 2);
|
LineWinAddr = (u32)((( (Vdp2Regs->LWTA0.part.U & 0x07) << 15) | (Vdp2Regs->LWTA0.part.L >> 1) ) << 2);
|
||||||
_Ygl->win0_vertexcnt = 0;
|
_Ygl->win0_vertexcnt = 0;
|
||||||
|
|
||||||
for( v = 0; v < vdp2height; v++ )
|
for( v = 0; v < vdp2height_gl; v++ )
|
||||||
{
|
{
|
||||||
if( v < Vdp2Regs->WPSY0 || v > Vdp2Regs->WPEY0 )
|
if( v < Vdp2Regs->WPSY0 || v > Vdp2Regs->WPEY0 )
|
||||||
{
|
{
|
||||||
|
@ -1016,7 +1016,7 @@ static void Vdp2GenerateWindowInfo(void)
|
||||||
m_b0WindowChg = 1;
|
m_b0WindowChg = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for( v = 0; v < vdp2height; v++ )
|
for( v = 0; v < vdp2height_gl; v++ )
|
||||||
{
|
{
|
||||||
|
|
||||||
m_vWindinfo0[v].WinHStart = Vdp2Regs->WPSX0 >> HShift;
|
m_vWindinfo0[v].WinHStart = Vdp2Regs->WPSX0 >> HShift;
|
||||||
|
@ -1068,23 +1068,23 @@ static void Vdp2GenerateWindowInfo(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
// resize to fit resolution
|
// resize to fit resolution
|
||||||
if( m_vWindinfo1_size != vdp2height )
|
if( m_vWindinfo1_size != vdp2height_gl )
|
||||||
{
|
{
|
||||||
if(m_vWindinfo1 != NULL) free(m_vWindinfo1);
|
if(m_vWindinfo1 != NULL) free(m_vWindinfo1);
|
||||||
m_vWindinfo1 = (vdp2WindowInfo*)malloc(sizeof(vdp2WindowInfo)*vdp2height);
|
m_vWindinfo1 = (vdp2WindowInfo*)malloc(sizeof(vdp2WindowInfo)*vdp2height_gl);
|
||||||
|
|
||||||
for( i=0; i<vdp2height; i++ )
|
for( i=0; i<vdp2height_gl; i++ )
|
||||||
{
|
{
|
||||||
m_vWindinfo1[i].WinShowLine = 1;
|
m_vWindinfo1[i].WinShowLine = 1;
|
||||||
m_vWindinfo1[i].WinHStart = 0;
|
m_vWindinfo1[i].WinHStart = 0;
|
||||||
m_vWindinfo1[i].WinHEnd = 1024;
|
m_vWindinfo1[i].WinHEnd = 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_vWindinfo1_size = vdp2height;
|
m_vWindinfo1_size = vdp2height_gl;
|
||||||
m_b1WindowChg = 1;
|
m_b1WindowChg = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( vdp2width>=640 ) HShift = 0; else HShift = 1;
|
if( vdp2width_gl>=640 ) HShift = 0; else HShift = 1;
|
||||||
|
|
||||||
|
|
||||||
// LineTable mode
|
// LineTable mode
|
||||||
|
@ -1097,7 +1097,7 @@ static void Vdp2GenerateWindowInfo(void)
|
||||||
// start address for Window table
|
// start address for Window table
|
||||||
LineWinAddr = (u32)((( (Vdp2Regs->LWTA1.part.U & 0x07) << 15) | (Vdp2Regs->LWTA1.part.L >> 1) ) << 2);
|
LineWinAddr = (u32)((( (Vdp2Regs->LWTA1.part.U & 0x07) << 15) | (Vdp2Regs->LWTA1.part.L >> 1) ) << 2);
|
||||||
|
|
||||||
for( v = 0; v < vdp2height; v++ )
|
for( v = 0; v < vdp2height_gl; v++ )
|
||||||
{
|
{
|
||||||
if( v < Vdp2Regs->WPSY1 || v > Vdp2Regs->WPEY1 )
|
if( v < Vdp2Regs->WPSY1 || v > Vdp2Regs->WPEY1 )
|
||||||
{
|
{
|
||||||
|
@ -1169,7 +1169,7 @@ static void Vdp2GenerateWindowInfo(void)
|
||||||
m_b1WindowChg = 1;
|
m_b1WindowChg = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for( v = 0; v < vdp2height; v++ )
|
for( v = 0; v < vdp2height_gl; v++ )
|
||||||
{
|
{
|
||||||
m_vWindinfo1[v].WinHStart = Vdp2Regs->WPSX1 >> HShift;
|
m_vWindinfo1[v].WinHStart = Vdp2Regs->WPSX1 >> HShift;
|
||||||
m_vWindinfo1[v].WinHEnd = Vdp2Regs->WPEX1 >> HShift;
|
m_vWindinfo1[v].WinHEnd = Vdp2Regs->WPEX1 >> HShift;
|
||||||
|
@ -1326,7 +1326,7 @@ void Vdp2GenLineinfo( vdp2draw_struct *info )
|
||||||
if( VDPLINE_SX(info->islinescroll)) bound += 0x04;
|
if( VDPLINE_SX(info->islinescroll)) bound += 0x04;
|
||||||
if( VDPLINE_SZ(info->islinescroll)) bound += 0x04;
|
if( VDPLINE_SZ(info->islinescroll)) bound += 0x04;
|
||||||
|
|
||||||
for( i = 0; i < vdp2height; i += info->lineinc )
|
for( i = 0; i < vdp2height_gl; i += info->lineinc )
|
||||||
{
|
{
|
||||||
index = 0;
|
index = 0;
|
||||||
if( VDPLINE_SX(info->islinescroll))
|
if( VDPLINE_SX(info->islinescroll))
|
||||||
|
@ -1575,7 +1575,7 @@ static void Vdp2DrawPattern(vdp2draw_struct *info, YglTexture *texture)
|
||||||
|
|
||||||
|
|
||||||
// Screen culling
|
// Screen culling
|
||||||
if( tile.vertices[0] >= vdp2width || tile.vertices[1] >= vdp2height || tile.vertices[2] < 0 || tile.vertices[5] < 0 )
|
if( tile.vertices[0] >= vdp2width_gl || tile.vertices[1] >= vdp2height_gl || tile.vertices[2] < 0 || tile.vertices[5] < 0 )
|
||||||
{
|
{
|
||||||
info->x += tile.w;
|
info->x += tile.w;
|
||||||
info->y += tile.h;
|
info->y += tile.h;
|
||||||
|
@ -1770,18 +1770,18 @@ static void Vdp2DrawMap(vdp2draw_struct *info, YglTexture *texture)
|
||||||
X = info->x;
|
X = info->x;
|
||||||
|
|
||||||
info->patternpixelwh = 8 * info->patternwh;
|
info->patternpixelwh = 8 * info->patternwh;
|
||||||
info->draww = (int)((float)vdp2width / info->coordincx);
|
info->draww = (int)((float)vdp2width_gl / info->coordincx);
|
||||||
info->drawh = (int)((float)vdp2height / info->coordincy);
|
info->drawh = (int)((float)vdp2height_gl / info->coordincy);
|
||||||
|
|
||||||
i=0;
|
i=0;
|
||||||
yy = info->y*info->coordincy;
|
yy = info->y*info->coordincy;
|
||||||
while( yy < vdp2height )
|
while( yy < vdp2height_gl )
|
||||||
{
|
{
|
||||||
Y = info->y;
|
Y = info->y;
|
||||||
j=0;
|
j=0;
|
||||||
info->x = X;
|
info->x = X;
|
||||||
xx = info->x*info->coordincx;
|
xx = info->x*info->coordincx;
|
||||||
while( xx < vdp2width )
|
while( xx < vdp2width_gl )
|
||||||
{
|
{
|
||||||
info->y = Y;
|
info->y = Y;
|
||||||
info->PlaneAddr(info, info->mapwh * i + j);
|
info->PlaneAddr(info, info->mapwh * i + j);
|
||||||
|
@ -1914,16 +1914,16 @@ static void FASTCALL Vdp2DrawRotation(vdp2draw_struct *info, vdp2rotationparamet
|
||||||
u32 LineColorRamAdress;
|
u32 LineColorRamAdress;
|
||||||
|
|
||||||
vdp2rotationparameter_struct *parameter;
|
vdp2rotationparameter_struct *parameter;
|
||||||
if( vdp2height >= 448 ) vres = (vdp2height>>1); else vres = vdp2height;
|
if( vdp2height_gl >= 448 ) vres = (vdp2height_gl>>1); else vres = vdp2height_gl;
|
||||||
if( vdp2width >= 640 ) hres = (vdp2width>>1); else hres = vdp2width;
|
if( vdp2width_gl >= 640 ) hres = (vdp2width_gl>>1); else hres = vdp2width_gl;
|
||||||
info->vertices[0] = 0;
|
info->vertices[0] = 0;
|
||||||
info->vertices[1] = 0;
|
info->vertices[1] = 0;
|
||||||
info->vertices[2] = vdp2width;
|
info->vertices[2] = vdp2width_gl;
|
||||||
info->vertices[3] = 0;
|
info->vertices[3] = 0;
|
||||||
info->vertices[4] = vdp2width;
|
info->vertices[4] = vdp2width_gl;
|
||||||
info->vertices[5] = vdp2height;
|
info->vertices[5] = vdp2height_gl;
|
||||||
info->vertices[6] = 0;
|
info->vertices[6] = 0;
|
||||||
info->vertices[7] = vdp2height;
|
info->vertices[7] = vdp2height_gl;
|
||||||
cellw = info->cellw;
|
cellw = info->cellw;
|
||||||
cellh = info->cellh;
|
cellh = info->cellh;
|
||||||
info->cellw = hres;
|
info->cellw = hres;
|
||||||
|
@ -2168,8 +2168,8 @@ static void SetSaturnResolution(int width, int height)
|
||||||
{
|
{
|
||||||
YglChangeResolution(width, height);
|
YglChangeResolution(width, height);
|
||||||
|
|
||||||
vdp2width=width;
|
vdp2width_gl=width;
|
||||||
vdp2height=height;
|
vdp2height_gl=height;
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -2219,7 +2219,7 @@ void VIDOGLResize(unsigned int w, unsigned int h, int on)
|
||||||
glViewport(0, 0, w, h);
|
glViewport(0, 0, w, h);
|
||||||
YglNeedToUpdateWindow();
|
YglNeedToUpdateWindow();
|
||||||
|
|
||||||
SetSaturnResolution(vdp2width, vdp2height);
|
SetSaturnResolution(vdp2width_gl, vdp2height_gl);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3066,7 +3066,7 @@ static void Vdp2DrawBackScreen(void)
|
||||||
|
|
||||||
if (Vdp2Regs->BKTAU & 0x8000)
|
if (Vdp2Regs->BKTAU & 0x8000)
|
||||||
{
|
{
|
||||||
for(y = 0; y < vdp2height; y++)
|
for(y = 0; y < vdp2height_gl; y++)
|
||||||
{
|
{
|
||||||
dot = T1ReadWord(Vdp2Ram, scrAddr);
|
dot = T1ReadWord(Vdp2Ram, scrAddr);
|
||||||
scrAddr += 2;
|
scrAddr += 2;
|
||||||
|
@ -3076,7 +3076,7 @@ static void Vdp2DrawBackScreen(void)
|
||||||
lineColors[3*y+2] = (dot & 0x7C00) >> 7;
|
lineColors[3*y+2] = (dot & 0x7C00) >> 7;
|
||||||
line[4*y+0] = 0;
|
line[4*y+0] = 0;
|
||||||
line[4*y+1] = y;
|
line[4*y+1] = y;
|
||||||
line[4*y+2] = vdp2width;
|
line[4*y+2] = vdp2width_gl;
|
||||||
line[4*y+3] = y;
|
line[4*y+3] = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3084,7 +3084,7 @@ static void Vdp2DrawBackScreen(void)
|
||||||
glEnableClientState(GL_COLOR_ARRAY);
|
glEnableClientState(GL_COLOR_ARRAY);
|
||||||
glVertexPointer(2, GL_INT, 0, line);
|
glVertexPointer(2, GL_INT, 0, line);
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
glDrawArrays(GL_LINES,0,vdp2height*2);
|
glDrawArrays(GL_LINES,0,vdp2height_gl*2);
|
||||||
glDisableClientState(GL_COLOR_ARRAY);
|
glDisableClientState(GL_COLOR_ARRAY);
|
||||||
glColor3ub(0xFF, 0xFF, 0xFF);
|
glColor3ub(0xFF, 0xFF, 0xFF);
|
||||||
}
|
}
|
||||||
|
@ -3096,12 +3096,12 @@ static void Vdp2DrawBackScreen(void)
|
||||||
|
|
||||||
line[0] = 0;
|
line[0] = 0;
|
||||||
line[1] = 0;
|
line[1] = 0;
|
||||||
line[2] = vdp2width;
|
line[2] = vdp2width_gl;
|
||||||
line[3] = 0;
|
line[3] = 0;
|
||||||
line[4] = vdp2width;
|
line[4] = vdp2width_gl;
|
||||||
line[5] = vdp2height;
|
line[5] = vdp2height_gl;
|
||||||
line[6] = 0;
|
line[6] = 0;
|
||||||
line[7] = vdp2height;
|
line[7] = vdp2height_gl;
|
||||||
|
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
glVertexPointer(2, GL_INT, 0, line);
|
glVertexPointer(2, GL_INT, 0, line);
|
||||||
|
@ -3293,10 +3293,10 @@ static void Vdp2DrawNBG0(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
yy = info.y;
|
yy = info.y;
|
||||||
while( yy < vdp2height )
|
while( yy < vdp2height_gl )
|
||||||
{
|
{
|
||||||
xx = info.x;
|
xx = info.x;
|
||||||
while( xx < vdp2width )
|
while( xx < vdp2width_gl )
|
||||||
{
|
{
|
||||||
info.vertices[0] = xx * info.coordincx;
|
info.vertices[0] = xx * info.coordincx;
|
||||||
info.vertices[1] = yy * info.coordincy;
|
info.vertices[1] = yy * info.coordincy;
|
||||||
|
@ -3461,10 +3461,10 @@ static void Vdp2DrawNBG1(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
yy = info.y;
|
yy = info.y;
|
||||||
while( yy < vdp2height )
|
while( yy < vdp2height_gl )
|
||||||
{
|
{
|
||||||
xx = info.x;
|
xx = info.x;
|
||||||
while( xx < vdp2width )
|
while( xx < vdp2width_gl )
|
||||||
{
|
{
|
||||||
info.vertices[0] = xx * info.coordincx;
|
info.vertices[0] = xx * info.coordincx;
|
||||||
info.vertices[1] = yy * info.coordincy;
|
info.vertices[1] = yy * info.coordincy;
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
|
|
||||||
#define VIDCORE_OGL 1
|
#define VIDCORE_OGL 1
|
||||||
|
|
||||||
|
extern int vdp2width_gl;
|
||||||
|
extern int vdp2height_gl;
|
||||||
extern VideoInterface_struct VIDOGL;
|
extern VideoInterface_struct VIDOGL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue