[Release] TemperPCE for 3DS

Discussion in '3DS - Homebrew Development and Emulators' started by bubble2k16, Jun 18, 2017.

  1. bubble2k16
    OP

    bubble2k16 GBAtemp Fan

    Member
    10
    Jul 25, 2016
    Senegal
    Silly me: Please put the BIOS in the /3ds/temperpce_3ds/syscards folder instead! :)


    Hey, I'd like to thank you for the original work on Temper. I got your source from gameblabla's GitHub - he ported it to GCW0.

    As a rough gauge, in this current port, I use 2 CPUs of the Old 3DS. The first runs the main emulation + graphics, the second emulates the PSG and mixes it with the raw CD + ADPCM output (which comes from the main CPU). When running most games, the CPU + graphics (hardware-accelerated) takes up about 60% without idle loop patching. Raiden, in some areas in the first stage, gets rather busy and hits 110%-120%. I tried earlier to define the CPU_ARM_FAST_MODE before to use the cpu_arm_asm_fast.s, but for some reason, it ran a wee bit slower than the original C core. I didn't spend too much time to figure out why, and I just went back to the original C core.

    Obviously when I went software, the total CPU time goes up to 150% or more for a bulk of the games. The Raiden one is probably much worse. I could do some timings for you if you want more details.

    To know that the ARM9 can run this at 150Mhz at full speed is a great reference. And it does seem to me that we don't have full access to 100% of the 3DS's app core, or I am missing something in my codes.
     
    Last edited by bubble2k16, Jun 19, 2017
    MKKhanzo likes this.
  2. Exophase

    Exophase Member

    Newcomer
    3
    Jan 22, 2008
    United States
    Yeah I thought as much based on the readme. GCW Zero isn't ARM based, so there would have been no intention of using ARM_ARCH there, but it should be used here.

    Have you done benchmarking to see what the result is of doing PSG and mixing on the second CPU? These are pretty low overhead operations and you should make sure that you don't lose speed doing this. The one thing that I'd consider the best candidate for being done on another core is Vorbis decoding for CD games with OGGs. This should also be using libtremor, which is a fixed point ARM optimized library.

    CPU_ARM_FAST_MODE isn't something you're supposed to define, it's a wrapper to allow switching between a compatible mode and a slightly faster mode for the ARM assembly interpreter. As far as I know this is only necessary to get one game working (Exile). I would recommend either making this an option that defaults on or make it always in compatible mode, I don't think the performance difference is especially large.

    But if you don't have ARM_ARCH defined you'll never be using the ARM interpreter and anything you measured in performance degradation was probably just a coincidence.

    While it's good that you have something that's usually full speed, it seems like it'd be more desirable if you could get there with a more compatible and more timing-deterministic software renderer. The best option there may be to write ARM assembly for the C code in the new renderer, something I never got around to. I suspect that this could be faster than the old one was, since part of the new rendering approach was intended for improved speed.

    But I have to warn that this renderer also has some regressions that I haven't fixed or even identified, and I'm not sure which games they occur in, this is just based on some old reports from Pandora users. So all things considered it may be worthwhile to just use the old one anyway, unless SuperGrafx support is an important goal.

    It'd be good to have some idea of just how much CPU time you have available. Do you have any means of profiling, or using the benchmark mode built into the emulator?
     
  3. bubble2k16
    OP

    bubble2k16 GBAtemp Fan

    Member
    10
    Jul 25, 2016
    Senegal
    My profiling is rather primitive. It uses simple 3DS timers (which itself introduces overheads) to wrap around blocks of code. I could report some figures here these few days after I try again with ARM_ARCH. I'm pretty sure I tried that too. :)

    I'd loved to use the original renderers if I could - other than the intended compatibility, it would have saved lots of hours.

    Earlier I've spent time optimizing FCEUX (NES) on 3DS without much success. The 1.7 Mhz NES running in FCEUX was crawling at a meagre 40-50 FPS. So it leads me to think that I'm locked out of fully utilizing the full processing power of the 3DS, or I have been doing something really wrong for all my previous emulators. :unsure:

    EDIT:
    Forgot to mention, for the PSG part, I moved the PSG generation to the 2nd CPU. The first CPU simply just writes the PSG register into the queue, consumed by the second CPU. I didn't profile how much time this saved - but I didn't think it would matter either way.

    Oh if you could provide the optimized renderers, that will be great! :)
     
    Last edited by bubble2k16, Jun 19, 2017
    SaffronXL likes this.
  4. AtlasFontaine

    AtlasFontaine GBAtemp Maniac

    Member
    6
    Jul 18, 2015
    Venezuela
    Venezuela-Zulia.
    Good job as always!

    Will play some Bomberman '94 and Rondo Blood with this :D
     
  5. drben

    drben Newbie

    Newcomer
    1
    Aug 9, 2016
    Gambia, The
    Thanks for your work!
    But for some reason the 3dsx version wont work for me :/ I'm getting the "An exception occurred" error and have to shut down the 3ds.
    Other homebrew apps and games work though.

    I use an O3DS XL on 11.4 running Luma 8.0.
     
  6. nyder

    nyder GBAtemp Fan

    Member
    6
    Mar 6, 2014
    United States
    Nm, it was a cue file it was looking for.
     
    Last edited by nyder, Jun 19, 2017
  7. yoshinatsu

    yoshinatsu GBAtemp Fan

    Member
    4
    Sep 14, 2009
    Greece
    Downtown Jigoku
    YES!!
    I had requested this to bubble months ago and he actually delivered!!!! I love you!!
    Just tried Lords of Thunder and it seems to be running perfectly!
     
    Last edited by yoshinatsu, Jun 19, 2017
  8. BARNWEY

    BARNWEY GBAtemp Maniac

    Member
    4
    Oct 11, 2016
    United States
    Beautiful work @bubble2k16, this is truly awesome!!
     
  9. Skull Kiddo

    Skull Kiddo Definitely Not A Kid

    Member
    2
    Dec 17, 2014
    My bedroom
    "Normal" games work fine for the most part, is there any compatibility list where we could add which games worked and which ones did not, etc?


    I have an issue with running CD games for some reason (I have all of the BIOS in sd:/3ds/temperpce_3ds/syscards), but maybe I'm doing something wrong? :S I have bin/cue files, I select the cue, sometimes it shows some random gibberish (or not), and then the emulator's all like "Sorry, we couldn't load the ROM!"
     
  10. Dodain47

    Dodain47 GBAtemp Advanced Maniac

    Member
    12
    Jan 1, 2017
    Austria
    @Billy Acuña
    Alright. Finally got the CD games running. They need to be in iso format to boot up. I played Castlevania and Gate of thunder. Both Games are very playable with almost 60 frames per second. Richter Belmonts Sprite has some flickering.
     
  11. weatMod

    weatMod GBAtemp Addict

    Member
    9
    Aug 24, 2013
    United States
    still no SGX ,sigh

    it says soon(tm) though
    so is this really going to happen?
     
  12. Exophase

    Exophase Member

    Newcomer
    3
    Jan 22, 2008
    United States
    http://drastic-ds.com/temper_src_2_12_2009.tar.gz

    I believe this matches the last version released for GP2X and Wiz, which has the original renderer and its ARM implementation.

    I'm tempted to try writing some assembly for the newer renderer just to see how much work it is, but I don't know if that's really going to happen.
     
  13. kane159

    kane159 GBAtemp Regular

    Member
    5
    May 28, 2013
    Taiwan
    Ummm.but i have cue with bin format file and they works fine :/


    從我的iPhone使用Tapatalk Pro 發送
     
  14. nyder

    nyder GBAtemp Fan

    Member
    6
    Mar 6, 2014
    United States
    Finding on some Cd games that cut screens are causing the fps to spike up to 200ish (I have a N3DS) and then it crosses over into the game play, which makes the game play too fast.

    Dragon Slayer is one example of this.

    With some other games, the cutscenes are speeded up (100-200 fps) but when the game play comes on, it goes back to 60 fps, like Download 2 , Dungeon Explorer II, It Came From the Desert
     
    Last edited by nyder, Jun 20, 2017 - Reason: add ed more
  15. arianadark

    arianadark GBAtemp Advanced Fan

    Member
    6
    Nov 20, 2016
    United States
    very impressed so far by this emulator
     
  16. drben

    drben Newbie

    Newcomer
    1
    Aug 9, 2016
    Gambia, The
    I just tried the cia version and that one starts up.. but still no luck with the 3dsx version.
     
  17. arianadark

    arianadark GBAtemp Advanced Fan

    Member
    6
    Nov 20, 2016
    United States
    why not use the cia version?
     
  18. nyder

    nyder GBAtemp Fan

    Member
    6
    Mar 6, 2014
    United States
    Psychic Storm requires a Super System Card. Not booting up under any of the rom options. It's the extra 192k ram for TurboDuo games on the older systems.
     
  19. drben

    drben Newbie

    Newcomer
    1
    Aug 9, 2016
    Gambia, The
    I like the idea of the homebrewlauncher and just wanted to share the issue with th 3dsx :/
    I tried the lastest luma nightly but that one still crashes.
     
  20. arianadark

    arianadark GBAtemp Advanced Fan

    Member
    6
    Nov 20, 2016
    United States
    In the 3ds folder on the root of your sd card do you have a folder named temperpce_3ds and inside that folder another folder called syscards?

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

    mine plays the super system card games no issue
     
Quick Reply
Draft saved Draft deleted
Loading...