Shop OBEX P1 Docs P2 Docs Learn Events
SXBASIC good for video work? — Parallax Forums

SXBASIC good for video work?

cbmeekscbmeeks Posts: 634
edited 2005-10-07 19:58 in General Discussion
I'm pretty sure Bean used it for video and I've used it a little on PICs.

But what is the general opinion on using BASIC for a video kernel driven by an SX?

Or should things like that be kept to pure asm?

Thanks

cbmeeks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://metroidclassic.com

=========
DMCA Sucks
RIAA Sucks

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-10-06 13:52
    The prob with SX/B for video, is the signals need to be deterministic (they need to happen at an exact time). That doesn't mean it can't be done, but you'll have to compile the SX/B into asm and do your cycle counting that way, many people (myself included) prefer to do the cycle counting in the coding step, not as a later step then go back and cut or pad cycles.

    <edit> If the time between signal changes for your video are far enough apart, you can place the code for doing that in the ISR (likely encoded in asm), then use SX/B for the non-interrupt code </edit>

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10

    Post Edited (Paul Baker) : 10/6/2005 2:01:42 PM GMT
  • KenLemKenLem Posts: 94
    edited 2005-10-07 12:58
    cbmeeks -

    I'm not sure as I haven't tried it but I think it's worth trying. I agree with Paul that you will end up needing to go to ASM to get the best performance but I bet you can get something running with just SX/B.

    I did something similar with an ATMega and C and was surpized at how good the results were. I did end up going to ASM to increase the resolution but since I was learning about video, it was a nice natural step for me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.speechchips.com

    Speech & Video IC's for BasicStamps
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-10-07 15:24
    Wait for Bean to weigh in on this. We had a great discussion yesterday about SX/B. Jon Williams would probably have some insight as to this as well.

    SX/B is getting more useful/powerful by the day [noparse];)[/noparse]

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • BeanBean Posts: 8,129
    edited 2005-10-07 16:05
    Black and white video can be done without too much problem.
    Color video is quite a bit more challenging.
    You can download the source code for the SX video module from www.sxvm.com
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012
    Product web site: www.sxvm.com
    Available now... SX-Video OSD module $59.95 www.sxvm.com

    "I'm a man, but I can change, if I have to, I guess"
    Red Green
    ·
  • cbmeekscbmeeks Posts: 634
    edited 2005-10-07 17:10
    Thanks.

    I've done both color and B/W in ASM and will probably just stick to ASM but I was wondering the general opion on BASIC and video.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://metroidclassic.com

    =========
    DMCA Sucks
    RIAA Sucks
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-07 19:58
    Remember the SX/B compiles pretty tight with many statements going 1-for-1 (not couning complex keywords like PAUSE, SEROUT, etc) and you can add ASM...ENDASM blocks wherever you need.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.