Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/Spice86.Core/CLI/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,4 +370,30 @@ public sealed class Configuration : CommandSettings {
[DefaultValue(true)]
public bool EnableSpeculativeCfgExploration { get; init; } = true;

/// <summary>
/// Gravis UltraSound I/O base address (default: 0x240).
/// Common values: 0x210, 0x220, 0x230, 0x240, 0x250, 0x260.
/// </summary>
[CommandOption("--GusBase <GUSBASE>")]
[DefaultValue((ushort)0x240)]
public ushort GusBase { get; init; } = 0x240;

/// <summary>
/// Gravis UltraSound IRQ number (default: 5).
/// Valid values: 2, 3, 5, 7, 11, 12, 15.
/// Default of 5 allows coexistence with a Sound Blaster card.
/// </summary>
[CommandOption("--GusIrq <GUSIRQ>")]
[DefaultValue((byte)5)]
public byte GusIrq { get; init; } = 5;

/// <summary>
/// Gravis UltraSound DMA channel (default: 3).
/// Valid values: 1, 3, 5, 6, 7.
/// Default of 3 allows coexistence with a Sound Blaster card.
/// </summary>
[CommandOption("--GusDma <GUSDMA>")]
[DefaultValue((byte)3)]
public byte GusDma { get; init; } = 3;

}
8 changes: 7 additions & 1 deletion src/Spice86.Core/CLI/RuntimeOptions/AudioRuntimeOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ namespace Spice86.Core.CLI.RuntimeOptions;
/// <param name="SbDma">8-bit DMA channel used by the emulated Sound Blaster card.</param>
/// <param name="SbHdma">16-bit DMA channel used by the emulated Sound Blaster card.</param>
/// <param name="SbType">Sound Blaster model to emulate.</param>
/// <param name="GusBase">Gravis UltraSound I/O base address.</param>
/// <param name="GusIrq">Gravis UltraSound IRQ number.</param>
/// <param name="GusDma">Gravis UltraSound DMA channel.</param>
public sealed record class AudioRuntimeOptions(
AudioEngine AudioEngine,
string? Mt32RomsPath,
Expand All @@ -25,7 +28,10 @@ public sealed record class AudioRuntimeOptions(
byte SbIrq,
byte SbDma,
byte SbHdma,
SbType SbType) {
SbType SbType,
ushort GusBase,
byte GusIrq,
byte GusDma) {
/// <summary>
/// Sound Blaster base I/O address.
/// </summary>
Expand Down
5 changes: 4 additions & 1 deletion src/Spice86.Core/CLI/RuntimeOptions/RuntimeOptionsMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ public static AudioRuntimeOptions ToAudioRuntimeOptions(Configuration configurat
configuration.SbIrq,
configuration.SbDma,
configuration.SbHdma,
configuration.SbType);
configuration.SbType,
configuration.GusBase,
configuration.GusIrq,
configuration.GusDma);
}
}
Loading
Loading