GenDev SpritesMind Website SpritesMind.Net
Sega Megadrive/Genesis development
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

BadApple... again :)
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
 
Post new topic   Reply to topic    SpritesMind.Net Forum Index -> Demos
View previous topic :: View next topic  
Author Message
Stef
Very interested


Joined: 30 Nov 2006
Posts: 1257
Location: France - Sevres

PostPosted: Sat Aug 18, 2012 6:15 pm    Post subject: BadApple... again :) Reply with quote

Highly inspired by this :
http://68000.web.fc2.com/bad_apple.html

I wanted to do almost the same stuff except that i wanted to keep the full sega genesis resolution to get the best video quality.

Edit :
Done Smile The total rom size is 8 MB but it does play at full 320x224 resolution, 30 FPS playback and 2bpp color.
Sound is 4bit ADPCM @13Khz.

Source code (also contains first part video data) :

https://dl.dropbox.com/u/93332624/dev/megadrive/demo/BadApple_src.7z

Final version 4 MB version :

https://dl.dropbox.com/u/93332624/dev/megadrive/demo/BadApple_p1.bin
https://dl.dropbox.com/u/93332624/dev/megadrive/demo/BadApple_p2.bin

Final version 8 MB version (without bank switch) :

https://dl.dropbox.com/u/93332624/dev/megadrive/demo/BadApple.bin

YouTube :
www.youtube.com/watch?v=2vPe452cegU

Note that the 8 MB version can work only with Mega Everdrive or custom flash cart supporting full 8 MB mapping (without SSF2 bank switch style).
Also some special emulator can support it as well (as this one).


Last edited by Stef on Thu Nov 29, 2012 1:11 am; edited 17 times in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Chilly Willy
Very interested


Joined: 17 Aug 2007
Posts: 1956

PostPosted: Sat Aug 18, 2012 7:50 pm    Post subject: Re: BadApple... again :) Reply with quote

Stef wrote:
You can download the rom from here :
http://9giga.sfr.fr/n/50-26/f/625273477/deflate/no/


Uhhhh - no, we can't. Laughing
Back to top
View user's profile Send private message
Stef
Very interested


Joined: 30 Nov 2006
Posts: 1257
Location: France - Sevres

PostPosted: Sat Aug 18, 2012 7:53 pm    Post subject: Reply with quote

err :-/ stupid french share stuff Sad
I'll try to find another one.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Stef
Very interested


Joined: 30 Nov 2006
Posts: 1257
Location: France - Sevres

PostPosted: Sat Aug 18, 2012 7:57 pm    Post subject: Reply with quote

Dropbox link... far better.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Chilly Willy
Very interested


Joined: 17 Aug 2007
Posts: 1956

PostPosted: Sat Aug 18, 2012 8:23 pm    Post subject: Reply with quote

That's better! Very Happy

Well, it's looking good - now you just have to get the speed up a bit. nice job on the compression - getting it to look decent and fit in 4M is no easy task.
Back to top
View user's profile Send private message
Stef
Very interested


Joined: 30 Nov 2006
Posts: 1257
Location: France - Sevres

PostPosted: Sat Aug 18, 2012 10:32 pm    Post subject: Reply with quote

Yeah as you said, getting that fit in 4 MB was a hard task Wink
But now it need more speed, hopefully there is room for that !
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Stef
Very interested


Joined: 30 Nov 2006
Posts: 1257
Location: France - Sevres

PostPosted: Sun Aug 19, 2012 7:59 pm    Post subject: Reply with quote

New version :

https://dl.dropbox.com/u/93332624/dev/megadrive/demo/BadApple2.bin

Speed is a bit better (not that much) but at least i fixed last bugs. The video is not anymore choppy and buggy in some place Smile
I am still in C but even with ASM i will need very important optimizations to get things at correct speed.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Chilly Willy
Very interested


Joined: 17 Aug 2007
Posts: 1956

PostPosted: Mon Aug 20, 2012 12:11 am    Post subject: Reply with quote

It's definitely better. It's usually best to work out the bugs, THEN work on the speed. Very Happy
Back to top
View user's profile Send private message
Stef
Very interested


Joined: 30 Nov 2006
Posts: 1257
Location: France - Sevres

PostPosted: Mon Aug 20, 2012 7:42 am    Post subject: Reply with quote

Yep, now i can work at 100% on optimizations Smile
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Stef
Very interested


Joined: 30 Nov 2006
Posts: 1257
Location: France - Sevres

PostPosted: Thu Aug 30, 2012 4:32 pm    Post subject: Reply with quote

New version :
https://dl.dropbox.com/u/93332624/dev/megadrive/demo/BadApple3.bin

Better speed but still far from what i need :p
I had to add a 128 KB lookup table to improve the 2 bpp to 4 bpp tile conversion speed... that hurts when you are so close from the 4 MB limit.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Stef
Very interested


Joined: 30 Nov 2006
Posts: 1257
Location: France - Sevres

PostPosted: Sat Sep 01, 2012 11:12 pm    Post subject: Reply with quote

Again a new version :

https://dl.dropbox.com/u/93332624/dev/megadrive/demo/BadApple4.bin

I passed almost all the tile unpack algo to ASM code.
Unfortunately that is still too slow :-/
I do not see much more room for big improvements now...

~600000 tiles on the total 850000 tiles are packed with dictionary method.
Unfortunately the dictionary unpack code is the more complex and slowest one : i believe that i have 20% to 70% of CPU time (depending the frame complexity) eat in that code.
I profiled time to unpack a single 2bpp tile with dictionary method : 5 to 16 scanlines (close to 8000 cycles in worst case) ! And we can have 250 tiles to unpack per frame. I think i should find a simpler unpacking method :p
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Chilly Willy
Very interested


Joined: 17 Aug 2007
Posts: 1956

PostPosted: Sat Sep 01, 2012 11:23 pm    Post subject: Reply with quote

The speed on the latest is actually rather good. While it's still slow on large changes, it's not THAT slow - just not real-time. There are packing schemes that are very fast depacking... of course, the tradeoff is usually space. You won't know until you try.
Back to top
View user's profile Send private message
Stef
Very interested


Joined: 30 Nov 2006
Posts: 1257
Location: France - Sevres

PostPosted: Sun Sep 02, 2012 12:11 am    Post subject: Reply with quote

Yeah speed is much better in the last version, basically because i moved to ASM all "bitstream" code (read a buffer bit per bit) which is used everywhere as well as the tile unpack code. Some others parts can be ported to ASM but there are not the bottleneck so i don't bother with them...
As you said all the problem is to find the good trade off between speed and space. I will try to find how i can simplify compression code without sacrificing too much space... There are always ways to do better :p
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ammianus
Very interested


Joined: 29 Jan 2012
Posts: 120
Location: North America

PostPosted: Sun Sep 02, 2012 1:13 pm    Post subject: Reply with quote

Wow that is awesome stuff. Hats off to you.
Back to top
View user's profile Send private message Visit poster's website
Stef
Very interested


Joined: 30 Nov 2006
Posts: 1257
Location: France - Sevres

PostPosted: Sun Sep 02, 2012 7:08 pm    Post subject: Reply with quote

Hehe thanks Very Happy
I have to admit that i already spent many time in that small demo, i really hope to get it up to the end Smile
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    SpritesMind.Net Forum Index -> Demos All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 1 of 10

 
Jump to:  
You can 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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group