You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#1
Column blitter / dithering library
Posted on: 2011/4/5 4:32
Nintendoid!
Joined 2007/12/14
169 Posts
CoderLong Time User (12 Years) App Coder
Hi all,

Just finished up documenting my latest developments in drawing directly to the framebuffer... looks like it's ready for a first release.

I built this using GCC 4.4.2 and tested both on hardware and with a patched version of Mednafen 0.9.17-WIP. I'm releasing this under the GPL, hoping to encourage code sharing among our small (but growing) dev community

Basically the idea is that you set your desired level of brightness, row, column, and VB color, then call PutPixels with the amount of pixels to blit down the screen. Lather, rinse, and repeat as necessary. Haven't run any benchmarks on this yet but it chugs along pretty zippily to me.

Take a look at columnBlitter.h for docs on what the various APIs do, and main.c for an example of how it is designed to be typically used.

Have fun!

Attach file:


zip dithertest_20110404.zip Size: 37.61 KB; Hits: 304
Top

#2
Re: Column blitter / dithering library
Posted on: 2011/4/5 7:13
PVB Elite
Joined 2003/7/26
USA
1471 Posts
PVBCC EntryCoderContributorSpecial AchievementTop10 PosterHOTY09 EntryLong Time User (15 Years) App Coder20+ Game RatingsPVBCC 2013 Entry
Yay! It's finally out of IRC and into the wild

This looks like it has enormous potential for making games look better and/or run faster! I'm sure the "CopyBits" function could be useful in areas besides graphics, too. Everything is really well commented, too, so dig in!

For those who don't frequent the IRC channel (i.e. lamerz ), blitter helped me alter this so the 8KB (!) table of dither patterns remains in ROM, which saves space in WRAM. If you set the ROM to one wait-state, it shouldn't be any slower this way (although testing still needs to be done to be sure). The trade off of ROM vs. RAM space (in the original version, the table can be compressed in the ROM) is now up to you!

You'll find the modified files attached below. BTW, the ROM in the package is compiled with the "Mednafen fix" enabled. See main.c to know what that's all about

Attach file:


zip ditherrom-20110405.zip Size: 44.97 KB; Hits: 295
Top

#3
Re: Column blitter / dithering library
Posted on: 2011/4/6 23:41
PVB Elite
Joined 2003/7/26
USA
1471 Posts
PVBCC EntryCoderContributorSpecial AchievementTop10 PosterHOTY09 EntryLong Time User (15 Years) App Coder20+ Game RatingsPVBCC 2013 Entry
Ryphecha, developer of Mednafen, mentioned on IRC that a patch blitter submitted to fix a Mednafen bug he found during development of this library has been incorporated into the current WIP. Due to the recent login problem, it couldn't be posted, so I am doing so now.

Here is a link to version 0.9.17.1 WIP:

http://forum.fobby.net/index.php?t=msg&goto=2100&#msg_num_9
Top

 Top   Previous Topic   Next Topic


Register To Post