My Teensy 3.1 Commodore SID Emulation / Player

Status
Not open for further replies.
Frank you are "The Man" :D

Im going to solder a pinheader onto the teensy after work tommorrow and give all this a go over xmas :)
 
hi i have just installed arduino 1.6.7 and teensyduino Beta, but im getting a compile error ???

C:\Users\user\AppData\Local\Temp\buildb5c8050153053bebccae74d3bf254918.tmp\sketch\sid.cpp:29:29: fatal error: reSID\envelope.cc: No such file or directory
#include "reSID\envelope.cc"
^
compilation terminated.

Any ideas anyone ??

edit - sketch folder is C:\Users\user\Documents\Arduino\reSID
Arduino dir is G:\tools and stuff\arduino-1.6.7

thanks lee
 
Last edited:
but that file is included :)
Sounds like a wrong installation.
1 Close Arduino.
2. Create a subirectory "reSID" inside your private "libraries" -folder under "Documents\Arduino"
3. Copy the contens of the directory from the zipfile into the newly created folder "reSID" - there will be another "reSID" folder inside the first, like this : Documents\Arduino\libraries\reSID\reSID
(..here's the missing file "envelope.cc", too)
4... i just noticed that the directory-structure is for the example is wrong. Just double - click on the reSID.ino file in your explorer. Arduinio will ask you how to proceed (click "ok")
 
Last edited:
but that file is included :)
Sounds like a wrong installation.
1 Close Arduino.
2. Create a subirectory "reSID" inside your private "libraries" -folder under "Documents\Arduino"
3. Copy the contens of the directory from the zipfile into the newly created folder "reSID" - there will be another "reSID" folder inside the first, like this : Documents\Arduino\libraries\reSID\reSID
(..here's the missing file "envelope.cc", too)
4... i just noticed that the directory-structure is for the example is wrong. Just double - click on the reSID.ino file in your explorer. Arduinio will ask you how to proceed (click "ok")

OK Im still having major trouble with this.

Im on windows 7 , i was running arduino IDE from a zip download , i had programmed several non-teensy boards before so i know it had worked , I installed 1.6.7 also from zip and the teensyduino, Thats how i got yesterdays results.

Today i cleared the installation , downloaded the 1.6.7 package installer and installed and also installed teensyduino , so far so good.

created "reSID" folder in ARDUINO.
copied contents of the zip directory into above .
Inside ARDUINO/reSID/ there is another reSID folder.
moved reSID.ino into ARDUINO/reSID.

verified and got....

C:\Users\user\AppData\Local\Temp\buildb5c8050153053bebccae74d3bf254918.tmp\sketch\sid.cpp:29:29: fatal error: reSID/envelope.cc: No such file or directory
#include "reSID/envelope.cc"
^
compilation terminated.

The envelope.cc is in the ARDUINO/reSID/reSID folder.

what have i messed up ??? :(
 
For my 'private' libraries, in the IDE I did "File / Preferences / Sketchbook Location" to a directory as "C:\tCode". That directory is where I save all my private sketches and it also has a "C:\tCode\libraries" directory where I put any 'private' local libraries.

If you did a layout like this you should put the files there in libraries\reSID and have all the files needed in that single directory.

I only do the 'unzip installs' at this time ( to I:\... ) as then the installer doesn't impute any knowledge or control over my system so I can have multiple 'zip installs' that all work.

The sketchbook independent of any install lets me wipe and install any IDE with no harm to my 'private' stuff that works across any install.

A library there takes precedence over other installed libraries and the IDE confirms that on compiling, thanks to Paul.

<edit> I'm not ready to try this yet - but pulled the ZIP to my indicated libraries folder.

The IDE 1.6.7 no longer shows 'libraries' as a folder under 'sketchbook' as it did before, and I look to 'examples' to see 'Teensy-reSID' where I see reSID twice and no EXAMPLES? [ this is odd layout? ]

So I opened first reSID and it compiled for me as dumped from the ZIP file - and I had a private "SdFat" that I had to remove from my libraries as it is now old.

Directory of C:\tCode\libraries\Teensy-reSID
12/29/2015 04:20 PM <DIR> examples
12/29/2015 04:20 PM 59 README.md
12/29/2015 04:20 PM <DIR> reSID
12/29/2015 04:20 PM 2,457 reSID.cpp
12/29/2015 04:20 PM 1,986 reSID.h
12/29/2015 04:20 PM 2,072 sid.cpp
12/29/2015 04:20 PM 1,616 sid.h
 
Last edited:
*Facepalm*

I feel such a pilchard.......

OK, I created C:\Teensycode\Libraries\reSID

dumped the contents of the zip directory into above

Created C:\Teensycode\reSID

copied reSID.ino alone into above.

set my IDE to read C:\Teensycode as sketchfolder

And......... IT COMPILES !!! :D

Many thanks all , think i have so much too learn......
 
SO.......

I'm learning a little bit and have hacked the SIDASTER synth into the teensy along with the reSID code from frank.

So far, so good , mono synth is working under usbmidi control with access too all 3 voices and there options.

Im working on some new POLY synth code which will give 2 modes.....

duo mode - 2 notes using the whole sid each for each note , 3osc etc but sharing wave / adsr / filter / ring / sync settings between virtual SIDS (hopefully if i get 2 sids running along with my spaghetti code)

poly mode - 6 notes using 1 voice per note (again , if i get 2 sids running)

Else it will be 3 notes and duo will be mono :D

Lee
 
Last edited:
I was told, that there might a problem with two SIDs.
I'm currently very busy, but i look at this, as soon as i can.

I started working on the 6502-emulation too - i can't promise that it will be fast enough together with reSID, but i'm very curious if the T3.2 is able to play SID-files... the needed RAM-relocation for the c64emulation adds some more cpu-cycles. i reall don't know if this all will work , but, hopefully, i can say more in feb.

Frank
 
...does anybody know wether it would be allowed to include a copy of the C64-ROMs ?
Running the C64-Basic interpreter on the Teensy would be cool :)
 
Are you asking about copyright?? the rule for game roms is that you can't use them unless you are licensed ... and that is usually meaning "own the rom itself" ... even then you would have to wonder about format shifting ... depends on the terms of the license you have... I'm guessing copyright isn't up yet on C64 roms ... then there is the whole copyright in software / hardware issue
 
Problem ?

I'm going to try assigning 1 SID to each channel as a start.

I may even try to set up a master slaves type deal at some point with multiple teensys :D

but even with 1 SID and once polyphony and pitchbend , patchs etc work i will work on adding 1v/octave and CV support.

As for copyright......... (there's always 1) Vice supplies roms with its emulator .
And, As this is a hobby project would anyone really be bothered about coming after (legally) a sid player ??
 
hmmmm..Yep definately a problem , tried 2 SIDS and it locked teensy :/

Hi,

i have good & bad news:

good news: i have a 2 SID working version
bad news: you have to compile it with 144MHz -O2

But maybe this is ok for a synthesizer...

I want to clean up it a bit first, and upload it soon (maybe tomorrow)

(edit: just for fun i'm playing two different DMP-Files parallel at the moment..sounds like funfair..)
 
Last edited:
2 Sids

Hi,

i have good & bad news:

good news: i have a 2 SID working version
bad news: you have to compile it with 144MHz -O2

But maybe this is ok for a synthesizer...

I want to clean up it a bit first, and upload it soon (maybe tomorrow)

(edit: just for fun i'm playing two different DMP-Files parallel at the moment..sounds like funfair..)

For a synth 1 sid is fine , Have re-written the midi code from Sidaster almost completely and 3 voice poly mode is working very well.

Im trying to implement some effects that normally would be done from the 6502 , Tremolo , Vibrato , anything that alters settings at 50hz etc

Does the resid code use so much cpu time by itself ?

Maybe a master / slave arrangement for multisids a'la midibox :)

Wondering if a teensy and resid could be used in a real c64 like the swinsid ?

lee
 
For a synth 1 sid is fine , Have re-written the midi code from Sidaster almost completely and 3 voice poly mode is working very well.

Im trying to implement some effects that normally would be done from the 6502 , Tremolo , Vibrato , anything that alters settings at 50hz etc

Does the resid code use so much cpu time by itself ?

Maybe a master / slave arrangement for multisids a'la midibox :)

Wondering if a teensy and resid could be used in a real c64 like the swinsid ?

lee

Yes, the reSID code needs much cpu time. Keep in mind that it was written for desktop-computers!
But there are not much places to optimize.

I've done some updates and (small)optimizations during the last days (..and there are more planned)

And i've uploaded an example for two sids.

Regards,
Frank.

edit: add 6 voices poly mode to sidaster :)
 
Last edited:
I've done some little optimizations, and took some improvements from the newest, not seperately published version of reSID (Version 1.0)
"DemoSauce" speed is increased by some FPS.
The code needs some cleanup, and i think in some days i can update the github-version.

The main reason for this post is: I have decided to put the SID-Player and 6502-Emulation on hold until the the next Teensy with more RAM is released.
That additional RAM is really needed, and it will be faster. So, it makes more sense to wait.

Regards,
Frank.
 
Last edited:
Sid

I've done some little optimizations, and took some improvements from the newest, not seperately published version of reSID (Version 1.0)
"DemoSauce" speed is increased by some FPS.
The code needs some cleanup, and i think in some days i can update the github-version.

The main reason for this post is: I have decided to put the SID-Player and 6502-Emulation on hold until the the next Teensy with more RAM is released.
That additional RAM is really needed, and it will be faster. So, it makes more sense to wait.

Regards,
Frank.

A new Teensy !!!!! **** Facepalm **** will it be pin compatible ??

I have designed some pcb boards for a mega SID implementation ala MIDIBOX based on all this and im current doing a CV pcb board :D

so far i have a routing board that splits the midi into 16 and also houses a Teensy SID voice , A SPI board with 24 analogue inputs and 16 Digital inputs & 16 Digital outputs.
 
will it be pin compatible ??

Yes. The plan is a 48 pin form factor, where the 28 left-most pins are exactly the same.

If you're designing a board or project now, perhaps keep any tall part outside of the 1.0 by 0.7 inch region to the right side of the Teensy, so you'll be able to let the larger board hang into that space.
 
Sid

Yes. The plan is a 48 pin form factor, where the 28 left-most pins are exactly the same.

If you're designing a board or project now, perhaps keep any tall part outside of the 1.0 by 0.7 inch region to the right side of the Teensy, so you'll be able to let the larger board hang into that space.

FANTASTIC...... I couldnt find any specs anywhere for the upcoming teensy though.

I got the best "bang for buck" out of the pcb's i sent to the board house so they will no doubt be revised. :D
 
A little update:
I had not much time (job..) , but had some minutes today and got my Teensy-C64 running :)
Currently it's not very compatible, due to not enough RAM (that will change with the new Teensy) - But it does a 6510 CPU emulation (including "unofficial opcodes + interrupts) , emulation of both CIAs, the PLA-Chip , and the VIC (i'm still working on a fast sprites-emulation - theoretical, it is compatible enought to do some nice raster-line effects - but not tested)
I myself am curious whether the teensy will be fast enough for Sound - the SID emulation is still very very cpu-expensive. Worst case, i'll add an additional teensy for sound. It will be not too much work, because it's already running standalone - just have to include as soon i have enough RAM.

I'm tried to upload a video but youtube is hanging.. maybe later...
 
Last edited:
Cool. Could 4 bit parallel 128MB RAM chip at 24 MHz be used on T_3.2? Like you did for ParFlash. Maybe with a couple cache blocks in Teensy Ram? Depends on how widely the C64 code accesses the full extent of its RAM and READONLY versus write.
 
Hm, i think no. You can run BASIC-Programs, usually the don't need the RAM > 40KB, since it is not usable for Basic (with a small hole at $C000)
For games and machine-code it makes almost no difference where they run and which regions they (random-)access, and they do it :) It would be too slow.
The pure 6510-emu is able to run @ 3x speed of the original, but all the other chips are emulated too, they need the remaining cpu-cycles.. currently i'm @ 1.5x speed, but without SID and the sprites are only partially done..
 
Last edited:
:eek: - Finished reading the page I had open - RAM used were already 100ns. That would be tough to achieve with other stuff going on and no cryo cooling and software addressing. Get used to everything having changed so much (CPU speed *100) - and some things not so much - RAM/HDD. Next Teensy should be a big help with RAM and Speed - spare SPI etc.
 
Status
Not open for further replies.
Back
Top