Views: 6,862,976 | Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search | 04-20-24 12:22 AM |
Guest: |
Main - Posts by Arisotura |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 501/884 EXP: 1334997 Next: 63179 Since: 03-28-17 From: France Last post: 1 day ago Last view: 2 hours ago |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 502/884 EXP: 1334997 Next: 63179 Since: 03-28-17 From: France Last post: 1 day ago Last view: 2 hours ago |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 503/884 EXP: 1334997 Next: 63179 Since: 03-28-17 From: France Last post: 1 day ago Last view: 2 hours ago |
(post in restricted forum) |
(post in restricted forum) |
(post in restricted forum) |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 507/884 EXP: 1334997 Next: 63179 Since: 03-28-17 From: France Last post: 1 day ago Last view: 2 hours ago |
Posted by Generic aka RSDuck this. melonDS needs exact savefile sizes (it relies on the file size to determine the memory type). ____________________ Kuribo64 |
(post in restricted forum) |
(post in restricted forum) |
(post in restricted forum) |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 511/884 EXP: 1334997 Next: 63179 Since: 03-28-17 From: France Last post: 1 day ago Last view: 2 hours ago |
welcome aboard!
I recommend you make a thread to ask about that error, though; this thread isn't going to be the best place for this ____________________ Kuribo64 |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 512/884 EXP: 1334997 Next: 63179 Since: 03-28-17 From: France Last post: 1 day ago Last view: 2 hours ago |
okay so
// culling
this is the culling code that melonDS employs atm. it's not too far away from what the DS seems to use. however:
// TODO: work out how it works on the real thing // the normalization part is a wild guess Vertex *v0, *v1, *v2, *v3; s64 normalX, normalY, normalZ; s64 dot; v0 = &TempVertexBuffer[0]; v1 = &TempVertexBuffer[1]; v2 = &TempVertexBuffer[2]; v3 = &TempVertexBuffer[3]; normalX = ((s64)(v0->Position[1]-v1->Position[1]) * (v2->Position[3]-v1->Position[3])) - ((s64)(v0->Position[3]-v1->Position[3]) * (v2->Position[1]-v1->Position[1])); normalY = ((s64)(v0->Position[3]-v1->Position[3]) * (v2->Position[0]-v1->Position[0])) - ((s64)(v0->Position[0]-v1->Position[0]) * (v2->Position[3]-v1->Position[3])); normalZ = ((s64)(v0->Position[0]-v1->Position[0]) * (v2->Position[1]-v1->Position[1])) - ((s64)(v0->Position[1]-v1->Position[1]) * (v2->Position[0]-v1->Position[0])); while ((((normalX>>31) ^ (normalX>>63)) != 0) || (((normalY>>31) ^ (normalY>>63)) != 0) || (((normalZ>>31) ^ (normalZ>>63)) != 0)) { normalX >>= 4; normalY >>= 4; normalZ >>= 4; } dot = ((s64)v1->Position[0] * normalX) + ((s64)v1->Position[1] * normalY) + ((s64)v1->Position[3] * normalZ); bool facingview = (dot < 0); if (facingview) { if (!(CurPolygonAttr & (1<<7))) { LastStripPolygon = NULL; return; } } else if (dot > 0) { if (!(CurPolygonAttr & (1<<6))) { LastStripPolygon = NULL; return; } } * on the DS, polygons always pass culling if they have v0==v2 or v1==v2, even if cull mode is 0. ** this would imply that the DS uses v2 as a base vertex. melonDS is using v1. ** it only checks X, Y and W. Z can be whatever. * cases of dot=0 pass both culling modes 1 and 2, but not 0 (unless they match the exception above). * the DS employs some mechanism for reducing precision of the normal components as needed so it doesn't overflow. the mechanism is weird tho. but for example specific input can cause erroneous cases of dot=0. *actually, testing tends to hint the DS is using v0 as a base. ____________________ Kuribo64 |
(post in restricted forum) |
(post in restricted forum) |
(post in restricted forum) |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 516/884 EXP: 1334997 Next: 63179 Since: 03-28-17 From: France Last post: 1 day ago Last view: 2 hours ago |
alternately we could make a 'consumer-toy' GL renderer that sacrifices accuracy in the name of betterer speeds (doing more aggressive polygon batching, etc) ____________________ Kuribo64 |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 517/884 EXP: 1334997 Next: 63179 Since: 03-28-17 From: France Last post: 1 day ago Last view: 2 hours ago |
we talked about it on IRC, actually there is a bug with audio sync: if SDL audio couldn't be initialized for whatever reason, it will still try to sync to the audio callback even though that is not running. the sync call has a delay so that it doesn't freeze entirely incase, but obviously that makes it slow as hell.
the bug is already fixed in the upcoming Qt frontend. ____________________ Kuribo64 |
(post in restricted forum) |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 519/884 EXP: 1334997 Next: 63179 Since: 03-28-17 From: France Last post: 1 day ago Last view: 2 hours ago |
you can try disabling the framerate limiter, audio sync, vsync, on each melonDS instance ____________________ Kuribo64 |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 520/884 EXP: 1334997 Next: 63179 Since: 03-28-17 From: France Last post: 1 day ago Last view: 2 hours ago |
Main - Posts by Arisotura |
Page rendered in 0.051 seconds. (2048KB of memory used) MySQL - queries: 22, rows: 111/111, time: 0.014 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |