Comentarios
United States3l3tric4 years ago

Hi everyone!

I'm mainly posting this thread for documentation in case I don't manage to make more progress on it.

I'm trying to create a modded version of/codes for Cosmic Smash that will allow level select from the menu as well as replaying the same level infinitely. Currently I've found the values in memory I need and am working on figuring out how to modify code on the disk.

Here's what I've found so far. Note that these were all found on Demul with Cheat Engine, and so the start of the addresses on hardware would be 8 instead of 2:

2C16E7A0 and 2C16E7A4 are level select variables in-game. After some levels are completed, you have a choice for the next one, hence 2 variables. When they're the same the game just takes you to the next level they designate. When they differ the game will give the branching choice, even if the 2 levels wouldn't normally be on a branch anywhere in the normal game. For ongoing repetition of levels, these will almost definitely need to be held at a specific value. I believe these only get updated at the start of a level.

2C16E794 is level select from main menu. Whatever value is here will be the starting level after hitting "game start" on the main menu. This value seems to still get updated at the end of each level transition, even though it doesn't seem to have any influence on future level selects after the first.

2C162F78 seems to be related to level select, as it updates as soon as the results screen of a level appears, but setting it inactive or setting it to strange values doesn't have an effect on the game. I feel like maybe this is used in some visual process, like the lighting of sections of the map or something similar, that needs to update with the levels but won't affect them if it's wrong.

2C17E79C behaves similarly to 2C16E794, as in it updates at the same times, but changing it doesn't seem to have an effect on starting level. Maybe 94 and 9C are a pair in the same way A0 and A4 are, but 94 ends up getting used from the main menu since the game would initialize both variables to 0 at the game over screen anyway. Likely not necessary for level select things.

2C20B320 Index for option screen. Starts at 0 and increases as you scroll down through the list. Maybe this could be used to somehow add more menu options, but likely this won't be necessary for level select.

2C20D2E8 Start Time variable. In the options screen, you can set your start of game timer to any value between 50 and 150 by steps of 5. If you modify the code that adds 5 every time the value is incremented, you can get results by ones without causing issues with the game, and the limits of 50 and 150 can both be bypassed with similar modification. This would probably be the best candidate for modification into a level select function, as you should be able to modify the code to have this variable written to one of the earlier locations instead. I've verified through cheat engine's debugger that these modifications can be made on a per instruction basis and the game still runs. In total you need to modify 4 instructions to remove both the limits and the 5 increment.

2C24072A Start Time variable in-game. This value gets updated right after the previous, and it seems this one is what the game bases its starting time off of, while the other variable is used to update the options menu. When you change the start time, D2E8 gets updated first and then 072A gets updated. If the function that updated this value instead updated 2C16E794 (main menu level select), you'd have the ability to choose any level from the start, and if the value is also pushed to 2C16E7A0 and A4 that level would be repeated indefinitely (at least, as far as my few hours of research thus far have shown). Therefore, I think these memory values should be enough to implement a practice code that allows selecting and repeating any given level from the main menu. One potential stumbling block is that this value (2C24072A) seems to get written to pretty often, even when you haven't changed the start time at all. It doesn't change during these rewrites though, only when the main D2E8 variable changes. Some further messing around with the debugger will likely be necessary to figure out how to adapt this update function for level select.

That's all I've got so far. If/when I make more progress I'll update this post. If you're finding this years later with no responses, hopefully this info helps you in making your own practice code for this cool game. My discord tag is 3l3tric#5514 if you want to contact me there for some reason.

EDIT: Some follow info I was able to find through further exploring:

2C21B4A8 Input Register. This memory location responds to button presses on the dreamcast controller. For instance, FFFB in that memory location denotes an A button press. Needed for a code breaker approach. 2C21B4AA Trigger press register. B4AA is the right trigger, B4AB is the left. Can also be used for code breaker approach.

Here's a prototype code that doesn't really work, but does have working activators in case you want to adapt them for your own code breaker codes. I'll edit this post when I finally get these codes working. Hopefully this won't be the end of the level select journey though, as I'm hoping to find a solution that doesn't involve disc swap

0E02FF7F 0021B4A8 03010001 8C16E794

0E04FFEF 0021B4A8 03010001 8C16E7A0 03010001 8C16E7A4

0E04FFDF 0021B4A8 03020001 8C16E7A0 03020001 8C16E7A4

Brobey y V1CCHAOS les gusta esto
Acerca de 3l3tric
Unido
6 years ago
En línea
2 years ago
Partidas
22
Juegos jugados
Super Mario 64
Super Mario 64
Última carrera 2 years ago
16
Partidas
Super Mario 64 Category Extensions
Super Mario 64 Category Extensions
Última carrera 2 years ago
2
Partidas
Super Mario 64 Randomizer
Super Mario 64 Randomizer
Última carrera 5 years ago
2
Partidas
Submachine 1: The Basement
Submachine 1: The Basement
Última carrera 6 years ago
1
Partida
Super Mario Odyssey
Super Mario Odyssey
Última carrera 5 years ago
1
Partida