Zeldix Magic
Zeldix :: Zelda III Hacking :: The Archives :: Zeldix Magic
Page 8 of 8
Page 8 of 8 • 1, 2, 3, 4, 5, 6, 7, 8
Re: Zeldix Magic
heh that's pretty much what my notes are like back then, inconsistent and confusing, you can probably tell the reason why I've never publicly released them (I have similar cat scratches for sprite placement / selection for the scrolling ending credits as well including changing how the exits scroll, as you may have noticed that's "different" in PW than original lttp)
Sorry for that, didn't have too much time to dump it (I just copied and pasted)
Lets start over again - all UNHEADERED addresses for sure this time.
To parse the ending credits data (both return of the king text and scrolling credits), I'll take one as an example:
0x7317A = EXECUTIVE PRODUCER
0x73170 - XX XX XX XX XX XX XX XX 07 23 3C 4F 3C 3A 4C 4B
0x73180 - 40 4D 3C 9F 47 49 46 3B 4C 3A 3C 49 FF
07 - start from the 7th tile from the left of the screen (Note scrolling credits have no vertical position, and return of the king section have them hardcoded)
23 - (23+1) / 2 = 0x12 bytes to read
Then read 12 bytes - 3C 4F 3C 3A 4C 4B 40 4D 3C 9F 47 49 46 3B 4C 3A 3C 49
For each 12 bytes look up the table definition and draw the character on screen at the position.
Now to pointers to the data.
Pointers start at 0x7393D
Data around there is as follows:
94 91 9B 97 8D 8B 9F 9B 83 8F 83 86 83 00 00 14
00 14 00 14 00 15 00 27 00 14 00 14 00 14 00 14
00 14 00 14 00 14 00 14 00 39 00 14 00 14 00 14
That 00 00, is a relative position to 0x73178, funnily enough, the next value is 14 00, which points straight to the FF! FF is a special placeholder to show a blank line (as the game's engine does)
In other words from the above
00 00 EXECUTIVE PRODUCER
14 00 BLANK
14 00 BLANK
14 00 BLANK
15 00 NAME FIRST LINE
27 00 NAME SECOND LINE
14 00 BLANK
14 00 BLANK
14 00 BLANK
14 00 BLANK
14 00 BLANK
14 00 BLANK
14 00 BLANK
14 00 BLANK
39 00 NEXT LABEL (forgot what it is)
14 00 BLANK
14 00 BLANK
...
This continues until the last pointer @ 0x73C4F, so the data ends at 0x73C50 (0x73C51 has assembly!) - you'll notice that the lines with the death counts have the place names written this way but not the actual number. That bit is hardcoded.
So the next thing is what about the RETURN OF THE KING data? (puns)
As you've graciously pointed out by your pictorial there's 4 byte control code rather than two in the credits area.
For the line THE RETURN OF THE KING, the data actually starts 4 bytes before 0x73F50 @ 0x73F4C
@0x73F40
30 A9 FF 9D 02 10 A9 01 85 14 AB 60 62 65 00 2B
2D 21 1E 9F 2B 1E 2D 2E 2B 27 9F 28 1F 9F 2D 21
1E 9F 24 22 27 20 62 E9 00 19 64 75 6E 71 68 61
62 65 00 2B
62 E9 00 19
63 09 00 19
62 EB 00 11
63 0B 00 11
First + second byte are related to the position of the data (16 bytes BIG endian) - to actually control the starting location of the text, you would subtract2ONE for every tile you want to move left (62 64), and add 2ONE if you want to move it right (62 66). I could go into snes screen positioning tutorial but that would just bore you, but I can assure this this goes straight into a DMA RAM area to the GPU.
3rd byte is always - 00 (the code ANDs them out anyway lol)
4th byte - length - formula is (value + 1) / 2 in terms of text to read after that byte just like the above. So the first line we would read $16 bytes (THE RETURN OF THE KING)
Now last thing on the list is the pointers to THE RETURN OF THE KING.
See post below. Ignore all this stuff here.
DO note that they're extremely hardcoded and scattered around the rom - the first lot of it start at 0x742E1 - all relative positions to 73F4C - I have a feeling there's multiple lists of pointers based off the event control asm so if you want to juggle them it might become annoying.
@0x742E0
9E 00 00 3C 00 68 00 AA 00 E8 00 28 01 5B 01 98
01 CF 01 07 02 42 02 7D 02 B0 02 EA 02 22 03 52
03 95 03
00 00 - THE RETURN OF THE KING
3C 00 - HYRULE CASTLE (top)
68 00 - HYRULE CASTLE (bottom)
...
...
If you're really interested into getting into the gritty pointers, I'll need to dig up the rest of the data for you, unfortunately I've already spent like 90+ minutes writing this and I am sleepy and have work tomorrow so you'll have to wait till another day for rest of this data.
Sorry for that, didn't have too much time to dump it (I just copied and pasted)
Lets start over again - all UNHEADERED addresses for sure this time.
To parse the ending credits data (both return of the king text and scrolling credits), I'll take one as an example:
0x7317A = EXECUTIVE PRODUCER
0x73170 - XX XX XX XX XX XX XX XX 07 23 3C 4F 3C 3A 4C 4B
0x73180 - 40 4D 3C 9F 47 49 46 3B 4C 3A 3C 49 FF
07 - start from the 7th tile from the left of the screen (Note scrolling credits have no vertical position, and return of the king section have them hardcoded)
23 - (23+1) / 2 = 0x12 bytes to read
Then read 12 bytes - 3C 4F 3C 3A 4C 4B 40 4D 3C 9F 47 49 46 3B 4C 3A 3C 49
For each 12 bytes look up the table definition and draw the character on screen at the position.
Now to pointers to the data.
Pointers start at 0x7393D
Data around there is as follows:
94 91 9B 97 8D 8B 9F 9B 83 8F 83 86 83 00 00 14
00 14 00 14 00 15 00 27 00 14 00 14 00 14 00 14
00 14 00 14 00 14 00 14 00 39 00 14 00 14 00 14
That 00 00, is a relative position to 0x73178, funnily enough, the next value is 14 00, which points straight to the FF! FF is a special placeholder to show a blank line (as the game's engine does)
In other words from the above
00 00 EXECUTIVE PRODUCER
14 00 BLANK
14 00 BLANK
14 00 BLANK
15 00 NAME FIRST LINE
27 00 NAME SECOND LINE
14 00 BLANK
14 00 BLANK
14 00 BLANK
14 00 BLANK
14 00 BLANK
14 00 BLANK
14 00 BLANK
14 00 BLANK
39 00 NEXT LABEL (forgot what it is)
14 00 BLANK
14 00 BLANK
...
This continues until the last pointer @ 0x73C4F, so the data ends at 0x73C50 (0x73C51 has assembly!) - you'll notice that the lines with the death counts have the place names written this way but not the actual number. That bit is hardcoded.
So the next thing is what about the RETURN OF THE KING data? (puns)
As you've graciously pointed out by your pictorial there's 4 byte control code rather than two in the credits area.
For the line THE RETURN OF THE KING, the data actually starts 4 bytes before 0x73F50 @ 0x73F4C
@0x73F40
30 A9 FF 9D 02 10 A9 01 85 14 AB 60 62 65 00 2B
2D 21 1E 9F 2B 1E 2D 2E 2B 27 9F 28 1F 9F 2D 21
1E 9F 24 22 27 20 62 E9 00 19 64 75 6E 71 68 61
62 65 00 2B
62 E9 00 19
63 09 00 19
62 EB 00 11
63 0B 00 11
First + second byte are related to the position of the data (16 bytes BIG endian) - to actually control the starting location of the text, you would subtract
3rd byte is always - 00 (the code ANDs them out anyway lol)
4th byte - length - formula is (value + 1) / 2 in terms of text to read after that byte just like the above. So the first line we would read $16 bytes (THE RETURN OF THE KING)
Now last thing on the list is the pointers to THE RETURN OF THE KING.
See post below. Ignore all this stuff here.
@0x742E0
9E 00 00 3C 00 68 00 AA 00 E8 00 28 01 5B 01 98
01 CF 01 07 02 42 02 7D 02 B0 02 EA 02 22 03 52
03 95 03
00 00 - THE RETURN OF THE KING
3C 00 - HYRULE CASTLE (top)
68 00 - HYRULE CASTLE (bottom)
...
...
If you're really interested into getting into the gritty pointers, I'll need to dig up the rest of the data for you, unfortunately I've already spent like 90+ minutes writing this and I am sleepy and have work tomorrow so you'll have to wait till another day for rest of this data.
Last edited by Trovsky on Thu 23 Mar 2017 - 12:04; edited 3 times in total (Reason for editing : reformatted for me)
Euclid- Since : 2012-06-21
Re: Zeldix Magic
Euclid wrote:If you're really interested into getting into the gritty pointers, I'll need to dig up the rest of the data for you, unfortunately I've already spent like 90+ minutes writing this and I am sleepy and have work tomorrow so you'll have to wait till another day for rest of this data.
Thank you so much I really appreciate that you took over an hour to make this. If you could get info on those other pointers, I would greatly appreciate it. Again thank you!
Mr.x- Fluteboy
- Since : 2014-04-10
Re: Zeldix Magic
I have make a few mistakes up there which I'll have to correct here
After having some time to go through the ending with a debugger on the credits pointers
@0x742E0
9E 00 00 3C 00 68 00 AA 00 E8 00 28 01 5B 01 98
01 CF 01 07 02 42 02 7D 02 B0 02 EA 02 22 03 52
03 95 03
00 00 - First screen (return of the king)
3C 00 - second screen (sanctuary)
68 00 - village
... etc
There are 16 screens in total so 17 pointers (one to mark the end) makes sense.
Basically the data for the pointers to the screens are
73F4C + 00 -> 73F4C + 3C - 1
73F4C + 3C -> 73F4C + 68 - 1
and so forth.
If you see any control code data at the end of the block of data, make sure you keep it there when you make modifications.
With regards to the position, the value you change is by 1 (not 2, i keep thinking of different addresses), edited the post above to correct this.
Also had a look at my music notes - 0xD0000 was the only offset i have, but I'm sure you know that already.
After having some time to go through the ending with a debugger on the credits pointers
@0x742E0
9E 00 00 3C 00 68 00 AA 00 E8 00 28 01 5B 01 98
01 CF 01 07 02 42 02 7D 02 B0 02 EA 02 22 03 52
03 95 03
00 00 - First screen (return of the king)
3C 00 - second screen (sanctuary)
68 00 - village
... etc
There are 16 screens in total so 17 pointers (one to mark the end) makes sense.
Basically the data for the pointers to the screens are
73F4C + 00 -> 73F4C + 3C - 1
73F4C + 3C -> 73F4C + 68 - 1
and so forth.
If you see any control code data at the end of the block of data, make sure you keep it there when you make modifications.
With regards to the position, the value you change is by 1 (not 2, i keep thinking of different addresses), edited the post above to correct this.
Also had a look at my music notes - 0xD0000 was the only offset i have, but I'm sure you know that already.
Last edited by Trovsky on Thu 23 Mar 2017 - 12:06; edited 1 time in total (Reason for editing : format)
Euclid- Since : 2012-06-21
Re: Zeldix Magic
Misc offsets by various people which you may find useful
Dungeon Maps (default lttp one, not conkers)
Entrance blocksets
Enemy Damages (they're in Hyrule Add ons)
Magic Usage
Damage Pointers
Overworld Events:
Grass Colors and issues
- Code:
Normal entrance addresses are:
14E4F - X Scroll
14D45 - Y Scroll
15724 - Door location
Starting location addresses are:
15BB4 - X Scroll
15BC2 - Y Scroll
15C32 - Door location
+ 0x200 header
PS: Sephiroth3 swapped X and Y scrolls in HM!
Dungeon Maps (default lttp one, not conkers)
- Code:
Agahnim 2 dungeon map (used as temp and test since i don't need it)
57BCB:
0F 0F 0F 0F 0F
0F 0F 0D 0F 0F
0F 0F 1D 0F 0F
0F 0F 0F 0F 0F
0F 0F 0F 0F 0F
Room pointers for 7F Agahnim 2 from the looks of it.
57621: start of room pointers...
0F 0F 0F 0F 0F
0F 0F 11 0F 0F
0F 0F 21 22 0F
0F 0F 0F 32 0F
0F 0F 0F 0F 0F
Room pointers for B1 Church. (first ever map)
57C00 - 57CB9 dungeon map graphic data (tile to use...)
Entrance blocksets
- Code:
0x15C08 in a non headered rom, the start location 0 blockset.
Sequential
Enemy Damages (they're in Hyrule Add ons)
- Code:
Here's the snippet of code in Hyrule Add ons which reads the rom for data
Public Sub readData()
Dim i As Integer
Open fileName For Binary As #1
'get damage table
i = 0
While (i < 50)
Get #1, &H37627 + 1 + i, damageTable(i + 1)
i = i + 1
Wend
'get health
i = 0
While (i < 256)
Get #1, &H6B373 + 1 + i, enemyHealth(i + 1)
i = i + 1
Wend
'get enemy damage area
i = 0
While (i < 256)
Get #1, &H6B466 + 1 + i, enemyDamage(i + 1)
i = i + 1
Wend
Close #1
'read sprite names text
i = 0
Open (App.Path + "\names.cfg") For Input As #2
While (i < 256)
Line Input #2, enemyName(i + 1)
i = i + 1
Wend
Close #2
End Sub
Magic Usage
- Code:
3B287 - fire/ice rod
3B28A - 3 spells
3B28D - magic powder
3B290 -
3B293 - Red Staff (block making one)
3B296 -
3B299 - torch
3B29C -
3B29F - Blue Staff (start using)
Note Cape is coded somewhere else.
Damage Pointers
- Code:
36F33 - Damage ptr of weapon - 4 bytes (also determines which enemies you can kill with)
6BAF1 - Damage table of weapons (including items like boomerang)
Overworld Events:
- Code:
0x77664 - overworld events
Area Event
0 64F7 64F7 Tree Stump gets drawn
1 64F7
2 64F7
3 AAF7 AAF7 ?
4 AAF7
5 AAF7
6 AAF7
7 AAF7
8 B1F7 B1F7
9 B1F7
A 64F7
B B1F7
C B1F7
D B1F7
E B1F7
F B1F7
10 B1F7
11 B1F7
12 B1F7
13 B1F7
14 C7F7 C7F7 Stair grave gets drawn and is opened.
15 E4F7
16 E4F7
17 E4F7
18 E4F7 E4F7 Bird Statue
19 E4F7
1A FEF7
1B FEF7 FEF7 Hyrule Castle Gate gfx gets drawn
1C FEF7
1D 27F8 27F8
1E 27F8
1F 27F8
20 E4F7
21 E4F7
22 27F8
23 FEF7
24 FEF7
25 27F8
26 27F8
27 27F8
28 27F8
29 27F8
2A 27F8
2B 27F8
2C 2DF8
2D 2DF8
2E 2DF8
2F 2DF8
30 2DF8 2DF8 Staircase for heart piece.
31 2DF8
32 33F8
33 33F8
34 33F8
35 33F8
36 33F8
37 33F8 33F8 Bombable (ice cave) and staircase shared with dark world
38 2DF8
39 2DF8
3A 39F8 39F8 Staircase kept open.
3B 3FF8 3FF8 Watergate, shared with dark world.
3C E6F9 E6F9 Fire Rod burn, keep open.
3D E6F9
3E E6F9
3F E6F9
40 E6F9
41 E6F9
42 2EFA 2EFA Ganon tower seal open.
43 2EFA
44 2EFA
45 5BFA 5BFA Staircase opened.
46 5BFA
47 61FA 61FA Turtle rock keep open
48 E6F9
49 E6F9
4A B4FA B4FA Gargoyle Switch pulled
4B 2EFA
4C 2EFA
4D 5BFA
4E 5BFA
4F B4FA
50 B4FA
51 B4FA
52 B4FA
53 B4FA
54 B4FA
55 B4FA
56 B4FA
57 B4FA
58 B4FA
59 B4FA
5A CFFA CFFA Big Bomb wall bombed.
5B CFFA
5C CFFA
5D F6FA
5E F6FA F6FA Monkey and the level 1 door.
5F F6FA
60 B4FA
61 B4FA
62 0BFB 0BFB Hammered all things down, cave opened.
63 CFFA
64 CFFA
65 11FB 11FB Mazy Mire rain stoped and level opened.
66 F6FA
67 F6FA
68 11FB
69 11FB
6A 11FB
6B 27F8
6C 11FB
6D 11FB
6E 11FB
6F 11FB
70 11FB
71 11FB
72 64FB 64FB
73 64FB
74 64FB
75 64FB
76 64FB
77 33F8
78 11FB
79 11FB
7A 64FB
7B 3FF8
7C 64FB
7D 64FB
7E 64FB
7F 64FB
Grass Colors and issues
- Code:
Grass Color
$0B/FEB2 A2 32 2A LDX #$2A32 <-- xBBB BBGG GGGR RRRR
You hate brown grass corners?
$02/C698 - Area 03/43
$02/C69C - Area 05/45
$02/C6A0 - Area 07/47
Change the C9 XX to C9 FF and it should disappear from the areas listed above.
Euclid- Since : 2012-06-21
Re: Zeldix Magic
Do you happen to have the table the credits use for the character values and colors? I know this was provided to me, but I'd like to have documentation on how the game stores the colors and tiles and the ROM location for it. I'd rather not have the character values embedded into the editor. Currently, I can read the developer credit pointers and select tiles from an image of tiles.
Mr.x- Fluteboy
- Since : 2014-04-10
Re: Zeldix Magic
A WIP screenshot for fun. The CHR table on the left is just for debugging, it will be gone once the character ROM data is located or is embedded into the program.
Mr.x- Fluteboy
- Since : 2014-04-10
Re: Zeldix Magic
Never looked into it and don't intend to. I decompiled the table via taking a zst save state and checked out the vram data there, it's probably loaded there just after the triforce room.Trovsky wrote:Do you happen to have the table the credits use for the character values and colors? I know this was provided to me, but I'd like to have documentation on how the game stores the colors and tiles and the ROM location for it. I'd rather not have the character values embedded into the editor. Currently, I can read the developer credit pointers and select tiles from an image of tiles.
Euclid- Since : 2012-06-21
Re: Zeldix Magic
Credit text is now viewable (the people credits, “The King Returns” text is not viewable). The text viewing gets messed up after 40 or so pointers. Perhaps there's multiple pointer tables for the credits?
Mr.x- Fluteboy
- Since : 2014-04-10
Re: Zeldix Magic
It's amazing how well this project is progressing
Is there anyway in which we can try beta builds of it to test it out and bring up feedback about it?
Is there anyway in which we can try beta builds of it to test it out and bring up feedback about it?
ShadowOne333- Witch
- Since : 2016-04-06
Re: Zeldix Magic
The source code needs to be compiled with a compiler. Similar to ASM. When you write the actual code with something that a human can understand - you need to then assemble it with Xkas for a machine to understand it. Basically you thus convert a list of comands into a sequence of bytes. In the case of ASM the bytes will be written into Rom, which will be run with an emulator, in the case of a compiler the bytes will form a standalone exe.Do these files need a front end or have to be compiled by something?
Puzzledude- Since : 2012-06-20
Re: Zeldix Magic
Decided importing was a lost cause, so you can now edit graphics in the editor. Code will be pushed whenever I feel like.
Mr.x- Fluteboy
- Since : 2014-04-10
Page 8 of 8 • 1, 2, 3, 4, 5, 6, 7, 8
Similar topics
» Zeldix Magic Dev Area
» Zeldix Magic Open Alpha
» So what's a "Zeldix" anyway?
» Cats Take Over Zeldix
» Zeldix Ranking
» Zeldix Magic Open Alpha
» So what's a "Zeldix" anyway?
» Cats Take Over Zeldix
» Zeldix Ranking
Zeldix :: Zelda III Hacking :: The Archives :: Zeldix Magic
Page 8 of 8
Permissions in this forum:
You cannot reply to topics in this forum