Chrom-ART 2D hardware accelerator driver (DMA2D)

This forum is about you. Feel free to discuss anything is related to embedded and electronics, your awesome projects, your ideas, your announcements, not necessarily related to ChibiOS but to embedded in general. This forum is NOT for support.
User avatar
TexZK
Posts: 57
Joined: Sat Sep 22, 2012 7:06 pm
Location: Lodi, Italy
Contact:

Chrom-ART 2D hardware accelerator driver (DMA2D)

Postby TexZK » Tue Dec 03, 2013 4:42 pm

Finally, after a few days of headaches, I got the koolest splashscreen evah displayed on my STM32F429i-DISCO board, via DMA2D! 8-)

735858_204126666442309_1036396864.jpg
Wolf3D splash screen over the XOR-ed palette texture
735858_204126666442309_1036396864.jpg (153.98 KiB) Viewed 3751 times


The dma2d branch is already available at:
https://github.com/TexZK/ChibiOS-RT-Community/tree/dma2d
(the ltdc branch was merged into this one)

There are a few things to test and adjust in the API, since some registers aren't very well documented in the Reference Manual, but at least the demo is working.
I also encounter some problems when launching sdram and erase commands via Chibi's shell, to write on the SDRAM. I'll open another thread for that anyway, because I don't know if my code for sleeping waits is wrong, or it's just an issue when mixing Chibi with ST's SDRAM code. I only know that the ISR counter or the scheduler get messed up... ugh! :oops:

User avatar
Giovanni
Site Admin
Posts: 13086
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 759 times
Been thanked: 637 times
Contact:

Re: Chrom-ART 2D hardware accelerator driver (DMA2D)

Postby Giovanni » Tue Dec 03, 2013 4:55 pm

Cool!

Now it remains to port the rest of the game :-) and attach a joystick.

Giovanni

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Chrom-ART 2D hardware accelerator driver (DMA2D)

Postby Tectu » Tue Dec 03, 2013 6:44 pm

Well done! It's merged into the community repository by now.


~ Tectu

User avatar
TexZK
Posts: 57
Joined: Sat Sep 22, 2012 7:06 pm
Location: Lodi, Italy
Contact:

Re: Chrom-ART 2D hardware accelerator driver (DMA2D)

Postby TexZK » Sat Dec 07, 2013 5:26 pm

D'oh, I fixed that stupid mistake that gave me threading troubles. I forgot to keep the default heap allocator boundaries inside the 112kB RAM bank, and instead it allocated the shell stack somewhere in the uninitialized SDRAM :o
Everything seems to work now :mrgreen:

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Chrom-ART 2D hardware accelerator driver (DMA2D)

Postby Tectu » Sat Dec 07, 2013 5:58 pm

Nice work - already merged!


~ Tectu

kenyee
Posts: 14
Joined: Fri Sep 20, 2013 8:27 pm

Re: Chrom-ART 2D hardware accelerator driver (DMA2D)

Postby kenyee » Thu Dec 12, 2013 4:15 pm

LOL...awesome. Would be hilarious if you can actually port that game over.

User avatar
TexZK
Posts: 57
Joined: Sat Sep 22, 2012 7:06 pm
Location: Lodi, Italy
Contact:

Re: Chrom-ART 2D hardware accelerator driver (DMA2D)

Postby TexZK » Tue Dec 17, 2013 8:20 pm

Oh well, I've been wondering about making a Wolf3D-like engine for 10 years, but: it requires way too much time, nobody will play it, every embedded platform needs its own port... So, despite my willpower and affection for that game (which was the kickstart of my computer-related career), I won't.

There's Wolf4SDL, but SDL needs to be ported for a generic ChibiOS-powered platform, and I think it would be very troublesome. Another way is to adapt SDL calls with a mini-SDL driver (like miniGL did).

I only hope somebody will use my DMA2D driver to speed up 2D stuff. Note: DMA2D doesn't output less than 16 bits per pixel, so it is totally useless for manipulating a palettized (8-bit) frame buffer, which must be handled by hand like the good old days.


Return to “User Projects”

Who is online

Users browsing this forum: No registered users and 1 guest