Shop OBEX P1 Docs P2 Docs Learn Events
I need help please!!! — Parallax Forums

I need help please!!!

GkarGkar Posts: 9
edited 2007-12-10 13:01 in Propeller 1
Hello
I'm a Computer engineering student in a university. I and several of my companions must do a project for the class of microprocessors.
Basically, we must do a Sudoku for the propeller, so that it could see in a television or on a screen of computer and play with it.
In my university we have some "Starter Kit" like this: Starter Kit
The problem is that we don't know how use the objects like "TV.Spin" and " Graphics.Spin" of the propeller development program library. Therefore we can neither draw things on screen, nor draw text, nor something like this.
There is some manual about this?
Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-08 16:59
    The Propeller Tool has two folders of sample programs. One contains the various drivers like TV.spin and Graphics.spin. The other contains sample or demo programs that illustrate their use. There are also useful objects in the Propeller Object Exchange on the Parallax website. Look through the list of what's available. There's no manual yet although there are a few tutorials (like the Propeller Education Kit tutorials). For your project, the best way to start is probably with the demo program for Graphics.spin. Also, you need to read the comments in the various "library" routines like Graphics.spin. Often the comments describe how to use the object.
  • RaymanRayman Posts: 14,162
    edited 2007-12-08 17:00
    Oh, and check out my Video Blackjack game here:

    http://www.rayslogic.com/propeller/Programming/RaysStuff/RaysStuff.htm

    This is an example of how you can make something that works both for TV and VGA...
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-12-08 17:01
    This is the graphics starter I gave to my students to help get them started, maybe it will help.

    -Martin


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards

    Southern Illinois University Carbondale, Electronic Systems Technologies
  • RaymanRayman Posts: 14,162
    edited 2007-12-08 17:04
    I wouldn't recommend starting from Graphics.spin because the overhead required leaves very little room left for actual game code...

    Rather, I would create custom characters and/or use the ROM font to generate the display. You don't really need to double-buffer a slow game like Sudoku...
  • RaymanRayman Posts: 14,162
    edited 2007-12-08 17:09
    Coincidentally, I have a theory that there is but one Sudoku solution that can be made into any other solution via character exchange and row and column interchange and rotation (has to be done in groups of 3)...

    If this is true, then you can implement many puzzles with just one stored in memory....

    Post Edited (Rayman) : 12/8/2007 5:52:37 PM GMT
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-12-08 17:13
    Hmmm, good point Rayman on not starting from Graphics.spin. Students did run into plenty of memory issues. But on the flip side, sure made them deal with those memory issues as a challenge to overcome!

    -Martin
  • AribaAriba Posts: 2,685
    edited 2007-12-08 21:21
    Graphics.spin does not need double buffering. It's the Graphics_Demo that install this 2 buffers for flicker free Animation.
    With only 1 Graphic buffer you get 12kByte more space for the application, and that's enough memory for a Sudoku.

    Andy

    Edit: Make the following changes in the Graphics_Starter.spin:
    Change:
      _stack = ($3000 + $3000 + 100) >> 2   'accomodate display memory and stack
    to:
      _stack = ($3000 + 100) >> 2   'accomodate display memory and stack
    
    Change:
      bitmap_base = $2000
      display_base = $5000
    to:
      bitmap_base = $5000
      display_base = $5000
    
    Delete:
        gr.copy(display_base)   ' copy bitmap to display before displaying
    
    

    Post Edited (Ariba) : 12/8/2007 9:41:47 PM GMT
  • GkarGkar Posts: 9
    edited 2007-12-09 12:38
    I think that is a good job, but I haven't got much idea about the SPIN programing lenguaje, so it is quite dificult to understand for me. but thanks in any way

  • GkarGkar Posts: 9
    edited 2007-12-09 12:43
    Yes, I know, I was looking for examples and I did look them. But I can't understand the source code of Graphics_palette.spin and Graphics_demo.spin
    Mike Green said...
    The Propeller Tool has two folders of sample programs. One contains the various drivers like TV.spin and Graphics.spin. The other contains sample or demo programs that illustrate their use. There are also useful objects in the Propeller Object Exchange on the Parallax website. Look through the list of what's available. There's no manual yet although there are a few tutorials (like the Propeller Education Kit tutorials). For your project, the best way to start is probably with the demo program for Graphics.spin. Also, you need to read the comments in the various "library" routines like Graphics.spin. Often the comments describe how to use the object.
  • GkarGkar Posts: 9
    edited 2007-12-09 12:50
    This Is incredible, I am impressed, it is really a magnificent work. The code seems to me to be a bit complex of understanding, but it is incredible that something like that could work in the propeller. thank you
    Rayman said...
    Oh, and check out my Video Blackjack game here:


    http://www.rayslogic.com/propeller/Programming/RaysStuff/RaysStuff.htm



    This is an example of how you can make something that works both for TV and VGA...
  • GkarGkar Posts: 9
    edited 2007-12-09 13:00
    Thanks, this is an very easy source code, I read it, and I could understand it.
    I think that your students are lucky for have a teacher as you tongue.gif
    Martin Hebel said...
    This is the graphics starter I gave to my students to help get them started, maybe it will help.


    -Martin
  • GkarGkar Posts: 9
    edited 2007-12-09 13:04
    Ok, thank you, I will bear your advices in mind
    Ariba said...
    Graphics.spin does not need double buffering. It's the Graphics_Demo that install this 2 buffers for flicker free Animation.
    With only 1 Graphic buffer you get 12kByte more space for the application, and that's enough memory for a Sudoku.

    Andy

    Edit: Make the following changes in the Graphics_Starter.spin:
    Change:
      _stack = ($3000 + $3000 + 100) >> 2   'accomodate display memory and stack
    to:
      _stack = ($3000 + 100) >> 2   'accomodate display memory and stack
    
    Change:
      bitmap_base = $2000
      display_base = $5000
    to:
      bitmap_base = $5000
      display_base = $5000
    
    Delete:
        gr.copy(display_base)   ' copy bitmap to display before displaying
    
    

  • GkarGkar Posts: 9
    edited 2007-12-10 13:01
    I'm using·your library, and I have a question for you. Can you explain me how can I put a digit in the middle of a cell?. thanks
    Martin Hebel said...
    This is the graphics starter I gave to my students to help get them started, maybe it will help.

    -Martin

Sign In or Register to comment.