How to Modify a ROM to make Battle Garegga colored bullet?

A place for people with an interest in developing new shmups.
Post Reply
User avatar
Shadolf
Posts: 99
Joined: Wed Nov 12, 2014 11:26 am
Location: Germany

How to Modify a ROM to make Battle Garegga colored bullet?

Post by Shadolf »

Hey,
does someone know a way to modify a rom like the rom of Battle Garegga.
I would really like to put some brighter colored bullets into some games like the one mentioned above.
And maybe some other stuff.
I think I would have to "find" the sprites/textures and exchange them with other ones.
Has someone here experience with this sort of things?
User avatar
Despatche
Posts: 4253
Joined: Thu Dec 02, 2010 11:05 pm

Re: How to Modify a ROM to make Battle Garegga colored bulle

Post by Despatche »

You don't even need to hack it, the "Type-2" version of Battle Garegga already has this. It's a slightly different game to play, though.
Rage Pro, Rage Fury, Rage MAXX!
User avatar
Shepardus
Posts: 3505
Joined: Sat Dec 13, 2014 10:01 pm
Location: Ringing the bells of fortune

Re: How to Modify a ROM to make Battle Garegga colored bulle

Post by Shepardus »

I think he's asking how to modify other ROMs in the same manner, not just for Garegga. But yes, for Garegga there's the Type II version, but that version also removes the option formation switching for some reason.
Image
NTSC-J: You know STGs are in trouble when you have threads on how to introduce them to a wider audience and get more people playing followed by threads on how to get its hardcore fan base to play them, too.
1CCs | Twitch | YouTube
User avatar
Shadolf
Posts: 99
Joined: Wed Nov 12, 2014 11:26 am
Location: Germany

Re: How to Modify a ROM to make Battle Garegga colored bulle

Post by Shadolf »

I know about Garrega v2, but there arent all bullets colored and mybe i´d like some other colors like pink ;-).
Simply said, I´m looking for a way to modify graphics of shmups roms in general. Are there any good/simple ways to do this?
Ixmucane2
Posts: 773
Joined: Mon Jan 19, 2009 3:26 pm
Location: stuck at the continue prompt

Re: How to Modify a ROM to make Battle Garegga colored bulle

Post by Ixmucane2 »

Writing custom tools to extract and replace graphics inside ROM content is a programming task that ranges from small and relatively easy (uncompressed, unencrypted data in simple formats) to horribly difficult (arcane bitplane, palette and sprite systems, compression and encryption, possibly rebuilding a whole game with different lengths and offsets). I suspect hacking tools for Battle Garegga would be near the easy end of the spectrum, but ask trap15.
User avatar
MintyTheCat
Posts: 2079
Joined: Sat Jun 19, 2010 3:46 am
Location: Germany, Berlin

Re: How to Modify a ROM to make Battle Garegga colored bulle

Post by MintyTheCat »

Shadolf wrote:I know about Garrega v2, but there arent all bullets colored and mybe i´d like some other colors like pink ;-).
Simply said, I´m looking for a way to modify graphics of shmups roms in general. Are there any good/simple ways to do this?
Get yourself a copy of IDA:

https://en.wikipedia.org/wiki/Interactive_Disassembler

Also, try an Emu to help you with stepping through the game as it runs such as MESS that has a debugger build in. I have used it for a 68K target so this works :)

Familiarise yourself with the hardware that the game runs on, find out where the colours are stored in with register, find the pixel colour format, determine which colours are used in which palette and which colour slot, modify the colours to your liking, patch the rom to load in the palette that you want to use, re-calc the ROM's checksum and you should be good to go.

Cheers,

Minty.
More Bromances = safer people
User avatar
Shadolf
Posts: 99
Joined: Wed Nov 12, 2014 11:26 am
Location: Germany

Re: How to Modify a ROM to make Battle Garegga colored bulle

Post by Shadolf »

Thanks for your answers. Is there some Forum especially for modding roms?

Would also like to know how to get sprites/sprite sheets out of roms.
Would like to modify them and maybe use them for my future projekts.
User avatar
MintyTheCat
Posts: 2079
Joined: Sat Jun 19, 2010 3:46 am
Location: Germany, Berlin

Re: How to Modify a ROM to make Battle Garegga colored bulle

Post by MintyTheCat »

Shadolf wrote:Thanks for your answers. Is there some Forum especially for modding roms?

Would also like to know how to get sprites/sprite sheets out of roms.
Would like to modify them and maybe use them for my future projekts.
There are a couple but this one uses English:

http://www.romhacking.net/

Over the years I have found this to be a good resource.

With your hack interest for BG you have one possible factor that is useful: the palette devoted to the bullets, player ship and HUD will be present pretty much all throughout the game so it may simply be as simple as changing the palette data stored in ROM, recalculating the ROM's checksum and away you go.
Start up MESS or IDA from the start of the ROM then work out which part of the code handles the actual game or attract mode, put in breaks for those regions, let it run, then find out where game loads in it gfx and palettes, expect to see something like this:

Code: Select all

move.L #$SECTION_OF_ROM_FOR_PALSGFX, a1 ; load the start of gfx and pal data to a1.
If you have a decent Emulator or the real hardware with some debug hardware you can then see exactly what goes into the palette registers and graphics in Video-RAM and usually Palette-RAM is a given area of VRAM.

For the Megadrive (i am most familiar with this so I use it as an example):
This special area of the VDP is known as CRAM, or Colour RAM.
http://md.squee.co/VDP
Palettes
The VDP has an internal memory called CRAM, or colour RAM, which is 64 words of 9 bits each. This is divided up into 4 palette lines, while one palette line is divided into 16 different palette entries, with the first entry always being transparent (but is able to be displayed as the display background colour,) and the remaining 15 entries being able to be used regularly. Tiles reference into a palette with each nybble, and mappings tell them which one of the 4 palette lines it shall use. The format of a CRAM entry is as follows:
All of the older machines essentially are a variation on these ideas and concepts and varying usually in the number of slots and available colours on screen at a time.

The Megadrive can display only (16-1) x 4 at any one time - 60 with colour in the first slot being invisible.

This is an excellent tool that Dr Mefisto and R57Shell have been working on:

http://gendev.spritesmind.net/forum/vie ... f=7&t=2193

You can use IDA for many, many targets and nearly all of the Retro consoles.

From this:

https://en.wikipedia.org/wiki/Battle_Garegga

You can either go it alone with IDA using 68K as the target or if you know enough about the hardware that BG runs on you can write your own plugin to work out memory ranges and commonly used handles, etc.

Dr Mefisto wrote his own plugin for the Megadrive and he is usually pretty good with answering questions so perhaps contact him for some ideas as to how to handle BG once you have looked into it for yourself.

Taking Sprites from games is a hairy topic indeed.
You can either grab from the screen or memory through an Emu or the real hardware as most Sprite rips are done by people who cannot program.
The other option is to dump sections of ROM, Work-RAM or Video-RAM, process the data and turn it into a standard graphic format such as Bitmap, PNG, etc.

*However* each machine's format is different AND often you will find that the graphics data is compressed - so you need to know exactly what type of compression scheme was used by the developers. Taking the gfx data directly from VRAM once it has been uncompressed though simply gives you the gfx in the machine's native format so you sidestep the compression issue this way but it is more fiddly work.

In short: you are looking at some work.

My advice would be to PM Trap15 on here as he has some experience in modifying ROMs. He did an interview at one stage and talked about his dealings with CAVE and he mentions some methods he uses and since he is a chap interested in Shmups this might be a useful resource for you too:

http://daifukkat.su/blog/archives/reverse_engineering/

I have worked on Megadrive ROMs too so I can give you some pointers but I will say that if the idea of looking at other peoples' raw machine-code converted to assembly scares you then this type of ROM hacking is not going to be for you :)

Edit:

Trap did some work on BG:

http://daifukkat.su/hacks/garemisc/

Do a diff on the resultant ROM and the original ROM then work out what he changed as a start to your own hack work.

Cheers,

Minty.
More Bromances = safer people
Post Reply