Wednesday, September 06, 2006

Viewport scaling

It's been a fairly slow week for progress on Daedalus. I've had a few busy days with work, and I was away over the weekend so I've not had much time to work on Daedalus since my last update.

One thing I have managed to implement is viewport scaling however. After the previous release I received an email from Chris Meyer-Rassow which had a couple of interesting points. He suggested that I should have a look at providing a setting to allow the emulator to run with an aspect ratio of 4:3, rather than strecthing everything to fit the PSP's 16:9 (or 15.88236:9 to be accurate :)

I had been meaning to add this option for some time, and as it was only a small change I decided to implement this feature for the next release. I've added 3 different modes, as shown the in screenshots below. The first mode simply scales the graphics up to fit the PSP's screen (this is no different from the current release of the emulator):



This renders at 480x272. Notice how the vertial lines for the 't' and 'f' characters look slightly too heavy. This is as a result of scaling the graphics up to fit the PSP's screen. (As an aside, this screenshot clearly shows another issue that I need to address - the zfighting which is clearly visible in the carpet. I have a couple of ideas for fixing this.)

The next shot shows the same scene with the new unscaled 4:3 viewport setting:



This renders at 320x240, and so avoids scaling up any of the graphics. You can see that the problems with the 'f' and 't characters has gone. On the downside, there's a lot of 'wasted' space around the screen.

The final settings shows the new scaled 4:3 viewport setting:



This maintains a 4:3 ratio (so we maintain the correct aspect ratio), but scales things up to 362x272 to make full use of the screen's height. We waste a little less space with this mode, but some of the original problems with the text are still visible.

In the end all three options are a trade off between making full use of the screen and quality. In the next release it will be possible to adjust this setting as the emulator is running so you can pick whichever one looks best for the rom you're currently running.

As a result of doing this work with the viewport, I also fixed a couple of bugs related to how I was emulating the N64's viewport. When I originally wrote the graphics code for the PSP version of Daedalus, I forgot to handle the N64's viewport scaling/translation, which causes problems rendering certain scenes, as demonstrated in Aerogauge below:



Notice how the car is being rendered off-centre (it should be in the top right hand corner). After my viewport fixes, the same scene now looks like this:



The same change also fixes various minor glitches in a number of other roms (including Mariokart and Waverace), so it's a nice bugfix to get in for the next release.

-StrmnNrmn

48 comments:

  1. This looks fantastic. I've been wondering about the ratios but knew you were in perfect control all along.

    ReplyDelete
  2. YES chaz! wide screen would be sexy!
    ... sexy like tittys!
    jk jk
    well great news StrmnNrmn!
    cant wait until next release!

    ReplyDelete
  3. first off, Nice strmnnrmn, you always surprise me with all your ideas. i hope your short break was fun and stuff.
    anyways, i just thought, stupid idea, that maybe a fourth would be to wide zoom so it isn't stretched, but it fills the screen. the bad thing would be missing the picture. idk, just my two cents.

    ReplyDelete
  4. Looks better Ryan, I think your getting the hang of it. But for your next release I think you should really try to use your imagination and come up with a really sick idea for the matchin icon/wallpaper. Just really try to think of something great and you eventually will get an idea, then just go with it and we'll see what happens. Kepp it up, you to StrmnNrmn keep up this great work on Daedalus! And on a side note, I can't wait to get NASCAR 07 for PSP and also be able to play it on my 2.81 Devhooked firmware!

    ReplyDelete
  5. looks like R9 wont be out for a while though :(

    ReplyDelete
  6. I think R9 will be out in less than a month. StrmnNrmn has showwed how good he is at this stuff. I can trust him to get this update out pretty soon.

    ReplyDelete
  7. gmdude66: that's not possible, unless the emulator knows at runtime what is scenario and what is character, while it just gets a bunch of triangles to render :)

    What he COULD try, is cropping the top/bottom portions and re-locating the 2D sprites to the appropriate places (ie: move them up/down if they are in the "cut" areas)

    ReplyDelete
  8. Johnybon I have never used that program but I'm going to look it up and see what I can help you with, okay?

    ReplyDelete
  9. I'm sorry man I looked pretty well and I can't find anywhere to get a kickstart rom. Make sure when you find one that you rename it to "kickstart.rom" (it's case sensative). I searched to no avail and believe me I want to help you but I'm inexperienced when it comes to Amiga emulators. Put keep searching man becasue you have to find one becasue it's a must to play the emulator, so I mean everyone has one. I suggest going to a forum or just using google until you hit something. Good luck man, and I'm sorry!

    ReplyDelete
  10. sort of a subject change

    In case you don't have this site bookmarked or are tired of typing in the link, I shortened this link. www.pspn64.tk

    It's a direct link, not like my own fan site.

    ReplyDelete
  11. That sounds pretty cool, nice idea. Guys I made a small discovery today, how to get past the start menu in Super Smash Brothers with Dyrnarec ON. All you do is go to the start screen and don't hit anything, wait for the tuturial comes up. As soon as that comes up hit start and it'll bring you to the start menu again, quickly hit start and it will bring you to the menu but hit start ASAP! Then you will end up at the character selection menu. You can choose your character but after that it seems to freeze. I'll keep playing with it and I'll see if I can get in game.

    ReplyDelete
  12. nice morgan. and that 4:3 idea does seem cool probably easy to do too.

    ReplyDelete
  13. Nice icons especially the first matching ones. Maybe you should make a matching backround picture for the Daedalus menu's. Anyway Ryan I would suggest you look at the first matching ones and try to aim at stuff like this. Nice work man.

    ReplyDelete
  14. Im back! So strmnnrmn how much progress have got for R9?

    ReplyDelete
  15. Welcum back Mario Kart God!
    Im glad your safe or whatever!
    Anyway, I hope theres a speed up in the next release!

    ( O ) ( O )

    ReplyDelete
  16. Welcome back MKG, good to see your okay. Only 50min left till kickoff in the Bears vs Packers game! Go packers!

    ReplyDelete
  17. that mIRC server is smart. It's a lot easier than reading everything. btw for the people that don't know, mIRC is free.

    ReplyDelete
  18. Hopefully we'll get some news about R9 tomorrow (11th). On a side note, my condolenses to the families/victims of 9/11, 5 years ago tomorrow....

    ReplyDelete
  19. [quote= asshole]
    WHO CARES ABOUT 9/11 NOT me i dont see why we care so much and i am sick of hearing of it. [/quote]

    GET SUM FUCKING SYMPATHY ASSHOLE. JUST CUZ U DIDN'T LOSE FAMILY/ FRIENDS DOESN'T MEAN OTHERS DIDN'T. HERE'S A BIG FUCK YOU FROM THE PPL OF NEW YORK!

    ReplyDelete
  20. ryan wtf you say I dont know why WE care so that means that you care now I can understand that you dont have much interest in 9/11 since you dont have any personal tye to it but dont be an asshole and have some respect.

    ReplyDelete
  21. Well to me its just hurtfull seeing the actual original footage again because its sad!
    And no!
    its no laughing matter!
    Show sume respect for our fellow Amaricans!
    Even tho im not Amarican i still feel for those who lost what they did!
    eg. Family, husbands, wives, MOTHERS! FATHERS!
    Just remember to think of what your posting befor u make retarded comments kk!
    Not trying to be the parent!

    ( O ) ( O )

    ReplyDelete
  22. sroon not to be a grammer ass but it is americans not amaricans.

    ReplyDelete
  23. lol sry bro!
    its justi cum back on this site and peopl are being a buch of jerks
    lol.
    btw StrmnNrmn hows it going bro?

    ( O ) ( O )

    ReplyDelete
  24. Ryan I will never help you or do anything for you from this day forward just because of that comment. Just think your at work and suddenly a plane hits your building and killing you INSTANTLY. Imagine your dead, done, finished! Actually THINK, your DEAD, gone not comming back. And now your gone off the face of the earth for things you have nothing to do with, your an innocent person. Would you want people then making fun of how you lost your life and just saying who cares. I have respect for the victims/families of 9/11 and I'm not tied to it, maybe you should too.

    ReplyDelete
  25. Good boy Captain!
    I actually have to agree with you!
    maan such a tragety! (Skater or how you spell it)

    ( O ) ( O )

    ReplyDelete
  26. Ryan, I can't believe you said that! That was very disrespectful!!!!

    ReplyDelete
  27. I hope StrmnNrmn gives an update soon, I'm sure he's almost got R9 ready.

    ReplyDelete
  28. I doubt there is any speed diffrence in the diffrent screen modes but could be wrong with experience on other emus I havent seen anthing also athough I dont think it was the same way that strmn did I did try it with only about 1/4 of the screen used when I was just messing around I saw no diffrence.(1/4 is an estimate I cant remember exactly)

    ReplyDelete
  29. i have a feeling there will be a blog update or r9 out of no where. idk, but strmnnrmn seems to be hard at work because he isn't posting or, he is tired of all this 9/11 crap. I'm not making fun of 9/11, it is just the fight. Anyways, I think r9 can't be too much better than r8 without some dramatic code change or something. i jsut can't wait

    ReplyDelete
  30. well said Wally!
    I will respect you and this blog!

    ( O ) ( O )

    ReplyDelete
  31. This comment has been removed by a blog administrator.

    ReplyDelete
  32. lol question?
    what does it say when u select a course when u enter a level?
    pickle?
    lol
    and no pro bro aka Wally
    cuz i dont feel like beind pawnd!

    ReplyDelete
  33. Please no more 9/11 stuff, everything has been said. Anyway yeah I'm looking forward to this in game menu. I really hope StrmnNrmn hits the nail on the head with the GUI. I just hope it looks cool like for example the SNES9XTYL 4.2me one.

    ReplyDelete
  34. RyanMWolfe - "didnt think"


    Enough said.

    ReplyDelete
  35. This comment has been removed by a blog administrator.

    ReplyDelete
  36. OMFG!
    Wally's Iz gona PWN US ALL!
    STOP IT BEFORE ITS TOO LATE!
    anyways I have a PS2 emu for psp that plays elf files cumming out as soon as i can find a place to upload it!

    ( O ) ( O )

    ReplyDelete
  37. I wasn't saying that comment to be smart, I was just saying Ryan wasn't thinking and he messsed up, it's over. Anyway sroon why would you say that you'll get people all annoyed.

    ps. Don't use stupid game words like "pawn" you sound stupid

    ReplyDelete
  38. I would pay a max of 10$ if it had mostly full speed and complete sound. Now, when I say mostly full speed, I mean, not completely full because it is somewat not probable, but sound i think is possible. but ten bucks is a great price i think. even five will make him a lot. but, who said he is going to charge? strmnnrmn has proven himself to be awesome.

    ReplyDelete
  39. Hey Stermnnrmn, whats going on?? Did you make any proress?

    ReplyDelete
  40. I'm sure StrmnNrmn is been hard at work on Daedalus and he'll update us with R9 soon. We jsut got to stay patient, I'm fine with that because I'm recovering from a kegger last night!

    ReplyDelete
  41. This comment has been removed by a blog administrator.

    ReplyDelete
  42. Same here Morgan!
    what u slam down bro?
    it was kethes fer me!

    ( O ) ( O )

    ReplyDelete
  43. OH and btw I will be happy to wait because Alexisonfire was at the resterount I work at and I got FREE backstage passes!
    YEEEH!
    aaaaand i SORRY again Morgan for um saying Pawn......or what ever I did!
    WERE STILL BROS right!?!
    ANd take your time Norm iv got all the time in the world!
    And what u upto Wally?

    ( O ) ( O )

    ReplyDelete
  44. Were cool man, I had Miller Lite in the keg. Not my choice but keg beer is banger.

    ReplyDelete
  45. Thank you for the update wally!
    You da maan!
    Question?
    Is it the textures your fixing, or the background images,
    aka, in 007 worlds not enough the floor has black dots OR are you fixing stuff like the Zelda links house and stuff like that?

    ( O ) ( O )

    ReplyDelete
  46. One more thing Wally?
    Would you could you Please start with Zelda?
    And wally since when did you learn to code?!?!?
    BRAVO BROTHA!

    ( O ) ( O )

    ReplyDelete
  47. Thanks Wally, I wonder where Strmnnrmn is. I can't wait till R9!

    ReplyDelete
  48. Wally isn't doing serious code, he's using missing_mux to put in the code for the Blend Modes folder to fix the purple/black textures you see in some roms. Thanks Wally, and hope your release fixes DKR.

    ReplyDelete