Shop OBEX P1 Docs P2 Docs Learn Events
A new topic for vga (not only) sid player — Parallax Forums

A new topic for vga (not only) sid player

pik33pik33 Posts: 2,350
edited 2014-08-20 03:02 in Propeller 1
.... to stop mixing two of them in one topic.

Version 0.08

**** Alpha warning
**** Messy code warning

This version can access all directory tree on SD - you can change directory in any time

The program keeps its data in files "dirlist.dat" and "dmplist. dat"
When accessing a directory first time, it scans the directory and creates these files in it, it may take some time if there is a lot of dmp files in it.
If it find these files, it doesn't scan a directory and reads informations directly from these files. Delete them manually when adding or removing dmp files to your directory to avoid the crash (alpha warning), then when next run, the player will rescan this directory.

Use up/down arrows to move file or directory selector up/down one position, PgUp/PgDn moves it 10 positions.
Tab changes active window
Enter selects file or directory. When changing a directory, wait some time until the program process the informations (alpha warning) When it is ready, directory selector is gray.

When playing, + and - changes playing rate (useful for high speed headerless dmp files), space pauses/resumes playing.
1024 x 768 - 90K

Comments

  • Ahle2Ahle2 Posts: 1,178
    edited 2012-06-19 09:11
    I like your player very much!
  • pik33pik33 Posts: 2,350
    edited 2012-06-20 04:05
    0.10
    Still early alpha
    Some bug fixed, but maybe new ones added

    Main changes:

    - no more these stupid ABCDE~1 names - LFN support added (need to add some functions to Kye's driver). It tries to get a LFN first, if not found, it tries to get a module name from its header, if this fails, it uses short filename. If it find "_" in the name, it replaces it with space

    - rescan on demand with "R" key
    - some color changes (I added these 100 Ohm resistors to VGA output in my demoboard to get all 64 colors - then I changed some color values in program)
    1024 x 768 - 171K
  • Ahle2Ahle2 Posts: 1,178
    edited 2012-06-20 12:46
    @pik33
    For some reason the "
    LFN support" isn't working... I havn't had any time to debug it yet.
  • KyeKye Posts: 2,200
    edited 2012-06-20 14:09
    That's awesome! Very nice.
  • pik33pik33 Posts: 2,350
    edited 2012-06-20 20:29
    Ahle2 wrote: »
    @pik33
    For some reason the "
    LFN support" isn't working... I havn't had any time to debug it yet.

    Most probable reason are files "dmplist.dat" and "dirlist.dat" from previous version of this player.; if they exists, the program will use data from these files (with old 8.3 names).
    Try to delete these files or use "R" in player.
    It seems I have to add a version number for them, to force a new rescan when program version changes.

    If this don't help, things will need debugging. It is still alpha. Adding LFN reading functions was a quick modification, so it may need debugging, too; this is first working version of "LFN read enabled" driver.
  • pik33pik33 Posts: 2,350
    edited 2012-06-26 01:09
    0.12
    Still alpha.

    Now it can play wav files, too. Wave playing procedure is the first working version - it doesn't read wav headers and it plays only 44100/16bit wav
    I had to change name from Sidplay to Propplay :)

    If you used earlier version of it, delete every "dmplist.dat" and "dirlist.dat" file or rescan every directory with R key
    S key stops playing immediately (frees playing cog and closes the file)
  • pik33pik33 Posts: 2,350
    edited 2012-07-04 23:13
    Compile the player with bst - Propeller Tool can exceed 32 k. :(


    There is a bug in my wav driver which can cause hang for 50 seconds (classic cnt problem). I have to rewrite this part:
    loop                    cmp     time,cnt      wz, wc   'if it is not time to get next sample
                if_c_or_z   jmp     #p01
                            nop
                            call    #dither
                            jmp     #loop
    
    p01
    
                            add     time,delay
                        (...rest of code...)
    

    When "time" is near $FFFFFFFF, it is possible that cnt will be something about 0, and then it will wait another 50 seconds... and then it can fail again.
  • Ahle2Ahle2 Posts: 1,178
    edited 2012-07-05 01:57
    loop                    [COLOR=#ff0000]cmps    [/COLOR]time,cnt      wz, wc   'if it is not time to get next sample
                if_c_or_z   jmp     #p01
                            nop
                            call    #dither
                            jmp     #loop
    
    
    p01
                             add     time,delay
                        (...rest of code...)
    


    I think it will help...
  • kuronekokuroneko Posts: 3,623
    edited 2012-07-05 03:58
    cmps just shifts the problem to the POSX/NEGX transition (instead of -1/0). You'll have to subtract both values then check for the sign, e.g.
    mov     tmp, time
    sub     tmp, cnt
    cmps    tmp, #0 wc,wz
    
  • pik33pik33 Posts: 2,350
    edited 2012-07-05 04:12
    So I changed this fragment of code to this - there has to be always 4 instructions between calls to #dither... Now testing...
    loop
                            mov     temp, time
                            sub     temp, cnt
                            nop
                            call    #dither
                            cmps    temp, #0 wc
                            nop
                     if_c   jmp     #p01
                            nop
                            call    #dither
                            jmp     #loop
    
    
    
    p01
    
                            add     time,delay
    
    
  • Ahle2Ahle2 Posts: 1,178
    edited 2012-07-05 04:55
    @kuroneko
    Yes, that's the way I use to do it as well.
    Somehow I thought that "cmps" was all that was missing... ;)
  • pik33pik33 Posts: 2,350
    edited 2012-07-05 05:48
    0.13

    Does not hang when play wav files (thank you for help)
    Reduced pop at wav start (now it reads header, but still dosen't interpret it). It still can pop when start playing wav file, don't know why. It is random (the same wav can pop or not pop)

    After changing directory, now it stays in directories window instead of switch to file window.
  • pik33pik33 Posts: 2,350
    edited 2012-07-05 06:07
    12-bit video wav driver alpha first test (mono, only one channel played, maybe still buggy... this what I published as code sample had a bug which reduced its resolution to 7 bits))

    Edit: it seems to give clear noise free sound !. So (1) it needs additional work (2) it needs its own topic
  • pik33pik33 Posts: 2,350
    edited 2012-07-16 01:57
    0.14

    Wav player changed from dithered to noise shaped duty dac - lower noise.
  • pik33pik33 Posts: 2,350
    edited 2012-07-19 02:48
    0.15

    Another wav driver change, now to nco pwm noise shaping dac working @ 308 kHz. This gives near noise free sound. At last.
  • pik33pik33 Posts: 2,350
    edited 2012-07-27 03:24
    0.16.

    Experimental version,it outputs SID sound via 10x oversampling NCO driver instead of duty dac. This should improve sound quality.

    Please try it and check if this improved or degraded SID sound quality in your environment...

    Compile with BST! The player may not fit in prop RAM without BST's removing unused methods. And 80 MHz only because of hardcoded constants (this will change..)
  • pik33pik33 Posts: 2,350
    edited 2012-07-27 04:35
    Some constants changed to get rid of audible high frequency sound. Changed oversampling from 10x to 9x to give the procedure some more time to work. Seems to sound better than previous one. I will try and compare these versions on a better equipment later.
  • pik33pik33 Posts: 2,350
    edited 2012-07-28 00:43
    It seems SID sound output via nco instead of duty is better :):) and 0.16 is not experimental any more.

    SIDCog needs update (it seems nobody tries to use SidSample variable before)
    NCOWav object needs cleaning and then I have to put it in OBEX: it outputs better sound than duty dac
    The player needs reworking to make possible its compilation in Propeller Tool. The Propeller Tool says it doesn't fit :(

    Now, it uses 8 cogs and, when compiled in BST, only about 300 longs left. Optimization needed...
  • pik33pik33 Posts: 2,350
    edited 2014-08-20 03:02
    Some bug fixes and feature updates as a result of working with fpga prop.

    This version can be compiled by standard propeller tool

    Untested. My "poor man sd interface" to the Propeller Demo Board is broken now (some wires are broken, I have to make it again) so everything I got from the demoboard was a message that SD card cannot be mounted
Sign In or Register to comment.