mirror of
https://github.com/livingcomputermuseum/ContrAlto.git
synced 2026-01-23 02:47:48 +00:00
Small performance tweaks, minor cleanup, minor improvement to microcode disassembly. Fixes to microcode annotation (thanks, Ken!).
This commit is contained in:
parent
7704bca35d
commit
39277a17a2
@ -8,6 +8,9 @@ EndProject
|
||||
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "ContraltoSetup", "ContraltoSetup\ContraltoSetup.wixproj", "{47BBC195-80C5-43F3-B691-7D27B0803B84}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(Performance) = preSolution
|
||||
HasPerformanceSessions = true
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
|
||||
@ -220,7 +220,7 @@ namespace Contralto.CPU
|
||||
F1 == SpecialFunction1.Constant ||
|
||||
F2 == SpecialFunction2.Constant;
|
||||
|
||||
ConstantAccessOrBS4 = ConstantAccess || (int)BS > 4;
|
||||
BS4 = ((int)BS > 4);
|
||||
|
||||
// Constant ROM access:
|
||||
// "The constant memory is gated to the bus by F1=7, F2=7, or BS>4. The constant memory is addressed by the
|
||||
@ -308,7 +308,7 @@ namespace Contralto.CPU
|
||||
|
||||
// Metadata about the instruction that can be precalculated and used during execution
|
||||
public bool ConstantAccess;
|
||||
public bool ConstantAccessOrBS4;
|
||||
public bool BS4;
|
||||
public ushort ConstantValue;
|
||||
public bool MemoryAccess;
|
||||
public MemoryOperation MemoryOperation;
|
||||
|
||||
@ -128,7 +128,7 @@ namespace Contralto.CPU
|
||||
switch (df2)
|
||||
{
|
||||
case DiskF2.INIT:
|
||||
_nextModifier |= GetInitModifier(instruction);
|
||||
_nextModifier |= GetInitModifier();
|
||||
break;
|
||||
|
||||
case DiskF2.RWC:
|
||||
@ -138,7 +138,7 @@ namespace Contralto.CPU
|
||||
// by INCREC by the microcode to present the next set of bits.
|
||||
int command = (_diskController.KADR & 0x00c0) >> 6;
|
||||
|
||||
_nextModifier |= GetInitModifier(instruction);
|
||||
_nextModifier |= GetInitModifier();
|
||||
|
||||
switch (command)
|
||||
{
|
||||
@ -161,7 +161,7 @@ namespace Contralto.CPU
|
||||
|
||||
case DiskF2.XFRDAT:
|
||||
// "NEXT <- NEXT OR (IF current command wants data transfer THEN 1 ELSE 0)
|
||||
_nextModifier |= GetInitModifier(instruction);
|
||||
_nextModifier |= GetInitModifier();
|
||||
|
||||
if (_diskController.DataXfer)
|
||||
{
|
||||
@ -170,13 +170,13 @@ namespace Contralto.CPU
|
||||
break;
|
||||
|
||||
case DiskF2.RECNO:
|
||||
_nextModifier |= GetInitModifier(instruction);
|
||||
_nextModifier |= GetInitModifier();
|
||||
_nextModifier |= _diskController.RECNO;
|
||||
break;
|
||||
|
||||
case DiskF2.NFER:
|
||||
// "NEXT <- NEXT OR (IF fatal error in latches THEN 0 ELSE 1)"
|
||||
_nextModifier |= GetInitModifier(instruction);
|
||||
_nextModifier |= GetInitModifier();
|
||||
|
||||
if (!_diskController.FatalError)
|
||||
{
|
||||
@ -186,7 +186,7 @@ namespace Contralto.CPU
|
||||
|
||||
case DiskF2.STROBON:
|
||||
// "NEXT <- NEXT OR (IF seek strobe still on THEN 1 ELSE 0)"
|
||||
_nextModifier |= GetInitModifier(instruction);
|
||||
_nextModifier |= GetInitModifier();
|
||||
if ((_diskController.KSTAT & DiskController.STROBE) != 0)
|
||||
{
|
||||
_nextModifier |= 0x1;
|
||||
@ -195,7 +195,7 @@ namespace Contralto.CPU
|
||||
|
||||
case DiskF2.SWRNRDY:
|
||||
// "NEXT <- NEXT OR (IF disk not ready to accept command THEN 1 ELSE 0)
|
||||
_nextModifier |= GetInitModifier(instruction);
|
||||
_nextModifier |= GetInitModifier();
|
||||
if (!_diskController.Ready)
|
||||
{
|
||||
_nextModifier |= 0x1;
|
||||
@ -224,7 +224,7 @@ namespace Contralto.CPU
|
||||
/// The status of the INIT flag
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private ushort GetInitModifier(MicroInstruction instruction)
|
||||
private ushort GetInitModifier()
|
||||
{
|
||||
//
|
||||
// "NEXT<-NEXT OR (if WDTASKACT AND WDINIT) then 37B else 0."
|
||||
|
||||
@ -261,7 +261,7 @@ namespace Contralto.CPU
|
||||
// Conditions ORed onto NEXT Comment
|
||||
//
|
||||
// if IR[0] = 1 3-IR[8-9] complement of SH field of IR
|
||||
// if IR[1-2] = 3 IR[5] the Indirect bit of R
|
||||
// if IR[1-2] != 3 IR[5] the Indirect bit of R
|
||||
// if IR[3-7] = 0 2 CYCLE
|
||||
// if IR[3-7] = 1 5 RAMTRAP
|
||||
// if IR[3-7] = 2 3 NOPAR -- parameterless opcode group
|
||||
@ -273,21 +273,18 @@ namespace Contralto.CPU
|
||||
// if IR[3-7] = 37B 17B ROMTRAP -- used by Swat, the debugger
|
||||
// else 16B ROMTRAP
|
||||
|
||||
//
|
||||
// NOTE: the above table from the Hardware Manual is incorrect
|
||||
// (or at least incomplete / out of date / misleading).
|
||||
// There is considerably more that goes into determining the dispatch, which is controlled by a 256x8
|
||||
// PROM. We just use the PROM rather than implementing the above logic (because it works.)
|
||||
//
|
||||
//
|
||||
// NOTE: The above table is accurate and functions correctly; using the PROM is faster.
|
||||
//
|
||||
if ((_cpu._ir & 0x8000) != 0)
|
||||
{
|
||||
// 3-IR[8-9] (shift field of arithmetic instruction)
|
||||
_nextModifier = (ushort)(3 - ((_cpu._ir & 0xc0) >> 6));
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
// Use the PROM.
|
||||
_nextModifier = ControlROM.ACSourceROM[((_cpu._ir & 0x7f00) >> 8)];
|
||||
_nextModifier = ControlROM.ACSourceROM[((_cpu._ir & 0x7f00) >> 8)];
|
||||
}
|
||||
|
||||
break;
|
||||
@ -309,10 +306,15 @@ namespace Contralto.CPU
|
||||
// DNS<- does the following:
|
||||
// - modifies the normal shift operations to perform Nova-style shifts (done here)
|
||||
// - addresses R from 3-IR[3-4] (destination AC) (see Early LoadDNS handler)
|
||||
// - stores into R unless IR[12] is set (done here)
|
||||
// - stores into R unless IR[12] is set (done here)
|
||||
// [NOTE: This overrides a LoadR BS field if present -- that is, if IR[12] is set and
|
||||
// BS=LoadR, no load into R will take place. Note also that the standard
|
||||
// microcode apparently always specifies a LoadR BS for LoadDNS microinstructions. Need to
|
||||
// look at the schematics more closely to see if this is required or just a convention
|
||||
// of the PARC microassembler.]
|
||||
// - calculates Nova-style CARRY bit (done here)
|
||||
// - sets the SKIP and CARRY flip-flops appropriately (see Late LoadDNS handler)
|
||||
int carry = 0;
|
||||
int carry = 0;
|
||||
|
||||
// Also indicates modifying CARRY
|
||||
_loadR = (_cpu._ir & 0x0008) == 0;
|
||||
@ -321,40 +323,40 @@ namespace Contralto.CPU
|
||||
// We need to set the CARRY bit that will be passed through the shifter appropriately.
|
||||
|
||||
// Select carry input value based on carry control
|
||||
switch(_cpu._ir & 0x30)
|
||||
switch((_cpu._ir & 0x30) >> 4)
|
||||
{
|
||||
case 0x00:
|
||||
case 0x0:
|
||||
// Nothing; CARRY unaffected.
|
||||
carry = _carry;
|
||||
break;
|
||||
|
||||
case 0x10:
|
||||
case 0x1:
|
||||
carry = 0; // Z
|
||||
break;
|
||||
|
||||
case 0x20:
|
||||
case 0x2:
|
||||
carry = 1; // O
|
||||
break;
|
||||
|
||||
case 0x30:
|
||||
case 0x3:
|
||||
carry = (~_carry) & 0x1; // C
|
||||
break;
|
||||
}
|
||||
|
||||
// Now modify the result based on the current ALU result
|
||||
switch (_cpu._ir & 0x700)
|
||||
switch ((_cpu._ir & 0x700) >> 8)
|
||||
{
|
||||
case 0x000:
|
||||
case 0x200:
|
||||
case 0x700:
|
||||
case 0x0:
|
||||
case 0x2:
|
||||
case 0x7:
|
||||
// COM, MOV, AND - Carry unaffected
|
||||
break;
|
||||
|
||||
case 0x100:
|
||||
case 0x300:
|
||||
case 0x400:
|
||||
case 0x500:
|
||||
case 0x600:
|
||||
case 0x1:
|
||||
case 0x3:
|
||||
case 0x4:
|
||||
case 0x5:
|
||||
case 0x6:
|
||||
// NEG, INC, ADC, SUB, ADD - invert the carry bit
|
||||
if (_cpu._aluC0 != 0)
|
||||
{
|
||||
|
||||
@ -138,8 +138,7 @@ namespace Contralto.CPU
|
||||
protected virtual InstructionCompletion ExecuteInstruction(MicroInstruction instruction)
|
||||
{
|
||||
InstructionCompletion completion = InstructionCompletion.Normal;
|
||||
bool swMode = false;
|
||||
bool block = false;
|
||||
bool swMode = false;
|
||||
ushort aluData;
|
||||
ushort nextModifier;
|
||||
_loadR = false;
|
||||
@ -243,7 +242,7 @@ namespace Contralto.CPU
|
||||
// more than one source is gated to it. Up to 32 such mask contans can be provided for each of the four bus sources
|
||||
// > 4."
|
||||
// This is precached by the MicroInstruction object.
|
||||
if (instruction.ConstantAccessOrBS4)
|
||||
if (instruction.BS4)
|
||||
{
|
||||
_busData &= instruction.ConstantValue;
|
||||
}
|
||||
@ -319,7 +318,7 @@ namespace Contralto.CPU
|
||||
//
|
||||
// If the first uOp executed after a task switch contains a TASK F1, it does not take effect.
|
||||
// This is observed on the real hardware, and does not appear to be documented.
|
||||
// It also doensn't appear to affect the execution of the standard Alto uCode in any significant
|
||||
// It also doesn't appear to affect the execution of the standard Alto uCode in any significant
|
||||
// way, but is included here for correctness.
|
||||
//
|
||||
if (!_firstInstructionAfterSwitch)
|
||||
@ -333,10 +332,7 @@ namespace Contralto.CPU
|
||||
// Technically this is to be invoked by the hardware device associated with a task.
|
||||
// That logic would be circuituous and unless there's a good reason not to that is discovered
|
||||
// later, I'm just going to directly block the current task here.
|
||||
_cpu.BlockTask(this._taskType);
|
||||
|
||||
// Let task-specific behavior take place at the end of this cycle.
|
||||
block = true;
|
||||
_cpu.BlockTask(this._taskType);
|
||||
break;
|
||||
|
||||
case SpecialFunction1.LLSH1:
|
||||
@ -520,14 +516,14 @@ namespace Contralto.CPU
|
||||
//
|
||||
if (swMode)
|
||||
{
|
||||
Log.Write(LogType.Verbose, LogComponent.Microcode, "SWMODE: uPC {0}, next uPC {1} (NEXT is {2})", Conversion.ToOctal(_mpc), Conversion.ToOctal(instruction.NEXT | nextModifier), Conversion.ToOctal(instruction.NEXT));
|
||||
//Log.Write(LogType.Verbose, LogComponent.Microcode, "SWMODE: uPC {0}, next uPC {1} (NEXT is {2})", Conversion.ToOctal(_mpc), Conversion.ToOctal(instruction.NEXT | nextModifier), Conversion.ToOctal(instruction.NEXT));
|
||||
UCodeMemory.SwitchMode((ushort)(instruction.NEXT | nextModifier), _taskType);
|
||||
}
|
||||
|
||||
//
|
||||
// Do task-specific BLOCK behavior if the last instruction had a BLOCK F1.
|
||||
//
|
||||
if (block)
|
||||
if (instruction.F1 == SpecialFunction1.Block)
|
||||
{
|
||||
ExecuteBlock();
|
||||
}
|
||||
|
||||
@ -70,15 +70,15 @@ namespace Contralto.CPU
|
||||
break;
|
||||
|
||||
case BusSource.ReadMD:
|
||||
source = "MD ";
|
||||
source = "←MD ";
|
||||
break;
|
||||
|
||||
case BusSource.ReadMouse:
|
||||
source = "MOUSE ";
|
||||
source = "←MOUSE ";
|
||||
break;
|
||||
|
||||
case BusSource.ReadDisp:
|
||||
source = "DISP ";
|
||||
source = "←DISP ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -161,7 +161,15 @@ namespace Contralto.CPU
|
||||
break;
|
||||
|
||||
case SpecialFunction1.LoadMAR:
|
||||
f1 = "MAR<- ";
|
||||
|
||||
if (instruction.F2 == SpecialFunction2.StoreMD)
|
||||
{
|
||||
f1 = "XMAR← ";
|
||||
}
|
||||
else
|
||||
{
|
||||
f1 = "MAR← ";
|
||||
}
|
||||
break;
|
||||
|
||||
case SpecialFunction1.Task:
|
||||
@ -173,15 +181,15 @@ namespace Contralto.CPU
|
||||
break;
|
||||
|
||||
case SpecialFunction1.LLSH1:
|
||||
f1 = "<-L LSH 1 ";
|
||||
f1 = "←L LSH 1 ";
|
||||
break;
|
||||
|
||||
case SpecialFunction1.LRSH1:
|
||||
f1 = "<-L RSH 1 ";
|
||||
f1 = "←L RSH 1 ";
|
||||
break;
|
||||
|
||||
case SpecialFunction1.LLCY8:
|
||||
f1 = "<-L LCY 8 ";
|
||||
f1 = "←L LCY 8 ";
|
||||
break;
|
||||
|
||||
case SpecialFunction1.Constant:
|
||||
@ -221,7 +229,10 @@ namespace Contralto.CPU
|
||||
break;
|
||||
|
||||
case SpecialFunction2.StoreMD:
|
||||
f2 = "MD<- ";
|
||||
if (instruction.F1 != SpecialFunction1.LoadMAR)
|
||||
{
|
||||
f2 = "MD← ";
|
||||
}
|
||||
break;
|
||||
|
||||
case SpecialFunction2.Constant:
|
||||
@ -256,7 +267,7 @@ namespace Contralto.CPU
|
||||
break;
|
||||
}
|
||||
|
||||
load = String.Format("T<- {0}", loadTFromALU ? operation : source);
|
||||
load = String.Format("T← {0}", loadTFromALU ? operation : source);
|
||||
}
|
||||
|
||||
// Load L (and M) from ALU
|
||||
@ -264,18 +275,18 @@ namespace Contralto.CPU
|
||||
{
|
||||
if (string.IsNullOrEmpty(load))
|
||||
{
|
||||
load = String.Format("L<- {0}", operation);
|
||||
load = String.Format("L← {0}", operation);
|
||||
}
|
||||
else
|
||||
{
|
||||
load = String.Format("L<- {0}", load);
|
||||
load = String.Format("L← {0}", load);
|
||||
}
|
||||
}
|
||||
|
||||
// Do writeback to selected R register from shifter output
|
||||
if (loadR)
|
||||
{
|
||||
load = String.Format("$R{0}<- {1}",
|
||||
load = String.Format("$R{0}← {1}",
|
||||
Conversion.ToOctal((int)rSelect),
|
||||
load != String.Empty ? load : operation);
|
||||
}
|
||||
@ -285,12 +296,12 @@ namespace Contralto.CPU
|
||||
{
|
||||
if (string.IsNullOrEmpty(load))
|
||||
{
|
||||
load = String.Format("$S{0}<- M",
|
||||
load = String.Format("$S{0}← M",
|
||||
Conversion.ToOctal((int)rSelect));
|
||||
}
|
||||
else
|
||||
{
|
||||
load = String.Format("$S{0}<- M, {1}",
|
||||
load = String.Format("$S{0}← M, {1}",
|
||||
Conversion.ToOctal((int)rSelect),
|
||||
load);
|
||||
}
|
||||
@ -392,10 +403,10 @@ namespace Contralto.CPU
|
||||
return "RDRAM ";
|
||||
|
||||
case EmulatorF1.LoadRMR:
|
||||
return "RMR<- ";
|
||||
return "RMR← ";
|
||||
|
||||
case EmulatorF1.LoadESRB:
|
||||
return "ESRB<- ";
|
||||
return "ESRB← ";
|
||||
|
||||
case EmulatorF1.RSNF:
|
||||
return "RSNF ";
|
||||
@ -425,13 +436,13 @@ namespace Contralto.CPU
|
||||
return "MAGIC ";
|
||||
|
||||
case EmulatorF2.LoadDNS:
|
||||
return "DNS<- ";
|
||||
return "DNS← ";
|
||||
|
||||
case EmulatorF2.BUSODD:
|
||||
return "BUSODD ";
|
||||
|
||||
case EmulatorF2.LoadIR:
|
||||
return "IR<- ";
|
||||
return "IR← ";
|
||||
|
||||
case EmulatorF2.IDISP:
|
||||
return "IDISP ";
|
||||
|
||||
@ -495,6 +495,7 @@
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@ -156,7 +156,7 @@ DW0145> DWA<-L, :XNOMORE;
|
||||
DW0045> DOMORE: DDR<-MD, TASK;
|
||||
DW0146> DDR<-MD, :NOTAB;
|
||||
|
||||
DW0144> XNOMORE:DDR<- MD, BLOCK;
|
||||
DW0044> XNOMORE:DDR<- MD, BLOCK;
|
||||
DW0147> DDR<- MD, TASK;
|
||||
|
||||
DW0150> DWTF: :DWT;
|
||||
@ -445,7 +445,7 @@ EN0223> EOCDW1: ECNTR<- L,EWFCT,:EOCDWT; [EOCDWT,EOCDGO]
|
||||
|
||||
EN0235> EOCDRS: L<- ESABRT,:EPOST; [EPOST] POST event
|
||||
|
||||
EN227> EIGO: :EIFRST; [EIFRST] Input under output
|
||||
EN0227> EIGO: :EIFRST; [EIFRST] Input under output
|
||||
|
||||
;Output main loop setup
|
||||
|
||||
@ -994,8 +994,8 @@ EM0743> Z1: L<- T<- CYCOUT, TASK;
|
||||
EM0161> L1: CYCOUT<- L MLSH 1, :ENDCYCLE;
|
||||
EM0160> L0: CYCOUT<- L, :ENDCYCLE;
|
||||
|
||||
EM0164> L8: CYCOUT<- L LCY 8, :ENDCYCLE;
|
||||
EM0165> L7: CYCOUT<- L LCY 8, :Y1;
|
||||
EM0170> L8: CYCOUT<- L LCY 8, :ENDCYCLE;
|
||||
EM0167> L7: CYCOUT<- L LCY 8, :Y1;
|
||||
EM0166> L6: CYCOUT<- L LCY 8, :Y2;
|
||||
EM0165> L5: CYCOUT<- L LCY 8, :Y3;
|
||||
|
||||
@ -1382,7 +1382,7 @@ EM1161> L<- SRCX-T-1;
|
||||
EM1165> T<- LREG+1, SH<0; TEST HORIZONTAL DIRECTION
|
||||
EM1167> L<- 17.T, :LTOR; SKEW <- (SRCX - DESTX) MOD 16
|
||||
EM1163> RTOL: SKEW<- L, L<- 0-1, :AH, TASK; HINC <- -1
|
||||
EM0162> LTOR: SKEW<- L, L<- 0+1, :AH, TASK; HINC <- +1
|
||||
EM1162> LTOR: SKEW<- L, L<- 0+1, :AH, TASK; HINC <- +1
|
||||
EM1170> AH: HINC<- L;
|
||||
;
|
||||
; CALCULATE MASK1 AND MASK2
|
||||
@ -1436,7 +1436,7 @@ EM1240> LNW2: NWORDS<- L; LOAD NWORDS
|
||||
;
|
||||
; /* DETERMINE VERTICAL DIRECTION
|
||||
!1,2,BTOT,TTOB;
|
||||
T<- SRCY;
|
||||
EM1241> T<- SRCY;
|
||||
EM1244> L<- DESTY-T;
|
||||
EM1245> T<- NLINES-1, SH<0;
|
||||
EM1246> L<- 0, :BTOT; VINC <- 0 IFF TOP-TO-BOTTOM
|
||||
|
||||
@ -68,21 +68,10 @@ namespace Contralto.Memory
|
||||
// Check for XM registers; this occurs regardless of XM flag since it's in the I/O page.
|
||||
if (address >= _xmBanksStart && address < _xmBanksStart + 16)
|
||||
{
|
||||
return (ushort)(0xfff0 |_xmBanks[address - _xmBanksStart]);
|
||||
return (ushort)(0xfff0 | _xmBanks[address - _xmBanksStart]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/*
|
||||
// debug for kaehler's music st
|
||||
if (address == 0x1fe || address == 0x1ff) // music microcode
|
||||
// || (address >= 0x7f00 && address <= 0x80ff)) // DAC buffer
|
||||
{
|
||||
System.Console.WriteLine("MUSIC read from {0} by task {1} in bank {2}.",
|
||||
Conversion.ToOctal(address), task, UCodeMemory.GetBank(task));
|
||||
}
|
||||
*/
|
||||
|
||||
{
|
||||
address += 0x10000 * GetBankNumber(task, extendedMemory);
|
||||
return _mem[address];
|
||||
}
|
||||
@ -101,15 +90,6 @@ namespace Contralto.Memory
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
if (address == 0x1fe || address == 0x1ff || // music microcode
|
||||
(address >= 0x7f00 && address <= 0x80ff)) // DAC buffer
|
||||
{
|
||||
System.Console.WriteLine("MUSIC write to {0} ({1}) by task {2} in bank {3}.",
|
||||
Conversion.ToOctal(address), Conversion.ToOctal(data), task, UCodeMemory.GetBank(task));
|
||||
}
|
||||
*/
|
||||
|
||||
address += 0x10000 * GetBankNumber(task, extendedMemory);
|
||||
_mem[address] = data;
|
||||
}
|
||||
|
||||
@ -428,14 +428,14 @@ namespace Contralto.Memory
|
||||
{
|
||||
// Memory-mapped device access:
|
||||
// Look up address in hash; if populated ask the device
|
||||
// to return a value otherwise throw.
|
||||
// to return a value otherwise return 0.
|
||||
IMemoryMappedDevice memoryMappedDevice = null;
|
||||
if (_bus.TryGetValue(address, out memoryMappedDevice))
|
||||
{
|
||||
return memoryMappedDevice.Read(address, task, extendedMemoryReference);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -458,12 +458,12 @@ namespace Contralto.Memory
|
||||
{
|
||||
// Memory-mapped device access:
|
||||
// Look up address in hash; if populated ask the device
|
||||
// to store a value otherwise throw.
|
||||
// to store a value otherwise do nothing.
|
||||
IMemoryMappedDevice memoryMappedDevice = null;
|
||||
if (_bus.TryGetValue(address, out memoryMappedDevice))
|
||||
{
|
||||
{
|
||||
memoryMappedDevice.Load(address, data, task, extendedMemoryReference);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
40
Contralto/UI/AlternateBootWindow.Designer.cs
generated
40
Contralto/UI/AlternateBootWindow.Designer.cs
generated
@ -31,8 +31,8 @@
|
||||
this.EthernetBootFileGroup = new System.Windows.Forms.GroupBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.BootFileComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.CancelButton = new System.Windows.Forms.Button();
|
||||
this.DialogOKButton = new System.Windows.Forms.Button();
|
||||
this.DialogCancelButton = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.EthernetBootRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.DiskBootRadioButton = new System.Windows.Forms.RadioButton();
|
||||
@ -77,23 +77,23 @@
|
||||
//
|
||||
// OKButton
|
||||
//
|
||||
this.OKButton.Location = new System.Drawing.Point(245, 174);
|
||||
this.OKButton.Name = "OKButton";
|
||||
this.OKButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.OKButton.TabIndex = 2;
|
||||
this.OKButton.Text = "OK";
|
||||
this.OKButton.UseVisualStyleBackColor = true;
|
||||
this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
this.DialogOKButton.Location = new System.Drawing.Point(245, 174);
|
||||
this.DialogOKButton.Name = "OKButton";
|
||||
this.DialogOKButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.DialogOKButton.TabIndex = 2;
|
||||
this.DialogOKButton.Text = "OK";
|
||||
this.DialogOKButton.UseVisualStyleBackColor = true;
|
||||
this.DialogOKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
//
|
||||
// CancelButton
|
||||
//
|
||||
this.CancelButton.Location = new System.Drawing.Point(326, 174);
|
||||
this.CancelButton.Name = "CancelButton";
|
||||
this.CancelButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.CancelButton.TabIndex = 3;
|
||||
this.CancelButton.Text = "Cancel";
|
||||
this.CancelButton.UseVisualStyleBackColor = true;
|
||||
this.CancelButton.Click += new System.EventHandler(this.CancelButton_Click);
|
||||
this.DialogCancelButton.Location = new System.Drawing.Point(326, 174);
|
||||
this.DialogCancelButton.Name = "CancelButton";
|
||||
this.DialogCancelButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.DialogCancelButton.TabIndex = 3;
|
||||
this.DialogCancelButton.Text = "Cancel";
|
||||
this.DialogCancelButton.UseVisualStyleBackColor = true;
|
||||
this.DialogCancelButton.Click += new System.EventHandler(this.CancelButton_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
@ -164,8 +164,8 @@
|
||||
this.ClientSize = new System.Drawing.Size(406, 201);
|
||||
this.Controls.Add(this.DiskBootGroupBox);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.CancelButton);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.Controls.Add(this.DialogCancelButton);
|
||||
this.Controls.Add(this.DialogOKButton);
|
||||
this.Controls.Add(this.EthernetBootFileGroup);
|
||||
this.Name = "AlternateBootOptions";
|
||||
this.ShowIcon = false;
|
||||
@ -187,8 +187,8 @@
|
||||
private System.Windows.Forms.GroupBox EthernetBootFileGroup;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ComboBox BootFileComboBox;
|
||||
private System.Windows.Forms.Button OKButton;
|
||||
private System.Windows.Forms.Button CancelButton;
|
||||
private System.Windows.Forms.Button DialogOKButton;
|
||||
private System.Windows.Forms.Button DialogCancelButton;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.RadioButton EthernetBootRadioButton;
|
||||
private System.Windows.Forms.RadioButton DiskBootRadioButton;
|
||||
|
||||
@ -176,6 +176,11 @@ namespace Contralto
|
||||
return base.Equals(obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
public ushort FileNumber;
|
||||
public string Description;
|
||||
}
|
||||
|
||||
1
Contralto/UI/Debugger.Designer.cs
generated
1
Contralto/UI/Debugger.Designer.cs
generated
@ -1045,7 +1045,6 @@
|
||||
this._memoryData.DefaultCellStyle = dataGridViewCellStyle33;
|
||||
this._memoryData.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
|
||||
this._memoryData.Location = new System.Drawing.Point(6, 19);
|
||||
this._memoryData.MultiSelect = false;
|
||||
this._memoryData.Name = "_memoryData";
|
||||
this._memoryData.ReadOnly = true;
|
||||
this._memoryData.RowHeadersVisible = false;
|
||||
|
||||
@ -21,6 +21,7 @@ using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Contralto.CPU;
|
||||
using System.Text;
|
||||
|
||||
namespace Contralto
|
||||
{
|
||||
@ -259,7 +260,30 @@ namespace Contralto
|
||||
Conversion.ToOctal(_reservedMemoryEntries[i].Address, 3),
|
||||
_reservedMemoryEntries[i].Name,
|
||||
Conversion.ToOctal(0, 6));
|
||||
}
|
||||
|
||||
ContextMenuStrip memoryContextMenu = new ContextMenuStrip();
|
||||
memoryContextMenu.Items.Add("Copy all");
|
||||
memoryContextMenu.ItemClicked += OnMemoryContextMenuItemClicked;
|
||||
|
||||
_memoryData.ContextMenuStrip = memoryContextMenu;
|
||||
|
||||
}
|
||||
|
||||
private void OnMemoryContextMenuItemClicked(object sender, ToolStripItemClickedEventArgs e)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
for(int i=0;i<65536;i++)
|
||||
{
|
||||
sb.AppendFormat("{0}:{1} {2}\r\n",
|
||||
Conversion.ToOctal(i, 6),
|
||||
_memoryData.Rows[i].Cells[2].Value,
|
||||
_memoryData.Rows[i].Cells[3].Value);
|
||||
}
|
||||
|
||||
Clipboard.SetText(sb.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -545,7 +569,7 @@ namespace Contralto
|
||||
string status = task.Wakeup ? "W" : String.Empty;
|
||||
|
||||
// Run bit
|
||||
if (task == _system.CPU.CurrentTask)
|
||||
if (task.TaskType == _system.CPU.CurrentTask.TaskType)
|
||||
{
|
||||
status += "R";
|
||||
}
|
||||
|
||||
40
Contralto/UI/SystemOptions.Designer.cs
generated
40
Contralto/UI/SystemOptions.Designer.cs
generated
@ -47,8 +47,8 @@
|
||||
this.tabPage3 = new System.Windows.Forms.TabPage();
|
||||
this.ThrottleSpeedCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.InterlaceDisplayCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.CancelButton = new System.Windows.Forms.Button();
|
||||
this.DialogOKButton = new System.Windows.Forms.Button();
|
||||
this.DialogCancelButton = new System.Windows.Forms.Button();
|
||||
this.AltoI1KROMRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
@ -268,23 +268,23 @@
|
||||
//
|
||||
// OKButton
|
||||
//
|
||||
this.OKButton.Location = new System.Drawing.Point(211, 239);
|
||||
this.OKButton.Name = "OKButton";
|
||||
this.OKButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.OKButton.TabIndex = 1;
|
||||
this.OKButton.Text = "OK";
|
||||
this.OKButton.UseVisualStyleBackColor = true;
|
||||
this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
this.DialogOKButton.Location = new System.Drawing.Point(211, 239);
|
||||
this.DialogOKButton.Name = "OKButton";
|
||||
this.DialogOKButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.DialogOKButton.TabIndex = 1;
|
||||
this.DialogOKButton.Text = "OK";
|
||||
this.DialogOKButton.UseVisualStyleBackColor = true;
|
||||
this.DialogOKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
//
|
||||
// CancelButton
|
||||
//
|
||||
this.CancelButton.Location = new System.Drawing.Point(292, 239);
|
||||
this.CancelButton.Name = "CancelButton";
|
||||
this.CancelButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.CancelButton.TabIndex = 2;
|
||||
this.CancelButton.Text = "Cancel";
|
||||
this.CancelButton.UseVisualStyleBackColor = true;
|
||||
this.CancelButton.Click += new System.EventHandler(this.CancelButton_Click);
|
||||
this.DialogCancelButton.Location = new System.Drawing.Point(292, 239);
|
||||
this.DialogCancelButton.Name = "CancelButton";
|
||||
this.DialogCancelButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.DialogCancelButton.TabIndex = 2;
|
||||
this.DialogCancelButton.Text = "Cancel";
|
||||
this.DialogCancelButton.UseVisualStyleBackColor = true;
|
||||
this.DialogCancelButton.Click += new System.EventHandler(this.CancelButton_Click);
|
||||
//
|
||||
// AltoI1KROMRadioButton
|
||||
//
|
||||
@ -302,8 +302,8 @@
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(371, 271);
|
||||
this.Controls.Add(this.CancelButton);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.Controls.Add(this.DialogCancelButton);
|
||||
this.Controls.Add(this.DialogOKButton);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Name = "SystemOptions";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
@ -338,8 +338,8 @@
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox AltoEthernetAddressTextBox;
|
||||
private System.Windows.Forms.Button OKButton;
|
||||
private System.Windows.Forms.Button CancelButton;
|
||||
private System.Windows.Forms.Button DialogOKButton;
|
||||
private System.Windows.Forms.Button DialogCancelButton;
|
||||
private System.Windows.Forms.TabPage tabPage3;
|
||||
private System.Windows.Forms.CheckBox ThrottleSpeedCheckBox;
|
||||
private System.Windows.Forms.CheckBox InterlaceDisplayCheckBox;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user