Home > Projects / Repairs, Sid Player, Various > Come è nato il progetto The Return of the Hybrid SID Player?

Come è nato il progetto The Return of the Hybrid SID Player?

The Return of the Hybrid SID Player

In questo post cercherò brevemente di riassumere la cronostoria del progetto “The Return of the Hybrid SID Player”.

Da sempre ho avuto la scimmia di costruire un SID Player standalone che non fosse completamente emulato, in quanto sono un Purista dei brani musicali SID e del CHIP sonoro SID (6581/8580).

Negli ultimi anni ho provato diversi SID Player, e nell’ultimo periodo mi sono concentrato sull’emulatore SID di Bakisha (basato su MCU STM32F407VET6 che adoro) upgradandolo aggiungendo un display OLED ILI9341 e alcune informazioni a schermo.

Sfruttando lo stesso progetto, ma questa volta utilizzando l’MCU STM32F401CCU6, ho invece aggiunto la possibilità di pilotare un SID Reale (ringrazio Bakisha per il prezioso supporto).

Purtroppo il Player era rimasto in uno stadio embrionale, almeno rispetto quello che avevo in mente e alle aspettative che ritengo si debbano avere da un software di quel tipo.

Dopo aver cercato in rete (per evitare di perdere tempo a reinventare la ruota) ho trovato il progetto Hybrid Sid Player di Markus Gritsch, pubblicato sul forum Dangerousprototypes e rilasciato tra il 2011 – 2015.

Il progetto di Markus prevedeva, oltre l’emulazione del SID, anche l’utilizzo di un SID reale esterno, di un display OLED, un Browser dei files con la possibilità di utilizzare un Encoder Rotativo e VU-METER, SID Digi in formato PSID (pre HVSC #50), e SID con multi Tunes, oltre ad un formato proprietario chiamato DMP, che permetteva anche di poter ascoltare (dopo una semplice conversione) i files SID nel nuovo formato RSID.

Purtroppo la CUI32 DEV Board sulla quale era stato sviluppato il Player non è più disponibile da molti anni, quindi per assemblare il progetto ho utilizzato la DEV Board PIC32-T795 di Olimex, basata sullo stesso MCU Microchip PIC32MX795F512H.

The Return of the Hybrid SID Player

Tutto ha girato praticamente da subito, ma purtroppo mancavano alcune importanti funzionalità. Ho pensato di contattare Markus per sapere se fosse intenzionato a continuare con il progetto, ma purtroppo non era più interessato e, tra l’altro, sorpreso che il sorgente si compilasse anche con la nuova versione dell’MPLAB X IDE di Microchip.

A quel punto non ho potuto fare altro che iniziare lentamente a leggere e comprendere il codice sorgente da lui scritto, riuscendo ad aggiungere diverse caratteristiche (che potete leggere nel changelog riportato di seguito).

Una volta raggiunta una buona stabilità del firmware mi son detto: ora bisogna fare il PCB! Non posso tenere tutto sulla breadboard, in quanto non è decisamente indicato lavorare con segnali audio Analogici su una Breadboard, sopratutto se sei un purista del suono e del SID!

Da solo però non ce l’avrei mai fatta a realizzare un progetto del genere, avevo assolutamente bisogno di una mano. Ho pensato così di contattare Gianluca Renzi di RetroBit Lab, persona con un’ottima esperienza in Elettronica, PCB design e Programmazione. La mia idea gli è piaciuta fin da subito, ed ha preso a cuore il progetto disegnando da zero lo schema elettrico, occupandosi della scelta dei componenti e curando alcune critiche sezioni di alimentazione. Non sto ad elencarvi tutte le prove che abbiamo fatto, ma vi assicuro che sono state tante!

Pignolo e Paranoico io e Pignolo Gianluca, dopo diversi mesi, siamo riusciti a partorire il prototipo dello stampato che potete vedere qui di seguito.

Attualmente manca la stampa del PCB e il relativo assemblaggio dei componenti, testarne il funzionamento e, nel caso di problemi, applicare dei fix volanti, correggere lo schema elettrico e di conseguenza lo stampato.

L’ultimo passo sarà quello di scrivere una breve documentazione e rilasciare tutto su GITHUB, in modo che chiunque possa avere modo di autocostruirsi il proprio SID Player e, nota importante, di aggiungere funzionalità al software, risolvere bug oppure, perché no, riscrivere anche tutto da zero! Lo stampato lo permette ed è stato pensato per essere dinamico e adattarsi alla fantasia e alle esigenze del programmatore.

Gallery:

Video:

…altri video qui.

Changelog:

The return of the Hybrid Sid Player by xAD/Nightfall & Gianluca Renzi (RetroBitLab)

Based on the Project and Hardware Schematic by Markus Gritsch released in the years 2011-2015 on the forum dangerousprototypes. Thanks Markus.

v1.03 – 01/04/2021

Updated:

- Reset Timer when the MODE key is pressed for the following modes: SEQUENTIAL – RANDOM – INTRO.
- Replaced the code for the EEPROM emulator with a real EEPROM 24LC256 (BitBang/I2c Mode). No more Timing Problem.

Added:

- Serial Debug via UART1 (RD3).
  The firmware will be released in two differents versions, one with the Debug enabled and one without.
- Splash Screen Logo.
- New fourth choice for the button MODE, it’s called The INTRO mode. (i like it!)
  It will play the first 15 seconds of the SID and then automatically select a new one at Random.
  If you like the SID you are listening to just press the MODE button to switch to Manual MODE and the SID will not change.
  This option remindful the old MP3 players that had the INTRO option to listen the first 30 seconds of the music track.
 
Fixed:

- Missing INCLUDE to remove the error “unable to resolve the symbol… tolower()” but MPLABX compile the code anyway :D
- The label of the SID Model Version in case the sid have subsongs is too large, fixed with a workaround. I am realizing now this OLED screen is too small :-D

Various:

- Cleaned up a bit the code with some unused functions.

v1.02 – 04/03/2021

Updated:

- Changed connection of Buttons [Previous|Next] (RB0 & RB1) because are conflict with the ICSP (thanks Gianluca Renzi [Te lo avevo detto! :D]) to RB3 and RB4,
  RB2 is already used by the MODE button.

Fixed:

- Reset timer when the playing MODE is changed.
- SID Model Version displayed accidentally when the playing MODE is changed.
- Pseudo Random.
- *DMP (Dump) Custom File Format Broken in the previous version v1.01.

* The DMP is a custom file of the original RSID format after a conversion.
  More information here: http://dangerousprototypes.com/forum/index.php?topic=2197.msg41618#msg41618

Various:

- Optimizing code.

v1.01 – 23/02/2021

Added:

- Button MODE for choose how to play the song: MANUAL – SEQUENTIAL – RANDOM.
  Since can’t implement songlenghts, the song changes every 2 minutes.

v1.0 – 09/02/2021

Updated:

- Adjusted Brightness when is used a OLED Display 1.3″
- 2 Secs wait time for the SpashScreen.
- Modified Splash Screen.

Added:

- Button for Next SID in the same folder and it start from the first one when reach the last one.
- Button for Previous SID in the same folder and it start from the last one when reach the first one.
- SID Model Version when Playing a SID, displayed the firsten 3 seconds and then show again the play icon .

Todo:

- Draw a Circuit Diagram with some enhancements and make a Prototype PCB and share the project for all. *This is NOT a commercial project*

- Update the FATFS Library by ChaN
– http://elm-chan.org/fsw/ff/00index_e.html

- Add Illegal Opcodes to the 6502/6510 Emulator and also Optimizing the CPU Emulator.
– https://www.oric.org/ftp/ceo/ceomag/downloads///ebooks/nomoresecretsnmos6510.pdf
– http://www.oxyron.de/html/opcodes02.html

- SID Playlist.
- Realtime Switching 6581/8580 if ARMSID is used.
- Use the Button MODE to open an advanced setup menu.
- Loading files error handling.

- Add Firmware Upgrade via USB Pen Drive.
– https://www.eeweb.com/wp-content/uploads/articles-app-notes-files-pic32-bootloader-1335647102.pdf

  1. Martin Pasta
    1 May 2021 a 0:52 | #1

    Hi there,

    Nice job ;-). I’ve been playing with the original project for some time now. I was able to compile the code only in mplab 8 and struggling a bit with dual boot. I need to always burn dualboot first with erasing everything and then burn hybrid sid and netsid sequentially (it’s bit annoying). Would you mind to share the x ide project that I could play with it? Also do you have some hints for keeping the sound quality as best as possible? I am on prototype board so it’s bit difficult as the wiring is bit messy. I’ve managed to keep digital lines mainly separated from audio and 5V and 9V for 8580. Also I am using separate LDOs for those voltages and using TL072 as amp. I suspect that display is adding some high pitch noise to the sound so thinking about switching it off instead of dimming after some timeout period.

    Regards,
    Martin.

  2. 1 May 2021 a 10:50 | #2

    Hi Martin,

    The schematic/pcb and sources will be made public on github as soon as i have the final prototype for the latest checks and implementations and a help for the software part is welcome to improve it.

    Last night i added a couple of illegal opcodes for the 6502/6510 cpu emulator, some tunes use them, others instead block completely, they are very few and i have to debug and understand why it happens.

    In my opinion i should completely replace the current CPU emulator and replace it and partially remove the SID emulator which i am not interested in, i want to use only the real SID.

    This fucking OLED generates a lot of noise, i have fixed it 99% with a RLC filter.

    d.

    https://electronics.stackexchange.com/questions/441907/filtering-out-oled-electrical-noise
    https://www.eevblog.com/forum/projects/oled-audible-noise/

  3. Martin Pasta
    1 May 2021 a 22:03 | #3

    Thanks for hint with OLED, i’ll give it a try. Looking forward for schema/code and future progress.

    Take care.

  4. John de Rooij
    30 September 2021 a 23:56 | #5

    hI mARTIN,
    iS tHIS pROJECT aLREADY aVAIL 4 dIy?

    nEED 2 bUILD THIS!

    aWESOME!

  5. Martin
    10 October 2021 a 11:31 | #6

    Hi,

    How is it going with your project? Is the latest version of the software source code available somewhere or is it still not published?

    Regards,
    Martin.

  6. 10 October 2021 a 12:56 | #7

    @Martin

    Hi Martin,

    Before releasing the sources i have to implement some functionality that are available only in the PCB.

    I await the PCB and after the implementations if everything is ok, i will release the sources on github.

    Here the changelog of the changelog :D

    https://www.nightfallcrew.com/category/today/projects_repairs/sid-player-projects_repairs/

*