BadApple... again :)
Moderator: Mask of Destiny
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
BadApple... again :)
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 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://www.dropbox.com/s/xrpak1eatkkdb ... rc.7z?dl=0
Final version 4 MB version :
https://www.dropbox.com/s/fg8oymtgjv6o7 ... 1.bin?dl=0
https://www.dropbox.com/s/v8dffnxpcgvo9 ... 2.bin?dl=0
Final version 8 MB version (without bank switch) :
https://www.dropbox.com/s/6fy2y71zfssom ... e.bin?dl=0
YouTube :
http://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).
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 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://www.dropbox.com/s/xrpak1eatkkdb ... rc.7z?dl=0
Final version 4 MB version :
https://www.dropbox.com/s/fg8oymtgjv6o7 ... 1.bin?dl=0
https://www.dropbox.com/s/v8dffnxpcgvo9 ... 2.bin?dl=0
Final version 8 MB version (without bank switch) :
https://www.dropbox.com/s/6fy2y71zfssom ... e.bin?dl=0
YouTube :
http://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 Wed Jun 21, 2017 8:47 am, edited 18 times in total.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: BadApple... again :)
Uhhhh - no, we can't.Stef wrote:You can download the rom from here :
http://9giga.sfr.fr/n/50-26/f/625273477/deflate/no/
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
New version :
https://dl.dropbox.com/u/93332624/dev/m ... Apple2.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
I am still in C but even with ASM i will need very important optimizations to get things at correct speed.
https://dl.dropbox.com/u/93332624/dev/m ... Apple2.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
I am still in C but even with ASM i will need very important optimizations to get things at correct speed.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
New version :
https://dl.dropbox.com/u/93332624/dev/m ... Apple3.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.
https://dl.dropbox.com/u/93332624/dev/m ... Apple3.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.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Again a new version :
https://dl.dropbox.com/u/93332624/dev/m ... Apple4.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
https://dl.dropbox.com/u/93332624/dev/m ... Apple4.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
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
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
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