Shop OBEX P1 Docs P2 Docs Learn Events
MMVGD Video Game: Sketch questions for BEAN — Parallax Forums

MMVGD Video Game: Sketch questions for BEAN

T&E EngineerT&E Engineer Posts: 1,396
edited 2006-08-17 15:17 in General Discussion
Bean,

I have been trying to study your Sketch code but the DATA statements look a bit strange to me. Where is the DATA statements for line 0 for S C R E and 0? Can you explain what you did here.

I also have been able to draw lines using For Next statements very quickly using the PLOTXY command. It appears that if you use the PLOTXY and UNPLOTXY commands, all the DATA statements are used up for 16 unique tiles (or is this embeded into the MMVGD program somehow?).

Also is there any way to boost the resolution as I have been able to get 32x22 resolution using PLOTXY and UNPLOTXY. If there are 16 unique tiles (is this for both line 0 and lines 1-10 shared or separate?), then each one has 8x8 pixels - 8*16 x 8*11 = 128 x 88. Is this right?

Thanks again for a great job - just had some questions I wanted to understand better.

·

Comments

  • BeanBean Posts: 8,129
    edited 2006-08-16 11:58
    The driver is setup so that the first line (LINE 0) has a seperate tile set. This is so that you can display a value using digits zero thru nine without using up 10 of your 16 tiles. These are the 16 data lines starting at the label "TilePatterns:". NOTE: The last tile in each set should be blank (if you need a blank tile).

    The pong and sketch examples setup the game tiles (the next 16 data lines) as every possible combination of quarter tile "cells" filled and unfilled. Then I have routines in the game code to plot and unplot these quarter cells. So even though you have 32 cells (not tiles) by 22 cells (not tiles) that is about the best resolution you can get. This is just something done in the game code and the MMVGD driver knows nothing about it.

    You are right that the screen resolution is 128 x 88, but if you needed to store an image with unique pixels it would take 128*88 / 8 = 1408 bytes. The SX28 doesn't have near enough RAM to hold it.

    Because of the limited RAM in the SX28 that seemed like a good comprimise. Because you need to leave some RAM for the user game too.

    With a SX48 and an external SRAM chip you could make a circuit with 256x192 resolution without a lot of trouble. That's about as good as you can get with NTSC video. Problem is that the screen would take about 6K of memory, so you would need an external EEPROM or something non-volitile to hold the screen image.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com

    "You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
    ·
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-08-16 12:23
    Bean,

    Thanks for the clarification.

    I see what you did with the S C R E and 0 in the Constants. They are there but just not used in the DATA lines. However, why is there 2 sets of DATA that are almost identical in the Sketch program?

    Thanks.


    Post Edited (T&E Engineer) : 8/16/2006 12:28:10 PM GMT
  • BeanBean Posts: 8,129
    edited 2006-08-16 12:48
    Because the sketch program uses the top line to draw on.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com

    "You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
    ·
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-08-17 15:06
    Bean,

    Thanks for the info. I have another question about the DATA statements at $300.

    Is one limited to (16+16) 32 data statements of unique tiles? Is it possible to have more DATA statements to call other tiles up (as long as there is only 32 tiles at anyone time)?

    I want to an action character (e.g. Pitfall) with some movement tiles. Depending on what he is doing (e.g. running, standing, swinging) only that tile would be displayed. Is this possible or is it that you define the tiles one time and that is all you get.

    Thanks.
  • BeanBean Posts: 8,129
    edited 2006-08-17 15:17
    No can do...
    There is one tile set (16 tiles) for the top line. And one tile set (16 tiles) for the rest of the screen.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com

    "You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
    ·
Sign In or Register to comment.