Hacking NDSSFC/CATSFC revival

What sort of additional hotkeys do you want?


  • Total voters
    98

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,187
Country
New Zealand
I want to restart using the timer-interrupt audio first. I think I found the cause of one crash in the main menu when I was using interrupts to feed audio to the DS, and it's not the interrupts. It's the way the main menu is coded.

See CATSFC issue 27 for more information.

On topic: Does anyone have links to some good code analysis tools I could use to find out about use of uninitialised memory?
cppcheck is always a helpful.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
After a few commits of fixing null pointer dereferencing and uninitialised memory accesses, nothing has changed. Tried playing Super Bomberman 5 and I got to a point where the upper screen froze.

I'll revert the timer interrupt audio, again. But now, most of the menu won't just be working by chance alone!
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
CATSFC 1.21 is now released, with an almost-wholly new icon set for the GUI (see the screenshot on filetrip) and a load of improvements related to using the Touch Screen.

Theme editors should note that this release adds 2 new GUI images, called smaini.bmp and snmaini.bmp. They correspond to the single background used for the 3 bottommost options in the Main Menu. These options were previously known as "NEW", "RETURN" and "RESTART".

It also deletes 2 GUI images, called subselb.bmp and gbafile.bmp.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Uhh... Is it just me...

I use the Recently played games menu (by touch or by key) more than twice during an emulator run, and it displays some elements as white on white! Was that always like that? I only used the Recently played games menu once per run until now.

EDIT: Oh! It's by touch. And the submenu's init_function is not getting called. Damn it!

EDIT 2: I dunno what it is yet, and my initial assumption proved to be wrong.

EDIT 3: I found what it was. It's the end_function not getting called. Now I call it when the menu is done. I'll roll this into the next release along with something else...
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
CATSFC 1.23, the Hotkey Edition, is now released. It has three hotkeys for now, settable globally and overridable per game:
* Go to the main menu
* Temporary fast-forward
* Toggle sound

Pressing keys for two hotkeys at once stacks them, so you can temporarily fast-forward while toggling sound so you can get some extra speed out of a game, e.g. to skip long dialogue faster.

Ideas for more hotkeys, anyone? :)
 

maravig

Well-Known Member
Newcomer
Joined
May 29, 2012
Messages
81
Trophies
0
XP
189
Country
United States
Ok, I'll try that and see how it goes. Thk

I still can't get the cheats to work. I'm currently using 1.20. Could someone please post a screenshot of their gamepak folder and their gamecht folder? Just trying to figure out what I'm doing wrong.
 

nitendo

Well-Known Member
Newcomer
Joined
Oct 9, 2011
Messages
82
Trophies
1
XP
186
Country
I'm just putting it out there - you don't have to do it if you don't want to Nebuleon.
(In my book - you have done plenty already :bow:)

Anyway - here it goes:
The Zelda BS games does not seem to work at all. The thing is - they worked in CATSFC 1.1 - IF you turned off the sound.
But then you played a updated Zelda game WITHOUT any sound and that is not enjoyable at all.

In short: Could you have a look at the Zelda BS games and the sound emulation (because that is most likely what causes them to not load at all)?

/dACE
 

remjay24

Member
Newcomer
Joined
Jan 13, 2010
Messages
5
Trophies
0
XP
68
Country
United States
Thanks for picking up the project!

I downloaded it (1.23), love the new layout and full screen mode! Unfortunately, my games don't seem to be running any better than before. I tried Mega Man X, Mortal Kombat 3 and Tetris Attack. All had slow down/skipping frame issues... especially mmx and mk3 when there were more enemies/objects on the screen. I tried muting the games, but nothing seemed to change. I changed it to not skip any frames, but the games became unplayable with how slow they ran. Perhaps I was thinking this would make nearly all SNES games 100% (raised my personal bar too high) or possibly its on my end. If it matters, I am using a transcend mirco 8gb class 6 sdhc on my old fat DS.

I was also experiencing sound issues with Mortal Kombat 3, usually when the announcer would speak (choose your destiny, character names, etc.).

Anyway - hope this helps any at all... or possibly something on my end is wrong. As a note - all my other emulators (nesDS, Lameboy, S8DS...) work fine, though I am not surprised as the SNES is much more demanding in terms of power. I also have a 3DS, but have not set up my DSTwo to work with it. If the type of DS helps (an old phat DS versus a 3DS) - I'd definitely use my 3DS.

Thanks for reading!
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
[...] I tried muting the games, but nothing seemed to change. I changed it to not skip any frames, but the games became unplayable with how slow they ran. Perhaps I was thinking this would make nearly all SNES games 100% (raised my personal bar too high) or possibly its on my end. If it matters, I am using a transcend mirco 8gb class 6 sdhc on my old fat DS.

I was also experiencing sound issues with Mortal Kombat 3, usually when the announcer would speak (choose your destiny, character names, etc.).

Anyway - hope this helps any at all... or possibly something on my end is wrong. As a note - all my other emulators (nesDS, Lameboy, S8DS...) work fine, though I am not surprised as the SNES is much more demanding in terms of power. I also have a 3DS, but have not set up my DSTwo to work with it. If the type of DS helps (an old phat DS versus a 3DS) - I'd definitely use my 3DS.

Thanks for reading!
Muting the games raises their frame rate, though not as much as in CATSFC 1.1 where disabling the sound meant you stopped emulating the audio processor altogether (and that messed with saved states - if you loaded a state then enabled sound, it would freeze emulation immediately). It's partly why I implemented "Toggle sound" as a hotkey. The other part is that baby Mario in Yoshi's Island is so annoying...

Frame skipping: You can choose to skip 1 frame or 2, and that will get it to closer to normal speed but not skip frames unpredictably like auto frame skip. You can still very much play the games at up to 2 frame skipping; that makes it 20 frames per second (or 16 if playing PAL games).

CATSFC 1.23 does not make all games run 100%, nor does it make all games run, unfortunately. Snes9x 1.53, which would make more games run, has more C++ in it which the DS2 SDK doesn't support.

The speed class of the card only matters when loading a ROM; a faster card will load the ROM into the DSTwo's RAM faster, but a faster card will do nothing when emulation has commenced because the ROM is in RAM :) This also applies to NDSGBA.

The type of DS doesn't matter at all with CATSFC and NDSGBA, because all of the work is done on the DSTwo's internal processor. The DS's processor is only used to display the screen, query the controller and emit sound. In short, the DS acts as a dumb terminal.

As for the sound issues, I can't really deal with those, because updated code from Snes9x 1.53 has lots of C++ that needs to be converted to C. Sorry about that.
I'm just putting it out there - you don't have to do it if you don't want to Nebuleon.
(In my book - you have done plenty already :bow:)

Anyway - here it goes:
The Zelda BS games does not seem to work at all. The thing is - they worked in CATSFC 1.1 - IF you turned off the sound.
But then you played a updated Zelda game WITHOUT any sound and that is not enjoyable at all.

In short: Could you have a look at the Zelda BS games and the sound emulation (because that is most likely what causes them to not load at all)?

/dACE
I can't really deal with that. See above. Since it works with CATSFC 1.1, you might want to keep it around for playing Zelda BS, though I know that it's a pain to keep two emulators around just for that. The other option is to freeze the emulator if you save a state with sound off and enable it, and that's no option to me.
 

Aeter

A walking contradiction
Member
Joined
Apr 1, 2009
Messages
942
Trophies
1
Age
36
Location
The lands of nether
XP
485
Country
Netherlands
As for the sound issues, I can't really deal with those, because updated code from Snes9x 1.53 has lots of C++ that needs to be converted to C. Sorry about that.
There is a compiler which converts C++ to C, but that's only useful when you need to compile C++ code on a system without a C++ compiler, because it won't create any readable or managable C code.
And even if someone could convert the code to C, you're probably still dependent on C++ libraries unless those parts are converted to but that would be hell.
 

Skelux

Well-Known Member
Newcomer
Joined
Jul 21, 2009
Messages
83
Trophies
0
XP
413
Country
It's likely you didn't read my comment on Filetrip, so I will repeat it here.

There has been a major slowdown problem ever since version 1.08 and beyond. Something changed in this version causes very noticeable stuttering, as I have observed in various games. I think you should try reverting the changes in 1.08 and see if it fixes the stuttering (best tested on the rainy scene in zelda).
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
It's likely you didn't read my comment on Filetrip, so I will repeat it here.

There has been a major slowdown problem ever since version 1.08 and beyond. Something changed in this version causes very noticeable stuttering, as I have observed in various games. I think you should try reverting the changes in 1.08 and see if it fixes the stuttering (best tested on the rainy scene in zelda).
Did you try out 1.24? There's no description on this thread for it yet, but it's called the Major Speedup Edition for a reason :)

It dramatically cuts the time needed for sound rendering, which helps the stuttering in many games and allows the Super Bomberman 5 intro music to run near the correct speed instead of half speed. Additionally, games that use no special chips should get a noticeable speedup because I added an optimisation inspired by Snes9x-Euphoria: for any given frame, decide only once whether SA-1 and Super FX chips are enabled, and run a different loop for each result. That avoids a few million instructions per second, which is a pretty good chunk.
 

Skelux

Well-Known Member
Newcomer
Joined
Jul 21, 2009
Messages
83
Trophies
0
XP
413
Country
Did you try out 1.24? There's no description on this thread for it yet, but it's called the Major Speedup Edition for a reason :)

It dramatically cuts the time needed for sound rendering, which helps the stuttering in many games and allows the Super Bomberman 5 intro music to run near the correct speed instead of half speed. Additionally, games that use no special chips should get a noticeable speedup because I added an optimisation inspired by Snes9x-Euphoria: for any given frame, decide only once whether SA-1 and Super FX chips are enabled, and run a different loop for each result. That avoids a few million instructions per second, which is a pretty good chunk.

As I stated, ever since 1.08. I tried every other version including 1.24 and all had the same stuttering. I strongly suggest you try this yourself and compare the difference in speed between 1.01 and 1.24 while playing Zelda in the raining areas.

It looks as though some sort of V-sync may have been implemented in 1.08.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
As I stated, ever since 1.08. I tried every other version including 1.24 and all had the same stuttering. I strongly suggest you try this yourself and compare the difference in speed between 1.01 and 1.24 while playing Zelda in the raining areas.

It looks as though some sort of V-sync may have been implemented in 1.08.
I undid v-sync in 1.08.

The reason for this is that, with the v-sync, every single frame was half-updated after 15 minutes of play time. So every frame would appear torn.

Edit: 1.01? :wtf: Can you link me to that one?
 

Skelux

Well-Known Member
Newcomer
Joined
Jul 21, 2009
Messages
83
Trophies
0
XP
413
Country
Regardless of what was changed between 1.01 and 1.08, I stand firm by my claim that it causes stuttering.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Regardless of what was changed between 1.01 and 1.08, I stand firm by my claim that it causes stuttering.
Code:
Settings.SoundSync = TRUE;
This line, added in commit 286bfd58050a13e2e0e30bb35a7a1d189ec7edd1, causes the graphical stuttering, but making it FALSE makes the sound stutter. See CATSFC issue 27 for more discussion on this problem.

For HitsuMaruku, SoundSync = FALSE solves the note length problem, but for me, SoundSync = FALSE makes it worse.

However, as I see just now, it does lower the frames per second a lot.

I see that S9xProcessSound is called after every scanline, so 224*60 times per second, and it tries to buffer a truckload of sound samples every time it's called. Maybe it should stop trying to push so much audio... It actually buffers 92.8 milliseconds of audio data during one frame of 20 milliseconds, then does God-knows-what for 3 more frames.

I'll try fixing that a bit more. But it may end up with subtle silences or crackling in certain games. (The SDK sucks about that; it can't give me an indication that it's out of sound...)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    I @ idonthave: :)