DCEmulation

dreamcast development • homebrew software • hardware hacking • indie games • emulators • and more!
Back to main site
It is currently Thu Sep 21, 2017 4:02 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Wed Jan 18, 2017 1:51 am 
Offline
DCEmu Crazy Poster
DCEmu Crazy Poster

Joined: Tue Jul 14, 2015 6:32 pm
Posts: 35
Image
I looked around at porting Vogtinator's nCrafti to the Sega Dreamcast and here it is !
It's a Minecraft clone programmed by Vogtinator for the Ti Nspire CX : a very limited calculator with a weak ARM cpu. (clocked at 132 Mhz !)
It is entirely software renderered : No OpenGL, only a framebuffer.

The Dreamcast port runs okay and does not make use of the PowerVR GPU.

No enemies are available but you do get Redstone and TNT blocks !

Grab it while it's hot :
CDI file
https://gameblabla.nl/files/crafti-dreamcast.zip
Plain files (for SD cards)
https://gameblabla.nl/files/crafti-dc-sd.zip

Burn the CDI file and you're good to go !
There's no music, since it was slowing down the game (it requires a lot of RAM as well) but there are some sound effects.


Last edited by gameblabla on Wed Jan 18, 2017 9:04 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 18, 2017 4:07 am 
Offline
Moderator
Moderator
User avatar

Joined: Sun Apr 20, 2014 7:45 am
Posts: 567
Nice project!

I had a quick look at the code. Some suggestions, if you want to speed things up

1. You can use the fast math routines of the SH4 (fsincos) instead of the sinus table to implement fast_sin and fast_cos. Your code also always computes both sine and cosine, so I suggest you add a call fast_sincos(degree, &sin, &cos) anyway.

http://gamedev.allusion.net/docs/kos-cu ... 87868239ca

2. Another easy change with huge performance benefits would be reimplementing nglDisplay. Instead of memcpy in ngl/gl.cpp on line 245 you should perform an asynchronous copy using a store queue or dma. This has increased performance a lot in other software rendered titles as well.

3. It would be much faster if you used kos gl and made use of the hardware. Since you only use a small subset of OpenGL, the port should be relatively straight forward.

4. You should draw arrays of triangles, instead of calling a function for every vertex (glBegin vs. glDrawArrays)

_________________
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 18, 2017 10:07 am 
Offline
DCEmu Crazy Poster
DCEmu Crazy Poster

Joined: Tue Jul 14, 2015 6:32 pm
Posts: 35
1. This is going to be very tricky : it uses fixed point (on an int) rather than floats for math...
So far my attempts to switch to fast_cos and fast_sin has failed.

2. Hmm... Using DMA might do it. Any examples or open source games that uses it ?

3 and 4. I know but i admit i'm not really familiar with even OpenGL :p
I might attempt a gl port for the pc version first, then the dc

Thanks for the quick look booglez !


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 18, 2017 2:20 pm 
Offline
Moderator
Moderator
User avatar

Joined: Sun Apr 20, 2014 7:45 am
Posts: 567
1. Yeah you'd have to switch to float. If you want to support both platforms and that other platform doesn't have floats you'll have to introduce some global typedef depending on the platform you're on.

2. Check the first bullet point viewtopic.php?f=29&t=104104&p=1051279#p1051279
I've also tried this myself in a raytracer I wrote.

_________________
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 18, 2017 7:15 pm 
Offline
DCEmu Newbie
DCEmu Newbie

Joined: Wed Jan 18, 2017 7:13 pm
Posts: 1
This looks amazing! I'm downloading it now.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 18, 2017 8:40 pm 
Offline
DCEmu Crazy Poster
DCEmu Crazy Poster

Joined: Thu Dec 04, 2003 10:54 am
Posts: 32
Awesome! Always hungry for more DC homebrew. Any chance of plain files so I can make an SD Iso?


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 18, 2017 9:09 pm 
Offline
DCEmu Crazy Poster
DCEmu Crazy Poster

Joined: Tue Jul 14, 2015 6:32 pm
Posts: 35
bogglez wrote:
1. Yeah you'd have to switch to float. If you want to support both platforms and that other platform doesn't have floats you'll have to introduce some global typedef depending on the platform you're on.

It's going to be a little more tricky than a couple of idefs, i'm afraid...
I will talk with Vogtinator about this at some point, if he's still interested lol. (floats should squash those graphical bugs as well)

I actually tried to disable rendering, to see if using store queues on a texture would improve things
and rendering is not the bottleneck, especially at the low resolution of 320x240.
Best case, i would only gain 1~3 FPS.
I will look at this at some point tho.

brmanuk wrote:
Awesome! Always hungry for more DC homebrew. Any chance of plain files so I can make an SD Iso?

Here are the plain files :
https://gameblabla.nl/files/crafti-dc-sd.zip

Thanks for the comments, i'm amazed by the reception !


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 19, 2017 1:48 am 
Offline
Insane DCEmu
Insane DCEmu

Joined: Wed Sep 03, 2003 4:37 pm
Posts: 160
Excellent work! Thanks for sharing.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 19, 2017 8:39 pm 
Offline
Moderator
Moderator
User avatar

Joined: Sun Apr 20, 2014 7:45 am
Posts: 567
gameblabla wrote:
bogglez wrote:
I actually tried to disable rendering, to see if using store queues on a texture would improve things
and rendering is not the bottleneck, especially at the low resolution of 320x240.
Best case, i would only gain 1~3 FPS.
I will look at this at some point tho.

I assumed the renderer is the bottle neck because you're not running at 640x480.

BTW I shared this with the dcjunkyard on Twitter and you seem to be pretty popular there, if that motivates you to work on this :)
https://twitter.com/TheDCJunkyard/statu ... 3260538880

_________________
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 21, 2017 12:47 am 
Offline
DCEmu Crazy Poster
DCEmu Crazy Poster

Joined: Thu Dec 04, 2003 10:54 am
Posts: 32
Feature on polygon.com

http://www.polygon.com/2017/1/20/143361 ... -dreamcast


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 21, 2017 8:22 am 
Offline
DCEmu Crazy Poster
DCEmu Crazy Poster

Joined: Tue Jul 14, 2015 6:32 pm
Posts: 35
Crafti is catching fire it seems... I guess people really wanted to have minecraft (a clone of it) on the Dremcast !
Hopefully it should ease of pain of In the Line of Fire being canceled.

I won't work more on this though... maybe at a later point once i have ported my own games (KillMinds & Rubby Bird 100) to the DC.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group