1
Programming / Dte question?
« on: July 01, 2013, 04:47:53 am »
Why is a LDA($insert value here), y or x, also known as the A1 or B1 statement needed? Couldn't I just use something else if those statements happen to not be available in the games text routine? Like another type of LDA statement?
Forgive me, if this sounds like a stupid statement but I have been trying to locate a said A1/B1 statement that would work in my routine with no success, so I'd just like a breakdown as to why it's or an alternative solution some of you have used to overcome this problem.
I am working on Kawa no Nushi Tsuri for the Famicom and here is the area in the text routine I am referencing. That last line is the one I am using to perform my jump.
Forgive me, if this sounds like a stupid statement but I have been trying to locate a said A1/B1 statement that would work in my routine with no success, so I'd just like a breakdown as to why it's or an alternative solution some of you have used to overcome this problem.
I am working on Kawa no Nushi Tsuri for the Famicom and here is the area in the text routine I am referencing. That last line is the one I am using to perform my jump.
Code: [Select]
01E569:AD BA 07 LDA $07BA = #$00 ;index into window buffer
01E56C:AA TAX ;X = index to dakuten line of current printed character?
01E56D:18 CLC
01E56E:69 12 ADC #$12
01E570:A8 TAY ;Y = X+0x12, because each line is 18 characters wide, so the main character will be 18 bytes after the corresponding dakuten
01E571:20 FB DB JSR $DBFB
01E574:A5 91 LDA $0091 = #$23
01E576:8D 06 20 STA $2006 = #$E8
01E579:A5 92 LDA $0092 = #$27
01E57B:8D 06 20 STA $2006 = #$E8
01E57E:BD 50 06 LDA $0650,X @ $065F = #$FE ;here it's reading the dakuten line
01E581:8D 07 20 STA $2007 = #$98 ;and here's it writing one tile to VRAM
01E584:B9 50 06 LDA $0650,Y @ $06B0 = #$34 ;here its reading the main text line. And the next will write that tile
[\code]
The text is loaded in the ram at 650 to 6DF and I been pouring through the searching for B1/A1 statements or the ram numbers in the range I am looking for. Can any of you tell me what I should be on the lookout for when I do that?