Black Magic and ALL the Source Code
Zeldix :: Zelda III Hacking :: Workshop :: Tools
Page 1 of 1
Black Magic and ALL the Source Code
Source code for newest version:
* assassin17 mirror: http://assassin17.brinkster.net/mathonnapkins/Black_Magic_2015_04_04.7z
* bwass.org/bucket: http://www.bwass.org/bucket/Black_Magic_2015_04_04.7z
Alpha source code
* bwass.org/bucket: http://bwass.org/bucket/Black_Magic_src_a09.zip
BM will always be needed, unless you want to die from some sort of sepsis.
* assassin17 mirror: http://assassin17.brinkster.net/mathonnapkins/Black_Magic_2015_04_04.7z
* bwass.org/bucket: http://www.bwass.org/bucket/Black_Magic_2015_04_04.7z
Alpha source code
* bwass.org/bucket: http://bwass.org/bucket/Black_Magic_src_a09.zip
BM will always be needed, unless you want to die from some sort of sepsis.
Re: Black Magic and ALL the Source Code
I still have the partial source code but am not sure whether this is what people look after.
Other than that I believe he got it from MoN, so the code isn't lost anyway.
Other than that I believe he got it from MoN, so the code isn't lost anyway.
- Attachments
Conn- Since : 2013-06-30
Re: Black Magic and ALL the Source Code
looking at that code gives me the headaches, i can see why seph3 never wanted to touch it again.
Euclid- Since : 2012-06-21
Re: Black Magic and ALL the Source Code
Even though it is badly coded, can you read some parts of it Euclid?
Founder- Since : 2012-06-19
Re: Black Magic and ALL the Source Code
Yes... (un)fortunately I have no issues reading it.
For example, that (in)famous monologue killing ganon AI code around 0xE8000 is caused by this
Line 5266 or thereabouts
To the untrained eye, the code above don't seem to have any issues, until you realise the check only check if the current text string overflows to 0xe8000. So what if it lands exactly on 0xe7FFF?
if it lands on 0xe7FFF, the next text block would cause it to go over 0xe8000, and then HM, by its buggyness, will write a 0x80 (indicator that the text in this bank has ended) @ 0xe8000, overwriting the next bank's ASM which is already there. What's worse is that if that happens to be the last block of text, HM will slam a FF in that spot instead. FF is usually very bad for ASM as it's some weird SBC instruction which normally guarantees rom crash.
If I were to fix HM I would put the check to 0xe7FF8 rather than 0xe8000, which would solve all the HM mysteriously writing over stuff in the next bank from the monologue editor.
For example, that (in)famous monologue killing ganon AI code around 0xE8000 is caused by this
Line 5266 or thereabouts
- Code:
s+=bd; <--- add length to the current begin write location (think s is the pointer start for this block of text, bd is the length of the current text block calculated in extremely badly named variables above)
if(s<0xe0000 && s>0x77400) { <--- check if s is out of bounds and ran out of space in bank 0E (if it's above 0xe0000 it's writing into first bank still)
doc->t_modf=1;
MessageBox(framewnd,"Not enough space for monologue.","Bad error happened",MB_OK);
return;
}
if(s>0xe8000) { <--- so basically when you hit the end of bank 1E if the length of current text will push it beyond this offset
rom[s-bd]=0x80; <--- write 80, indicator that the text in this bank has ended.
s=0x75f40+bd; <-- set the current pointer to location 0E, so this current text block begins there.
}
memcpy(rom+s-bd,b2,bd); <-- copy the text from ram into the target location
rom[s++]=0x7f; <--- pad the text with 7F (End of Line char)
}
rom[s]=0xff; <-- once it's all done pad the text with 0xFF (End of Data char)
To the untrained eye, the code above don't seem to have any issues, until you realise the check only check if the current text string overflows to 0xe8000. So what if it lands exactly on 0xe7FFF?
if it lands on 0xe7FFF, the next text block would cause it to go over 0xe8000, and then HM, by its buggyness, will write a 0x80 (indicator that the text in this bank has ended) @ 0xe8000, overwriting the next bank's ASM which is already there. What's worse is that if that happens to be the last block of text, HM will slam a FF in that spot instead. FF is usually very bad for ASM as it's some weird SBC instruction which normally guarantees rom crash.
If I were to fix HM I would put the check to 0xe7FF8 rather than 0xe8000, which would solve all the HM mysteriously writing over stuff in the next bank from the monologue editor.
Euclid- Since : 2012-06-21
Similar topics
» MSU-1 on the Starfox source code level
» Videoplayer by Ikari ASM source code
» Black magic editir?
» Zelda 3 Magic Regen ASM code. (Solved)
» Zelda alttp source leaked
» Videoplayer by Ikari ASM source code
» Black magic editir?
» Zelda 3 Magic Regen ASM code. (Solved)
» Zelda alttp source leaked
Zeldix :: Zelda III Hacking :: Workshop :: Tools
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum