Well here's where I got confused. I am setting the bus select bits in
the vidctrl register and leaving the raster bits to 0. When I do
this, it seems to affect which page is visible(this is backwards of
what I would expect it to do given the names of the bits). What you
are describing is how I expected it to work, but my quick test of
setting both the bus and raster to page 1 and then writing to the
first position in fb didn't yield a pixel in the top left of page 1
like I would have expected. I'll have to play around with it a bit
more tonight I guess and see if I can figure out what I've done wrong.
It does help to know that it is supposed to work the way I was
thinking though, I just need to find my bug.
BTW, I've managed to shoehorn a 1 bit alpha into the unused extra bit
in each pixel. This is how I intend to do sprites. I'm curious
though, have you tried anything crazier, like using a second page as a
16 bit zbuffer for the page before it and doing simple triangle
rasterization? Is the speed just not there to do it? I still don't
have a really good idea of what the fill rate is like on this board
yet. It would seem like the zbuffer idea could be made to work faster
with a modified fpga that inherently supported a ztest when you write
to the fb, but I'm not brave enough to start messing with that until
I've gotten the standard fare stuff under control.
--- In "PeterElliot" <> wrote:
>
> James,
>
> You need to use the VIDCTRL to select the visible and edited frame
> buffers. You can then set the bits directly from your program.
>
> You only memory map the frame buffer as _scrW*_scrH*2.
>
> Hope this helps,
>
> PJE
>
> PS. Once you get the direct writing functions working along with the
> bitblt, everything becomes much more straight forward.
>
> --- In "gamehoser" <james.singer1@> wrote:
> >
> > I too am very impressed with the flexibility and speed of the
> board.
> > I am quite pleased at my purchase at this point. At this point I
> have
> > double buffered blits and rectangles ping ponging between pages 1
> and
> > 2(I leave page 0 alone so that I can switch back to the console
> when I
> > need to).
> >
> > The problem I'm now having is that I can't figure out how to
> address a
> > page other than 0 with a setpixel type routine. When I take the
> start
> > of video memory and offset to what SHOULD be the second
> > page(fb+(1024*1024)), I invariably crash the machine when I try to
> > write a pixel there. I then thought maybe the bus select in the
> > vidctrl register would automatically relocate writes to fb to the
> > appropriate page. I tested that this morning and still no go. I'm
> > getting pretty close to having sprites running, but I need to be
> able
> > to write to non-visible pages with more than just a rectangle draw
> to
> > make this useful. I am memory mapping the entire 8 meg video memory
> > with a single mmap. If that's a problem, I'd love to understand
> why,
> > but it might be relevant info. Any help here would be appreciated.
> >
> > As for posting of code, I'm torn on that subject. While I
> appreciate
> > the help I get here, I sorta bought the board to "tinker" with. By
> > posting code, you would get me further ahead of where I am now, but
> I
> > would have "earned" it and where would the fun be in that. ;).
> >
> > With that said, there may not be a better way to do this, the docs
> for
> > the video portion of the board seem VERY sparse, so code may be the
> > most concise way for me to learn the fundamentals of the hardware.
> I
> > write video games for a living and with the exception of the PS2 and
> > PS3 I don't think I've ever spent this much time rebooting my kit
> > because I crashed it. :)
> >
> > P.S. Peter I'm sure many have said it already, but let me add my
> > voice: Thank you for moderating this group, and extra thanks go for
> > funding something as valuable as an 800x600 fpga load.
> >
> > --- In "PeterElliot" <egroups@> wrote:
> > >
> > > James,
> > >
> > > I've done quite a bit of direct frame buffer/blit code with the
> 7300
> > > (as well as funding the 800x600 update ;-)
> > >
> > > If you, or anyone else, would like access to some of my code (for
> non-
> > > commercial uses) then I'll look at posting some code -
> Unfortunately
> > > I use a folding text editor (Interspector) which mangles the raw
> > > source code which makes it difficult to extract...
> > >
> > > Functions I've coded include:
> > >
> > > * Anti-Aliased Fonts in multiple sizes and horizontal/vertial
> > > orientation complete with kerning.
> > > * Boxes and frames with adjustable line thicknesses and corner
> radius.
> > > * Icon bliting by using the spare screens as icon stores which
> are
> > > pre-loaded before my application runs.
> > > * Anti-Aliased line routines.
> > >
> > > I must say, for my use (machine user interface) the 7300 has been
> > > very easy to work with and using double buffering, the screen
> updates
> > > are very quick.
> > >
> > > Regards,
> > >
> > > PJE
> > >
> > > --- In "gamehoser" <james.singer1@>
> wrote:
> > > >
> > > > This topic seems to have been asleep for a while, but I've now
> got
> > > my
> > > > board and I'm looking for details on how to use the FPGA built
> in
> > > > bit-blt and rectangle draw functions so that I can encorporate
> them
> > > > into a graphics library I'm working on. I've got simple frame
> > > buffer
> > > > writes working, but a full screen bit-blt of black for example
> would
> > > > be nice for a clear and given that the frame buffer address
> can't be
> > > > adjusted dynamically, it'll probably be the ONLY way to have
> decent
> > > > double buffering performance. Thanks in advance.
> > > >
> > > > James
> > >
> >
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|