how to modify sega genesis games ?? what tools should i use?

Started by Gilberto9, April 07, 2021, 03:15:13 PM

Previous topic - Next topic

Gilberto9

hello friends, does any of you know how to modify sega genesis games? bin, smd, I would like to learn to modify, where do I start ?? what tools should i use? please someone give me a notion
GILBERTO9

FAST6191

Same as everything else.

Games typically have text in them, graphics (which can be some text representations and also what you will likely be looking at when it comes to editing a font), audio, gameplay and some code linking it all. You can do a lot without going into the code world but the best hackers will be able to manipulate that. There are also things the devs can and did do that might make a game harder to hack than a simplistic ideal or some other games.

For text then most usually start with learning to make tables. If you have ever used a code like A=1, B=2, C=3.... then games often use their own rather custom setup here and the would be hacker tends to then have to figure out what a game (or indeed section of game) used. This data is collected into a file called a table file that various tools beyond that can use to view, extract, edit (or at least attempt to edit) and reinsert.
Relative search is what most start there with Roman alphabet games (Japanese, Chinese and other such languages can be harder here as relative search is of limited use)
http://www.romhacking.net/utilities/513/

Games don't read text like modern text viewers, browsers and whatnot and thus need to have something tell it where everything is and by extension how long it is. For this you have values somewhere in a game that tell it, point the way if you will and thus we have pointers. I usually liken them to contents pages in books -- rip out a bunch of pages and count the number of pages it should be normally and you will be ahead in the book, stuff a bunch in and now behind. Various rip out and stuff in (no translation is ever likely to be the exact same number of characters after all) and you can see why pointers get broken and need to be fixed when editing text.


Graphics.
The basic tool of choice is a so called tile editor. Each system tends to have a few formats it mostly relies upon and these can different between systems, so much so that most tile editors will split things up by system.
I like https://www.romhacking.net/utilities/112/ as an entry level option myself but there are plenty of others.
There are simple tricks like backwards searching (find the thing in an emulator memory/sprite viewer and search the ROM for that and you might find it) but a lot of people will simply open the ROM and press down/page down a lot until they find something useful.

Audio varies between systems. As megadrive audio creators were often highly regarded as coders in their own right then you tend to have to get down and dirty with the hardware unlike some later systems where you might have simple tools to convert to midi.
To that end grab some hardware documentation and a debugger, or hope someone came before you and blazed a trail.


Gameplay ranges from levels, to stats to all manner of things in the middle of that, and includes actually being able to design a game -- I am sure we have all played some boring hack, server setup or something made by someone that merely has a bunch of overpowered stuff and made it boring as a result.

This gets a bit involved for a simple forum reply so I will defer to my GBA/DS docs http://www.romhacking.net/forum/index.php/topic,14708.0.html for level editing basics.

Stats. Usually numbers in the memory somewhere. Can be edited many times, though some games might calculate them or assign them by level.


Code then.
I usually encourage people to learn to make cheats as a first thing
https://web.archive.org/web/20080309104350/http://etk.scener.org/?op=tutorial
Get good at that and much of what follows is made easier.
After this most would probably look at some tracing, though some might look at hardcoding a cheat
https://www.romhacking.net/documents/361/ is for the GBA but is much the same for all systems. Afraid I don't have a good suggestion for a megadrive debugging/debugger emulator these days but you should be able to find something (might start with the tool assisted speedrun set if you are struggling otherwise).
Anyway tracing will see you able to follow things back from memory to the location on the cartridge, as well as what was done to it if something changed along the way (compression, decryption, simple alteration of some form).
The hardcoding a cheat thing comes up as once you have found it the very same thing that allows you to break on a write to the memory location holding say a graphics you are interested in for tracing works just as well for the lives counter in a game. Find the instructions that fiddle with it and you can change a subtract to an add or simple set and thus now have infinite lives or go one further and find something like https://www.dragonflycave.com/mechanics/gen-i-capturing for your game of choice.

Somewhere along the way you will also pick up a static disassembler -- the ones from emulators that run in game are useful for a lot but as not everything runs in a given period in a game you will want something to reference against and for that then static disassembly (as opposed to the dynamic/runtime ones from emulators) make a nice text file of instructions to pick through.

We had a discussion on SNES assembly a little while ago that might also provide some insight as again much of the underlying logic carries between any system be it a humble bbc micro or a modern PC game.
http://www.romhacking.net/forum/index.php?topic=32527

You can do this to understand any aspect of the game. Further hackers will then see to add extra functionality in the game -- better fonts for translations, fix bugs, multiplayer maybe, add new in game actions that might have appeared in sequels...


One of the things that most commonly gets in the way is compression. The megadrive was old enough to avoid most of it compared to newer systems but it is still present in small amounts, and usually quite custom.
https://ece.uwaterloo.ca/~ece611/LempelZiv.pdf serves as a nice primer on the various types of compressions seen out in the wild. Being a rather lower power system as these things go mean you will mostly see simple forms like run length encoding (RLE), maybe some simple unpacking and utterly primitive LZ compared to the crazy stuff seen elsewhere so there is that.

Save games also feature in here, and usually when it comes to assembly as games will have a checksum to make sure the save did not get corrupted (or edited by a cheater). Or if you prefer back to the A=1 B=2... thing from before. Add up all the values in the message before this sentence and then imagine someone has changed some words, is it likely to be the same value? Welcome to the world of hashes and checksums. They can be anything, though again the megadrive is on the weaker side of computing power so tended not to delve into full blow cryptographic stuff that is trivial today.

Gilberto9

our wow, thank you very much friend for the tip i want to give shang tsung gameplay in the mortal kombat sega genesis, he is already included but without powers and without transformation of other fighters, and is also defective when he presses the action buttons the game crashes also on the internet https://web.archive.org/web/20200205042543/http://www.easy68k.com/EASy68Kforum/index.php
GILBERTO9

Whipon

Hello, good night.

I use the MAME / MESS / HazeMD debugger to hack Sega Genesis games.
I got used to it in a few days.

This is a post where Pugsy teached me how to use it, several years ago:

https://gamehacking.org/vb/forum/video-game-hacking-and-development/school-of-hacking/1713-please-somebody-make-a-gens-tracer-tutorial?p=37973#post37973

Good luck in your new project ;).

Regards.

Gilberto9

Thank you very much friend for the help and encouragement, grateful, eager to fix this hack thanks Brother

April 07, 2021, 11:00:23 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

Thank you very much friend for the help and encouragement, grateful, eager to fix this hack thanks Brother

April 08, 2021, 03:30:57 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

:-\guys what language should i learn assembly ?? or have more ??
GILBERTO9

Anime_World

Quote from: Gilberto9 on April 07, 2021, 10:59:58 PM
Thank you very much friend for the help and encouragement, grateful, eager to fix this hack thanks Brother

April 07, 2021, 11:00:23 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

Thank you very much friend for the help and encouragement, grateful, eager to fix this hack thanks Brother

April 08, 2021, 03:30:57 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

:-\guys what language should i learn assembly ?? or have more ??

68000 and Z80 Assembly
And a good time of study about the console architecture including VDP

pianohombre

"Programming in itself is beauty,
whether or not the operating system actually functions." - Steve Wozniak

Gilberto9

GILBERTO9

FAST6191

I doubt you will find a site that covers programming for the 68k processor. Most things teaching assembly will be focused on X86/X64 (the PC) or maybe ARM (most phones and tablets and things like the GBA and DS and 3ds). If you go back you might find some powerpc for old macs, and even further back will be 6502 maybe. Some universities have courses that use simplified chips like the y86 and maybe some microcontrollers or quasi 6502 but I am not sure how much I like them, though they would at least be theoretically modern courses, and many give them away for free these days

Most people that learn any of these processors now will likely at least know a low level programming language like C and then move sideways, and better still might know an assembly language such that the concepts are not new but it is mainly about learning the limitations, slightly different conventions and other particulars* of this chip.


*you can learn every instruction for the 68K, including how many cycles it takes for them to complete, but the megadrive as a whole has a z80 processor also in it and a whole bunch of memory in very specific places that do very specific things so you then have to learn, and then a different bunch again when you decide no more megadrive and CPS-2 is your new target of choice.

If you want one for the PC then
art of assembly on https://www.plantation-productions.com/Webster/
and gavin's guide to x86 https://stuff.pypt.lt/ggt80x86a/asm1.htm

https://ocw.mit.edu/index.htm might be a good start for the university stuff mentioned above.

If you want more things along the lines of learning about data types, linked lists, bubble sort, what XML is an why you might care, and the other things they get taught in most computing courses, intros to programming and whatever else
https://www.youtube.com/watch?v=hE7l6Adoiiw&list=PL6B940F08B9773B9F&index=1 being one I have suggested to many over the years.
and for more curios
https://www.youtube.com/playlist?list=PL96C35uN7xGLLeET0dOWaKHkAlPsrkcha


For ROM hacking specifically more don't necessarily start out say hacking a game to use a variable width font. They might hardcode a cheat, they might learn to do tracing, they might stop an action from happening in a game or they might change the flow of the game using a few of those. Start to recognise enough little things and how to handle them and when it comes time to altering a game more substantially you already know you can do the little things and thus the larger stuff is more tedious than daunting -- finding space is just something you end up having to do, have done it before, now you need to do it 10 times and get more of it.

Gilberto9

Quote from: FAST6191 on April 21, 2021, 10:18:23 AM
I want to finish the final boss (Shang tsung) of mortal kombat 1 sega genesis, shang is without powers and without his transformations, I would also like to include reptile in his transformations, reptile is ready in the game just include him in the transformation of shang tsung and put powers in shang tsung his fireballs are 4 balls in a row would you like to finish this project for me friend ?? I will send the rom for you to see and analyze shang tsung so that you can finish shang tsung so that it is complete with powers and transformations, at this time shang tsung also fails to press the action buttons causing the game to crash, please friend help me to q I can share the rom with all friends, I am waiting for your reply, thanks brother 🤗
GILBERTO9


Gilberto9

GILBERTO9