SNES9x for Old 3DS

Discussion in '3DS - Homebrew Development and Emulators' started by bubble2k16, Jul 25, 2016.

  1. ScarletDreamz

    ScarletDreamz [Debug Mode]

    Member
    2,384
    986
    Feb 16, 2015
    United States
    California
    So... Anyone?

    I seriously cant compile this file, it gives me the same error over and over again, on every revision of the code:

    Warning: Spoilers inside!

    Any idea why the appStatus appears as Undeclared?
     


  2. bubble2k16
    OP

    bubble2k16 GBAtemp Fan

    Member
    310
    1,102
    Jul 25, 2016
    Senegal
    Try to go to the make file and remove the -DLIBCTRU_1_0_0 to see if it helps.

    Do note that building with libctru 1.2 will cause the emulator to run at Old 3DS clock speeds on a New 3DS. I am not sure why.
     
  3. ScarletDreamz

    ScarletDreamz [Debug Mode]

    Member
    2,384
    986
    Feb 16, 2015
    United States
    California
    This do work for the Master branch, but however, the v80 release code, does not have the -DLIBCTRU_1_0_0 flag on it.
     
  4. bubble2k16
    OP

    bubble2k16 GBAtemp Fan

    Member
    310
    1,102
    Jul 25, 2016
    Senegal
    Support for libctru v1.2 was only added after v0.80, thanks to the help of a fellow contributor.
     
  5. ScarletDreamz

    ScarletDreamz [Debug Mode]

    Member
    2,384
    986
    Feb 16, 2015
    United States
    California
    This confuses me a little bit.. So basically...

    v0.80 and on uses 1.2, but this trigger O3DS Speeds on the N3DS.

    the flag -DLIBCTRU_1_0_0 is needed in order to make the N3DS speed works? do i need to recompile libctru v1.0.0 in order to compile with the flag -DLIBCTRU_1_0_0?

    However the flag -DLIBCTRU_1_0_0 doe snot appear on v80, only on the master branch as you stated, so the error continues..

    I can build master branch whitout issues, but cant compile v80, do i need libctru 1.0.0 compiled? whe compiling the v80 i got the errors pasted above. o-oU

    So... basically:

    MasterBrach + Libctru 1.2.0 with Removed flag: Works
    MasterBrach + Libctru 1.2.0 with With flag: Does Not Works
    v0.80 + libctru 1.2.0 : Does Not Works
     
  6. bubble2k16
    OP

    bubble2k16 GBAtemp Fan

    Member
    310
    1,102
    Jul 25, 2016
    Senegal
    Thanks to @zerofalcon's feedback on Batman and Robin, and @angelhp's report on Doraemon - Nobita something .

    Both were bugs resulting from the implementation of layering in Mode 7, which fixes Contra 3's stage 2, but broke the above games.

    The latest nightly fixes everything about the Mode 7 layering with some really crazy math and alpha channel hacks. It also added another stretch option :yay:, but this should be the last of it for this round.

    https://github.com/bubble2k16/snes9x_3ds/raw/master/snes9x_3ds.3dsx
    https://github.com/bubble2k16/snes9x_3ds/raw/master/snes9x_3ds.cia


    For now my focus will be on breaking changes (means: games that work in v0.80 but stopped working, or has corrupted graphics in v1.00b). Please do report them if you find them!

    To keep it simple: Build all of the Snes9x for 3DS versions with devkitARM r45, libctru v1.0.0, and citro3d v1.0.0. You can get these all from source forge.
     
    Last edited by bubble2k16, Feb 9, 2017
  7. kane159

    kane159 GBAtemp Regular

    Member
    138
    27
    May 28, 2013
    Taiwan
    hey! good job bro! now i can play all my snes games on my really old 3ds :P
    and heres some graphic glitch i report very long times ago....
    about clock tower
    1.disable style2 looks like this
    [​IMG]
    2.disable style1 looks like this
    [​IMG]
    3.and enable looks like this(the white ling flashing....)
    [​IMG]
     

    Attached Files:

  8. ScarletDreamz

    ScarletDreamz [Debug Mode]

    Member
    2,384
    986
    Feb 16, 2015
    United States
    California
    Thanks for the help, sadly it did not work, ill guess ill stick with master branch and libctru 1.2.0, compiling with 1.0.0 gives several errors on v80, and master branch :/

    This is the log when compiling master branch with libctru 1.2.0 and with the flag enable:
    Warning: Spoilers inside!

    This is the log building v0.80 with libctru 1.2.0:
    Warning: Spoilers inside!

    This is the log building v0.80 with libctru 1.0.0:
    Warning: Spoilers inside!

    So far, for me the only thing that work its the master branch with the flag removed using libctru 1.2.0.
     
  9. vander263

    vander263 GBAtemp Regular

    Member
    177
    27
    Jan 21, 2017
    Brazil
    Great improvement @bubble2k16, i wish i could help you with this, but my knowledge in emulation is very limited yet, i'm trying to fix some bugs in a SuperCHIP8 emulator that i made and i'm getting angry already lol, so i kinda know how you fell when this strange things happens, and in a project so complex like this one, you are really a hero :bow:
     
  10. bubble2k16
    OP

    bubble2k16 GBAtemp Fan

    Member
    310
    1,102
    Jul 25, 2016
    Senegal
    Yup this was reported, but it looks like another timing issue that I don't really know how to fix. :) I probably won't either...

    Yup. If you compile the latest with libctru 1.2.0 successfully, you will not be able to run the emulator using the New 3DS clock speed (unless of course you set up BootNTR or setup Luma3DS to enable the full clock on your New 3DS). It is a known problem with libctru 1.2.0. It's ok if you are running and Old 3DS, and you are not going to distribute this version.

    Therefore, it is better to compile with libctru v1.0.0 so that the emulator can automatically enable the full clock speed in a New 3DS. But to do that, you must remove devkitARM r46 and reinstall devkitARM r45. You probably didn't do that that's why you couldn't compile with libctru v1.0.0. :)
     
  11. ScarletDreamz

    ScarletDreamz [Debug Mode]

    Member
    2,384
    986
    Feb 16, 2015
    United States
    California
    EOohhh.. i see....

    Well, since luma have the patches for N3DS Clocks, its not a big deal O:

    thanks for answering btw.
     
  12. coinblock

    coinblock GBAtemp Regular

    Member
    208
    91
    Sep 4, 2015
    Thanks a lot for adding this! I think it makes a big difference when playing sprite-based games, anyway. The performance on the latest nightly is also excellent!
     
  13. bubble2k16
    OP

    bubble2k16 GBAtemp Fan

    Member
    310
    1,102
    Jul 25, 2016
    Senegal
    No problem. If you are adding any features and fix any bugs, be sure to let me know. :)
     
  14. coinblock

    coinblock GBAtemp Regular

    Member
    208
    91
    Sep 4, 2015
    @bubble2k16, another thought for you... When this project wraps up, instead of working on GBA or PSX emulation, have you considered trying to port a Virtual Boy emulator over? It would be a natural fit for the 3DS! (Although probably the N3DS would only be able to run it...)
     
    Vague Rant and angelhp like this.
  15. angelhp

    angelhp GBAtemp Fan

    Member
    313
    46
    Nov 30, 2014
    Yes , virtual boy emu will be genial.....
     
  16. ScarletDreamz

    ScarletDreamz [Debug Mode]

    Member
    2,384
    986
    Feb 16, 2015
    United States
    California
    If you add the feature to read the lenguage from external files, as example, .lang files, i can translate some languages.
     
  17. mqk9999

    mqk9999 GBAtemp Regular

    Member
    206
    95
    Apr 14, 2010
    United States
    All that work and research for Mario Clash and Wario <.< Honestly I'd rather have a functional NES or Genesis/MD emulator that doesn't use RetroArch
     
  18. BL4Z3D247

    BL4Z3D247 GBAtemp Stoner

    Member
    1,527
    362
    Oct 22, 2008
    United States
    I'm so high, I don't even know!
    Isn't there a Virtual Boy emulator already being worked on for the N3DS? I think it's called r3Dragon but it only runs on firmware 9.3 or below. I don't know how well it runs as I've never tried it(I have a 2DS and my N3DS isn't here yet). Looks like it's still being work on as the last commit on github was 8 days ago. Just mentioning it in case someone hadn't known about it.

    Personally I'd like to see a GBA emulator so I(we) can get rid of the clutter that is VC injects, not to mention some much needed features that VC injects don't provide. I can also go for a PSX emulator, I'd love to play some FFVII and Xenogears on the go(I know I could just use my PSP Phat but it's not as comfortable to play on).

    Anyways, whatever the next project you venture off to is, I'll be following. :)
     
  19. ScarletDreamz

    ScarletDreamz [Debug Mode]

    Member
    2,384
    986
    Feb 16, 2015
    United States
    California
  20. bubble2k16
    OP

    bubble2k16 GBAtemp Fan

    Member
    310
    1,102
    Jul 25, 2016
    Senegal
    Hmm... I haven't really decided what to do. I'll see. :)

    Virtualboy has too little games. And besides, as @ScarletDreamz and @BL4Z3D247 mentioned, there's already one.

    — Posts automatically merged - Please don't double post! —

    Finally, think it's time.

    v1.00 Released

    - Transplanted the full SPC700 + DSP source codes from Snes9x v1.51 into this emulator. As a result, the sound emulation now supports Gaussian Interpolation, and has better accuracy. This fixes some sound problems in Clay Fighter and Mortal Kombat I and II.
    - Fixed Mode 7 priorities in games that use this: Contra III's stage 1 (at the loss of some color fidelity). Implementing this required the use of some crazy math hacks and hardware tricks to pull this off.
    - Implemented some experimental speed hacks for Super Mario RPG and Kirby's Dreamland. Runs slightly faster (still not full speed) on Old 3DS.
    - Implemented hi-res translucency. We get non-flickering emulation of hi-res screens (Secret of Mana, Seiken Densetsu 3, A.S.P. Air Strike Patrol) now as a bonus. As a result, Kirby's Dreamland is now playable.
    - Invented a new cheat file format .CHX (text file) so that players can add cheats by using any text editor.
    - Centralized the SNES output screen vertically on the top screen.
    - Overhauled the user interface to give a more modern look as well as provide additional fonts.
    - Added more screen stretch options as requested by many users.
    - Added 3D slider support. Pushing up the 3D slider doesn't create any 3D effect, but may create a better viewing experience.
    - Removed unnecessary debug messages during start up / shut down of the emulator.
    - Fixed a bug when the SRAM still saves randomly when it is set to Disabled.
    - Reduced memory footprint for storing texture position caches.
    - Made this version buildable with libctru v1.2.0 (thanks to Maki-chan)
    [Note: Building with devkitARM r46 and libctru v1.2.0 will cause a bug where the emulator cannot utilize the full clock speed of the New 3DS.]


    Thanks to everyone for the suggestions and bug reports! :grog:
     

    Attached Files:

    Last edited by bubble2k16, Feb 10, 2017
    ahezard, JimmyZ, Ashachu123 and 25 others like this.