Original Post

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!

2 Replies

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 πŸ˜‰

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

 

Write a reply

You must be logged in to reply to this topic.