109 Commits
Author SHA1 Message Date
Ian Scott 2be3565e5c Firmware v4.1.0 2026-04-13 22:31:52 -06:00
Ian Scott 889dfa89c7 Better messaging when BLASTER has problems 2026-04-13 18:20:56 -06:00
Ian Scott 78a92f1d95 pgusinit: print loaded CD image after /cdload 2026-04-13 18:20:56 -06:00
Ian Scott 54dbdfa9bd pgusinit general fixes 2026-04-13 18:20:56 -06:00
Ian Scott f325a59c0e Revert "protocol == 1 it's never reached because b is never == 512" 2026-04-13 18:00:27 -06:00
Ian Scott bd1a58f3cb Merge pull request #135 from andreacampanella/error_by_one_protocol
protocol == 1 it's never reached because b is never == 512
2026-04-13 08:37:30 -06:00
Andrea campanella 58f99d5660 protocol == 1 it's never reached because b is never == 512 2026-04-10 18:31:03 +01:00
Andrea campanella 95e4cd017e fixed typo that passes irq instead of DMA 2026-04-10 18:23:45 +01:00
Ian Scott db355ec4d6 Merge branch 'wss-sb16' into sb16_merge
Bring in SB16/WSS support (bufferless SB DSP, AD1848, SB mixer, IRQ/DMA configuration) and 0.12 fixed-point volume scaling from wss-sb16, and combine with stereo OPL3 pipeline and lock-free SPSC audio FIFO from sb16_merge.
Conflict resolutions:
- volctrl.h: use 0.12 scale from wss-sb16 (no int64_t)
- sbplay.cpp: keep stereo opl_resample_tick() with clamp16 before resampler buffers; lock-free SPSC FIFO reads with stereo volume; add sbdsp_process() from wss-sb16
- pgusinit.c: use wss-sb16's full BLASTER parser (A/I/D/H/T fields)
2026-03-28 23:50:22 -06:00
Daniel Arnold 82de83fe3a Update versioning v3.3.0-beta 2026-03-28 11:53:01 -06:00
Daniel Arnold 82fa438059 feat(opl): add ymfm OPL2/OPL3 backend with true stereo output
Adds ymfm as a new OPL synthesis backend alongside the existing emu8950
implementation, selectable at compile time via USE_YMFM_OPL / USE_YMF3812.

- ymf262 (OPL3): 18-channel true stereo via data[0]/data[1] (L1/R1)
- ym3812 (OPL2): mono, duplicated to both channels
- Pre-generation buffer (128 samples) for cache-efficient synthesis
- Stereo FIFO pipeline in sbplay: interleaved L/R pairs, proper resampling
  from 49716 Hz to 44100 Hz via Q16.16 phase accumulator
- OPL3 bank 2 port handling in SOUND_SB path (ports +0xA/+0xB) and
  SOUND_OPL path (port mask widened to 0x3fc, case 2/3 added)
- opl_addr widened to uint16_t to carry the 0x100 bank 2 flag
- OPL3 bank 2 status read port (oplBasePort+2) added to IOR handler
- Panning bits default to 0x30 (L1+R1) for 0xC0-0xC8 regs when unset,
  preventing channels from going silent after newflag (reg 0x105) is set
- pgusinit: BLASTER T type now accepts T3-T6 (adds SB16 OPL3 / AWE32)
- Removed OPL cmd buffer drain spin-wait from IOR path (timer regs are
  handled on core 0, no drain needed)
2026-03-28 11:53:01 -06:00
wbcbz7 5e8dec0c89 pgusinit: add option to init GUS/SB mode reosurces (base port, IRQ, DMA) from ULTRASND/BLASTER environment variable. 2026-03-28 23:05:35 +07:00
wbcbz7 4bf5631472 SB: finalize IRQ/DMA/options settings 2026-03-22 00:56:38 +07:00
Ian Scott d3ac864d9c Firmware version 3.2.1 2025-09-26 07:27:32 -06:00
Ian Scott 4466438c9b pgusinit: fix /wifistatus 2025-08-25 23:38:37 -06:00
Ian Scott e1f5b6b5dc pgusinit: actually get SB/GUS port option 2025-08-25 23:25:42 -06:00
Ian Scott 60742596ab pgusinit: restore /defaults command 2025-08-25 23:25:42 -06:00
Ian Scott a63103f70a pgusinit: fix bug where port is parsed as decimal 2025-08-25 23:08:30 -06:00
Ian Scott 2b2b995e22 v3.2.0 release 2025-08-09 15:46:00 -06:00
Ian Scott 4fc7cdedf2 Fix progress bar and extraneous newlines 2025-08-09 10:28:03 -06:00
Ian Scott bf6c52c607 More pgusinit refactor 2025-08-09 08:34:09 -06:00
Ian Scott c54450481f Refactor parseCommand and various commands
This means not having to pass the index into argv[] around, etc.
2025-08-08 22:08:41 -06:00
Ian Scott 0b92610043 Merge branch 'House_Keeping' into sb_bufferless_ng_volume 2025-08-07 22:13:24 -06:00
Ian Scott b2fc8ea00d Rename MODE_ to CMD_ to be less confusing 2025-08-07 19:50:47 -06:00
Ian Scott fb8638eca1 pgusinit quality of life improvements:
Restoration of prior pgusinit functionality:

- Case insensitive command line switches
- Bail out if there are errors detecting the card
- Bail out on firmware mismatch, but allow flashing new firmware

More QoL improvements:

- Generic paging interface that detects rows on screen
- /? and /?? are paged
- /cdlist uses new paging interface
2025-08-07 17:28:35 -06:00
Daniel Arnold 1c939997e9 Fix printUSBMode() typo 2025-07-08 06:57:32 -06:00
Daniel Arnold 93dc398b22 Consolidate all volume printf to printVolume() 2025-07-07 08:07:34 -06:00
Daniel Arnold a9892121f0 /cdlist paging 2025-07-06 19:48:30 -06:00
Daniel Arnold 77f9a05681 Add /save into command parser 2025-07-06 08:31:24 -06:00
Daniel Arnold 123247d958 Remove no commands check 2025-07-06 07:20:26 -06:00
Daniel Arnold 5f2976550e Finish main() cleanup 2025-07-05 14:52:31 -06:00
Daniel Arnold c9868f0d25 Remove unused variables 2025-07-04 11:55:59 -06:00
Daniel Arnold 95419bbfbc Use gMode for main card mode
This name might be temporary, but separating the main card mode from register modes to help remove overlap.
2025-07-04 11:53:25 -06:00
Daniel Arnold 286b7f1481 Print status functions
More clean up to main(). I am finding there is some overlap with the term "mode" which indicates the global card mode (ex. SB_MODE, GUS_MODE, etc) as well as register modes communicating with PicoGUS. The next commit I will probably spend some time distinguishing these two types for clarity.
2025-07-04 11:20:13 -06:00
Daniel Arnold 80c90a532e Add exit codes to CD load functions, fix /cdloadname, clean out void returns 2025-07-04 08:11:17 -06:00
Daniel Arnold 077fd8504c ctrlGet commands, cleanup printf feedback 2025-07-03 19:53:03 -06:00
Daniel Arnold e2fa0f75b7 Iterative command parser
Refactored the inline argument commands into functions that iterate through a command table. This should help make input commands more robust and easier to expand.

It also allows for default values when setting options. For example if the user wants a default value for the OPL port, they can use "/oplport default".

Since /sbport and /gusport always check the environment for SET BLASTER and SET ULTRASND, I added the function for pgusinit to retrieve these values from the environment directly. This could open up environment parsing for other variables in the autoexec.bat.

The commands should behave exactly as I did when they were inline to start, but can now easily be expanding.
2025-07-03 19:53:03 -06:00
Daniel Arnold 66b61eb0b2 Progress bar when flashing 2025-07-03 19:53:03 -06:00
Daniel Arnold 4dd60f8c4e Volume control tighten up 2025-07-01 10:57:53 -06:00
Daniel Arnold c84773c562 Volume control 2025-06-30 07:56:53 -06:00
Ian Scott 140fabb478 Update pgusinit README 2025-06-23 22:41:08 -06:00
Ian Scott a2904c9929 Add /loadname to pgusinit usage, update pgusinit README 2025-06-22 11:40:16 -06:00
Ian Scott 02ba99b6aa Many fixes/improvements to CD image handling:
- Fix memory leak when changing images (file handle not freed)
- Longer max file length limit (127 chars)
- Better errors when USB not present
- Fix polling of CD status register when listing images
- Add ability to load image by name
- Many weird edge cases with image loading state fixed
2025-06-21 23:46:50 -06:00
Ian Scott 8a987afcf4 Bump pgusinit and protocol version 2025-06-19 08:11:07 -06:00
Ian Scott 191ab382a2 Fix selecting wrong mode in pgusinit 2025-06-19 08:01:15 -06:00
Ian Scott 180e1db710 Consolidate Tandy and CMS into PSG mode 2025-06-18 18:30:01 -06:00
Ian Scott 23f80828b9 Better handling of CD image load errors 2025-06-17 23:55:49 -06:00
Ian Scott c968918bc3 Optionally auto-advance image on USB reinsert 2025-06-14 18:25:31 -06:00
Ian Scott e611f2672f Let pgusinit get name of loaded CD image 2025-06-12 23:10:52 -06:00
Ian Scott d0df0cdd42 CDROM checkpoint, hacky AdLib 2025-06-12 23:10:52 -06:00