Skip to content

Commit 0a9d7d2

Browse files
refactor: removed unused _timer field in INT8H
1 parent c20bb99 commit 0a9d7d2

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/Spice86.Core/Emulator/InterruptHandlers/Timer/TimerInt8Handler.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
using Spice86.Core.Emulator.CPU;
44
using Spice86.Core.Emulator.Devices.ExternalInput;
5-
using Spice86.Core.Emulator.Devices.Timer;
65
using Spice86.Core.Emulator.Function;
76
using Spice86.Core.Emulator.InterruptHandlers;
87
using Spice86.Core.Emulator.InterruptHandlers.Bios.Structures;
@@ -14,7 +13,6 @@
1413
/// </summary>
1514
public class TimerInt8Handler : InterruptHandler {
1615
private readonly DualPic _dualPic;
17-
private readonly Timer _timer;
1816
private readonly BiosDataArea _biosDataArea;
1917

2018
/// <summary>
@@ -27,10 +25,11 @@ public class TimerInt8Handler : InterruptHandler {
2725
/// <param name="stack">The CPU stack.</param>
2826
/// <param name="state">The CPU state.</param>
2927
/// <param name="dualPic">The two programmable interrupt controllers.</param>
30-
/// <param name="timer">The programmable Interval Timer chip.</param>
31-
public TimerInt8Handler(IMemory memory, IFunctionHandlerProvider functionHandlerProvider, Stack stack, State state, DualPic dualPic, Timer timer, BiosDataArea biosDataArea, ILoggerService loggerService)
28+
public TimerInt8Handler(IMemory memory,
29+
IFunctionHandlerProvider functionHandlerProvider,
30+
Stack stack, State state, DualPic dualPic,
31+
BiosDataArea biosDataArea, ILoggerService loggerService)
3232
: base(memory, functionHandlerProvider, stack, state, loggerService) {
33-
_timer = timer;
3433
Memory = memory;
3534
_dualPic = dualPic;
3635
_biosDataArea = biosDataArea;

src/Spice86/Spice86DependencyInjection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ internal Spice86DependencyInjection(Configuration configuration, MainWindow? mai
238238

239239
TimerInt8Handler timerInt8Handler =
240240
new TimerInt8Handler(memory, functionHandlerProvider, stack, state,
241-
dualPic, timer, biosDataArea, loggerService);
241+
dualPic, biosDataArea, loggerService);
242242

243243
if (loggerService.IsEnabled(LogEventLevel.Information)) {
244244
loggerService.Information("Timer int8 handler created...");

tests/Spice86.Tests/Dos/DosFileManagerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ private static DosFileManager ArrangeDosFileManager(string mountPoint) {
138138
loggerService, dualPic);
139139
TimerInt8Handler timerInt8Handler =
140140
new TimerInt8Handler(memory, functionHandlerProvider, stack, state,
141-
dualPic, timer, biosDataArea, loggerService);
141+
dualPic, biosDataArea, loggerService);
142142

143143
DmaController dmaController =
144144
new(memory, state, ioPortDispatcher, configuration.FailOnUnhandledPort, loggerService);

0 commit comments

Comments
 (0)