berawards.blogg.se

Chrono trigger emulator
Chrono trigger emulator











  1. #Chrono trigger emulator Patch#
  2. #Chrono trigger emulator code#

#Chrono trigger emulator code#

Once these changes are in place, CTM’s code begins watching memory at the end of the SNES’s RAM for certain values.

chrono trigger emulator

Once patching is done the emulator is resumed Because these patches are made in RAM the actual ROM file for the game is never modified. And finally, patches are made to the pointer table containing the locations of each song in Chrono Trigger If the user has specified that a song should be replaced its pointer inside the table is changed to point to the ‘silence’ song track (track 0).

chrono trigger emulator

More patches are made to have code that executes song changes, volume changes, and more jump to my newly inserted code to allow monitoring. Patches are made to fix a couple bugs/soft locks that arise when Chrono Trigger isn’t playing music when it should be. Patches are made to insert the code that allows my code to detect changes with the audio engine in Chrono Trigger. Once Chrono Trigger has been detected as being loaded in the ROM area, the emulator is suspended while CTM makes some patches. Once the DLL is running inside the emulator it uses memory locations for each emulator known to contain pointers to the emulated SNES’s ROM and RAM to being inspecting the ‘SNES’. Also, there are 2 scenes in the game which are synced to music tracks, if the correct music is not playing the scenes will softlock.ĬTM works by launching an emulator, allocating memory within the process and then injecting a DLL into that memory and executing it (this code largely came from Code Project, the source code properly credits it). For example, the title screen and party select screen will not show if music is not playing.

#Chrono trigger emulator Patch#

Along with needing to make patches for sound changes done by Chrono Trigger’s engine I also had to track down a couple other issues and patch them. This is done by patching multiple pieces of code inside Chrono Trigger to jump to a special bit of code I add to the ROM as a patch This code places information about the change at the end of the SNES’s RAM which my code can then monitor and react to.

chrono trigger emulator

Each time Chrono Trigger tries to make changes to its audio I needed a way to hook into it and communicate these changes to my code. A lot of time was spent playing through Chrono Trigger in a debug emulator tracking assembly and using breakpoints to find code that needed to be changed. CTM is one of the first C++ programs I ever wrote It was developed over a couple months time which includes both the time spent reverse engineering Chrono Trigger as well as the time spent coding.













Chrono trigger emulator