Homebrew [Release] TemperPCE for 3DS

bubble2k16

Well-Known Member
OP
Member
Joined
Jul 25, 2016
Messages
467
Trophies
0
XP
2,118
Country
Senegal
Anyone have CD roms working? I need some help here.

So far no luck, with getting the PC Engine CD games to run.

I've not had any luck getting ISOs for Gradius II or Castlevania running however, and have made sure that the BIOS file is named correctly, in the right place and selected via the options menu.

Silly me: Please put the BIOS in the /3ds/temperpce_3ds/syscards folder instead! :)


I'm surprised that 3DS isn't powerful enough to run the software renderer. On GP2X most games could run full speed (no frameskip, the emulator didn't even implement it originally) at 150MHz or less. This is with an ARM9.

Do you have any profiles showing where the performance problems are? Is there a lot of overhead from background processes or updating screen textures/the framebuffer in software?

EDIT: Thinking about it now, the "new" video renderer didn't have an ARM ASM implementation. There's an older codebase that supports the old renderer, it's probably faster (but you'd lose SuperGrafx support and I think some types of scaling) I uploaded zips for both way back when but I can upload it again if necessary.

EDIT2: This should really have platform specific defines for 3DS in platform_defines.h, where ARM_ARCH should be defined like the other ARM platforms (and ARM_V5). I don't think that the makefile is pulling in the assembly in the arm subdirectory. So it's probably not even using the ARM CPU interpreter, taking another big unnecessary performance hit.

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,
  • Like
Reactions: MKKhanzo

Exophase

Active Member
Newcomer
Joined
Jan 22, 2008
Messages
39
Trophies
0
XP
244
Country
United States
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.

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.

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).

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.

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.

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.

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.

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?
 

bubble2k16

Well-Known Member
OP
Member
Joined
Jul 25, 2016
Messages
467
Trophies
0
XP
2,118
Country
Senegal
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.

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?

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,
  • Like
Reactions: SaffronXL

drben

Member
Newcomer
Joined
Aug 9, 2016
Messages
8
Trophies
0
Age
30
XP
83
Country
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.
 

Skull Kiddo

Definitely Not A Kid
Member
Joined
Dec 17, 2014
Messages
317
Trophies
0
Location
My bedroom
XP
183
Country
United Kingdom
"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!"
 
D

Deleted User

Guest
@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.
 

Exophase

Active Member
Newcomer
Joined
Jan 22, 2008
Messages
39
Trophies
0
XP
244
Country
United States
Oh if you could provide the optimized renderers, that will be great! :)

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.
 

kane159

Well-Known Member
Member
Joined
May 28, 2013
Messages
215
Trophies
1
Age
34
XP
1,234
Country
Taiwan
@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.

Ummm.but i have cue with bin format file and they works fine :/


從我的iPhone使用Tapatalk Pro 發送
 

nyder

Well-Known Member
Member
Joined
Mar 6, 2014
Messages
485
Trophies
0
Age
55
XP
918
Country
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, , Reason: add ed more

drben

Member
Newcomer
Joined
Aug 9, 2016
Messages
8
Trophies
0
Age
30
XP
83
Country
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.

I just tried the cia version and that one starts up.. but still no luck with the 3dsx version.
 

nyder

Well-Known Member
Member
Joined
Mar 6, 2014
Messages
485
Trophies
0
Age
55
XP
918
Country
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.
 

arianadark

Well-Known Member
Member
Joined
Nov 20, 2016
Messages
724
Trophies
0
Age
46
XP
1,825
Country
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?

--------------------- MERGED ---------------------------

mine plays the super system card games no issue
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: yawn