-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
helios: default to padding roms to a reasonable size
- Loading branch information
Federico Berti
committed
Apr 17, 2022
1 parent
ec1e29f
commit 2260df5
Showing
8 changed files
with
146 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
#linux | ||
sudo usermod -a -G audio <user> | ||
sudo usermod -a -G pulse-rt <user> | ||
sudo usermod -a -G jackuser <user> | ||
sudo usermod -a -G pipewire <user> | ||
|
||
#set Pulse latency | ||
export PULSE_LATENCY_MSEC=50 | ||
|
||
#show current latency | ||
pactl list sinks | grep Lat | ||
|
||
run visudo | ||
add: <user> ALL=NOPASSWD:/usr/bin/nice | ||
start the process: nice -n -5 <cmdLine> | ||
|
||
#see /etc/pulse/daemon.conf | ||
default-fragments = 2 | ||
default-fragment-size-msec = 25 | ||
# | ||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | ||
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package omegadrive.util; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
|
||
import static omegadrive.util.Util.th; | ||
|
||
/** | ||
* Federico Berti | ||
* <p> | ||
* Copyright 2022 | ||
*/ | ||
public class RomHolder { | ||
|
||
private final static Logger LOG = LogManager.getLogger(RomHolder.class.getSimpleName()); | ||
|
||
public static final RomHolder EMPTY_ROM = new RomHolder(new int[1]); | ||
|
||
public int baseSize, size, romMask; | ||
public int[] data; | ||
|
||
public RomHolder(int[] rom) { | ||
this.data = Util.getPaddedRom(rom); | ||
this.size = data.length; | ||
this.baseSize = rom.length; | ||
this.romMask = Util.getRomMask(size); | ||
assert romMask == size - 1; | ||
if (baseSize != size) { | ||
LOG.info(this::toString); | ||
} | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "RomHolder{" + | ||
"romSize=" + th(baseSize) + | ||
", paddedSize=" + th(size) + | ||
", romMask=" + th(romMask) + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters