Shop OBEX P1 Docs P2 Docs Learn Events
I need help understanding the definition of spacetile in Chip Gracey's VGA 1280 — Parallax Forums

I need help understanding the definition of spacetile in Chip Gracey's VGA 1280

Marc GebauerMarc Gebauer Posts: 60
edited 2007-06-16 23:15 in Propeller 1
I thought I had a handle on the use of the constant spacetile when I familiarized myself with Chip Gracey's VGA_1024x768_Tile_Driver_With_Cursor.spin. In the demo, spacetile was defined as $8000 + $20 << 6 = $8800.·I figured out $8800 is the space character in the rom bit map and these spaces are being used to clear the screen via wordfill(@array, spacetile, tiles).
Now I am looking at the VGA_1024x768_Tile_Driver_With_Cursor.spin and I noticed that in the demo spacetile is defined as $220. This does not make sense to me. How does $220 relate to the rom bit map location of the space character? Why is it different?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-06-16 18:54
    When I wrote the Propeller Kiosk I was similarly perplexed, but after looking at it a bit it dawned on me, its a character aligned view of the memory. Each charactor occupies 64 or $40 bytes, $40 * $220 = $8800.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Marc GebauerMarc Gebauer Posts: 60
    edited 2007-06-16 20:30
    I am guessing this·means that it's the VGA 1280x1024 Tile driver·is what looks at memory in a character aligned fashion.·If this is the case, does·it mean that·using this driver·precludes being able to do bitmap graphics?·If I can·do·bit mapped·graphics, I assume that I would have to assign my display_base as $200 minus the number of characters worth of graphics·I have (display_base = $200-$80 = $180)·and if this is correct then·how would the equivilent 'make some graphic tiles on the screen' routine change?
    The demo for trhe VGA 1024x768 driver has some code that looks like this:
    · 'make some graphics tiles on the screen
    · repeat i from 0 to 7
    ··· repeat j from 0 to 15
    ····· array.word[noparse][[/noparse]cols * (w_y + i) + j + w_x] := display_base + i << 6 + j <<9 + 21

    How would it be written for the VGA 1280x1024 driver?
    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Post Edited (Marc Gebauer) : 6/16/2007 8:38:32 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-06-16 22:25
    Neither driver supports true bitmap graphics, there simply isn't enough memory to do it. So what is done instead is a 64 byte aligned tile located in RAM·is pointed to instead of to the charater ROM. Take a look at my kiosk.zip in http://forums.parallax.com/showthread.php?p=643397·for an example. I created a string of special character (really just 4 color·bitmaps) to create a quote box, the·method which sets a location to one of these characters is qboxchr(c).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Marc GebauerMarc Gebauer Posts: 60
    edited 2007-06-16 23:15
    Thanks Paul! I'll check it out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.