News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: aladdin sega genesis - hacking notes  (Read 2502 times)

Metal64

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
aladdin sega genesis - hacking notes
« on: July 14, 2020, 05:36:03 am »
I had been hacking "disney aladdin" for sega genesis for months, so I decided share my findings.


initial quantities of lifes in practice mode
0x1b0048
00 35

initial quantities of lifes in normal mode
0x1b0056
00 33

initial quantities of lifes in difficult mode
0x1b0064
00 32

initial quantities of apples in practice mode
0x1aa670
31 35

initial quantities of apples in normal mode
0x1aa67e
31 30

initial quantities of apples in difficult mode
0x1aa68c
30 35

initial quantities of gems (all mode)
0x1aa666
30 30

lifes have a limit of 9

apples and gems have a limit of 99

examples
30 30 = 00
30 39 = 09
00 39 = 9
39 39 = 99

July 14, 2020, 05:37:06 am - (Auto Merged - Double Posts are not allowed before 7 days.)
------------------------------------------------------------------

Sound address (Incomplete)

122db5 - flagpole
1b32a5 - menu change
1a9c73 - head pop
1b1353 - ne naw tune (music of preview level)
1af48b - apples
1af24b - gem
1b0d9d - music level complete
1b5199 - apu bonus level music
1abef9 - apple splat
1b5689 - pole slide
1acd3f - flamingo hey!
1acd1b - flamingo hey 2
1add93 - rock bounce
1a9473 - out of apples
1af3d7 - abu tokens
1af4ed - genie tokens
1aeeef - genie heart
1abe9f - sword ching (knife juggler, Fazahl, Razoul, Gazeem)
1ae5a9 - aladdin hurt
1ae699 - continue point (checkpoint)
1a96c5 - low sword
1aecab - gazeem hit 1
1ac209 - gazeem hit 2
1a944f - object throw

FAST6191

  • Hero Member
  • *****
  • Posts: 2900
    • View Profile
Re: aladdin sega genesis - hacking notes
« Reply #1 on: July 14, 2020, 09:49:33 am »
Give or take the thing with the 00 those numbers are in ASCII (3 followed by a number is that number in ASCII, one of the little niceties the creators of it went in for) which is quite strange as these things go, especially on older systems where memory and CPU was at a premium (while not outrageous that does not make things all that much easier to code for and has a lot of downsides).

I have encountered binary coded decimal (even 5,3,2,-1 format), values using the top bit as a flag for something else and split values between values before but this one is odd for a console game.

Cool info.

Metal64

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: aladdin sega genesis - hacking notes
« Reply #2 on: July 21, 2020, 07:34:41 am »
Entities Data

A list of the data of itens, enemies, boss, npcs and others objects

Code: [Select]
00 - nothing
01 - flagpole
02 -
03 - iago
04 - boss iago
05 - bats
06 - pot thrower
07 - snake 2 stage
08 -
09 -
0a - knife juggler 
0b - fish
0c - shiva statue 
0d -
0e - snake charmer
0f - snake of the snake charmer
10 - Razoul
11 - cobra jaffar
12 - jaffar
13 - Gazeem
14 - apple thief
15 - stealing apple (power of the apple thief)
16 - skeleton
17 - ghost
18 - cave boss (5 stage)
19 -
1a - red statue
1b -
1c -
1d -  Fazahl
1e - Zagoolien
1f - Hakim
20 -
21-
22 -
23 - pot that give you gem
24 -
25 - 
26 -
27 -
28 -
29 - release abu
2a - pot of the pot thrower
2b - 3 stage key to market
2c - spit of the fish
2d - all knifes
2e - projectile of the shiva statues
2f - barrel
30 - fire of cave boss
31 - bones
32 - lava splash
33 -
34 - genie tokens
35 - apples
36 - black lamp
37 - magic lamp (5th stage)
38 -
39 -
3a - gem
3b - gem in the pot
3c - level complete
3d - scrab 1 (2 stage)
3e - scrab dust
3f - scrab halve cutscene
40 - apples
41 - abu token
42 - apples slice
43 - checkpoint
44 - genie heart
45 -
46 - life
47 - flute
48 - flute
49 - flute
4a - flute
4b - flute
4c - flute
4d - jaffar tractor
4e - genie hands spring
4f - genie spring
50 - genie ballon explode
51 - genie ballon ?
52- stationary genie hand plataform
53- rotary genie hand plataform
54- giant rock (rug ride stage)
55- falling block stage 2
56-
57-
58- disappearing blocks
59- spawn ghost
5a-
5b-
5c-
5d-
5e- magic carpet
5f- magic carpet lying down (9 stage)
60- magic carpet (7 stage)
61-
62- plataform sink
63-
64-
65- camel
66-
67- flamingo 
68-
69- plataform
6a- falling plataform (stage 1)
6b-
6c-
6d -
6e-
6f- 
70- block
71-
72-
73-
74- plataform cave (waterfall)
75-
76- falling platafom cave
77-
78-
79- spike in the ground (2 stage)
7a-
7b- fire of the cobra jaffar
7c- pot that contain the magic rope
7d- giant rock
7e- peddler’s stall
7f- spit dromedary
80-
81-
82-
83- aladdin
84-
85-
86-
87- merchant
88-
89- rocks of cave plataform
8a- cave boss 1º plataform ?
8b- cave boss 2º plataform
8c- fire in charcoal
8d-
8e-
8f-

sound data

Code: [Select]
00 - high sword
01 - low sword
02 - no sound (probably silent lamb)
03 - object throw
04 - menu select
05 - flagpole
06 - menu change
07 - head bop
08 - wall hit 2
09 - cloud poof
0a - ne naw tune
0b - apple collect
0c - apple slice
0d - gem collect
0e - jaffar laugh
0f - arab rock 1
10 - arabic rock 2
11 - music level complete
12 - bonus level music
13 - scarab wow
14 - one jump ahead
15 - music stage 1
16 - turban jazz
17 - remove music
19 - music reset
1a - new world
1b - friend like me
1c - friend like me 2
1d - rug ride
1e - rug ride 2
1f - ballon pop
20 - sword spinning
21 - sword ching
22 - apple splat
23 - gloomy tune
24 - gloomy tune
25 - gloomy tune
26 - camel jazz
27 - pole slide
29 - rope launch
2a - genie fumes
2b - guards pants
2c - rope appear
2d - yago squawk
2e - honk
2f - landing ooof
31 - aladdin hurt
32 - boss tune
33 - boss tune
34 - boss tune
35 - boss tune
36 - boss tune
37 - skeleton explosion
38 - bones tinkle
39 - clay pot
3a - boxing bell
3b - aladdin push
3c - splash
3d - camel spit
3e - guard beckon
3f - canopy bounce
40 - flamingo hey!
41 - guard hit
42 - guard hit 2
43 - geyser
44 - flamingo hey 2
45 - stone rumble
46 - spring doing 1
47 - spring doing 2
48 - cash registery
49 - prince ali
4a - prince ali 2
4b - honk
4c - fire from coal
4d - stones crumbels
4e - wall spikes
4f - tip toe
50 - rock bounce
51 - out of apples
52 - arabian nigths
53 - earthquake
54 - storytine
55 - drama
56 - mushy one
5a - stopping
5b - win a bonus
5c - starting gun
5d - abu uh oh
5e - oooo
5f - ahhh
60 - eeee
61 - iiee
62 - extra health
63 - continue point (checkpoint)
64 - scarab pickup
65 - body crunch
66 - yeahh
67 - flute pickup
68 - jaffar tractor
69 - wow
6a - gazeem hit 1
6b - gazeem hit 2
6c - jaffar snake
6d - peddle shop
6e - abu waving
70 - coming out of the checkpoint sound
71 - honkey sound
73 - cloud poof
« Last Edit: August 19, 2020, 08:59:53 am by Metal64 »

peixemacaco

  • Jr. Member
  • **
  • Posts: 72
  • 70 65 69 78 65 6d 61 63 61 63 6f
    • View Profile
    • Old peixemacaco site found
Re: aladdin sega genesis - hacking notes
« Reply #3 on: August 02, 2020, 01:25:27 pm »
Hi Metal64 , great findings you did on this awesome game...
Does the 1st addresses may be found in Hex Editor?

And I think you're aware of Alladin secrets https://gamehistory.org/aladdin-source-code/
If not, it may help you in some way or just for curiosity...

Nelson
Super Monaco GP... It garnered an at-the-time unprecedented 10–10–9–9 rating from Electronic Gaming Monthly's Review and wasn`t a F Indy title.

Metal64

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: aladdin sega genesis - hacking notes
« Reply #4 on: August 03, 2020, 05:52:18 pm »
In the offset "0x1dbe" we can see this code
Code: [Select]
00 1a f4 68     ori.b      #0x68,(A2)
This code it is referent to the apples function (when you touch a apple you gain 1 apple)

now let's go to the offset "0x1d96"
Code: [Select]
00 1a f5 16     ori.b      #0x16,(A2)+
This is the code for the black lamp, when you touch it, the lamp explodes and damages nearby enemies

Now let's go again to the "0x1dbe" offset and change the values ​​of "00 1a f4 68" to "00 1a f5 16". With this change every time that you pick up an apple it will explode like a black lamp. We can change all the entities function with this logic. We can make a projectile of a enemie restore our health, make an enemy sell you items or even make an item like an apple damage you.

Here is the list of the entities function
note: incomplete
Code: [Select]
0x1CC2
flagpole
00 1A FD 84

0x1CC6
00 1A FF 82

0x1CCA
iago
00 1A ED 86

0x1CCE
boss iago
00 1A ED A6

0x1cd2
bat
00 1A E9 C6

0x1CD6
pot thrower
00 1A E9 DA

0x1CDA
snake 2 stage
00 1A E9 C6

0x1CDE
00 1A E7 22

0x1CE2
00 1A E7 22

0x1CE6
knife juggler
00 1A E9 C6

0x1CEE
statue
00 1A E9 A8

0x1CF2
?
00 1A EB 7A

0x1CF6
snake of the snake charmer
00 1A E9 C6

0x1CFA
snake charmer
00 1A E9 DA

0x1CFE
?
00 1A E9 C6

0x1D02
jaffar cobra
00 1A F1 10

0x1D06
jaffar
00 1A F1 10

0x1D0A
?
00 1A E9 C6

0x1D0E
apple thief
00 1A EB FE

0x1D12
apple thief power
00 1A E9 78

0x1D16
skeleton
00 1A E9 C6

0x1D1A
ghost
00 1A E9 C6

0x1D1E
monkey statue red
00 1A EA 48

0x1D22
monkey statue red
00 1A EA 48

0x1D26
monkey statue red - first
00 1A E9 E0

0x1D2A
monkey statue second
00 1A EA 00

0x1D2E
monkey statue red - last
00 1A EA 24

0x1D32
Fazahl
00 1A E9 C6

0x1D36
Zagoolien that walk in coal
00 1A E7 96

0x1D3A
hakin normal
00 1A E7 96

0x1D4E
Fazahl
00 1A E9 C6

0x1D42
Zagoolien normal
00 1A E7 96

0x1D46
hakin standing still
00 1A E7 96

0x1D4A
pot that give you gem
00 1A EE CA

0x1D4E
?
00 1A EE DE

0x1D62
save abu
00 1A F4 00

0x1D66
pot
00 1A E9 C6

0x1D6A
?
00 1A EB FE

0x1D6E
fish spit
00 1A EE 40

0x1D72
prohectile of knife juggler, Fazahl, Gazeem, Razoul
00 1A EE 40

0x1D76
statue projectile
00 1A EE 40

0x1D7A
barrel
00 1A ED A8

0x1D7E
fire of cave boss
00 1A EE 18

0x1D82
skeleton bones
00 1A EE 40

0x1D86
lava splash
00 1A EB 7C

0x1D8A
?
00 1A F4 A0

0x1D8E
genie tokens
00 1A F4 D8

0x1D92
?
00 1A F4 68

0x1D96
black lamp
00 1A F5 16

0x1D9A
3 scrab of the 2 stage
00 1A F3 44

0x1D9E

00 1A F4 A0

0x1DA2

00 1A F4 A0

0x1DA6
gem
00 1A F2 28

0x1DAA
gem bonus stage
00 1A F2 1E

0x1DAE
beat the level
00 1A F3 44

0x1DB2

00 1A F3 84

0x1DB6
scrab
00 1A F2 B0

0x1DBA
scrab
00 1A F2 FA

0x1DBE
apple
00 01 F4 68

0x1DC2
abu token
00 1A F3 C2

0x1DC6
apple slice
00 1A F2 64

0x1DCA
checkpoint
00 1A E6 4C

0x1DCE
genie hearth
00 1A EF 12

0x1DD2

00 1A EE E0

0x1DD6
life
00 1A EF 5C

0x1DDA
flute
00 1A EF B0

0x1DDE
flute
00 1A EF DC

0x1DE2
flute
00 1A F0 08

0x1DE6
flute
00 1A F0 34

0x1DEA
?
00 1A F0 60

0x1DEE
?
00 1A F0 8C

0x1DF2
?
00 1A F0 B8

0x1DF6
genie hand spring
00 1A FC D2

0x1DFA
genie spring
00 1A FC 4E

0x1DFE
genie ballon
00 1A F8 F6

0x1E02
genie ballon
00 1A F8 F6

0x1E06
stationary genie hand plataform
00 1A F7 9E

0x1E0A
rotary genie hand plataform
00 1A F7 9E

0x1E0E
giant rock of the rug ride
00 1A F7 F2

0x1E12
falling block stage 2 (1)
00 1A F5 90

0x1E16
falling block stage 2 (2)
00 1A F5 90

0x1E1A
00 1A F5 90

0x1E1E
00 1A F5 90

0x1E22
spawn ghost
00 1A E9 C6

0x1E26
?
00 1A F5 3E

0x1E2A
00 1A F5 4A

0x1E2E
00 1A F5 56

0x1E32
00 1A F5 62

0x1E36
?
00 1A F6 38

0x1E3A
?
00 1A F6 AC

0x1E3E
00 1A F6 DC

0x1E42
00 1A F6 DC

0x1E46
00 1A F8 1C

0x1E4A
00 1A F8 1C

0x1E4E
00 1A F8 94

0x1E52
dromedary
00 1A FB F4

0x1E56
last dromedary
00 1A FB F4

0x1E5A
flamingo
00 1A F7 40

0x1E5E
flamingo
00 1A F7 40

0x1E62
00 1A F9 78

0x1E66
00 1A F9 78

0x1E6A
00 1A F9 78

0x1E6E
00 1A F9 78

0x1E72
00 1A EE 40

0x1E76
magic rope
00 1A FB 36

0x1E7A
magic rope
00 1A FB 36

0x1E7E
magic rope
00 1A FB 36

0x1E82
magic rope
00 1A FB 36

0x1E86
magic rope
00 1A FB 36

0x1E8A
magic rope
00 1A FB 36

0x1E8E
?
00 1A FA 84

0x1E92
?
00 1A FA 84

0x1E96
plataform cave
00 1A F9 F6

0x1E9A
plataform cave (falling)
00 1A F9 F6

0x1E9E
chain ball
00 1A EB DC

0x1EA2
spike in the ground (2 stage)
00 1A EB 7C

0x1EA6
spike wall
00 1A EB DC

0x1EAA
fire of the cobra jaffar
00 1A E9 D4

0x1EAE
pot that contain the magic rope ?
00 1A E9 C6

0x1EB2
giant rock
00 1A EB A4

0x1EB6
peddler’s stall
00 1A FE 1C

0x1EBA
?
00 1B 65 BE

0x1EBE
00 1A BF 9A

0x1EC2
apple splat
00 1A BF 8E

0x1EC6
00 1A C0 EE

0x1ECA
boss dying
00 1A C1 02

0x1ECE
enemie die
00 1A C1 B4

0x1ED2
00 1A C4 58

0x1ED6
00 1A C4 58

0x1EDA
?
00 1A BF 8E

1EDE
?
00 1A BF 8E

0x1EE2
00 1A C4 58

0x1EE6
00 1A C4 58

0x1EEA
00 1A C4 58

0x1EEE
?
00 1A C6 0E

0x1EF2
00 1A C4 58

0x1EF6
00 1A C4 58

0x1EFA
?
00 1A C2 BC

0x1EFE
?
00 1A C4 E8

0x1F02
?
00 1A C4 E8

0x1F06
sub boss dying
00 1A C1 D0

0x1F0A
00 1A C6 14

0x1F0E
00 1A C4 58

0x1F12
00 1A C4 58

0x1F16
00 1A C4 58

0x1F1A
00 1A C4 DE

0x1F1E
00 1A C4 DE

0x1F22
00 1A C4 08

0x1F26
00 1A C4 32

0x1F2A
00 1A C4 44

0x1F2E
00 1A C3 50

0x1F32
00 1A C3 18

0x1F36
00 1A C2 E0

0x1F3A
00 1A C3 50

0x1F3E
00 1A C3 34

0x1F42
00 1A C2 FC

0x1F46
00 1A BF F0

0x1F4A
00 1A C0 3E

0x1F4E
00 1A C0 5A

0x1F52
00 1A C0 76

0x1F56
00 1A C0 7C

0x1F5A
00 1A C0 98

0x1F5E
00 1B 65 BE

0x1F62
00 1A C4 58

0x1F66
00 1A C6 3C

0x1F6A
00 1B 65 BE

0x1F6E
00 1A C6 A2

0x1F72
00 1A C6 A2

0x1F76
00 1A C6 76

0x1F7A
00 1A C6 82

0x1F7E
00 1A C6 A2
« Last Edit: August 16, 2020, 06:58:38 am by Metal64 »

Metal64

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: aladdin sega genesis - hacking notes
« Reply #5 on: August 16, 2020, 07:02:53 am »
Hi Metal64 , great findings you did on this awesome game...
Does the 1st addresses may be found in Hex Editor?

And I think you're aware of Alladin secrets https://gamehistory.org/aladdin-source-code/
If not, it may help you in some way or just for curiosity...

Nelson

I'm already aware of the cut contents of this game! Now, what did you mean about "the 1st addresses"?