Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Berti committed Oct 12, 2024
1 parent d2b6848 commit fc7e313
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/test/java/omegadrive/vdp/BaseVdpDmaBandwidthTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import omegadrive.bus.model.GenesisBusProvider;
import omegadrive.memory.IMemoryProvider;
import omegadrive.util.LogHelper;
import omegadrive.util.MdRuntimeData;
import omegadrive.util.SystemTestUtil;
import omegadrive.vdp.md.TestGenesisVdpMemoryInterface;
import omegadrive.vdp.model.GenesisVdpProvider;
Expand All @@ -34,6 +35,8 @@
import java.util.Arrays;
import java.util.Optional;

import static omegadrive.SystemLoader.SystemType.GENESIS;
import static omegadrive.system.SystemProvider.NO_CLOCK;
import static omegadrive.vdp.model.GenesisVdpProvider.VdpRegisterName.*;

/**
Expand Down Expand Up @@ -79,6 +82,7 @@ public void setup() {
vdpProvider = opt.get();
memoryProvider = optMem.get();
MdVdpTestUtil.vdpMode5(vdpProvider);
MdRuntimeData.newInstance(GENESIS, NO_CLOCK);
}

private void setup68kRam() {
Expand Down
6 changes: 5 additions & 1 deletion src/test/java/omegadrive/vdp/md/BaseVdpDmaHandlerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import omegadrive.bus.model.GenesisBusProvider;
import omegadrive.util.LogHelper;
import omegadrive.util.MdRuntimeData;
import omegadrive.util.SystemTestUtil;
import omegadrive.vdp.MdVdpTestUtil;
import omegadrive.vdp.model.GenesisVdpProvider;
Expand All @@ -32,6 +33,8 @@
import java.util.Optional;
import java.util.stream.IntStream;

import static omegadrive.SystemLoader.SystemType.GENESIS;
import static omegadrive.system.SystemProvider.NO_CLOCK;
import static omegadrive.vdp.model.GenesisVdpProvider.VdpRamType.VRAM;

@Ignore
Expand All @@ -48,8 +51,9 @@ public void setup() {
Optional<GenesisVdpProvider> opt = busProvider.getBusDeviceIfAny(GenesisVdpProvider.class);
Assert.assertTrue(opt.isPresent());
vdpProvider = opt.get();
memoryInterface = (VdpMemoryInterface) vdpProvider.getVdpMemory();
memoryInterface = vdpProvider.getVdpMemory();
MdVdpTestUtil.vdpMode5(vdpProvider);
MdRuntimeData.newInstance(GENESIS, NO_CLOCK);
}

protected void testDMAFillInternal(int dmaFillLong, int increment,
Expand Down
6 changes: 5 additions & 1 deletion src/test/java/omegadrive/vdp/md/GenesisVdpTest2.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import omegadrive.bus.model.GenesisBusProvider;
import omegadrive.util.LogHelper;
import omegadrive.util.MdRuntimeData;
import omegadrive.util.Size;
import omegadrive.util.SystemTestUtil;
import omegadrive.vdp.MdVdpTestUtil;
Expand All @@ -34,7 +35,9 @@

import java.util.Optional;

import static omegadrive.SystemLoader.SystemType.GENESIS;
import static omegadrive.bus.model.GenesisBusProvider.VDP_ADDRESS_SPACE_START;
import static omegadrive.system.SystemProvider.NO_CLOCK;
import static omegadrive.vdp.model.GenesisVdpProvider.VdpRamType.*;
import static omegadrive.vdp.model.GenesisVdpProvider.VramMode.*;

Expand All @@ -54,7 +57,8 @@ public void setup() {
Optional<GenesisVdpProvider> opt = busProvider.getBusDeviceIfAny(GenesisVdpProvider.class);
Assert.assertTrue(opt.isPresent());
vdpProvider = opt.get();
memoryInterface = (VdpMemoryInterface) vdpProvider.getVdpMemory();
memoryInterface = vdpProvider.getVdpMemory();
MdRuntimeData.newInstance(GENESIS, NO_CLOCK);
}


Expand Down

0 comments on commit fc7e313

Please sign in to comment.