Home › Forums › Destiny of an Emperor › Paging Meteorstrike, Niahak, and Ludmeister
Tagged: Destiny of an Emperor, ludmeister, MeteorStrike, Niahak
- This topic has 34 replies, 7 voices, and was last updated 13 years, 8 months ago by
sonic.penguin.
-
AuthorPosts
-
July 17, 2012 at 10:37 pm #5853
MiDKnighT
ModeratorPaging Meteorstrike, Niahak, and Ludmeister…

Hey guys,
I could use a little help on the text box portion of this "Duel" tactic I'm working on. I'm looking for a function or something to call to load a text box that contains the text of my choice during battle (within a tactic). I know where to place the function call but I don't know how and which function to call yet. So far I've found this curious piece that gets called when most tactics are done to load text:
00:B9D0:A9 06 LDA #$06
00:B9D2:20 D5 C4 JSR $C4D5
00:B9D5:20 0D D1 JSR $D10D <– text gets loaded somewhere in this subroutine
Which goes further down to:
00:D1EA:20 BC C0 JSR $C0BC
But if I try to call any of those directly the game breaks. Any idears?
And if I wanna get really crazy how about my own little text bank (assuming I have space somewhere). Think that is possible?
July 18, 2012 at 12:23 am #44574MiDKnighT
ModeratorWow found this with google translate:
http://translate.google.com/translate?hl=en&sl=ja&u=http://wildplants.es.land.to/tenchi1_damege.html
Which indicates that the 2 values after JSR $D10D have the message ID. Interesting…now more to play with…
EDIT: Now I can get it to load the right text but can't get it to come back… Doh! Game goes all haywire after displaying the right message… Code I'm trying:
00:8500:A9 06 LDA #$06
00:8502:20 D5 C4 JSR $C4D5
00:8505:20 0D D1 JSR $D10D
Then: D2 01
July 18, 2012 at 1:26 am #44575MiDKnighT
ModeratorLooks like there's a different subroutine for doing text for tactics like Qi Shou, Wuo Jian, and a couple others:
00:BA4B:20 54 BC JSR $BC54
Where it is doing this:
$BC54:A5 4D LDA $004D = #$11 A:00 X:03 Y:11 P:nvUbdIZC
$BC56:38 SEC A:11 X:03 Y:11 P:nvUbdIzC
$BC57:E9 10 SBC #$10 A:11 X:03 Y:11 P:nvUbdIzC
$BC59:0A ASL A:01 X:03 Y:11 P:nvUbdIzC
$BC5A:65 7A ADC $007A = #$00 A:02 X:03 Y:11 P:nvUbdIzc
$BC5C:69 20 ADC #$20 A:02 X:03 Y:11 P:nvUbdIzc
$BC5E:85 14 STA $0014 = #$50 A:22 X:03 Y:11 P:nvUbdIzc
$BC60:A9 03 LDA #$03 A:22 X:03 Y:11 P:nvUbdIzc
$BC62:85 15 STA $0015 = #$00 A:03 X:03 Y:11 P:nvUbdIzc
$BC64:4C 24 D1 JMP $D124 A:03 X:03 Y:11 P:nvUbdIzc
Once again I got the text to display properly but the game again went haywire after showing the text.
July 18, 2012 at 1:31 am #44576Niahak
ModeratorI'm afraid I won't be any help here. Haven't re-learned assembly.
I guess the question here is, what's different between the conditions when Duel jumps to this subroutine versus when other tactics do it?
July 18, 2012 at 1:49 am #44577MiDKnighT
ModeratorQuote:I guess the question here is, what's different between the conditions when Duel jumps to this subroutine versus when other tactics do it?I've got the first part (getting the text to write)…just gotta figure out how to get back… Still tracing it…
July 18, 2012 at 3:30 pm #44578MiDKnighT
ModeratorAh Ha! I found a solution… When you call D124 as a subroutine it dumps you back on page 0E. Drop it off in the right place and it will come back. So I have it working where it write a text box then ends the turn. Would be nice if I could get it to do a text box then return back for another. Will play with it…
July 18, 2012 at 4:32 pm #44579MiDKnighT
ModeratorYay I've got it, just requires some creative jumping around. Now I can piggyback messages.
Ie…
Message 1, message 2, message 3, done.
Now I've got to looks for open spots in the text banks for custom messages…
July 18, 2012 at 4:42 pm #44580MiDKnighT
ModeratorNOW I could use some help Niahak. I need some blank text spots to edit with DoaEditor for "Duel" text near the end of bank 03 (around the "Protection against fire tactics has
increased" area or after). That is…unless you can shed some light on how to do this via a hex editor (I haven't tried to mess with text via hex much).
If I can get like 6-7 blank text spots I can do a lot of cool stuff with a new "Duel" tactic.
July 18, 2012 at 5:22 pm #44581MiDKnighT
ModeratorActually hold that thought. I'm going to attempt a new text bank…
EDIT: Doesn't look like it likes the new expanded ROM pages for that… Probably have to use the existing text bank(s). There's room at the end of the last one but it looks like Lud put his agility based attack stuff there. I can move it if need be.
July 18, 2012 at 6:25 pm #44582MiDKnighT
ModeratorI think I've got it. I'm making a mini-text bank at the bottom of text bank 3 using 4 lines of unused pointers.
No more help needed! Got it!
July 18, 2012 at 9:53 pm #44583Niahak
ModeratorCool!
You move pretty fast. I only got home from work a bit ago.
July 19, 2012 at 9:13 am #44584Zhuge Liang
ParticipantYou've gotten into the asm stuff not so long ago and you've grasped it fast. Pretty impressive.
DoaE gave birth to Huo Hu.
July 20, 2012 at 7:28 pm #44585sonic.penguin
ModeratorBe careful with those text banks. If for some reason there is in "overflow" at one point, it trashes a rom literally beyond repair. Once the new banks get entered in, it might be a good idea to present the address that can be edited manually, IE: Bonus text bank @ address 0xABC123 since DOAEditor might not want to include enhancements not all might use.
July 20, 2012 at 7:36 pm #44586MiDKnighT
ModeratorThe text is working great but occasionally something is crashing my test version… Not sure if it has something to do with my overflowing the text buffer or using too many zero pages (B0-BF) which can be dangerous… I'll try to figure it out before releasing the changes…
July 20, 2012 at 7:39 pm #44587sonic.penguin
ModeratorIf it freezes immediately upon someone performing an attack, you have an overflow problem. For all other flow related problems, you should probably see your doctor :cheers:
-
AuthorPosts
- You must be logged in to reply to this topic.

