Wednesday, April 29, 2020

SoundTracker Pro II - Progress #2

soundtrack2.png As I continue to program, I bumped into a problem with the soundtracker pro 2. The problem was the Portamento function, while in Protracker, you keep repeating the command on each row until the note is finished portomentoeing (however you spell this! lol) .

To tackle the way SoundTracker Pro 2 deals with this, you set the note and its command ONCE, and the player assumes the command is in effect until a new note or command is used. I had to create a translator for this, since this would be too slow to keep doing while playing on the fly. On the pattern loading it deals with the commands for us. Set the command once, and the translator will add the same commands to the sequencial rows until the same rule occured.

As a result, we got a nice portamento effect working. I’ve still yet to completely test as each pattern is loaded, there is a good chance the translation system could reset and leave a note half portamento’d… only time and testing will tell…MsMadLemon is going to have a field day listening to her tunes and pointing out the things that didn’t work or does’t sound right.

so the progress report is done here :)

Thank you for reading.

Tuesday, April 28, 2020

SoundTracker Pro II - Progress - Effects

soundtrack2.png The project is now taking on some real meat now. The sounds and effects are seemingly working without even trying now. I am suprised and thankful that most of the commands in the format seem to work very very much the same as protracker! I’ve spent HOURS on that

49xx - Protracker sampleoffset command. Start sample at offset $xx00.
4E6x - Protracker patternloop command. x=0:set loop, x=n, loop n times
4EEx - Protracker patterndelay command. Delay x notes after playing note
4Fxx - Protracker speed/tempo command. xx<$20: set speed, xx>=$20: set bpm.

with these available to me i’ve been able to implement the Sampleoffset and the speed and temp commands now!

Monday, April 27, 2020

The History of the Sidbox

sidbox0.jpgThe day I began to play with the microcontrollers was fun and interesting, from just turning on motors to lighting up LED’s.

While these where fun and I did make some pretty cool devices, such as a home automation. I began to yern for things like audio.

In the end I learned what I could get my hands on, and one day while listening to good old Sid tunes with Sidplay.exe, I thought, I’d love to hear this stuff on a chip, instant ON battery powered SIDPlay.

I created my own audio Sidchip with 8 channels, but it was fairly basic, didnt’ have Ring mod, PWM controls… So I desperately looked into how the C64 played its chip tunes and I found it was a lot more involved than I initially thought… As a result I slumped and almost gave up, after about a year I decided to have another go.

Starting with the need for the 6502 Core, and I wrote a small program on it and found that the core did work, the CORE emulation worked on a PIC MCU running on a 40Mhz chip!

So I proceeded to learn about the SID 8582 (it was the only chip I physically had) and begin to learn how this bird sang.

After MONTHS of tearing hair our, punching walls and crying, I got a sidchip working, but it wasn’t enough, the SIDCHIP worked in my c64, but i wanted to have it independently PLAY music from the MCU it self, that required the CPU emulation also, which sadly the 40Mhz MCU worked well enough to produce a very very low quality sid noise

Upgrading from an 8BIT MCU i used the dsPIC24, 16bit running at 70Mhz which MADE alot of difference, and built this…

This little device did everything I needed, so I added a very basic file system FAT16 to it, and would only read ONE file on the root, but it loaded that sid tune into its small ram, 32K (so only a small sid file was allowed, 1k) and more programming time was thrown into this.

It picked up the file and BADLY played the SID tune, BUT it gave it a go.
After many more weeks of figuring out whats going on, was a stupid signed char, not a unsigned char that made the difference…
Gates worked, pitch and audio stepping and phase worked!

this chip could only produce a small 22khz output but it was more than good enough for tiny speakers.

I started to think this was IT, a portable SID player! instant on, ready to go in a second and playing music! (greating cards anyone?)

sidbox_start.jpgI wonder if I could make a 4 channel amiga MOD play on this, there wasn’t enough memory to perform this action here, so I upgraded to another dsPIC33 which had 512k Rom, and 128k Ram,

THEN this little machine was born

this was the very very first sidbox made, it had no volume control nor a DAC, it was purely done with an amp, the TDA2822 with a PWM source in, wow the pure clean sound (lol) it was grainy and alot of electrical noise appeared on this amp too! no filtering (since I was still researching how to do this)

I used this for a few days, before I began to really redesign the mainboard, this has a volume control and much better noise handling however the PCB still was a 2 layer board so all the signal and power rails where all mixed up on the 2 layers, yupp that was a rookie mistake right there…

sidbox3.jpg

still this unit and I got on with each other for just a year.

Then microchip sent me a sample chip, just turned up at the door and I thought, ok I’ll see what this does…

THAT was the PIC32MZ that we all know and love today!

pic32mz.jpg

it currently runs our sidbox now. I’ve been developing the OS and the players and a total redesign of the PCB, 4 layer board, with the two power plates inside the board, giving it a nice capacitor feel so everything got a nice gulp of power where it needed, and shielding. all the signals on the top and bottom layers for ram and display and virtually ZERO noise! there was some from the display but that was gone when I tethered a ground wire from the displays shield plate! now, there is no sound at all! Well not that I can tell. even with the Scopes!

sidbox4.jpg

This is what the sidbox is today.

We have begun a nice facebook group and is gaining interest everyday!

Soon we’ll be able to start the kickstarter!

With everyone backing and supporting this project, we’ll go far!!!

Sidbox 5 - Testing Board

It has come to our attention that the sidbox could do with a little more horse power, So what we have found was a new chip, the STM32H743

nucleo.jpg

It is 400Mhz (Can be 480 it appears!) of ARM CPU power! has 1 Meg of RAM ONBOARD!! and with 144 pin outs, This should allow for this like fast framerates, more animations on screen, and the ability to use external RAM transparently.

What we thought was to have this newer model come with 4 Meg of RAM, or 8 if we can find the same chip. I am still looking into what kind of RAM we can use, PSDRAM, DRAM or just good old (but expensive) SRAM.

So the new specs will be as follows!

  • 400 Mhz CPU
  • 1 Meg Internal Ram (for video and fast cache audio) with 4Meg External Ram
  • Internal DAC
  • DMA Screen data transfer (so the cpu can continue doing work while the screen is being updated!
  • Possible USB action, easy firmware update, it seems you just plug in the sidbox and it shows up like a drive letter, plop the new firmware on it and thats it!
  • More players, XM modules, and MORE S3M channels, i REALLY want to get TFMX to work

As We find out more about this chip and what it can do, We are sure to see some amazing things happening here

** This will not change the developement time because everything else is already done, unless we have to totally redesign the PCB and CASE which took me only a few weeks anyway **

I Really hope this new board will pose some serious applications!

Who knows! maybe a Sidbox Micro? Who wants to do some good BASIC on a Sidbox Micro? HANGS UP!!

Sunday, April 26, 2020

Put your thoughts here!

While I am working towards bettering the Blogging system, I am hoping to have good discussion base here.

Please keep it clean, no spam, no links to other websites (unless its related to the topic)

Thank you.

SoundTracker Pro II

soundtrack2.png After having a problem with reading the format provided by Marco Nelissen, I have to admit that the Psuedo code was a little hard for me to understand.

It wasn’t until ModPlug Tracker had they’re own loader written, C++, and when i looked into the file, things started to make sence.

As soon as I started to program my loader, the files .STP started to make sence, i’ve been since able to read the file as close to properly as possible.

As a result, I’ve been able to extract samples and their loop infomation, turns out i was able to extract each sample into a nice wav file for later use ;)

Then i found the patterns causing some issues. They could be any length from 1 - 9999! WHO USES THAT many rows in one pattern!! Anyways, I ended up having to use a sort of Pattern POINTER, its quick, and simple.

The messy part was, Load the Header, Look at the sample data, load the patterns and their info in to a bank of memory for the points, THEN re-read the sample data for their pointer locations.

I was then able to make patterns load and run. No effects, but the notes are almost identical to that of a Mod!
except i have to now work out the periods needed for the extra 2 octives!

here is the code i used to read through the file

void load_stp_header(FILE *file){
    unsigned char iOrder;
    fread(&mod, 1, 204, file);

    printf("HEADER: %srn", mod.ftype);
    btsEndien16(&mod.version); printf("VERS: %urn", mod.version);
    printf("patterns: %urn", mod.numOrders);
    printf("patternLength: %urn", mod.patternLength);

    btsEndien16(&mod.speed);      printf("speed: %urn", mod.speed);
    btsEndien16(&mod.speedFrac);  printf("speedFrac: %urn", mod.speedFrac);
    btsEndien16(&mod.numSamples); printf("numSamples: %urn", mod.numSamples);
    btsEndien16(&mod.timerCount); printf("timerCount: %u // %Xrn", mod.timerCount, mod.timerCount);
    btsEndien16(&mod.flags);      printf("flags: %urn", mod.flags);
    //btsEndien(&mod.reserved);   printf("reserved: %lurn", mod.reserved);

    printf("rnMidi Inforn");
    btsEndien16(&mod.midiCount);  printf("  MidiCount: %urn", mod.midiCount);
        //printf("    Midi[%2u] = [%2u]rn", iOrder, mod.midi[iOrder]);

    btsEndien16(&mod.sampleStructSize);  printf("rnsampleStructSize: %urn", mod.sampleStructSize);
    printf("-------------------------rnrn");

    Player.cia = mod.timerCount;
}

More to come…

About the Sidbox

Using the microchips MCU and an EXTERNAL SRAM 512k worth, it allows cache the tunes into that area, it allows to run 6502 from there also and the internal 512k SRAM is used for the video graphics, and ton of functions.

The unit has the power to unLHA good old archvies into ram, and then play them.

PLEASE NOTE: The unit is unavailable for sales at the moment, multple sections still not programmed and debugged.

The Sidbox

sidbox.jpg I’ve decided to try to do a blog on the progress of the Sidbox project.

you can find more out about this in the Sidbox Facebook Group

This is the sound of the sidbox as it stands right now

Songs list

  1. 1: Make Love (not war) Atari ST (With EQ on) (YM)
  2. 1: Make Love (not war) Atari ST (With EQ off) (YM)
  3. 2: Sanxion C64 SID (With EQ on) (SID)
  4. 2: Sanxion C64 SID (With EQ off) (SID)
  5. 3: Kefmania-Theme Amiga MOD (With EQ on) (MOD)
  6. 3: Kefmania-Theme Amiga MOD (With EQ off) (MOD)
  7. 4: Dispostable Hero CD32 WAV (With EQ on) (WAV)
  8. 4: Dispostable Hero CD32 WAV (With EQ off) (WAV)

have a good listen to!