Homebrew [Release] TemperPCE for 3DS

Exophase

Active Member
Newcomer
Joined
Jan 22, 2008
Messages
39
Trophies
0
XP
244
Country
United States
Hmm... I think I might have found a bug in the cpu_arm_asm.s. Fortunately, it occurs early enough to detect and quickly fix:


#ifdef CPU_ARM_FAST_MODE
.globl ext_symbol(execute_instructions_fast)
ext_symbol(execute_instructions_fast):
#endif

#ifdef CPU_ARM_COMPATIBILITY_MODE
.globl ext_symbol(execute_instructions_compatible)
ext_symbol(execute_instructions_compatible):
#endif

ldr r1, 0b @ r1 = cpu

ldr r2, [r1, #0x0] @ r2 = cpu.global_cycles low
ldr r3, [r1, #0x4] @ r3 = cpu.global_cycles high

addadds r2, r2, r0 @ cpu.global_cycles += cycles
adc r3, r3, #0


The "add" is missing the "s". Without that the global_cycles mess up causing the threaded PSG to work incorrectly (at least for this port). Can't tell if it matters to you, but I figured it's good for you to know too.

Good find... I guess this must have not come up in testing because somehow global_cycles being clipped to 32-bit wasn't causing an issue for synchronization elsewhere (otherwise this would have caused issues around 200 seconds in and should have been noticed), and by chance the carry flag was cleared by something before calling this function. The latter part is probably what changed for you and is causing problems.

This is definitely something that should be fixed for anyone else who ever uses the ARM interpreter.
 
Last edited by Exophase,
  • Like
Reactions: Joel16

bubble2k16

Well-Known Member
OP
Member
Joined
Jul 25, 2016
Messages
467
Trophies
0
XP
2,118
Country
Senegal
Good find... I guess this must have not come up in testing because somehow global_cycles being clipped to 32-bit wasn't causing an issue for synchronization elsewhere (otherwise this would have caused issues around 200 seconds in and should have been noticed), and by chance the carry flag was cleared by something before calling this function. The latter part is probably what changed for you and is causing problems.

This is definitely something that should be fixed for anyone else who ever uses the ARM interpreter.

I am thinking of just using whatever is in cpu_arm_asm.s for the CPU emulation. Is the CPU_ARM_COMPATIBILITY_MODE as good compatibility as the cpu.c for all games?
 

Exophase

Active Member
Newcomer
Joined
Jan 22, 2008
Messages
39
Trophies
0
XP
244
Country
United States
I am thinking of just using whatever is in cpu_arm_asm.s for the CPU emulation. Is the CPU_ARM_COMPATIBILITY_MODE as good compatibility as the cpu.c for all games?

I'm not totally sure, but I think they're the same. And the only difference between fast and compatibility mode is that in the latter the PC fetch pointer is checked to see if it crosses segment boundaries. This is an issue only if the game maps code segments that are contiguous in the address space but not contiguous in physical memory. I'm only aware of one game that does this.
 

bubble2k16

Well-Known Member
OP
Member
Joined
Jul 25, 2016
Messages
467
Trophies
0
XP
2,118
Country
Senegal
I'm not totally sure, but I think they're the same. And the only difference between fast and compatibility mode is that in the latter the PC fetch pointer is checked to see if it crosses segment boundaries. This is an issue only if the game maps code segments that are contiguous in the address space but not contiguous in physical memory. I'm only aware of one game that does this.

Seems like a number of games lock up after using the compatible ASM core. So I'm letting the user choose the core they want to use to emulate; the default will be the original C core which seems to run better.

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

v0.91 Release

  • Fixed frame rate issues with CD-ROM games speeding up to 100-200 FPS
  • Fixed skipping CD music
  • Improved overall CD/ADPCM synchronization.
  • Added option to select optimized CPU core (less compatible)

1.3 MB temperpce_3ds-v0.91.zip


I had to release this quickly, because I'm going to be out of action for a while - it's work again building up. :) I'll stick around for any support problems, and do report bugs and stuff.

Thanks!
 
Last edited by bubble2k16,

Billy Acuña

Well-Known Member
Member
Joined
Oct 10, 2015
Messages
3,126
Trophies
1
Age
31
XP
3,701
Country
Mexico
Seems like a number of games lock up after using the compatible ASM core. So I'm letting the user choose the core they want to use to emulate; the default will be the original C core which seems to run better.

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

v0.91 Release

  • Fixed frame rate issues with CD-ROM games speeding up to 100-200 FPS
  • Fixed skipping CD music
  • Improved overall CD/ADPCM synchronization.
  • Added option to select optimized CPU core (less compatible)

1.3 MB temperpce_3ds-v0.91.zip


I had to release this quickly, because I'm going to be out of action for a while - it's work again building up. :) I'll stick around for any support problems, and do report bugs and stuff.

Thanks!
Damn, another bubbly's break [emoji21]
Welp, you did too much for the community, so I think you deserve a break time.
Thanks a lot for your emus3ds :yay3ds:
 
  • Like
Reactions: SaffronXL

Clydefrosch

Well-Known Member
Member
Joined
Jan 2, 2009
Messages
6,020
Trophies
2
XP
4,596
Country
Germany
so about the syscard files, there's multiple versions of v2 and 3, does it make any difference which one i use? should i use the supposed later versions?
 

bubble2k16

Well-Known Member
OP
Member
Joined
Jul 25, 2016
Messages
467
Trophies
0
XP
2,118
Country
Senegal
so about the syscard files, there's multiple versions of v2 and 3, does it make any difference which one i use? should i use the supposed later versions?

Hmm I don't have an answer to that. I suppose using the latest of each major version is the best.

Save states work just fine. Saving in-game seems to work... until you exit the emulator, and when you return to it it's like you never saved.

Thanks for pointing out. I will test it sometime this week to see if I can fix it. I had this nagging suspicion when I always had to watch the full intro of rondo of blood every time I run it.
 

Shebby289

New Member
Newbie
Joined
Jun 22, 2017
Messages
2
Trophies
0
Age
31
XP
45
Country
Malaysia
Thanks for your work! Been having a blast playing Rondo of Blood. Besides the save issue can anything be done about the character flickering issue? It's not too noticeable when using richter but pretty bad when using Maria
 

Parallax2814

Well-Known Member
Newcomer
Joined
Feb 8, 2017
Messages
78
Trophies
0
XP
98
Country
Canada
What format does the Rondo of Blood image have to be in? I currently have it in iso format and the emulator isn't seeing it.
 

Parallax2814

Well-Known Member
Newcomer
Joined
Feb 8, 2017
Messages
78
Trophies
0
XP
98
Country
Canada
Can I put it in a different format where the cue file isn't needed? Rename it to .pce format?

Edit: Nope. .pce format doesn't work and crashes the emulator.

Edit 2: Emulator isn't loading the game from the cue file at all. I don't know what's wrong. All I wanted to do this evening was play Rondo of Blood. :(
 
Last edited by Parallax2814,

piratesephiroth

I wish I could read
Member
Joined
Sep 5, 2013
Messages
3,453
Trophies
2
Age
103
XP
3,228
Country
Brazil
Can I put it in a different format where the cue file isn't needed? Rename it to .pce format?

Edit: Nope. .pce format doesn't work and crashes the emulator.

Edit 2: Emulator isn't loading the game from the cue file at all. I don't know what's wrong. All I wanted to do this evening was play Rondo of Blood. :(
grab the rom from that paradise site. It comes with the .cue file and works fine.
 

Parallax2814

Well-Known Member
Newcomer
Joined
Feb 8, 2017
Messages
78
Trophies
0
XP
98
Country
Canada
I tried that and yeah it works. But I'm trying to play a 100% translated version from that iso site. It comes in .rar format and if I unpack it, TemperPCE does play it from the cue file but the sound is squealing very badly.

I'm not sure if its TemperPCE that is the issue or the files it's trying to access. When I play the audio files on my PC, it plays them fine. When using TemperPCE, the sound is unbearable in game.
 
Last edited by Parallax2814,

bubble2k16

Well-Known Member
OP
Member
Joined
Jul 25, 2016
Messages
467
Trophies
0
XP
2,118
Country
Senegal
I tried that and yeah it works. But I'm trying to play a 100% translated version from that iso site. It comes in .rar format and if I unpack it, TemperPCE does play it from the cue file but the sound is squealing very badly.

I'm not sure if its TemperPCE that is the issue or the files it's trying to access. When I play the audio files on my PC, it plays them fine. When using TemperPCE, the sound is unbearable in game.

Hi Parallax, would you be so kind as to upload a video of how badly the sound squealing?

Also, do let me know a little more:
- Are you using the latest version (v0.91)?
- Is the squealing something like a blip that happens many times per second?
- What is the SD card that you are using - a slow card may cause the emulator to read the CD audio too slowly to be generated... causing the emulator the stretch the sound (causing it too sound lower in frequency).
- Can you try to enable frame skipping (1 frames), and enable idle loop patching to see if it helps?
 
  • Like
Reactions: AtlasFontaine

Vamosi

Well-Known Member
Newcomer
Joined
Apr 14, 2007
Messages
48
Trophies
0
XP
480
Country
bin/cue of the translated version works ok but the iso/wav version has static digital audio noise with the cd audio, in game efx sounds are ok.
 
Last edited by Vamosi,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: i always pee in the water