It is currently Fri Mar 24, 2017 12:58 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 108 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Author Message
PostPosted: Sun Jun 14, 2015 3:02 pm 
Offline

Joined: Thu Aug 12, 2010 3:43 am
Posts: 1589
Ramsis wrote:
Belief is one thing. Research, coding, and finally having stuff work is another. :P

Well, I imagine F-Zero did it somehow.

Ramsis wrote:
Pun intended? :lol: Anyway, sorry, but I don't see your point.

What happens if including the translation (i.e. moving around the map) ends up being not so trivial with the tables? You'll have to include combinations for them too. You'll run into the many-MB or even possibly GB range. Having several tables for each part of the calculation is feasible (and most likely what most games do), precomputing everything into a single table probably won't, however.

EDIT: also I find it ironic complaining about people restricting themselves to the limitations of a given ROM size but not about restricting themselves to the limitations of two and half decades old hardware.


Top
 Profile  
 
PostPosted: Sun Jun 14, 2015 4:43 pm 
Offline

Joined: Fri Jul 04, 2014 9:31 pm
Posts: 665
Ramsis wrote:
You need to do 16×8 bit signed math

It's possible (if a little fiddly) to do that with the ALU.

Partial precalculation is probably a good idea. But if you try to add altitude without adding at least some real-time math, you're going to have to multiply the amount of space your method currently takes by the number of altitude increments you want...

Sik wrote:
Well, I imagine F-Zero did it somehow.

Final Fantasy VI did both rotation and altitude during the airship sequences.


Top
 Profile  
 
PostPosted: Wed Jun 17, 2015 11:46 am 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 334
Location: Lion's den :3
Here's a build that implements on-the-fly calculation of all Mode 7 matrix parameter tables using CPU multiplication registers during active display -- just to illustrate to you guys how awful that turns out. :P

From my notes:

Code:
; This is the algorithm to do signed 8×16 bit multiplication using CPU multiplication registers:
; 1. do unsigned 8×8 bit multiplication for lower 8 bits of multiplicand, store 16-bit interim result in temp
; 2. do unsigned 8×8 bit multiplication for upper 8 bits of multiplicand, store 16-bit interim result in temp+3 (it's crucial that temp+2 remains $00)
; 3. combine interim results, keeping the upper 16 bits of the 24-bit result only (the lower 8 bits aren't needed by the Mode 7 matrix parameters)
;
; As CPU multiplication is unsigned, this is how the sign of the multiplier is accounted for:
; 1. if multiplier is positive, simply do the two 8×8 bit multiplications one by one, and do (temp+3)+(temp+1) for the end result
; 2. if multiplier is negative, make it positive first, then do the two 8×8 bit multiplications one by one, and do -(temp+3)-(temp+1) for the end result
;
; Proof of concept:
; Consider this multiplication:
; 17 * (-5) = -85
; Now make the multiplier positive, and store the two interim results:
; 7 * 5 = 35
; 10 * 5 = 50
; Now make the second result negative, and subtract the first one:
; (-50) - 35 = -85

As I suspected well before I actually decided to give it a try, 224 scanlines of active display still aren't enough to calculate all four tables (at least not without heavy slowdown), so I introduced a frame counter and split the calculations between odd and even frames, reducing performance from 60 fps to 30 fps.

Please be warned – doing turns on the Mode 7 map will very likely make you sea-sick. :|

Download:
http://manuloewe.de/snestuff/projects/furryrpg_build_00222.7z

N.B. Please don't bother speculating again and again about how this or that game might have managed to implement Mode 7. Instead, feel free to impress me (if you can), and possibly contribute to this project, by showing ( :idea: ) us all your own working Mode 7 perspective implementation (BTW, have fun doing it). :D

Thanks!
Ramsis

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
PostPosted: Wed Jun 17, 2015 12:10 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 17974
Location: NE Indiana, USA (NTSC)
Mario Kart Super Circuit for Game Boy Advance also calculates turns at 30 fps.


Top
 Profile  
 
PostPosted: Wed Jun 17, 2015 12:32 pm 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 334
Location: Lion's den :3
I forgot to mention: Horizontal scrolling (L/R shoulder buttons) causes heavy glitches in build #00222, the reasons of which are unknown (and likely won't be investigated) at this time.

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
PostPosted: Fri Jun 19, 2015 10:23 am 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 334
Location: Lion's den :3
More work on Mode 7. Just like in the previous build, everything is calculated in real-time. :wink: Horizontal scrolling is disabled for now as it breaks everything. Yes, the horizon line will be blurred later on. :D

Image

Download:
http://manuloewe.de/snestuff/projects/furryrpg_build_00223.7z

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
PostPosted: Fri Jun 19, 2015 11:14 am 
Offline
User avatar

Joined: Mon Mar 02, 2015 1:11 am
Posts: 71
Location: Australia (PAL)
Ramsis wrote:
More work on Mode 7. Just like in the previous build, everything is calculated in real-time. :wink: Horizontal scrolling is disabled for now as it breaks everything. Yes, the horizon line will be blurred later on. :D


That is amazing.

Makes me feel a little disappointed that I haven't done much SNES work this month (and I mean that in a good way).


Top
 Profile  
 
PostPosted: Sat Jul 04, 2015 3:34 am 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 334
Location: Lion's den :3
Thanks, UnDisbeliever. BTW, I haven't had the time to try out your platformer yet but will do so shortly. :D

Anyway, here's the preliminary result of my recent text box upgrade -- thanks again for all the help, guys. :)

Image

As you can see, Furry RPG's text engine now features a hi-res VWF. :D The only major issue remaining is that it only works correctly in PAL mode, the likely reason being that most of the routines are still on Vblank, which is too short in 60 Hz for all of them to complete. So today's build is PAL for a change.

Oh, and please notice how the text box and portrait were offset from the left and right to avoid clipping on older TV sets. :wink:

Download:
http://manuloewe.de/snestuff/projects/furryrpg_build_00227.7z

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
PostPosted: Sat Jul 04, 2015 6:06 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 17974
Location: NE Indiana, USA (NTSC)
"Quaoar"? Does this take place before or after contact with the native peoples of the west coast of North America?


Top
 Profile  
 
PostPosted: Sat Jul 04, 2015 12:07 pm 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 334
Location: Lion's den :3
There we are, once again in full 60 Hz glory:

Image


The script has been expanded as well:

Image

Download:
http://manuloewe.de/snestuff/projects/furryrpg_build_00228.7z

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
PostPosted: Sun Jul 05, 2015 1:39 pm 
Offline

Joined: Sun Mar 08, 2015 12:23 pm
Posts: 219
Location: Croatia
The first song is so beautiful. I like those dramatic minor subdominants and dominants in mutation.


Top
 Profile  
 
PostPosted: Mon Jul 06, 2015 11:41 am 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 334
Location: Lion's den :3
8bitMicroGuy wrote:
The first song is so beautiful. I like those dramatic minor subdominants and dominants in mutation.

Thanks, much appreciated. :D I'm currently working on the main theme, hoping that it's going to turn out even better yet ... :lol:

BTW, in case anyone is interested in Furry RPG's storyline, here it finally is (in a very small font as there are major spoilers ahead -- please be warned). :wink:

On learning that a »ghost« haunts their village as of late, frightening the kids and stealing food from unlocked pantries, best friends Alec Marlowe, a young hunter (lion), and skeptic scholar Lilac Pondicherry (tigress) join foreign soldier Primus Greyfur (wolf) for a trip into the vast forest just beyond their doorstep. Bent on hunting down and uncovering the villain, whom they suspect to be very fleshly in appearance (although furred, of course), the three venture deep into the woods, where they eventually make a discovery that will forever change their destinies as well as the history of their country, the Republic of Librefur. For in an abandoned military outpost, unbeknownst to anyfur, Reinhold von Pappenheim (fox/coyote?) has been living a secret life, with an unsightly Fennec puppet named Dorothy as his sole companion.

Initially posing as a trickster and ventriloquist, Reinhold is soon revealed to be the exiled heir to the throne of Fleckenstein Kingdom, beyond the Republic’s eastern border. He tells Alec and his friends of an uprising in his home country. The rebel forces are supposedly led by »the Badger,« whose sole purpose in life appears to be to overthrow the reign of the Pappenheim line of kings, and plunge the realm into chaos and destruction.

Convinced that his new friend could be lent a paw returning to his people, claiming back the throne and restoring peace to Fleckenstein, Alec and his comrades join Reinhold on a journey back to the kingdom—only to find it in full preparation for war against its three neighboring states: the Furderal Empire, to the south, the Free County of Coathill in the north, and the Republic of Librefur, due west.

Shocked about this finding, Alec and Lilac agree to return home in order to warn both the Palace and the population of Librefur of the impending invasion. But before they can even leave the capital of Fleckenstein, the four friends are all arrested and put in separate jails, knowing they will be publically executed on the very next morning for alleged high treason. However, Alec, Lilac and Primus are found and liberated at night by nofur else than »the Badger« himself, a.k.a. Kilian Lacrimo della Valle (cheetah), who tells them that Reinhold was nowhere to be found and has most likely already been killed.

During their journey back to the Republic of Librefur, the remaining three tell Kilian about Reinhold’s identity. Kilian, in turn, explains that nothing of what Reinhold told them was true. According to »the Badger,« the Pappenheim reign is actually a ruthless and cruel dictatorship that needs to keep up its outward saber-rattling so as to remain credible to its large amount of faithful citizens, and that the rebels indeed intend to rid the country of its unfurable leader. He reminds Alec that he and his friends are far too deeply involved within the conflict to go back to their normal lives anymore—as Fleckenstein assassins have already been sent out to track them down—and instead convinces them to retreat to the abandoned outpost in the forest, fortify it in case they are discovered by Fleckenstein spies, and aid the resistance from there.

In time, they are joined by others hoping to stop Fleckenstein: young Damian Fleck (jaguar/leopard?), a martial artist who is loyal to his home kingdom, yet afraid the Pappenheim’s war-mongering might wreak havoc on it; Tara of Idenmarch (lynx), a Fleckenstein refugee who saw her family being murdered by Pappenheim’s henchmen; Gregory P. E. H. Eindhoven Dubois Quaoar van der Muhlhausen Nido sulle Colline (bear), a would-be Coathill aristocratic who gets quickly debunked by Kilian and, being a carpenter, decides to help rebuilding the outpost; Kit, a foxling whose flute-playing ensnares friends and foes alike; and several others (i.e., secret characters).

When the motley crew around Alec finally re-enter Fleckenstein Kingdom to confront Reinhold in the hopes of ending the war before it really begins, they appear to succeed—only to realize that hardly anyfur amongst them is actually what he or she pretends. Not only that, but the real threat is found to stem from deeper than the deluded minds of those few who seek to conquer the lands around them.

In the end, Alec has to make a decision the world he knows depends upon—as do both his own life and the lives of all his friends …

Questions/comments are welcome, as always. :)

Thanks!
Ramsis

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
PostPosted: Tue Jul 07, 2015 10:32 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2012
What did you do about mode 7? Did it just end up working faster than expected?


Top
 Profile  
 
PostPosted: Tue Jul 07, 2015 11:40 am 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 334
Location: Lion's den :3
psycopathicteen wrote:
What did you do about mode 7? Did it just end up working faster than expected?

After optimizing things quite a bit, yes it did. :wink: Also, I'm saving the calculations for 56 scanlines thanks to the "sky", plus M7D gets fed the same values as M7A, which cuts down CPU usage a bit, too. This currently allows Mode 7 calculations @60fps. :)

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
PostPosted: Tue Jul 07, 2015 12:18 pm 
Offline

Joined: Fri Jul 04, 2014 9:31 pm
Posts: 665
Cool.

Does M7C get fed the negative of M7B? No need to waste a multiply on that if you can just flip a bit...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 108 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next

All times are UTC - 7 hours


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