Hacking NDSSFC/CATSFC revival

What sort of additional hotkeys do you want?


  • Total voters
    98

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
There's a buffer overflow that seems to have survived all versions of NDSSFC, BAGSFC and CATSFC until now.

The sound function S9xProcessSound, which 1.16 turned into the timer interrupt handling function NDSSFCProduceSound, wrote beyond the end of Buf and corrupted up to 2044 bytes of memory.

Edit: Thanks to the mod who edited the thread title for me :D

Edit 2: The SDK sucks too much to allow pushing sound in a timer interrupt; it appears to be glitching the communication channel every so often if I do that, creating an audible KRRSSHH and killing the main menu. For 1.18 I may simply reverse the Timer-Interrupt Audio Edition but keep some of the stuff I did since that. At least there is manual frameskip to handle some laggy sequences in games.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Alright, I decided that crashing after just 5-15 minutes of gameplay was not worth having the audio on a timer interrupt.

So 1.18 reverts the timer interrupt code from 1.16 and 1.17 and adds back some hacks for better controller status sync. At least, "if (so.stereo)", "if (so.sixteen_bit)" and so on are gone everywhere, so the audio renders a bit faster. The noise channel is also much faster and uses Blargg's code from Snes9x 1.53.
 

maravig

Well-Known Member
Newcomer
Joined
May 29, 2012
Messages
81
Trophies
0
XP
189
Country
United States
Alright, I decided that crashing after just 5-15 minutes of gameplay was not worth having the audio on a timer interrupt.

So 1.18 reverts the timer interrupt code from 1.16 and 1.17 and adds back some hacks for better controller status sync. At least, "if (so.stereo)", "if (so.sixteen_bit)" and so on are gone everywhere, so the audio renders a bit faster. The noise channel is also much faster and uses Blargg's code from Snes9x 1.53.

I just d/l 1.18 and tried it out. This is the best some of these games have ever played for me. The only issue I've come across so far is I can't load cheat files. I can select them, but nothing appears. These same cht files worked fine in older versions of CATSFC. Still, great work!!
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
I just d/l 1.18 and tried it out. This is the best some of these games have ever played for me. The only issue I've come across so far is I can't load cheat files. I can select them, but nothing appears. These same cht files worked fine in older versions of CATSFC. Still, great work!!
The .cht format changed in 1.09 to allow Game Genie and Pro Action Replay codes. Now you can simply dump Mightymo's cheat database pack into <microSD>/CATSFC/gamecht. See README.md for details. :)
 

granville

GBAtemp Goat
Member
Joined
Aug 24, 2007
Messages
5,102
Trophies
1
Age
35
Location
Orlando, Florida
XP
3,075
Country
United States
Sorry for repeating what others have said, but thanks a lot for continuing this project! It's nice to see the DSTWO get some action for a change. I'm especially grateful that you eliminated the nasty button lag that was present in the past versions, particularly awesome work there!

I don't expect there will be much that can be done about getting some of the more intensive special chip games working at a decent speed (Yoshi's Island or Mario RPG, Kirby Super Star at least already has a great DS version so not that big of a loss with that one), but i'm finding most of the other chip-less games are very playable. Tried out the DKC games and they seem to work pretty darn well considering.
 
  • Like
Reactions: The Catboy

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Sorry for repeating what others have said, but thanks a lot for continuing this project! It's nice to see the DSTWO get some action for a change. I'm especially grateful that you eliminated the nasty button lag that was present in the past versions, particularly awesome work there!

I don't expect there will be much that can be done about getting some of the more intensive special chip games working at a decent speed (Yoshi's Island or Mario RPG, Kirby Super Star at least already has a great DS version so not that big of a loss with that one), but i'm finding most of the other chip-less games are very playable. Tried out the DKC games and they seem to work pretty darn well considering.
Did you try out DKC on NDSSFC 1.06 or CATSFC 1.1 first, for a comparison?
 

maravig

Well-Known Member
Newcomer
Joined
May 29, 2012
Messages
81
Trophies
0
XP
189
Country
United States
th
ok will do. Thanks!
I tried and the cheat codes didn't load. I did go to that link, pull down the codes and make sure the names matched the games. Can't figure out what I'm doing wrong. I agree with Granville, awesome work!! The emu is vastly improved and I'll take it. :-)
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
th
I tried and the cheat codes didn't load. I did go to that link, pull done the codes and make sure the names matched the games. Can't figure out what I'm doing wrong.
Still, the emu is vastly improved and I'll take it. :-)
Did you load a game, then use the "Load a cheat file" option to find the correct file? It doesn't hook up the cheats on its own, you tell it which ones to use. However, when you reload the same game, cheats you loaded in your previous run of the game are reloaded automatically. Cheats you had enabled are also re-enabled.
 

granville

GBAtemp Goat
Member
Joined
Aug 24, 2007
Messages
5,102
Trophies
1
Age
35
Location
Orlando, Florida
XP
3,075
Country
United States
Did you try out DKC on NDSSFC 1.06 or CATSFC 1.1 first, for a comparison?
I tried the DKC games out on a version of CATSFC, whichever was the latest version before you took over the project. The button lag was rather horrible until you fixed that problem with your version. And for that I thank you! I don't recall whether I ever tried NDSSFC though, though i'm guessing the button lag went back to it as well.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
I tried the DKC games out on a version of CATSFC, whichever was the latest version before you took over the project. The button lag was rather horrible until you fixed that problem with your version. And for that I thank you! I don't recall whether I ever tried NDSSFC though, though i'm guessing the button lag went back to it as well.
Great, so it did improve :) I think it wasn't that bad with the controls in NDSSFC, but ShadauxCat's CATSFC started to sync frames by skipping them fluidly instead of NDSSFC's method of running full frames for a while then skipping a whole second. Control latency started in those versions. (Of course, NDSSFC was terrible to play on because of the skipping behaviour)
 

maravig

Well-Known Member
Newcomer
Joined
May 29, 2012
Messages
81
Trophies
0
XP
189
Country
United States
Did you load a game, then use the "Load a cheat file" option to find the correct file? It doesn't hook up the cheats on its own, you tell it which ones to use. However, when you reload the same game, cheats you loaded in your previous run of the game are reloaded automatically. Cheats you had enabled are also re-enabled.

yes, I loaded the game then went to load cheat file and still nothing. interesting
 

maravig

Well-Known Member
Newcomer
Joined
May 29, 2012
Messages
81
Trophies
0
XP
189
Country
United States
Which game? Which file, from which version of the mightymo cheat pack? What do you mean by "nothing"? All of them have "<None loaded here>" even after loading the .cht file?
every game i tried like super castlevania 4, yoshi's island, etc. all say none loaded here
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
every game i tried like super castlevania 4, yoshi's island, etc. all say none loaded here
Hmm...
yi-cheats.jpg

edit: This is after loading "Super Mario World 2 - Yoshi's Island (USA).cht" in fat:/CATSFC/gamecht/n-z, like the readme's folder structure
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
I renamed the cht files to match rom names like the readme said...is that wrong?
The readme said nothing about renaming .cht files. You just need to put them under your card's /CATSFC/gamecht folder, but seeing as there are more than 512, you need to move half of them into one subfolder and the other half into another.

Once that's done, you remove the card (after using Safely Remove in your OS), you put it into the DSTWO, start CATSFC, and load a game. For that game, no cheats will be loaded at first, so you tap the Touch Screen, go into Cheats, then "Load cheat file" (like in the image above), select the subfolder then the game. After that, the game's ROM name will be used to look up an autogenerated file in /CATSFC/gamerts, with an extension of .chb. That file will keep track of which cheats you've enabled and disabled, and is loaded when you load the same ROM a second time.
 

maravig

Well-Known Member
Newcomer
Joined
May 29, 2012
Messages
81
Trophies
0
XP
189
Country
United States
The readme said nothing about renaming .cht files. You just need to put them under your card's /CATSFC/gamecht folder, but seeing as there are more than 512, you need to move half of them into one subfolder and the other half into another.

Once that's done, you remove the card (after using Safely Remove in your OS), you put it into the DSTWO, start CATSFC, and load a game. For that game, no cheats will be loaded at first, so you tap the Touch Screen, go into Cheats, then "Load cheat file" (like in the image above), select the subfolder then the game. After that, the game's ROM name will be used to look up an autogenerated file in /CATSFC/gamerts, with an extension of .chb. That file will keep track of which cheats you've enabled and disabled, and is loaded when you load the same ROM a second time.
Ok, I'll try that and see how it goes. Thk
The readme said nothing about renaming .cht files. You just need to put them under your card's /CATSFC/gamecht folder, but seeing as there are more than 512, you need to move half of them into one subfolder and the other half into another.

ok i'll try that next. :-)
 

Rydian

Resident Furvert™
Member
Joined
Feb 4, 2010
Messages
27,880
Trophies
0
Age
36
Location
Cave Entrance, Watching Cyan Write Letters
Website
rydian.net
XP
9,111
Country
United States
You are using the cheats for the older version, right? The pack has two folders, the older type is the type this emulator supports.

And I just feel like injecting this... fuck binary cheat files. ASCII is much easier to manage for everybody involved. If things had gone wholly binary (i.e. MightyMo not including the older version pack) I wouldn't have even bothered updating the cheat converter.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
You are using the cheats for the older version, right? The pack has two folders, the older type is the type this emulator supports.

And I just feel like injecting this... fuck binary cheat files. ASCII is much easier to manage for everybody involved. If things had gone wholly binary (i.e. MightyMo not including the older version pack) I wouldn't have even bothered updating the cheat converter.
Yeah, but Snes9x has a function already in it that saves the current state of cheats "in context" from the emulation and it was simple to use, so meh.

It saves the value that was previously at the byte designated by the cheat, and whether or not it was enabled (so whether the byte is the old one or the new one). If you disable a cheat, the old byte needs to be re-applied, otherwise you disable, say, an invincibility cheat (ROM) and you're forever invincible. That byte can do the same cheat in two games (like the byte for invincibility in Super Mario World and one of its plentiful ROM hacks), but the games might not have the same initial value for it.

I didn't feel like implementing writing text files, only reading (from the mightymo cheat pack). But I also didn't want to write over the actual .cht files, because then I'd need to maintain a link to the file that differs from the ROM name - and what if you decide to rearrange your text cheat files into folders, add codes, save some states with cheats enabled or use the same cheat file with a main game and one of its ROM hacks? That was just complicated.

Therefore, .cht is an import function. (A pretty good one, if I may say so, since it saves you the trouble of maintaining the cheat pack converter ;) )

edit: Speaking of the cheat pack converter, could you please add "This converter is not needed if you're using CATSFC 1.11 or later by Nebuleon" to its download on filetrip? 1.11 is because Shadaux's last version was 1.1, and some might think 1.1 is later than 1.09, when really it's 1.07.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    RedColoredStars @ RedColoredStars: Ready to just leave tis place anyway. The amount of shit talking and bullying behavior that goes...