Shop OBEX P1 Docs P2 Docs Learn Events
Help for VGA driver 512x384 and graphics.spin — Parallax Forums

Help for VGA driver 512x384 and graphics.spin

Marc71Marc71 Posts: 14
edited 2010-12-19 14:46 in Propeller 1
Hello!
I ask you the following help.
how you can successfully use the graphics library with the original driver vga512x384 parallax parallax. what changes should make it to work properly.
how can you create an assembler routine plot driver for the following example:
with spin pixels [y + x +16>> 5], but with assembler?
this to speed up the tracking pixel
thanks.
Marc71

Comments

  • Marc71Marc71 Posts: 14
    edited 2010-12-19 00:08
    Hello!

    Having been approached recently about programming the propeller, I thought that you could seek help from experts who continually write in this forum, I was hoping at least one answer.

    I hope at least that arrives from parallax.

    Thank you!

    Marc71
  • kuismakuisma Posts: 134
    edited 2010-12-19 00:33
    
              mov  foo,y
              add  foo,x
              add  foo,#16
              shr  foo,#5
    

    Does this really makes you happy? :smile:
  • BaggersBaggers Posts: 3,019
    edited 2010-12-19 01:58
    kuisma, I think Marc71 had a typo in his calculation

    pixels[y<<4 + x>>5] |= |< x

    translates to something like this in pasm.

    sub plotsetup
      pixelbase := @pixels
    
    dat
    org 0
    'test plot
    entry 
      mov xpos,#256
      mov ypos,#192
      call #plot
    'done test plot make cog wait forever
    forever jmp #forever
    
    'this is the actual plot in pasm
    Plot
      cmp xpos,#511 wc,wz
    if_a jmp #plot_ret
      cmp ypos,#383 wc,wz
    if_a jmp #plot_ret
      mov plottmp1,ypos
      shl plottmp1,#4
      mov plottmp2,xpos
      shr plottmp2,#5
      add plottmp1,plottmp2
      mov plottmp2,#1
      add plottmp1,pixelbase
      rdlong plottmp3,plottmp1
      shl plottmp2,xpos
      or plottmp3,plottmp2
      wrlong plottmp3,plottmp1
    plot_ret ret
    
    pixelbase res 1
    plottmp1 res 1
    plottmp2 res 1
    plottmp3 res 1
    xpos res 1
    ypos res 1
    
  • kuismakuisma Posts: 134
    edited 2010-12-19 02:07
    I'm sure, Baggers. :smile:

    Mark71, to get good answers (opposite mine), you have to formulate your question more precise. I really have no idea what to answer your question. Sorry.
  • Marc71Marc71 Posts: 14
    edited 2010-12-19 06:43
    thanks, Kuisma and Baggers for the answer!

    Sorry if I was not very precise in formulating the question.

    The problem is:

    with the parallax driver vga 512x384 2-color, the library graphics.spin does not work.

    because it manages the 4-color mode.

    as it should be changed.

    or

    a function of plot with assembler.

    in part, have already been answered.

    thanks.

    marc71
  • BaggersBaggers Posts: 3,019
    edited 2010-12-19 09:50
    You're welcome Mark71,
    don't forget to post it working plus source when you've finished :)
  • AribaAriba Posts: 2,690
    edited 2010-12-19 14:46
Sign In or Register to comment.