Looking for help to understand Ray's PSB Graphic Demo
Don M
Posts: 1,652
I've been playing with Ray's demo. I've altered some of the code in the Graphics Demo method and I can see where the certain graphics and text are made and altered. What I don't understand is what limits the size of the black graphics display box? I'm guessing it has something to do with this portion of the code but I don't understand it. Can someone try and explain to me how this works?
Comments
Maybe the code at the bottom of this page would help:
http://www.rayslogic.com/propeller/Programming/Programming.htm
Where the bullet starts with: "I really like the 1024x768 (XGA) tile driver "
Does that help any?
If you can't figure it out, I'll help more...
edit: removed code
I think you were on the right track, starting with the original PSB_GraphicsDemo...
The variables:
x_tiles = 16
y_tiles = 12
GraphicsXOffset=6
GraphicsYOffset=3
should let you control the size and position of the graphics window.
But, I should mention that this demo uses double buffering and reserves a very large amount of memory for graphics...
I have the offsets set to 0 so that the screen starts at the upper left hand corner (0, 0). I tried changing the x_tiles and y_tiles but anything over the values you have there cause the screen to go funky. It adds a bunch of garbage as though it's pulling it out of memory from somewhere where it isn't supposed to? I can go smaller without any problem.
Any further clues?
Is it even possible to have the whole screen be a graphics area?
Does it have to be double buffered?
Is it a memory size issue?
Sorry for all the questions but I want to understand how it works.
This whole posting discussion lately has me not wanting to come here for help or to discuss anything.
You can definitely make it bigger by making it single buffer. That's what PSB_Paint does to cover most of the screen.
I think you just need to make these changes to do that:
_stack = ($3000 + 100) >> 2 'accomodate display memory and stack
bitmap_base = $5000
display_base = $5000
You might want to look to see this was done in PSB_Paint
There is still not enough memory to cover the entire screen though...
The Graphics Shield does free you of memory limitations. But, I'm still working to make it easy to draw multiple fonts quickly.
Soon though, it will be much easier to draw different fonts, anywhere you want...
If you still have trouble (it is a bit complicated, I must say), I'll make some time later this week to code up what you want..