Merge branch 'master' of https://github.com/TASVideos/bizhawk into Release
This commit is contained in:
commit
8e37d86b89
|
@ -343,6 +343,7 @@ namespace BizHawk.Client.Common
|
|||
case DiscType.MegaCD:
|
||||
game.System = "GEN";
|
||||
break;
|
||||
case DiscType.AudioDisc:
|
||||
case DiscType.TurboCD:
|
||||
case DiscType.UnknownCDFS:
|
||||
case DiscType.UnknownFormat:
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
DisassemblyLines.Clear();
|
||||
uint a = currentDisassemblerAddress;
|
||||
for (int i = 0; i < line_count; ++i)
|
||||
for (int i = 0; i <= line_count; ++i)
|
||||
{
|
||||
int advance;
|
||||
string line = Disassembler.Disassemble(MemoryDomains.SystemBus, a, out advance);
|
||||
|
|
|
@ -116,7 +116,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void PlaceZone(IMovie movie)
|
||||
{
|
||||
// TODO: This should probably do something with undo history batches/naming.
|
||||
if (movie is TasMovie)
|
||||
(movie as TasMovie).ChangeLog.BeginNewBatch("Place Macro at " + Start);
|
||||
|
||||
if (Start > movie.InputLogLength)
|
||||
{ // Cannot place a frame here. Find a nice way around this.
|
||||
|
@ -150,6 +151,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (movie is TasMovie) // Assume TAStudio is open?
|
||||
{
|
||||
(movie as TasMovie).ChangeLog.EndBatch();
|
||||
if (Global.Emulator.Frame > Start)
|
||||
{
|
||||
// TODO: Go to start of macro? Ask TAStudio to do that?
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.Windows.Forms;
|
|||
using System.Collections.Generic;
|
||||
|
||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||
using BizHawk.Common.NumberExtensions;
|
||||
using BizHawk.Client.Common;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
|
@ -61,8 +62,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private System.Timers.Timer _mouseWheelTimer;
|
||||
|
||||
// public static Color CurrentFrame_FrameCol = Color.FromArgb(0xCFEDFC); Why?
|
||||
public static Color CurrentFrame_InputLog = Color.FromArgb(0xB5E7F7);
|
||||
|
||||
|
@ -451,7 +450,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
JumpToGreenzone();
|
||||
// TODO: Turn off ChangeLog.IsRecording and handle the GeneralUndo here.
|
||||
CurrentTasMovie.ChangeLog.BeginNewBatch("Right-Click Edit");
|
||||
string undoStepName = "Right-Click Edit:";
|
||||
if (_rightClickShift)
|
||||
{
|
||||
undoStepName += " Extend Input";
|
||||
if (_rightClickControl)
|
||||
undoStepName += ", Insert";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_rightClickControl)
|
||||
undoStepName += " Copy";
|
||||
else
|
||||
undoStepName += " Move";
|
||||
}
|
||||
CurrentTasMovie.ChangeLog.BeginNewBatch(undoStepName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -487,6 +500,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (_rightClickFrame != -1)
|
||||
{
|
||||
_rightClickInput = null;
|
||||
_rightClickOverInput = null;
|
||||
_rightClickFrame = -1;
|
||||
CurrentTasMovie.ChangeLog.EndBatch();
|
||||
}
|
||||
|
@ -524,12 +538,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
GoToPreviousFrame();
|
||||
}
|
||||
}
|
||||
|
||||
if (_mouseWheelTimer.Enabled) // dunno if this is telling enough and nothing like bool _mouseWheelFast is needed, but we need to check on the first scroll event, and just decide by delta if it's fast enough to increase actual scrolling speed
|
||||
{
|
||||
_mouseWheelTimer.Stop();
|
||||
}
|
||||
_mouseWheelTimer.Start();
|
||||
}
|
||||
|
||||
private void TasView_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
|
@ -618,7 +626,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (shouldInsert)
|
||||
{
|
||||
for (int i = startVal + 1; i <= endVal; i++)
|
||||
CurrentTasMovie.InsertInput(i, _rightClickInput[(i - _rightClickFrame) % _rightClickInput.Length]);
|
||||
CurrentTasMovie.InsertInput(i, _rightClickInput[(i - _rightClickFrame).Mod(_rightClickInput.Length)]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -630,7 +638,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
else // Overwrite
|
||||
{
|
||||
for (int i = startVal; i <= endVal; i++)
|
||||
CurrentTasMovie.SetFrame(i, _rightClickInput[(_rightClickFrame - i) % _rightClickInput.Length]);
|
||||
CurrentTasMovie.SetFrame(i, _rightClickInput[(i - _rightClickFrame).Mod(_rightClickInput.Length)]);
|
||||
JumpToGreenzone();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -394,14 +394,16 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (TasView.SelectedRows.Any())
|
||||
{
|
||||
var wasPaused = GlobalWin.MainForm.EmulatorPaused;
|
||||
var needsToRollback = !(TasView.FirstSelectedIndex > Emulator.Frame);
|
||||
var rollBackFrame = TasView.FirstSelectedIndex.Value;
|
||||
bool wasPaused = GlobalWin.MainForm.EmulatorPaused;
|
||||
bool needsToRollback = !(TasView.FirstSelectedIndex > Emulator.Frame);
|
||||
int rollBackFrame = TasView.FirstSelectedIndex.Value;
|
||||
|
||||
foreach (var frame in TasView.SelectedRows)
|
||||
CurrentTasMovie.ChangeLog.BeginNewBatch("Clear frames " + TasView.SelectedRows.Min() + "-" + TasView.SelectedRows.Max());
|
||||
foreach (int frame in TasView.SelectedRows)
|
||||
{
|
||||
CurrentTasMovie.ClearFrame(frame);
|
||||
}
|
||||
CurrentTasMovie.ChangeLog.EndBatch();
|
||||
|
||||
if (needsToRollback)
|
||||
{
|
||||
|
|
|
@ -300,11 +300,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
Global.Config.MovieEndAction = MovieEndAction.Record;
|
||||
GlobalWin.MainForm.SetMainformMovieInfo();
|
||||
Global.MovieSession.ReadOnly = true;
|
||||
_mouseWheelTimer = new System.Timers.Timer(100); // consider sub 100 ms fast scrolling
|
||||
_mouseWheelTimer.Elapsed += (s, e) =>
|
||||
{
|
||||
_mouseWheelTimer.Stop();
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -452,7 +447,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
// Do not keep TAStudio's disk save states.
|
||||
if (Directory.Exists(PathManager.MakeAbsolutePath(Global.Config.PathEntries["Global", "TAStudio states"].Path, null)))
|
||||
Directory.Delete(PathManager.MakeAbsolutePath(Global.Config.PathEntries["Global", "TAStudio states"].Path, null), true);
|
||||
_mouseWheelTimer.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -555,7 +549,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
// frame == Emualtor.Frame when frame == 0
|
||||
if (frame > Emulator.Frame)
|
||||
{
|
||||
if (GlobalWin.MainForm.EmulatorPaused || GlobalWin.MainForm.IsSeeking || _mouseWheelTimer.Enabled) // make seek frame keep up with emulation on fast scrolls
|
||||
if (GlobalWin.MainForm.EmulatorPaused || GlobalWin.MainForm.IsSeeking) // make seek frame keep up with emulation on fast scrolls
|
||||
{
|
||||
GlobalWin.MainForm.PauseOnFrame = frame;
|
||||
GlobalWin.MainForm.UnpauseEmulator();
|
||||
|
|
|
@ -98,5 +98,13 @@ namespace BizHawk.Common.NumberExtensions
|
|||
|
||||
return 16;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The % operator is a remainder operator. (e.g. -1 mod 4 returns -1, not 3.)
|
||||
/// </summary>
|
||||
public static int Mod(this int a, int b)
|
||||
{
|
||||
return a - (b * (int)System.Math.Floor((float)a / b));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
//we can read the 2048 bytes directly
|
||||
var sector = disc.SynthProvider.Get(lba);
|
||||
|
||||
PrepareBuffer(buffer, offset, 2352);
|
||||
PrepareBuffer(buffer, offset, 2048);
|
||||
PrepareJob(lba);
|
||||
job.DestBuffer2448 = buf2442;
|
||||
job.DestOffset = 0;
|
||||
|
@ -147,7 +147,7 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
//we can read the 2048 bytes directly but we have to get them from the mode 2 data
|
||||
var sector = disc.SynthProvider.Get(lba);
|
||||
|
||||
PrepareBuffer(buffer, offset, 2352);
|
||||
PrepareBuffer(buffer, offset, 2048);
|
||||
PrepareJob(lba);
|
||||
job.DestBuffer2448 = buf2442;
|
||||
job.DestOffset = 0;
|
||||
|
|
Loading…
Reference in New Issue