Thread Status:
Not open for further replies.
  1. StapleButter

    OP StapleButter 'New Member' registered since 2009. Fuck yea.
    Member

    Joined:
    Dec 5, 2009
    Messages:
    815
    Country:
    France
    Thank you Bond697 :) I'll try it out in a while. If it works, you get to be listed in the credits list for this :P
     
  2. StapleButter

    OP StapleButter 'New Member' registered since 2009. Fuck yea.
    Member

    Joined:
    Dec 5, 2009
    Messages:
    815
    Country:
    France
    I gave it a try, and I may have missed something, but it didn't work. It basically just returned a 'not implemented' error code.

    I also tried replacing the 0 value with APPID_APPLICATION and 0xFFFF8001, to no avail.


    If this only works with APT:S, well, I'm fucked.
     
  3. Normmatt

    Normmatt Former AKAIO Programmer
    Member

    Joined:
    Dec 14, 2004
    Messages:
    2,156
    Country:
    New Zealand

    It should work at least according to NSMB2. (SML3D doesn't use it)
     
  4. StapleButter

    OP StapleButter 'New Member' registered since 2009. Fuck yea.
    Member

    Joined:
    Dec 5, 2009
    Messages:
    815
    Country:
    France
    Well then, I'd be curious to see how NSMB2 does it.

    Given how much resources PPU emulation is taking, I fail to see how I'll be able to emulate sound without another severe performance hit if I can't offload that to something else than the appcore.


    Unrelatedly, I guess I'm done with the 'PPU tidbits' part. Mode 3 and 256-color layers are done: http://i.imgur.com/Othvtn2.jpg -- this finally makes SMAS playable without having to choose a game blindly.

    At this point, implementing modes 0/2/4 would be ridiculously easy, if we ignore offset-per-tile for a while.


    I'm going to focus on the new scheduler I guess. Last big thing to do before a first release.
     
    shamzie and gamesquest1 like this.
  5. Normmatt

    Normmatt Former AKAIO Programmer
    Member

    Joined:
    Dec 14, 2004
    Messages:
    2,156
    Country:
    New Zealand

    According to NSMB its arguments are:

    cmdbuf[0] = 0x4F0080
    cmdbuf[1] = 1
    cmdbuf[2] = *percentage* (if you want the entire 30%, make it 30)

    Bond697 had an extra entry in it which NSMB2 doesn't seem to have.
     
  6. Bond697

    Bond697 Dies, died, will die.
    Member

    Joined:
    Jun 7, 2009
    Messages:
    353
    Country:
    United States
    yeah, i misread. just had another look. in my haste at work yesterday, or maybe a graphical glitch in remote desktop from scrolling around too fast, i definitely thought there were 2 strd instructions in a row.

    e: while i'm here, if you wanted to check the amount of syscore time that was being used:

    cmdbuf[0] = 0x500040
    cmdbuf[1] = 1
     
  7. cracker

    cracker Nyah!
    Member

    Joined:
    Aug 24, 2005
    Messages:
    3,518
    Country:
    United States
    Did you render that yourself or is there an emulator that gives an exploded view? I hope the latter because that looks pretty sweet.

    Good job StapleButter! You're kicking some ass on this emulator. :grog:
     
    Margen67 likes this.
  8. StapleButter

    OP StapleButter 'New Member' registered since 2009. Fuck yea.
    Member

    Joined:
    Dec 5, 2009
    Messages:
    815
    Country:
    France
    Thank you two! I just tried it and it works like a charm. Amazing!
     
    mercluke likes this.
  9. Normmatt

    Normmatt Former AKAIO Programmer
    Member

    Joined:
    Dec 14, 2004
    Messages:
    2,156
    Country:
    New Zealand
    Just took a quick look and it seems your drawing the screen twice, why not just memcpy the first buffer to the second instead of calling the drawing methods again?

    EDIT: NM misread your code.

    :)
     
  10. Idaho

    Idaho GBAtemp Advanced Fan
    Member

    Joined:
    Oct 3, 2013
    Messages:
    828
    Country:
    France
    I am a bit lost here, does that mean you have access to more ressources ?
     
  11. StapleButter

    OP StapleButter 'New Member' registered since 2009. Fuck yea.
    Member

    Joined:
    Dec 5, 2009
    Messages:
    815
    Country:
    France
    Normmatt: Each time, it uses a different layer enable register for drawing the layers (PPU_MainScreen/PPU_SubScreen).

    The SNES has two 'screens': main screen and sub screen. For each, the PPU draws the layers according to the corresponding layer enable register, and the two screens are mixed together, optionally with blending.

    Emulating this is important because it also affects priorities. For example, in SMW, the background layer is enabled in the subscreen, and the other layers and sprites are enabled in the mainscreen. Ignoring the mainscreen/subscreen feature would cause some sprites (like those flying piranha plants that jump out of pipes) to appear behind the background when they should appear in front of it.

    (you reminded me of the workarounds lolSnes used to make up for the lack of mainscreen/subscreen on the DS, heh)


    Idaho: Exactly :)
     
    Dartz150 and Idaho like this.
  12. loco365

    loco365 GBAtemp Guru
    Member

    Joined:
    Sep 1, 2010
    Messages:
    5,457
    Just out of curiosity, does the screen still become a garbled mess of tiles when the fade in/fade out occurs after pressing start?
     
  13. StapleButter

    OP StapleButter 'New Member' registered since 2009. Fuck yea.
    Member

    Joined:
    Dec 5, 2009
    Messages:
    815
    Country:
    France
    You get the same screen transition as on the real thing. Garbage may show up inbetween though, as I don't emulate master brightness.


    Also, fuck no. I can't use CSND. It's not listed in gw_workaround.rsf. And of course, adding it there doesn't work either (3DS menu just goes 'card has been ejected, press home to return to menu').

    fuuuuuuuuck >_<
     
  14. shamzie

    shamzie Oh David de Gea <3
    Member

    Joined:
    Mar 19, 2014
    Messages:
    903
    Country:
    I don't have a clue on what you are talking about, I just no you're doing a great job and you'll figure out whatever it is that needs to be done :) don't give up!
     
  15. bobmcjr

    bobmcjr GBAtemp Advanced Fan
    Member

    Joined:
    Apr 26, 2013
    Messages:
    987
    Country:
    United States
    I'm guessing that CSND has to be part of ServiceAccessControl? It's in SystemControlInfo. I find it odd they would leave CSND out since the microphone and camera appear to be included in ServiceAccessControl
     
  16. StapleButter

    OP StapleButter 'New Member' registered since 2009. Fuck yea.
    Member

    Joined:
    Dec 5, 2009
    Messages:
    815
    Country:
    France
    I guess it has to be in ServiceAccessControl too.

    CSND_initialize() returns a 'access denied' error code.
     
  17. bobmcjr

    bobmcjr GBAtemp Advanced Fan
    Member

    Joined:
    Apr 26, 2013
    Messages:
    987
    Country:
    United States
  18. StapleButter

    OP StapleButter 'New Member' registered since 2009. Fuck yea.
    Member

    Joined:
    Dec 5, 2009
    Messages:
    815
    Country:
    France
    Yeah, NULL is the value I passed to it.

    Now, well, how would one play sound without CSND? DSP stuff is mostly undocumented as of now.
     
  19. ichichfly

    ichichfly GBAtemp Advanced Fan
    Member

    Joined:
    Sep 23, 2009
    Messages:
    620
    Country:
    Gambia, The
    you need a signed dsp code block to run DSP sound decoding
     
  20. StapleButter

    OP StapleButter 'New Member' registered since 2009. Fuck yea.
    Member

    Joined:
    Dec 5, 2009
    Messages:
    815
    Country:
    France
    Isn't there a DSP microcode set up by the firmware? (or does it use CSND?)

    DSP would be tricky. I started looking into it, and well... it's a pain. The only documentation is littered with errors, the assembly language is weird and confusing, and half the disassembled code makes no sense.
     
  21. dontay0100
    This message by dontay0100 has been removed from public view by Cyan, Aug 20, 2014, Reason: offtopic.
    Aug 20, 2014 Show
  22. GorTesK
    This message by GorTesK has been removed from public view by Cyan, Aug 20, 2014, Reason: offtopic.
    Aug 20, 2014 Show
Loading...

Hide similar threads Similar threads with keywords - blargSnes, emulator, (WIP)

Thread Status:
Not open for further replies.