PDA

View Full Version : PSP: Daedalus - Early SSB Progress (9 May update)



blackrave
May 9th, 2007, 23:03
StrmnNrmn (http://strmnnrmn.blogspot.com) just posted this news about progress for Daedalus:


As I mentioned on Sunday (http://strmnnrmn.blogspot.com/2007/05/r11-sometime-on-sunday.html), my main focus for R12 is to fix whatever's causing the dynarec to hang with SSB, but to start with I've spent a little time looking into fixing some of the graphical issues plaguing Super Smash Bros.

In the end I fixed four or five separate problems which were all causing quite significant glitches.

The first bug was that I was assuming that the fixed-point texture coordinates specified in the TexRect (i.e. 2d textured rectangle) commands were unsigned. It turns out that they're actually signed - SSB just happens to be one of the few roms that ever specifies negative values.

The next issue was that I was ignoring the RDP tile* mask parameters, and assuming that the tile width and height always defined the extents for both wrapping and clamping. As it turns out, the mask values (if set) define how many bits from the texture coordinate to accept - all the other bits from the texture coordinate are ignored. This means that if a tile defines a mask of 5, the texture will wrap every 2^5, or 32 texels. What's quite interesting about the N64 is that it lets you define different limit for clamping than for wrapping. For instance, you can wrap every 32 texels, but clamp the texture to a coordinate of 100 (i.e. after the texture has repeated 3 and a bit times.) It turns out this is exactly what SSB was doing.

A related issue was that as the PSP only supports textures with power-of-2 dimensions, I have to pad out non-power-of-2 textures from the n64 with empty space. As I was assuming that the n64 always clamped at power of 2 boundaries, it meant that the PSP occasionally displayed texels from bits of the texture that I hadn't initialised. To get around this I just manually repeat the last column/row of the texture when converting it on the PSP.

Another issue I fixed was relating to how I handled 'swizzled'** textures that were not an even number of texels. In the second screenshot on the left below, you can see a fringe of corrupt pixels down the right-hand side of each character's icon. This was due to me not correctly handling all of the texels the swizzled rows, but it only happened when the rows were not a multiple of 8 bytes (in the example below, the textures were 30x32 texels at 16bpp). Again, this is something SSB does that I've not seen in other roms.

I fixed a bug relating to how I was recolouring textures. In order to support some of the N64's more complex combiner modes on the PSP, I need to replace the RGB channels of a texture while maintaining the existing alpha channel. As it turns out, I wasn't handling this correctly for textures that weren't a power of 2. This is what is messing up the black background behind the 'Super Smash Bros' text on the first screenshot. Whoops.

Wow! That's quite a few bugs! Here's a few screenshots, with SSB running in R11 on the left, and the R12 work-in-progress on the right:

http://img72.imageshack.us/img72/595/ssb1ur8.png

http://img72.imageshack.us/img72/1531/ssb2vl0.png

http://img72.imageshack.us/img72/481/ssb3gu6.png


What's quite nice is that even though I've been fixing these with SSB in mind, there are likely to be lots of other roms which I've not tested that are relying on the same behaviour.

Graphically SSB is looking pretty slick, so now it's on to chasing down that dynarec bug :)

-StrmnNrmn

* The RDP has 8 tile attribute descriptors, which are used to tell the RDP how to interpret the data loaded into it's 4KiB of texture memory. They define properties such as the tile's format, width, height and whether to clamp or wrap and so on.

** On the N64, all odd rows in a texture have pairs of texels alternated (or more precisely pairs of 4-bytes of data.) The reason for this is that the N64's texture memory is composed of two separate banks of 2KiB, and organising texels like this allows for multiple texels to be accessed simultaneously when sampling from the texture. I use the term 'swizzled' loosely as it's quite a different process than swizzled textures on modern consoles (such as the PSP (http://wiki.ps2dev.org/psp:ge_faq) and the Xbox (http://www.ce.chalmers.se/edu/year/2004/course/EDA425/course2002/lectures2002/gfxhw.pdf) (see page 28)), even if it is performed for similar reasons.

The best of luck to you, StrmnNrmn!

ICE
May 9th, 2007, 23:06
SWEET!!!!!!!!!!!!!!!!!!!! if he get ssb running as good as mario 64 i will literally cry tears of joy!

PLZKLLME0080
May 9th, 2007, 23:09
Awsome!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!

Jonesyxxiv
May 9th, 2007, 23:22
awesome i cant wait

Abgoj
May 9th, 2007, 23:33
SSB, but portable. one word, superfantasticmegaawsome. :thumbup:

-=me=-
May 9th, 2007, 23:48
this would be amazing... Super Smash bros on a PSP! hope it works as well as starfox or mario cart

mike03$$$
May 10th, 2007, 00:17
I hope this update will help out with the wwf games or at least the wcw games

DarthPaul
May 10th, 2007, 00:25
Awe...awe...awesome! Strm is darn fast coding.

Gold Line
May 10th, 2007, 00:27
we need the WWF games!

hack.fool
May 10th, 2007, 00:49
awesome.. the progress are substantive :thumbup:


SWEET!!!!!!!!!!!!!!!!!!!! if he get ssb running as good as mario 64 i will literally cry tears of joy!

if he get ssb running as mario 64 i wonder how mario 64 will run :D :D :D

Hiei311
May 10th, 2007, 00:55
i cant wait 4 kick ass sound im playin mario kart and mario 64, it rocks! SSB will be the best

starogre
May 10th, 2007, 02:03
wow, awesome! SSB just needs the characters shaded and i haven't seen the items yet soo...doesn't look like mmany more graphical errors! good job!

also, i hope that sleep mode will work during games!

Buddy4point0
May 10th, 2007, 02:12
dude! i cant wait!!! it would be even sicker if he added wifi.

PLZKLLME0080
May 10th, 2007, 02:22
dude! i cant wait!!! it would be even sicker if he added wifi.

that would be FREKIN AWSOME!!!!!!!! :thumbup:

CaptainMorgan4
May 10th, 2007, 02:28
That's way in the future guys, and I'm sure it will come but right now R12's hype has just gone through the roof!!

Gold Line
May 10th, 2007, 02:31
wifi would be a dream but the poor guy needs to get the game full speed first :)

PLZKLLME0080
May 10th, 2007, 02:33
wifi would be a dream but the poor guy needs to get the game full speed first :)

thats true. but when it happens...

i dont know what will happen yet. :(

Gold Line
May 10th, 2007, 02:39
thats true. but when it happens...

i dont know what will happen yet. :(

we will all be happy bunnys :)

Sp3ct0r
May 10th, 2007, 06:14
Wow, you already got Mario 64 practically perfect, now if you get SSB running just as good, you will be considered a psp god in my book.

kharaboudjan
May 10th, 2007, 14:28
this is fantastic! i think those glitches will do much in other games as well :D

Love yr work Strmn !!!!

Gold Line
May 10th, 2007, 14:31
Wow, you already got Mario 64 practically perfect, now if you get SSB running just as good, you will be considered a psp god in my book.

many psp coders take there time but this guy works sooo fast and updates us on every thing he dose so he is a psp god :thumbup:

dark heart
May 11th, 2007, 07:15
yay! does this mean it fixes writing and huds that go like that in all games? like earth worm jim 3d?

pibs
May 11th, 2007, 08:30
is StrmnNrmn gona add Media Engine to Daedalus or has he? sry i havent been too much in the scene right now

Baboon
May 11th, 2007, 08:41
is StrmnNrmn gona add Media Engine to Daedalus or has he? sry i havent been too much in the scene right now


I hope so but he hasnt mentioned it now for a wee while. :(

Compatibility is ideal (especialy SSB and Goldeneye), but speed and decent sound via ME would be much more preferable. :thumbup: