Releases: polpo/picogus
v4.1.1
Fixes/improvements
Fixes major issues in v4.1.0 where stale printf code in modes would cause the firmware to panic.
SB mode
- Fixes clicks during single-cycle DMA audio playback.
GUS mode
- Fixes one of the longest-lived bugs in GUS mode: playmidi in the GUS DOS software package now works!
v4.1.1-beta.1
Fixes/improvements
Fixes major issues in v4.1.0 where stale printf code in modes would cause the firmware to panic.
SB mode
- Fixes clicks during single-cycle DMA audio playback.
GUS mode
- Fixes one of the longest-lived bugs in GUS mode: playmidi in the GUS DOS software package now works!
v4.1.1-beta.0
Fixes/improvements
Fixes major issues in v4.1.0 where stale printf code in modes would cause the firmware to panic.
GUS mode
Fixes one of the longest-lived bugs in GUS mode: playmidi in the GUS DOS software package now works!
v4.0.0
New features/changes
Sound Blaster 16
SB mode now emulates a Sound Blaster 16. I had a somewhat-working implementation of the SB16 DSP in late 2024 but was discouraged by poor compatibility in Windows. Recently the ISA analyzer firmware (see below) gave me an easier way to compare PicoGUS to how a real SB16 behaves when detected by Windows and fix the long-standing bugs. Massive thanks to Artem Vasilev (wbcbz7) who implemented proper mixer support and implemented a ton of additional fixes, including support for DMA controller demand mode, all of which made SB16 and SBPro support truly usable.
OPL3 support is provided by the dbopl OPL3 emulator (this was the default OPL3 emulator in DOSbox until somewhat recently). The previous emu8950 OPL2 emulator is still available in Adlib mode, and has some improvements thanks to Daniel Arnold (Delphius): fixes to timer 2 and disabling of some of the optimizations made to emu8950 for rp2040-doom that affect sound quality. Delphius also experimented with Aaron Giles's ymfm for OPL2/OPL3 emulation but it has some issues with RAM and CPU usage so it's not used for now.
Because PicoGUS is an 8-bit card, it does not support high DMA. This is actually a mostly-supported configuration for SB16: several versions could be jumpered to disable high DMA, and the Creative Vibra 16X/16XV does not support high DMA at all. Almost all SB16-supporting software is fine working without high DMA, or configuring the same DMA channel for both low and high DMA.
SB mode also supports Sound Blaster Pro stereo properly and still supports SB 2.0. pgusinit can be used to set the DSP version reported by PicoGUS. The Line In channel in the SB mixer also controls the volume of the wavetable header on PicoGUS 2.0 boards, or is ignored on 1.0 boards.
ISA analyzer firmware
PicoGUS now has an ISA analyzer firmware that captures and logs ISA bus activity. This was inspired by the IDE analyzer firmware I wrote for PicoIDE. Having a tool like this brings a ton of insight into what's going on in the bus. Note that the analyzer firmware is made for developers so you must compile it yourself, and it runs on the PicoGUS 1.x board with the RP2350-based Pico 2 or Pimoroni Pico Plus 2.
Fixes/improvements
CD-ROM support
- The stock Win9x MKEPanasonic driver can now be used with PicoGUS. This driver does not peg the CPU like the Creative driver, which should give much more acceptable performance. Credit to 86Box as a reference for this fix.
- CD-ROM speed in SB mode is even faster again - I've gotten speeds between 3.75X and 4.75X in DOS.
- Lots of general fixes & improvements to CD-ROM support, thanks to Daniel Arnold (Delphius): protocol correctness fixes, pgusinit /cdlist stability, CUE parsing, and larger CD audio buffer.
GUS mode
- The audio rendering in GUS mode is now interrupt-driven like SB mode. This allows for finer grained handling of IRQs which should help random freezes in GUS titles, and frees up CPU to allow more titles to work with forced 44.1kHz sampling rate.
- Fixes volume ramp rate calculation in force 44.1kHz mode.
- Fixes a race condition when updating volume ramp, again helping random freezes.
General
- Reverted back to the pre-v3.2.0 method of overclocking the RP2040. This should hopefully fix the "doesn't come back after changing modes" issue reported by some people.
v3.2.1
Fixes/improvements
pgusinit
Fixes several regressions in pgusinit:
- Fixes issue where port settings are parsed as decimal, not hex (fixes /mpuport, /gusport, /cdport, etc.)
- Fixes /sbport and /gusport commands not passing through option
- Fixes /wifistatus command
- Restores /defaults command
General
- Gives VREG a bit more time to settle at bootup/reset. Should improve stability on initial poweron, after changing modes, or flashing firmware.
v3.2.0
Fixes/improvements
General
- Settings saved in flash with
pgusinit /saveare now preserved when upgrading to a firmware version that introduces new settings - Volume control is now available for all sources. For example, in SB mode, the SB DSP, OPL2, and CD-ROM audio volumes can be independently controlled. Thanks to Daniel Arnold (Delphius) for contributing this!
- DualShock 4 gamepad support has been fixed
SB mode
Sound Blaster playback has been almost completely rewritten, removing a major bottleneck and freeing up way more CPU time.
- Crashing on titles with simultaneous SB DSP & OPL2 fixed
- High-quality assembly optimized FIR polyphase resampler for much better sounding OPL2 output. Huge thanks to korneliuszo for contributing this and other optimizations!
- Direct DAC mode is back after being dropped in firmware v3.0.0
- Too-slow MPU-401 output in SB mode fixed (main symptom was long delay until music starts in Sierra titles)
- CD-ROM speed now faster in SB mode - improved from 2x to 3x
pgusinit
pgusinit has been almost completely refactored, thanks again to Daniel Arnold (Delphius). It not only helps future maintainability but brings new quality of life features:
- Long output like CD image listing and extended help text now pauses instead of scrolling off the screen
- Progress bar when flashing firmware instead of filling the screen with dots
- More helpful text if there are missing arguments
- Values can be set back to their default values with a
defaultargument. Example:pgusinit /cdport default - Added support for volume control via commands like /sbvol, /cdvol, etc.
v3.1.0
Fixes
CD-ROM emulation
Many fixes/improvements to CD image handling:
- Add ability to load image by name
- Fix memory leak when changing images (file handle not freed, causing crash after switching images several times)
- Less memory usage all over
- Longer max file length limit (127 chars)
- Better errors when USB not present
- Fix polling of CD status register when listing images
- Many weird edge cases with image loading state fixed
v3.0.1
Fixes
SB and USB modes
Fixes MPU-401 output in SB and USB modes. It was broken by the introduction of CD-ROM emulation in SB mode and it never actually worked in USB mode!
v3.0.0
(note: please use firmware v3.0.1, which fixes issues with MPU emulation in SB and USB modes)
New features/changes
CD-ROM emulation
PicoGUS now supports CD-ROM emulation (in other words, PicoGUS is now an ODE)! It emulates a Panasonic/MKE interface and drive and supports CD images in ISO or BIN/CUE stored on a USB drive plugged into the USB port on the PicoGUS. CD-ROM emulation has been tested in DOS and Windows 9x and CD audio playback is fully supported.
CD-ROM emulation is available in Sound Blaster and USB modes. Sound Blaster mode really pushes the limit of the RP2040: it mixes CD audio, SB DSP, and OPL sound while simultaneously supporting CD data and MPU-401 emulation. The emulated drive is approximately 2x speed in SB mode and 3x-4x speed in USB mode. Disc images can be swapped on the fly with pgusinit, and multi-disc games are supported by removing and reinserting the USB drive to advance the current disc image.
For more information and a guide on how to use CD-ROM emulation on PicoGUS with recommended drivers, known limitations, etc., visit the new CD-ROM emulation wiki page.
Massive thanks to Kevin Moonlight (yyzkevin) for reverse engineering the Panasonic/MKE interface and contributing the bulk of the underlying code for this emulation.
Also major thanks to rppicomidi for greatly improving mass storage speed for the RP2040 in TinyUSB and Artem Vasilev (wbcbz7) for additional fixes and rebasing on a more recent state of the repository. Without their work, USB mass storage would not be nearly fast enough to support CD-ROM emulation on the RP2040. These improvements are still not merged into the upstream project, so here's hoping that can be completed.
And thanks to all who tested this firmware before release to surface bugs and edge cases I wouldn't have been able to find myself. Cue sheets are the wild west of formats!
Tandy/CMS modes combined into new PSG (programmable sound generator) mode
To reduce firmware size and prepare for future support for other PSG sound chips (here's a hint, it's the AY-3 as used on the Mindscape Music Board), Tandy and CMS modes have been combined into a single PSG mode. It can be selected with pgusinit /mode psg, but the old /mode tandy and /mode cms switches still work for backwards compatibility.
Fixes
pgusinit
When pgusinit couldn't detect a PicoGUS, it would erroneously continue trying to configure the card. This would result in a strange firmware version mismatch error. This has now been fixed.
Known issues
Sound Blaster mode
Due to the addition of CD-ROM emulation to SB mode, SB DSP audio now runs through a FIFO. This may result in some playback issues that are being worked on. Also "Direct DAC" mode (mostly used by older titles) is not currently supported.
General
Due to the addition of new settings, any saved settings done with /pgusinit save on previous firmware versions will be reset to defaults when upgrading to firmware v3.0.0.
v2.2.0
New features/changes
NE2000 emulation/WiFi
Please note that this mode is not supported on PicoGUS 2.0! It needs a v1.1, v1.2, or Femto version of the PicoGUS that takes a Raspberry Pi Pico and requires a Pico W! I made this mode mainly just so I could use WiFi on my Pocket386 with a Femto card plugged into it. At least for now, NE2K mode comes in its own separate firmware file (pg-ne2k.uf2) and no other emulation is enabled when this firmware is loaded. Due to this limitation and the fact that the PCB design of the PicoGUS 1.x is not ideal for WiFI reception, consider this mode just a bit of a nice bonus. Config options have been added to pgusinit for NE2000 and WiFi SSID/password settings.
Fixes
Sound Blaster 2.0 emulation
- Fixes detection in Windows 9x, allowing SB mode to work in Windows 9x. Thanks to Ian Hanschen (@ianhan) for contributing the fix.
- Fixes detection in Tyrian and Dig-It! Thanks again to Ian Hanschen for the fix.
- Fixes detection in STMIK-based demos (Mental Surgery by Future Crew, SX by Substance, Min Monitor Briner by Syntax Error, probably others)
GUS emulation
- Fixes intelligent mode MIDI buffer overrun and slow MIDI output in GUS mode. Usually showed up as an "Exc. Checksum Error" on the MT-32 screen.
General
- Fixes issue with setting port numbers less than 0x100 or ending in 00. This fixes common port settings like 0c0 for Tandy or 0x300 for NE2000
- Refactors timers to be less jittery; shouldn't be noticeable in practice but may fix some GUS emulation edge cases.