NOTE: 1E2269 - 1E22FE may be lost text. It reads "Find out the forgotten secret of Emerl in the next episode, 'Tails'!"

Character Table

Note that if you add $20 to a character from the ROM, it will give you that character in ASCII. Hence all lowercase letters are uppercase in the ROM and will not be listed here.

Here is the character table:

Character

Hex Value

Character seen in a hex editor

!

01

N/A

"

02

N/A

#

03

N/A

$

04

N/A

%

05

N/A

&

06

N/A

'

07

N/A

(

08

N/A

)

09

N/A

*

0A

N/A

+

0B

N/A

,

0C

N/A

-

0D

N/A

/

0F

N/A

0

10

N/A

1

11

N/A

2

12

N/A

3

13

N/A

4

14

N/A

5

15

N/A

6

16

N/A

7

17

N/A

8

18

N/A

9

19

N/A

:

1A

N/A

;

1B

N/A

<

1C

N/A

=

1D

N/A

>

1E

N/A

?

1F

N/A

@

20

Space

A

21

!

B

22

"

C

23

#

D

24

$

E

25

%

F

26

&

G

27

'

H

28

(

I

29

)

J

2A

*

K

2B

+

L

2C

,

M

2D

-

N

2E

.

O

2F

/

P

30

0

Q

31

1

R

32

2

S

33

3

T

34

4

U

35

5

V

36

6

W

37

7

X

38

8

Y

39

9

Z

3A

:

Art Editing

Decompressed Art

Most of the art in Sonic Battle is decompressed, which is good. You can find many instances of decompressed art while browsing through the game with Tile Layer Pro. This art includes attacks, card text art, and more. I don't really know the format for decompressed art (and
it would be pretty useless if I told you; why learn the format of decompressed art when you can just browse and edit with TLP?) , so it will not be covered here.

Offset

Art

7AA00

ASCII characters (for the dialogue scenes)

8DDD0-A1400

Attack Text

A1400-A1600

Numbers for HUD

10FE00-00113200

Unknown (Dialogue sprites?)

?????-1A5258

Central City "SONIC"

31FE00

"Go" in a battle's start.

333200-333E00

GAME SET

320000-322E00

Health bars. Very repetetive tiles.

322E00-323200

Looks like numbers. Poorly mapped numbers, that is.

323200-3237D4

Life icons

3237D4-323E00

POW and DEF icons. No recognizable AIR icon.

323E00-324200

GROUND, DEFEND, AERIAL

324200-324800

PRESS START (as in demo)

338000-363E00

Text in the credits.

366A00-3D2800

Unknown (A beach or a map).

3D5000-3DEE0

"Now you can play the new episode" info.

3E1000-3E1400

"Ground Aerial Defend", before the start of battle.

3E3400

"Ground Aerial Defend", before the start of battle(2).

3ED000-3EF600

"Comunication error" info.

423800-426A00

Title screen art.

47B800-A8C600

Character battle sprites.

A8F000-BE6600

Attack effects and other animated stuff in battle.

BE8400-BF1200

Chao (in battle?)

3D Map Editing

3D Maps are stored as little 2D grids on the BG2 and BG3 maps. They are made into fully-fledged 3D worlds on runtime. The texture for the bottom of the platforms are stored as sprites. Tiles are represented by a byte value and go along in rows. When one row is done, the tiles go on to the next. There are 2 maps for a battle map; the texture map and the ground map. The texture map contains the textures above the ground (except in the Crater map), and the ground map contains the textures and shadows at ground level.

Texture Map Section

Here are the offsets for all of the texture maps:

Offset

Texture Map

456FA5 - 457FA5

Emerald Beach

44BC96 - 44CC96

Tails' Lab

47AB45 - 47BB45

Chao Ruins

42D405 - 42E405

Battle Highway

4449C5 - 4459C5

Club Rouge

454BA0 - 455BA0

Amy's Room

4353C5 - 4363C5

Metal Depot

NOTE: I can't find the Library texture map offset.

Each map has a set of tiles, represented by values from 00 to FF (obviously!), though not all of the slots are used. Here is a incomplete texture value list:

Ground Map Section

Ground maps are the maps of things at ground level. Except for the Crater area, the BG3 Map is always the ground map(In the Crater, the maps are reversed; the texture map, BG3 is the stuff underground, and the ground map, BG2, is the stuff aboveground.

Offsets:

Emerald Beach: 46DC70

Tails' Lab: 44A664

Cyberspace: 4721B4

Cyberspace

NOTE: Cyberspace has constant cycling palette effects, so a fully accurate list is impossible. This list is based on the semi-squares at the corners being the Raster 0 (lightest) color. In other words, the colors start as light colors, gradually go on to dark colors, and then gradually come back to light at the ends. Raster 0 is the lightest color, and Raster 5 is the darkest. (Of course, I shouldn't call it Raster, because the color cycling isn't a rasterization effect, though I originally thought it was.)

OAM Editing

The OAM is a listing of the tile numbers of the sprites that are onscreen. It also lists the Y position of the sprite, the X position of the sprite, the flags, and the palette number. The OAM, in a way, is a sort of sprite map. This can be useful when editing battle maps; you'll usually have to edit the sprite map to get your work done. It can also be useful when editing sprite mappings; the OAM usually IS the mappings. Not only that, it determines the screen position for each part, so you can have a mapped part of a mapped sprite outside the sprite.

But sadly, the OAM changes every second, so lasting changes to the OAM are, as far as I know, impossible.

The OAM Format

aa bb cc dd ee f? gg hh (next entry in OAM)

aa = Y Position on Screen
bb = Flags
cc = X Position on Screen
dd = Flags
ee = Tile Number
f = Palette No. (Backwards)
? = I have no idea what this is, but on some sprites it can do strange things when changed.
gg = I don't know what this is, but it does nothing.
hh = This byte is always either 00 or 01. But it doesn't do anything.

You can also add to the OAM by changing the unused slots as you wish. Unused slots usually all have the same bytes, and therefore unused slots in the OAM are marked by a handful of redundant (except for the gg and hh bytes) space.

The end of the OAM is easily recognizable; the redundant space suddenly changing to all-unredundant space.

In VBA, the XY positions, the tile number, and the palette number are shown as decimal values, so it is helpful to have a calculator that can convert from Decimal to Hex and back. The Windows Calculator supports all of that and more.

That's a lot of values! The glitchy tiles, by the way, can be unglitched into good 256-color tiles by changing the tile number into the 256-color tile you want it to show.

Here is an example OAM slot:

0F 50 01 10 04 1C F2 01

This will produce the tile number 04, with the XY location 1,10, the flag R, and the palette in slot 1. The offset for the OAM in memory is 0x7000000. There are no offsets in the ROM.

Palette Editing: Beauty and the Binary

There are two ways to palette edit. One is to use Icy Guy's excellent program, GBA Color Picker; the other option is to convert RGB values into binary. Which one would you rather do?

Each palette line can hold 16 colors, but the first seems to be reserved for transparency reasons, so you've got 15 colors available in each palette. Counting from the 2nd second color to left (this one is
often white), the colors are numbered according to standard hex numbering, sans 0, so that's 1-F. Palettes are byteswapped, meaning that 2700 shows up as 0027 in a hex editor. The first color in each palette controls
transparency, for your information.

Here are the offsets for each palette.

Offset

Description

1A7F90

Text/speech box palette

1A8E25

Emerald Beach

41A218

Title screen "background" palette

468A18

Emerald Beach shadow (on grass) palette

468A38

Emerald Beach shadow (on sand) palette

47AB78

Gray/"imposter" Emerl's in-fight palette

47AFB8

Sonic's in-fight palette

4CADD8

Knuckles' in-fight palette

5283F8

Tails' in-fight palette

58D818

Shadow's in-fight palette

5F3E38

Rouge's in-fight palette

636458

Amy's in-fight palette

681A78

E-102's in-fight palette

6F6A98

Cream's in-fight palette

7336B8

Chaos' in-fight palette

7822D8

Robotnik's in-fight palette

787CFA

Emerl's in-fight palette

BF2058

Dust cloud (from end of combo) palette

BF2078

In-fight shield palette ("opening" animation, when purple)

BF2098

In-fight shield palette/Tails' gun's power ball

BF20D8

Sonic's mine palette

VBA Hacking

Visual Boy Advance is THE ultimate tool for ROM hacking, when combined with Hex Workshop. This is especially true for Sonic Battle. These are steps that will let you do some radical
stuff with VBA too for any game compatible with it:

Open up the respective viewer and get the offset of the data you want.

Open up the Memory Viewer and go to that offset.

Take notes on the format and experiment with it.

Now that you've gotten the format into a file, do a search for the original hex values using Hex Workshop. Record the offset.

Change as you please.

If you want to distribute your results, make an IPS patch with StealthPatch.

Strange Things

There are many strange objects in Sonic Battle as can be seen by looking at the OAM. (What the heck is that messed-up Emerl doing there? Or the 1 1/2 Eggman?) This gives the location, the position, the color mode, the palette, the tile number, the priority, the size, and the description of each strange object I've come across so far.

NOTE: This would probably go in a glitches guide, but these slots can also serve as extra object places, I think.

Messed-Up Fire Thingy

Where: Emerald Town Map Cutscene 1 (Sonic Finds Emerl), OAM Slot 6

Position: 97, 160

Color Mode: 16-Colors

Palette: 2

Tile: 236

Priority: 3

Size: 32x32

Description: Sonic is covering up this object, but it's there.

White Sonic with ACH

Where: Emerald Town Map, OAM Slot 3

Position: 155, 160

Color Mode: 16-Colors

Palette: 0

Tile: 424

Priority: 2

Size: 32x32

Description: This White Sonic moves as Sonic moves. Now, you might be saying "It's the ACH in Emerald Beach with a wrong-palette Sonic! DUH!" It does become the slot for the ACH in Emerald Beach, but it might be relevant to note that the ACH is in a different location, and that we don't ever see this object.

Event Place with Arrow

Where: Emerald Town Map

(NOTE:There are two of these, so I have seperated them by slots.)

OAM Slot 6

Position: 98, 160

Color Mode: 16-Colors

Palette: 2

Tile: 116

Priority: 3

Size: 32x32

Description: N/A

OAM Slot 10

Position|107, 160

Color Mode: 16-Colors

Palette: 2

Tile: 116

Priority: 3

Size: 32x32

Description: N/A

*.SGM Savestate Hacking

Palette Editing

Like the ROM, palettes are stored in an RCGB value. R is Dark Red, C is Contrast, G is Green, and B is blue.

.sgm files are compressed. Heh, I spent a month trying to crack the format, only to find that they could be decompressed with WinZip. Here's how:

First, add the "*.gz" extension to your file. Then open up WinZip, decompress, and voila. You don't even have to recompress.

The offset for the palettes in the *.sgm savestate is 0x05000000. Edit heartily.

RAM Breakdown

If you want to make savestate hacks the easy way, you need to know the memory and what goes where, and where where you want to put something is. Wow, confusing sentence, huh? If you don't know this, the chances of you making a savestate hack that accomplishes something OTHER than crashing the game is not that high, unless you use VBA (See "Hacking with VBA" section for info about that.). VBA is the ultimate tool for RAM editing, too. Get it or be doomed to not knowing what you're doing in the savestate.

Palettes in the RAM

The palette is located at 0x05000000, and it, like the game itself, uses an RCGB value. Many beautiful (or messy, ^_^) results can be made with palettes. And if yours is messy...;_;

Map Editing in the RAM

Map editing is a tile-by-tile grid, like the game. Here are RAM offsets for BG0, BG1, BG2, and BG3 maps: