Shop OBEX P1 Docs P2 Docs Learn Events
SIDPLAYER for VGA — Parallax Forums

SIDPLAYER for VGA

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2012-07-07 11:59 in Propeller 1
Just finished up a revision of my SIDPLAYER for VGA configurations. (Updated)

SIDPLAYER SCREENSHOT.JPG


Designed with QuickVGA+ in mind, this will work on any Demoboard setup with additional SD configuration.

Grab a copy it from here (There is a file of SID DMP files as well)

Edit: Ahle2 was kind enough to share his personal DMP collection as well:
SidDumpsMegaArchive_zip
OriginalSIDcogDemoTunes_zip

Dump the DMP files into a folder called "dmp" on your SD card.

OBC
803 x 602 - 389K
«1

Comments

  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-06-11 21:08
    Hey, that looks fun!

    I'm barely keeping up with all your cool code at the moment. Keep up the good work OBC.
  • pik33pik33 Posts: 2,397
    edited 2012-06-11 23:03
    Tested your player smile.gif

    Nice 8-bit look smile.gif

    It doesn't work in overclocked environment (vga driver fails)
    It can see only 10 (from over 100) files on my fat32 sdhc card (it seems only Kye's SD driver can read this card well) ....

    It looks that it is a time to have a vga media player. At least two of us started to making one. :)

    I started this from something like "dos" - now it has only two commands. "dir" to list a directory and "play" to play a sid.
    And it was a first try to get it all working together: Kye's fat32 driver, Ahle's sidcog, kbd/mouse combo and my Nostalgic VGA.
    1024 x 768 - 73K
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-12 09:21
    @pik33

    Nice! I need to work Kye's fat32 driver back into my code. My version of Sidplayer currently uses fsrw meaning that your DMP files need to be in the root of the SD card.

    OBC
  • onewheeltomonewheeltom Posts: 40
    edited 2012-06-12 10:14
    It figures, I just finished adding "composite out" to my VGA+ board, and now I don't need it. :-)

    Standardizing on drivers for SD and VGA would be a good next progression. At the very least, document which SD driver and VGA driver is being used. This would be much more friendly to Propeller novices like myself. The current situation can be a bit frustrating.

    --tom
  • pik33pik33 Posts: 2,397
    edited 2012-06-12 10:18
    Next version. The code is now a heap of mess, but it works. Now it tries to read a file header and make use of it if found (song name and play frequency)
    1024 x 768 - 110K
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-12 10:30
    @Tom,

    Sorry about that! :) I really prefer the look/accuracy of the VGA picture over the composite NTSC signal. With the recent work being done by Karl, Alex, Marko, and pik33, we've got a lot of really great options for VGA displays.

    @pik33,

    Love the highlighter approach to selecting a SID file! Well done!

    OBC
  • pik33pik33 Posts: 2,397
    edited 2012-06-12 10:48
    Standardizing on drivers for SD and VGA would be a good next progression. At the very least, document which SD driver and VGA driver is being used.

    --tom


    There is only one SD driver which can work with SDHC FAT32 cards: Kye's one.

    It is harder to use than fsrw, (I still have to understand how to handle this abort stuff it uses instead of error codes) but fsrw can't see all files in the main directory of my 8 GB SDHC card.

    And, yes, there are A LOT of different drivers for everything.... and I I added another one for vga...
  • Ahle2Ahle2 Posts: 1,179
    edited 2012-06-12 12:30
    Nice to see so much interest in SID-players from a lot of different individuals. :)

    I had to dig out my old demo board (it's from 2007) to test out these VGA enabled players. I was shocked once again of the POOR audio quality. I wonder if Parallax fixed the low cutoff frequency on the demo board and C3??
    It really is a matter of awful versus quite good. I'm guessing that some people turns down the Propeller as a viable solution for audio playback when they have tested the demo board. (or the C3)
  • pik33pik33 Posts: 2,397
    edited 2012-06-12 12:54
    My demo board outputs a good sound. Sidcog sound from demo board seems to be better than PC Sid players. I didn't notice too low cut frequency - maybe this is fixed version...
    And if these audio circuits are not good... maybe it is worth to try some free demo board pins (4..7, 0..3 are used by sd card) with RC circuit as audio out?
  • Ahle2Ahle2 Posts: 1,179
    edited 2012-06-12 13:25
    @pik33
    Have a look at this old thread: http://forums.parallax.com/showthread.php?129224
    T
    he difference is quite big!
  • pik33pik33 Posts: 2,397
    edited 2012-06-12 13:34
    ... listened to these samples - this demoboard has too low cut frequency, too.

    Now, two things to do (1) measure it (2) make a correction...
  • onewheeltomonewheeltom Posts: 40
    edited 2012-06-12 16:10
    I can't tell which file is the main. The best I get is a blank screen when I load and run "siddos".

    I am using the GadgetGangster VGA+. Do I need to change any code?

    Thanks,
    Tom
  • kuronekokuroneko Posts: 3,623
    edited 2012-06-12 16:14
    I can't tell which file is the main. The best I get is a blank screen when I load and run "siddos".
    This is the main file. However, it's still set to what seems to be the authors favourite clock frequency (117MHz). Try adjusting that for your board.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-12 16:25
    @Pik33,

    Could you post a copy of your work that runs that these settings?
       _clkmode  = xtal1 + pll16x
       _xinfreq  = 5_000_000
    

    OBC
  • onewheeltomonewheeltom Posts: 40
    edited 2012-06-12 17:24
    Jeff,

    I'm only seeing the DMP files that are in DOS filename format (8.3). The other names show up truncated. Even if I type in the full file name, it fails (flips to the start screen, then right back).

    --tom
    Just finished up a revision of my SIDPLAYER for VGA configurations.

    SIDPLAYER SCREENSHOT.JPG


    Designed with QuickVGA+ in mind, this will work on any Demoboard setup with additional SD configuration.

    Grab a copy it from here (There is a file of SID DMP files as well)

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-12 20:49
    @Tom,

    I've updated the SIDPLAYER, (grab a new copy from the archive) with KyeDos so it should support the files now. Naturally, you'll need to type them in in their "truncated" form for them to load. Also, create a sub-directory on your SD card called, "dmp" and move them all there. This version supports Kye's sub directory commands.

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-12 20:52
    I can't tell which file is the main. The best I get is a blank screen when I load and run "siddos".

    I am using the GadgetGangster VGA+. Do I need to change any code?

    Thanks,
    Tom

    Looks like there is a timing issue in the pik33's VGA code. I'm getting a flashing screen here.
    Edit: Looks like Marko's got a fix, but I'll let him post it.

    OBC
  • kuronekokuroneko Posts: 3,623
    edited 2012-06-12 21:33
    I added a modified driver in the [post=1104330]driver main thread[/post]. Only the sync issue has been addressed.
  • pik33pik33 Posts: 2,397
    edited 2012-06-12 21:37
    @Pik33,

    Could you post a copy of your work that runs that these settings?
       _clkmode  = xtal1 + pll16x
       _xinfreq  = 5_000_000
    

    OBC

    Comment _clkfreq=117_xxx_xxx in the header
    Uncomment _clkfreq=80_000_000
    I change these 3 crystals (5,6.25,7.3) from time to time to test if it works and it is why there are 3 _clkfreq lines in the header (2 of them commented)
    It should work.
  • pik33pik33 Posts: 2,397
    edited 2012-06-12 23:40
    kuroneko wrote: »
    I added a modified driver in the [post=1104330]driver main thread[/post]. Only the sync issue has been addressed.


    Added a new version of this driver with positive sync, frq manually patched for 80 MHz and some bug fixes.
  • pik33pik33 Posts: 2,397
    edited 2012-06-13 02:12
    Ahle2 wrote: »
    @pik33
    Have a look at this old thread: http://forums.parallax.com/showthread.php?129224
    T
    he difference is quite big!

    Measured my board output with oscilloscope. There is low pass filter there....
  • pik33pik33 Posts: 2,397
    edited 2012-06-13 05:11
    Sidplayer 0.03

    Changes:
    - some mess removed
    - some bugs removed
    - used new vga driver version with positive sync and patched frqa
    - default clkfreq set at 80 MHz

    Main file is siddos.spin
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-13 09:12
    Nice player!

    I added a couple line to give it folder support "\DMP" Those DMP files can become a bit of a mess when you've got a bunch of them.

    siddos.spin

    Do you mind if I add a copy of this to my VGA program archive?

    OBC
  • pik33pik33 Posts: 2,397
    edited 2012-06-13 10:33
    Add it :) It is stil early experimental alpha version.. but it can work. I tried this trick with "dmp" directory, too...

    Change this:

    fat.changeDirectory(@folder)

    to this:

    \fat.changeDirectory(@folder)

    (in both players)

    to catch an abort. Without it the program will hang, if there is not "dmp" directory on disk. With it it will simply work in main dir
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-13 15:19
    pik33 wrote: »
    Add it :) It is stil early experimental alpha version.. but it can work. I tried this trick with "dmp" directory, too...

    Change this:

    fat.changeDirectory(@folder)

    to this:

    \fat.changeDirectory(@folder)

    (in both players)

    to catch an abort. Without it the program will hang, if there is not "dmp" directory on disk. With it it will simply work in main dir

    Good catch! I'll add it to both!

    OBC
  • pik33pik33 Posts: 2,397
    edited 2012-06-14 05:30
    New version

    Alpha warning!!! Alpha, alpha, alpha... Needs heavy debugging. It can hang when changing a tune. VGA driver needs heavy debugging and updating, too

    New user interface
    Playing method with separate cog, doesn't interfere with user interface
    There is place for directory selector

    Edit: and no more muffled demoboard sound. I patched it with 680 R resistors.
    1024 x 768 - 81K
  • pik33pik33 Posts: 2,397
    edited 2012-06-15 01:49
    Waitcnt warning....

    It is easy to write something, which plays. It is much harder to do it well...

    This main loop play code looks like it is working well
    repeat
      waitcnt(cnt + (clkfreq/playRate))
      c:=fat.readdata(@buffer2,25)
      sid.updateRegisters(@buffer2)
    until (c<>25)  
    

    but it delays. @ 200 Hz, it plays 10 sec of music in about 12 seconds

    This doesn't delay:
    repeat
      q:=q+(clkfreq/playRate)
      waitcnt(q)
      c:=fat.readdata(@buffer2,25)
      sid.updateRegisters(@buffer2)
    until (c<>25)  
    

    but hangs somewhere about 200 Hz playrate. Sometimes this:

    c:=fat.readdata(@buffer2,25)

    is too slow and then it will wait full cnt circle

    So maybe this...
    repeat
      repeat until cnt>wait              
      wait:=wait+w
      c:=fat.readdata(@buffer2,25)
      sid.updateRegisters(@buffer2)
    until (c<>25)
    
    

    This glitches from time to time (it seems to glitch every several tens of seconds...it seems once at every cnt full loop)
    This:
      wait:=(wait+w)
      if (cnt<(wait-1000))
         waitcnt(wait)
    

    glitches, too

    Both of these two procedures hangs for about a second every cnt full circle.. when cnt go over $8000_0000

    This works:
    repeat
      wait:=wait+w
      ifnot (cnt>0) and (wait<0)
        repeat until cnt>wait
      else
        repeat until cnt<0
        repeat until cnt>wait
      c:=fat.readdata(@buffer2,25)
      sid.updateRegisters(@buffer2)
      time:=time+100000/playrate
    until (c<>25)
    

    And this is still a raw patch, not a solution. The problem is caused by too slow unbuffered sector read from SD. SD reading has to be removed from play loop. The play loop has to read buffered data delivered by another thread / another cog.

    But it still can play...
  • pik33pik33 Posts: 2,397
    edited 2012-06-15 05:26
    This one seems to not hang, delay and glitch. Plays files from /dmp directory. VGA driver pll settings changed from pll/2 to pll/4 - it seems to give a better picture quality.

    Of course still alpha...
  • onewheeltomonewheeltom Posts: 40
    edited 2012-06-15 10:15
    Have not tested this one yet. Version "sidplay003" fixed the VGA display problem. Is there any way to stop a song once it has started?

    Also, which file is the main? In the "sidplay005" release, there was no "siddos.spin", so I copied over the siddos.spin from the previous version. Did not work.

    I was planning to demo this at Maker Faire NC tomorrow :

    http://makerfairenc.com

    Do you want me to include your name and/or URL in the information about your software? I want to properly credit you. Send by private message if you wish.

    --tom
    pik33 wrote: »
    This one seems to not hang, delay and glitch. Plays files from /dmp directory. VGA driver pll settings changed from pll/2 to pll/4 - it seems to give a better picture quality.

    Of course still alpha...
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-15 10:29
    @Tom,

    I'm curious if this one is working for you? (Since there are actually two different players discussed on this thread.) :)
    https://www.dropbox.com/s/jz1rz0wzr58yto9/VGASIDPLAYER.zip

    OBC
Sign In or Register to comment.