blargSnes -- SNES emulator for the 3DS (WIP)

Discussion in '3DS - Homebrew Development and Emulators' started by StapleButter, Aug 10, 2014.

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

    DiscostewSM GBAtemp Guru

    Member
    12
    Feb 10, 2009
    United States
    Sacramento, California
    A game like Donkey Kong Country may work well with 3D because the layers seem complete and separate from one another, but a game like Final Fantasy VI may not do so well because the map layout for places like towns use the tiles of the layers to kinda stitch it all together, even though the tiles are on separate layers, not to mention that sprites would shift from being above one layer to being behind them for areas like bridges, causing an unusual and sudden change in depth.

    Not saying the 3D effect isn't useful, it's just not optimal for all situations.
     
  2. spinal_cord

    spinal_cord Knows his stuff

    Member
    6
    Jul 21, 2007
    somewhere


    Simple solution -- user separation settings + use the 3D slider :-)
     
    dubbz82 likes this.
  3. gamesquest1

    gamesquest1 Nabnut

    Moderator
    20
    GBAtemp Patron
    gamesquest1 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Sep 23, 2013
    personally i think if your doing it for the 3ds you should atleast try to get some sort of 3D effect to make it......standout:rofl:
     
  4. Kane49

    Kane49 GBAtemp Fan

    Member
    3
    Nov 4, 2013
    Gambia, The
    SNES Games always have a sprite layer, basic 3DS should just have the sprite layer in the front and thats it :)

    [​IMG]
     
  5. dubbz82

    dubbz82 GBAtemp Advanced Maniac

    Member
    7
    Feb 2, 2014
    United States
    I'd much prefer that to be optional.
     
  6. gamesquest1

    gamesquest1 Nabnut

    Moderator
    20
    GBAtemp Patron
    gamesquest1 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Sep 23, 2013
    the 3d slider makes 3d always optional.....but then again i also didn't say "3D should be mandatory" i just meant that even if the 3d effect isn't fantastic it would still be cool to at least have a little play around with it to see what it looks like, i think the ini settings would be a good idea so games that work well with it could have it enabled and then there can be game specific tweaks if some games use odd layer setups...or it could just always be disabled for games where its particularly bad

    but still all this talk of 3D and its not even properly working yet :P

    couple of games i think 3d would work pretty well for would be shoot 'em ups off the top of my head like pop 'n twinbee,super strike gunner, R-type. im sure other games could work well but shoot 'em ups seem like the most natural games for it to work well with it
     
  7. andremario81

    andremario81 GBAtemp Regular

    Member
    1
    Jun 4, 2014
    United States
    Chicago, Illinois
    No one has answered my question!!!! HOW DO I RUN BLARGSNES?
     
  8. GorTesK

    GorTesK Mad Hatter

    Member
    4
    Jan 29, 2013
    Gambia, The
    Down The Rabbit Hole
    you have to compile it from the source
    if you don't know how, then maybe this is nothing you should use
    there is a reason, why the author said, he will release a compiled version, when it is ready - before that everything is experimental
     
    Margen67 likes this.
  9. andremario81

    andremario81 GBAtemp Regular

    Member
    1
    Jun 4, 2014
    United States
    Chicago, Illinois
    I get ya. Thanks. I'm open to learning however.
     
    Margen67 likes this.
  10. the_randomizer

    the_randomizer The Temp's official fox whisperer

    Member
    22
    GBAtemp Patron
    the_randomizer is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Apr 29, 2011
    United States
    Dr. Wahwee's castle

    Getting the sprites to show up and other stability is top priority. Let the emulator get into a working state before suggesting 3D.
     
  11. gamesquest1

    gamesquest1 Nabnut

    Moderator
    20
    GBAtemp Patron
    gamesquest1 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Sep 23, 2013
    thats the point i was trying to make there originally,
    but got a bit sidetracked with talk about how 3D *could* work good on some games
     
    Margen67 likes this.
  12. planetarian

    planetarian GBAtemp Regular

    Member
    3
    Aug 5, 2014
    United States
    Naturally, it's not something that every game, or even a significant number of games, would do. It is beneficial to do it that way, but it does take a bit more finesse to pull off.

    I'm just making note that some games DO use slightly different rendering mechanisms that may not be perfectly compatible with the standard layering mechanism. Other examples of games that would break standard layer rendering would be any games that do 3D or pseudo-3D rendering (see: racing games, star fox, DOOM)...
     
  13. shinyquagsire23

    shinyquagsire23 SALT/Sm4sh Leak Guy

    Member
    13
    Nov 18, 2012
    United States
    Las Vegas
    A per-game setting system might solve this, where each game as a sort of config file and maybe certain RAM hooks to determine which layers go where on the Z stack in which areas.
     
    Margen67 and planetarian like this.
  14. StapleButter
    OP

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

    Member
    9
    Dec 5, 2009
    France
    Indeed. I also think that pseudo-3D games that make use of Mode7-powered perspective or SuperFX will work better in 3D. Sidescrollers might work but it'd have to be tried out. Games that use non-Mode7 pseudo-3D (Pokémon style) won't work well at all without major hacks.

    But for now, funky 3D effects aren't what I'm after.


    I'm going to reimplement savegames. The reason it was disabled was that I wanted to get the lolSnes core working on the 3DS, and disabled all the extra stuff that could have interfered so I'd know where issues would come from. Now this can safely be reenabled.

    After that, I'd like to experiment a new event scheduler system, hoping it'll bring some speedup. I'll let you know :)

    Past all that, what will remain will be mostly some PPU tidbits, and I will be able to release a first blargSnes version I guess :)


    Unrelatedly, it'd be nice if someone could get the exheader and accessdesc of Super Mario 3D Land, so we can verify if the rumor that it uses the two ARM11 cores is true. I dumped my SM3DL cart but the exheader and accessdesc are encrypted.

    I tried to modify makerom so I could build a .3ds with an affinity mask of 3 instead of 1. But that .3ds wouldn't start, the system would just go 'the cart has been ejected'. Either I missed something there, or it's just not possible to use the two cores.

    I hope it's possible. It would greatly help with performance in the case of blargSnes.
     
    Margen67, Idaho and emo kid 68 like this.
  15. DiscostewSM

    DiscostewSM GBAtemp Guru

    Member
    12
    Feb 10, 2009
    United States
    Sacramento, California
    Unless I'm mistaken, attempting to get the 3D effect with Mode7 usage may not entirely be possible, at least not in the way we want it. The layer may scale and rotate, but technically, there isn't any real depth to work off of except for the priority that all other layers work off of. Even if you attempted to work off of scaling, it would still have to be confined within the boundary of all other layers, sprites included, because changing how it appears depth-wise would look off if it makes it go far back or forward enough past another layer's depth. It would make a nauseating effect similar to when you tilt the 3DS enough so that what each eye sees is swapped, making it look like what is in front actually has a greater depth.

    With SuperFX games like StarFox, however, it may be more plausible. For handling those games (not necessarily SMW2:YI), polygons are rendered to a frame buffer in the SNES's RAM, and then that gets sent to the display combined with other things like background layers. If it has commands for determining camera position/orientation, then perhaps you could make an additional buffer outside of the system, offset/angle each perspective as would be the norm of generating this effect, have the polygons rendered to both, and then when placing that frame buffer onto the main render buffer, you can take the additional frame buffer you made and rendered to, and simply place it on the 2nd main buffer. No offsetting would be needed like you would do with background layers and sprites because you technically made the effect in the SuperFX render stage.

    At least, that's how I'd imagine it would be. I know a lot about the GBA hardware, but I never delve into how the SNES does things with as much vigor, so part of my theory is based on the GBA.
     
  16. StapleButter
    OP

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

    Member
    9
    Dec 5, 2009
    France
    3D on Mode7 perspective can work if the perspective is always horizontal (or if you manage to calculate the angle from the per-scanline mode7 parameters).


    So, I'm done with SRAM. That reminded me of the other reason why it was left out: it had to be ported to the 3DS filesystem API (we don't have fopen/fread/etc yet). But in the end, this API is fairly easy to use, so it went well.

    Bringing it back also increased compatibility a bit, too, heh. SMAS now starts, although you have to blindly press buttons in the menus to get to the desired game because the menu uses mode 3 and that isn't supported yet (actually I'm lazy and only support the more common mode 1 :P ).

    Kirby's Dream Course gets stuck on a 'wrong region' type screen because I didn't reimplement the NTSC/PAL switch. Well atleast it isn't getting stuck on the piracy screen anymore :P

    Most other games get stuck while trying to communicate with the SPC700 because my SPC700 skipping method is still not good.


    I'm going to implement a few more PPU modes that can be done easily.
     
    jacobas92, Idaho and the_randomizer like this.
  17. Bond697

    Bond697 Dies, died, will die.

    Member
    4
    Jun 7, 2009
    United States
    CT
    you're allowed to use up to 30%(between 5 and 30) of the syscore's cpu time as of sdk version 3.0 and it's part of the APT: library. i doubt you'd see anything special in the exheader or access descriptor. aside from maybe apt service access, but that would probably be there for other reasons anyway.

    after you do that, you create a thread with a core number of 1.

    your current tests are failing because right now the syscore has 0% cpu time assigned to the application.
     
  18. StapleButter
    OP

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

    Member
    9
    Dec 5, 2009
    France
    Nice! Do you know details about how I'd use this, though? I fail to see a related function in 3dbrew's listing.

    I tried playing with the flags of APTU::Initialize, but to no avail. Setting bit0 or bit2 has no visible effect, and setting bit1 causes the app to stay on the 'Nintendo 3DS' loading screen forever.
     
  19. Bond697

    Bond697 Dies, died, will die.

    Member
    4
    Jun 7, 2009
    United States
    CT
    0x4F0080

    arguments passed should look like:

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


    if that doesn't work, i'll have to have a quick look at the applet module when i get home from work.

    e:

    APT:U should do it. i don't think APT:S is available in the access control in the rsf that everyone uses to build with. if it does require APT:S, you're out of luck. at least for now.
     
    jacobas92 likes this.
  20. DiscostewSM

    DiscostewSM GBAtemp Guru

    Member
    12
    Feb 10, 2009
    United States
    Sacramento, California
    What I described is what Kane49 demonstrated with that picture posted. A Mode 7 layer is like any other layer as far as priority layering is concerned. You could limit the depth you generate based on other layers so it neither has a depth less than the layer just in front of it nor greater than the layer behind it. Would still make it odd in some scenarios, like racing games where multiple sprites are on the same layer above the Mode 7 layer, so they kinda pop out rather than being at whatever suggested depth the game was meant to make them appear as. Even for such games, the point at the bottom of the screen meant to show how close to the track the camera is (vs off in the distance) would not be shown as closer than your own racer because of the same layering issue. Then there's also changing layer priorities in between scanlines. While such a thing isn't limited to Mode 7, if you were able to process angles to generate sloping depths for it, that altering of the layer priority mid-frame could make it produce an odd cut-off effect.
     
Thread Status:
Not open for further replies.