mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-03-31 04:30:58 +00:00
Parsing symbols shouldn't be done in constructor, but also, only when required.
This commit is contained in:
parent
b1eb4482fe
commit
b38cabc96d
@ -35,9 +35,6 @@ namespace M6502.Test
|
||||
this.symbols = new EightBit.Files.Symbols.Parser();
|
||||
this.disassembler = new Disassembler(this, this.CPU, this.symbols);
|
||||
this.mapping = new MemoryMapping(this.ram, 0x0000, (ushort)Mask.Sixteen, AccessLevel.ReadWrite);
|
||||
|
||||
this.symbols.Parse(string.IsNullOrEmpty(this.configuration.Symbols) ? string.Empty : this.configuration.RomDirectory + "/" + this.configuration.Symbols);
|
||||
|
||||
this.profiler = new Profiler(this.CPU, this.disassembler, this.symbols, this.configuration.Profile);
|
||||
}
|
||||
|
||||
@ -85,6 +82,11 @@ namespace M6502.Test
|
||||
this.CPU.ExecutedInstruction += this.CPU_ExecutedInstruction;
|
||||
this.WrittenByte += this.Bus_WrittenByte;
|
||||
|
||||
if (this.configuration.Profile || this.configuration.DebugMode)
|
||||
{
|
||||
this.symbols.Parse(string.IsNullOrEmpty(this.configuration.Symbols) ? string.Empty : this.configuration.RomDirectory + "/" + this.configuration.Symbols);
|
||||
}
|
||||
|
||||
if (this.configuration.Profile)
|
||||
{
|
||||
this.profiler.StartingOutput += this.Profiler_StartingOutput;
|
||||
|
Loading…
x
Reference in New Issue
Block a user