Skip to content

Commit b844281

Browse files
committed
Merge branch 'sb_bufferless_ng_volume'
2 parents 2f686c2 + 2b2b995 commit b844281

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2202
-5155
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,25 @@ jobs:
1313
PICO_EXTRAS_PATH: ${{github.workspace}}/pico/pico-extras
1414
OUTPUT_DIR: ${{github.workspace}}/binaries
1515
steps:
16+
# Act is a utility for testing github actions locally. Only run when in act.
17+
- name: Install Act dependencies
18+
if: ${{ env.ACT }}
19+
run: apt-get update && sudo apt-get install curl build-essential cmake -y
20+
1621
- name: Checkout repo with submodules
1722
uses: actions/checkout@v4
1823
with:
1924
submodules: recursive
2025

26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.13'
30+
cache: 'pip' # caching pip dependencies
31+
32+
- name: Install Python dependencies
33+
run: pip install sympy scipy more-itertools
34+
2135
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
2236
uses: carlosperate/arm-none-eabi-gcc-action@v1
2337
with:
@@ -93,7 +107,7 @@ jobs:
93107
uses: open-watcom/setup-watcom@v0
94108
with:
95109
version: "2.0-64"
96-
tag: "2024-03-01-Build"
110+
tag: "2025-07-01-Build"
97111

98112
- name: Build pgusinit
99113
working-directory: ${{github.workspace}}/pgusinit

common/picogus.h

Lines changed: 53 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -47,49 +47,56 @@ static const char *modenames[8] = {
4747
"NE2000"
4848
};
4949

50-
#define MODE_MAGIC 0x00 // Magic string
51-
#define MODE_PROTOCOL 0x01 // Protocol version
52-
#define MODE_FWSTRING 0x02 // Firmware string
53-
#define MODE_BOOTMODE 0x03 // Mode (GUS, OPL, MPU, etc...)
54-
#define MODE_GUSPORT 0x04 // GUS Base port
55-
#define MODE_OPLPORT 0x05 // Adlib Base port
56-
#define MODE_SBPORT 0x06 // SB Base port
57-
#define MODE_MPUPORT 0x07 // MPU Base port
58-
#define MODE_TANDYPORT 0x08 // Tandy Base port
59-
#define MODE_CMSPORT 0x09 // CMS Base port
60-
#define MODE_JOYEN 0x0f // enable joystick
61-
62-
#define MODE_GUSBUF 0x10 // Audio buffer size
63-
#define MODE_GUSDMA 0x11 // DMA interval
64-
#define MODE_GUS44K 0x12 // Force 44k
65-
66-
#define MODE_WTVOL 0x20 // Wavetable mixer volume
67-
#define MODE_MPUDELAY 0x21 // MPU sysex delay
68-
#define MODE_MPUFAKE 0x22 // MPU fake all notes off
69-
70-
#define MODE_OPLWAIT 0x30 // Adlib speed sensitive fix
71-
72-
#define MODE_MOUSEPORT 0x40 // Mouse Base port
73-
#define MODE_MOUSEPROTO 0x41 // Mouse protocol
74-
#define MODE_MOUSERATE 0x42 // Mouse report rate
75-
#define MODE_MOUSESEN 0x43 // Mouse sensitivity
76-
77-
#define MODE_NE2KPORT 0x50 // NE2000 Base port
78-
#define MODE_WIFISSID 0x51 // WiFi SSID
79-
#define MODE_WIFIPASS 0x52 // WiFi password
80-
#define MODE_WIFIAPPLY 0x53 // apply WiFi settings
81-
#define MODE_WIFISTAT 0x54 // WiFi status
82-
83-
#define MODE_CDPORT 0x60 // CD base port
84-
#define MODE_CDSTATUS 0x61 // Get CD image command status
85-
#define MODE_CDERROR 0x62 // Get CD image error
86-
#define MODE_CDLIST 0x63 // List CD images
87-
#define MODE_CDLOAD 0x64 // Load CD image or get loaded image index
88-
#define MODE_CDNAME 0x65 // Get name of loaded CD image
89-
#define MODE_CDAUTOADV 0x66 // Set autoadvance for CD image on USB reinsert
90-
91-
#define MODE_DEFAULTS 0xE0 // Select reset to defaults register
92-
#define MODE_SAVE 0xE1 // Select save settings register
93-
#define MODE_REBOOT 0xE2 // Select reboot register
94-
#define MODE_HWTYPE 0xF0 // Hardware type
95-
#define MODE_FLASH 0xFF // Firmware write mode
50+
#define CMD_MAGIC 0x00 // Magic string
51+
#define CMD_PROTOCOL 0x01 // Protocol version
52+
#define CMD_FWSTRING 0x02 // Firmware string
53+
#define CMD_BOOTMODE 0x03 // Mode (GUS, OPL, MPU, etc...)
54+
#define CMD_GUSPORT 0x04 // GUS Base port
55+
#define CMD_OPLPORT 0x05 // Adlib Base port
56+
#define CMD_SBPORT 0x06 // SB Base port
57+
#define CMD_MPUPORT 0x07 // MPU Base port
58+
#define CMD_TANDYPORT 0x08 // Tandy Base port
59+
#define CMD_CMSPORT 0x09 // CMS Base port
60+
#define CMD_JOYEN 0x0f // enable joystick
61+
62+
#define CMD_GUSBUF 0x10 // Audio buffer size
63+
#define CMD_GUSDMA 0x11 // DMA interval
64+
#define CMD_GUS44K 0x12 // Force 44k
65+
66+
#define CMD_WTVOL 0x20 // Wavetable mixer volume
67+
#define CMD_MPUDELAY 0x21 // MPU sysex delay
68+
#define CMD_MPUFAKE 0x22 // MPU fake all notes off
69+
70+
#define CMD_OPLWAIT 0x30 // Adlib speed sensitive fix
71+
72+
#define CMD_MOUSEPORT 0x40 // Mouse Base port
73+
#define CMD_MOUSEPROTO 0x41 // Mouse protocol
74+
#define CMD_MOUSERATE 0x42 // Mouse report rate
75+
#define CMD_MOUSESEN 0x43 // Mouse sensitivity
76+
77+
#define CMD_NE2KPORT 0x50 // NE2000 Base port
78+
#define CMD_WIFISSID 0x51 // WiFi SSID
79+
#define CMD_WIFIPASS 0x52 // WiFi password
80+
#define CMD_WIFIAPPLY 0x53 // apply WiFi settings
81+
#define CMD_WIFISTAT 0x54 // WiFi status
82+
83+
#define CMD_CDPORT 0x60 // CD base port
84+
#define CMD_CDSTATUS 0x61 // Get CD image command status
85+
#define CMD_CDERROR 0x62 // Get CD image error
86+
#define CMD_CDLIST 0x63 // List CD images
87+
#define CMD_CDLOAD 0x64 // Load CD image or get loaded image index
88+
#define CMD_CDNAME 0x65 // Get name of loaded CD image
89+
#define CMD_CDAUTOADV 0x66 // Set autoadvance for CD image on USB reinsert
90+
91+
#define CMD_MAINVOL 0x70 // Main Volume
92+
#define CMD_OPLVOL 0x71 // Adlib volume
93+
#define CMD_SBVOL 0x72 // Sound Blaster volume
94+
#define CMD_CDVOL 0x73 // CD Audio Volume
95+
#define CMD_GUSVOL 0x74 // GUS Volume
96+
#define CMD_PSGVOL 0x75 // PSG Volume
97+
98+
#define CMD_DEFAULTS 0xE0 // Select reset to defaults register
99+
#define CMD_SAVE 0xE1 // Select save settings register
100+
#define CMD_REBOOT 0xE2 // Select reboot register
101+
#define CMD_HWTYPE 0xF0 // Hardware type
102+
#define CMD_FLASH 0xFF // Firmware write mode

pgusinit/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ settings. Options may be given for other settings:
3939
* `/wtvol x` - sets wavetable header volume to x percent (PicoGUS 2.0 boards
4040
only). Available in all modes in case you want to use the wavetable header
4141
as an aux input (for example for an internal CD-ROM drive).
42+
* `/mainvol x` - sets main volume level for all outputs.
4243
* `/mode x` - changes the card to mode specified by x. Options:
4344
- `gus`: Gravis Ultrasound
4445
- `sb`: Sound Blaster 2.0 & AdLib. Supports CD-rom emulation.
@@ -77,6 +78,7 @@ port specified in ULTRASND.
7778
voices. Using this option enables 44.1kHz output for all numbers of voices,
7879
similar to the Interwave. This will result in stuttering in most games that
7980
use streaming DMA for sound effects like Doom, hence it is EXPERIMENTAL.
81+
* `/gusvol x` - sets the volume of the GUS output to x percent.
8082

8183
See the Compatibility List wiki for notes on programs that require special
8284
settings for the above options:
@@ -88,6 +90,7 @@ https://github.com/polpo/picogus/wiki/Compatibility-list
8890
* `/oplport x` - sets the base port of the OPL/AdLib. Defaults to 388.
8991
* `/oplwait` - wait on OPL2 data write. Can fix speed-sensitive early AdLib
9092
games on fast systems (example: 688 Attack Sub).
93+
* `/oplvol x` - sets the volume of the OPL2 output to x percent.
9194

9295
### MPU-401 options
9396

@@ -99,10 +102,12 @@ https://github.com/polpo/picogus/wiki/Compatibility-list
99102
### Tandy options
100103

101104
* `/tandyport x` - sets the base port of the Tandy 3-voice. Defaults to 2c0.
105+
* `/psgvol x` - sets the volume of the PSG output to x percent.
102106

103107
### CMS options
104108

105109
* `/cmsport x` - sets the base port of the CMS. Defaults to 220.
110+
* `/psgvol x` - sets the volume of the PSG output to x percent.
106111

107112
### Serial mouse settings
108113

@@ -124,6 +129,7 @@ that do not require an IRQ: AdLib, CMS, Tandy, and USB.
124129
* `/cdload n` - load image n in the list given by /cdlist. 0 to unload image
125130
* `/cdloadname x` - load CD image by name. Names with spaces can be quoted
126131
* `/cdauto 1|0` - auto-advance loaded image when same USB drive is reinserted
132+
* `/cdvol x` - sets the volume of the CD audio output to x percent.
127133

128134
## Compiling
129135

0 commit comments

Comments
 (0)