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

Author Topic: Final Fantasy II: Refurbished  (Read 60851 times)

Vanya

  • Hero Member
  • *****
  • Posts: 1493
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #140 on: January 16, 2016, 08:11:09 am »
So I've looked into it further and it's not gonna be a simple fix.

Here's the relevant parts of the code that controls the in-battle cursor position:
031C84 LDA $0053    - loads the byte at $0053 into the accumulator
031C86 ASL       - Arithmetic Shift Left
031C87 STA $0044    - stores the accumulator at $0044
031C89 LDY $005C = #$04 - loads into the Y register the value at $005C, which is the menu loop amount
031C8B DEY      - Decrement Y

Loop:
031C8C CLC       - Clear Carry
031C8D ADC $0044    - Adds the byte at $0044 to the accumulator (so like, 04-->08)
031C8F DEY       - Decrement Y
031C90 BNE Loop      - loop if it doesn't match
031C92 STA $0044   - loads the final position into $0044

Before this is executed, a "width" value is placed into $005C in the RAM. There's a different width value for the in-battle magic menu and the in-battle items menu. The problem is, they both share the same set of code when determining the cursor position. To remind you guys, this is what the items menu looks like:

When you move the cursor to the items slot in the in-battle items menu, it moves it to the "fourth" horizontal position coordinate (which there's no table for, as its hardcoded and done by calculations with RAM values that all stem with a single "width" byte), which shares its coordinates with the magic menu.

In other words, altering the code for the in-battle magic menu will also mess up the in-battle items menu. The only solution I see is if the two menus were to be separated, where the items menu uses the vanilla code and the magic menu uses new ASM code specifically made for it, but that's easier said than done. I think at this point it's best to just leave it alone and keep the four-character magic names :(

If anyone's willing to experiment though, make these byte changes to re-arrange the magic listing in-battle to how I have it in the screenshot below:
31EB7 - change to 0x01
31EDE - change to 0x0A
31EE9 - change to 0x00
31F84 - change to 0x29

This will position the text to allow for longer spell names, but it won't update the cursor positions :/ The reason why I never had this trouble for the out-of-battle menus is because the cursor positions are defined directly in the text strings. But for the in-battle menus the positions are controlled separately :(

I came to the same conclusion. If there is enough free space, it should be feasible to get this done.

justin3009

  • Hero Member
  • *****
  • Posts: 1615
  • Welp
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #141 on: January 16, 2016, 08:19:20 am »
I'm assuming there's a byte in RAM that'll dictate WHICH menu you have open.  In that case, you could probably write a quick check to see which menu then load separate code that way.  Nothing too difficult but it gets the job done... as long as you have the extra room anyway.
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

Chaos Rush

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #142 on: January 16, 2016, 12:46:59 pm »
For now, this is how I'm treating the spell names:

Use squish tiles but allow myself to use 5 characters instead of 4, but do it in such a way so that there still appears to be space between one spell name and the next (by only allowing myself to use half of the 5th character tile). Unfortunately I couldn't squish every name in (such as Teleport) due to limited font graphic space, and some spells were given priority over others (such as Blizzard, Thunder, and Ultima).

===============================

Anyways it's time to release this. This is not a gameplay alteration patch, this patch acts purely as a translation/localization of the original game. The gameplay alteration patch will be a separate patch that will be released in the coming weeks. But first, I would like to get the text-only patch out there. I am not yet submitting this up on the RHDN database, because there's bound to be a few typos or text wrapping goofs that I've made, so I'm going to release this on the RHDN forums first so people can try it out (you should probably use cheats because the vanilla game as it is is grindy), and if you spot any typos or text wrapping glitches, report them here and I'll have it fixed by the next release. Also for those of you that wanted the thinner font, that will be a separate patch included in the next release, but not this current release.

Final Fantasy II Retranslation V1.0: http://www.mediafire.com/download/mk2la4kaleo851j/FF2+Retranslation+V1.0.zip

Please report any typos or text wrapping goofs you find here.
Sole developer of STARLIGHT LEGACY intended to be released on Steam.
Discord: https://discord.gg/fTS5Q78

Rodimus Primal

  • Hero Member
  • *****
  • Posts: 1043
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #143 on: January 16, 2016, 01:04:01 pm »
 I'm going to give this a run through. I'll let you know if I find any bugs.

January 16, 2016, 02:34:48 pm - (Auto Merged - Double Posts are not allowed before 7 days.)

Okay for starters. Gordon says skulk instead of sulk. You can't learn the term Airship from Cid like you should. Everyone SAYS Airship but you don't learn it. I usually have it learned before going to Salamand.

I've also noticed a slight bug in where the monsters are. I stepped out of Altair to fight Sasquatch monsters and stepped out of Salamand to fight Wererats.

Golbin Guard looks strange as GblinGard. Perhaps Gob.Guard might work better.

I hope you can work out the magic spell names.
« Last Edit: January 16, 2016, 02:35:11 pm by Rodimus Primal »

Chaos Rush

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #144 on: January 16, 2016, 03:21:01 pm »
I'm going to give this a run through. I'll let you know if I find any bugs.

January 16, 2016, 02:34:48 pm - (Auto Merged - Double Posts are not allowed before 7 days.)

Okay for starters. Gordon says skulk instead of sulk. You can't learn the term Airship from Cid like you should. Everyone SAYS Airship but you don't learn it. I usually have it learned before going to Salamand.

I've also noticed a slight bug in where the monsters are. I stepped out of Altair to fight Sasquatch monsters and stepped out of Salamand to fight Wererats.

Golbin Guard looks strange as GblinGard. Perhaps Gob.Guard might work better.

I hope you can work out the magic spell names.
Are you able to learn Airship from someone else (don't you learn it from Hilda)? That's weird, because I remember specifically putting in Cid's learnable key term, but I probably accidentally removed it when reformatting some of the text. And aren't those enemy placements normal? If not, I'll fix it just by copying all non-text and non-menu bytes from the vanilla ROM to insure that any accidental byte changes are un-done. (I'm at work right now so I can't fix these right away)
Sole developer of STARLIGHT LEGACY intended to be released on Steam.
Discord: https://discord.gg/fTS5Q78

Heaven Piercing Man

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #145 on: January 16, 2016, 03:45:14 pm »
You're right, my bad.

Rodimus Primal

  • Hero Member
  • *****
  • Posts: 1043
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #146 on: January 16, 2016, 05:56:08 pm »
I can definately say they aren't supposed to be in that area as far as monsters are concerned.

Also found when a weapon leveled up it said Luntun up instead of Level.

Chaos Rush

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #147 on: January 16, 2016, 07:52:30 pm »
I can definately say they aren't supposed to be in that area as far as monsters are concerned.

Also found when a weapon leveled up it said Luntun up instead of Level.
I have to ask, did you patch to a clean Japanese ROM or to the Demiforce ROM by accident? The patch was made to be used with the Japanese ROM.

EDIT: okay, so I'm finally home and I'm able to check now. Yup, I goofed. I'm not having the incorrect enemies problem on my end though, but the typos you pointed out are there (the "Lvntup!" was most likely caused by me after I altered the DTE table). I'm just gonna recompile all of the text onto a fresh ROM.

EDIT: Done! Here's release V1.1: http://www.mediafire.com/download/tr3b660d96f3u0q/FF2+Retranslation+V1.1.zip

Changelog:
- The term "Airship" can now be learned from Cid
- Typo in Gordon's dialogue fixed
- "GblinGard" enemy name changed to "Gob.Gard"
- "Lvntup!" typo fixed to, "Lv up!"
- B-Button Dash removed because the way it was implemented was possibly causing incorrect enemies to appear in certain areas

I ported over all of the text and expanded the menus again onto a fresh ROM in order to ensure that there's no glitches (or at least none that weren't already in the Demiforce v1.03 release). I think the B-Button implementation is what was causing the wrong enemies to appear. SpiderDave told me how, and it involved a new subroutine inserted at 0x3c5e0, which he thought was free space (and which I didn't even bother to investigate), so I've left out the B-Button dash. I'm gonna try to have it back for the next release but I'm going to take a closer look at his routine first.
« Last Edit: January 17, 2016, 12:03:27 am by Chaos Rush »
Sole developer of STARLIGHT LEGACY intended to be released on Steam.
Discord: https://discord.gg/fTS5Q78

Rodimus Primal

  • Hero Member
  • *****
  • Posts: 1043
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #148 on: January 17, 2016, 02:36:37 pm »
With the B Button Dash removed it does seem to fix the areas of monsters, however the Goblin Guard formations now do not show up at all. I think GobGuard works better without the period.

Also Minwu joins my party is now Minh in battle and in menus.

AWJ

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #149 on: January 17, 2016, 03:05:13 pm »
I ported over all of the text and expanded the menus again onto a fresh ROM in order to ensure that there's no glitches (or at least none that weren't already in the Demiforce v1.03 release). I think the B-Button implementation is what was causing the wrong enemies to appear. SpiderDave told me how, and it involved a new subroutine inserted at 0x3c5e0, which he thought was free space (and which I didn't even bother to investigate), so I've left out the B-Button dash. I'm gonna try to have it back for the next release but I'm going to take a closer look at his routine first.

3C5E0 is definitely not free space; it's in the middle of a lookup table used by the random encounter code:

Code: [Select]
0F/C5C8: 00 00 00 00 00 00 00 00
0F/C5D0: 00 00 00 00 01 01 01 01
0F/C5D8: 01 01 01 01 01 01 01 01
0F/C5E0: 02 02 02 02 02 02 02 02
0F/C5E8: 02 02 02 02 03 03 03 03
0F/C5F0: 03 03 03 03 03 03 03 03
0F/C5F8: 04 04 04 04 04 04 05 05
0F/C600: 05 05 05 05 06 06 06 07

The table begins at 0x3CFD8 in a .nes format ROM due to the 16-byte header. If you look at the Disch disassembly of FF1, there's an identical table in it and you can see how it's used.

 There are a couple of chunks of zero-filled unused space in the fixed bank of the Japanese ROM, but I wouldn't be surprised if you're already using them for text.
« Last Edit: January 17, 2016, 03:11:56 pm by AWJ »

Chaos Rush

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #150 on: January 17, 2016, 03:59:18 pm »
With the B Button Dash removed it does seem to fix the areas of monsters, however the Goblin Guard formations now do not show up at all. I think GobGuard works better without the period.

Also Minwu joins my party is now Minh in battle and in menus.
Then that probably means the Goblin Guard wasn't supposed to show up in that place to begin with. But to be sure, I'll just copy+paste the encounter table from the Japanese ROM just in case the Demiforce ROM had modified enemy encounters.

As for the character names, I forgot to change them when I redid everything on a fresh ROM. So I'll fix it again tonight.

January 17, 2016, 04:01:43 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
3C5E0 is definitely not free space; it's in the middle of a lookup table used by the random encounter code:

Code: [Select]
0F/C5C8: 00 00 00 00 00 00 00 00
0F/C5D0: 00 00 00 00 01 01 01 01
0F/C5D8: 01 01 01 01 01 01 01 01
0F/C5E0: 02 02 02 02 02 02 02 02
0F/C5E8: 02 02 02 02 03 03 03 03
0F/C5F0: 03 03 03 03 03 03 03 03
0F/C5F8: 04 04 04 04 04 04 05 05
0F/C600: 05 05 05 05 06 06 06 07

The table begins at 0x3CFD8 in a .nes format ROM due to the 16-byte header. If you look at the Disch disassembly of FF1, there's an identical table in it and you can see how it's used.

 There are a couple of chunks of zero-filled unused space in the fixed bank of the Japanese ROM, but I wouldn't be surprised if you're already using them for text.
Well, that explains the wrong enemies then. I'm actually using the same text space that was used in the Demiforce ROM (but not the same distribution per text bank though), but it's nice to know there's some usable areas to keep the B-Button dash.

January 17, 2016, 11:33:24 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Here's release v1.2. It fixes the character names. http://www.mediafire.com/download/urhc4krw9u5bwcj/FF2+Retranslation+v1.2.zip

Also note that in order for the correct names to show up, you'll have to start a new file if you're using the same save file as the v1.1 patch, sorry.

Changelog:
- Character names fixed (they were wrong in v1.1 because I had copied over
 all of the text onto a fresh ROM as a precautionary measure to prevent
 any glitches, but I forgot to re-update the character names)
- "Gob.Gard" enemy name changed to "G.Guard"
- "Stars" attack changed to "Meteor" (it was originally named "Stars" because
 the corresponding attack in modern versions of FFII is called, "Starfall",
 but since there's a five-character limit for attacks I named it "Stars".
 But then I realized that's just lame-sounding so I changed it to,
 "Meteor", which could fit in five characters thanks to squish tiles)

I apologize for such a messy first release, hopefully with v1.2 all major issues are sorted out and now all that's left is typos. For v1.3 I plan on bringing back the B-Button dash and hopefully that will be the version that I'm fine with submitting to the RHDN database. I do still have the expanded magic menu on my mind too, but that will take a bit longer to work out.

EDIT:
Also, I've released my new text editor now. If anyone's interested in making a translation of FFII into their language, check this out: http://www.romhacking.net/forum/index.php/topic,21105.msg295472.html#new
« Last Edit: January 19, 2016, 03:48:14 am by Chaos Rush »
Sole developer of STARLIGHT LEGACY intended to be released on Steam.
Discord: https://discord.gg/fTS5Q78

Panzer88

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 5009
  • GENO means ♥♪!?
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #151 on: January 19, 2016, 06:08:04 pm »
Thanks Chaos Rush!
Donate now until 24 April, from the makers of shotwell Geary: a new open-source email client

Spooniest

  • Hero Member
  • *****
  • Posts: 3143
  • Ain't got no berf cer-fi-ti-cate on me now
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #152 on: January 19, 2016, 07:46:19 pm »
3C5E0 is definitely not free space; it's in the middle of a lookup table used by the random encounter code:

Code: [Select]
0F/C5C8: 00 00 00 00 00 00 00 00
0F/C5D0: 00 00 00 00 01 01 01 01
0F/C5D8: 01 01 01 01 01 01 01 01
0F/C5E0: 02 02 02 02 02 02 02 02
0F/C5E8: 02 02 02 02 03 03 03 03
0F/C5F0: 03 03 03 03 03 03 03 03
0F/C5F8: 04 04 04 04 04 04 05 05
0F/C600: 05 05 05 05 06 06 06 07

The table begins at 0x3CFD8 in a .nes format ROM due to the 16-byte header. If you look at the Disch disassembly of FF1, there's an identical table in it and you can see how it's used.

 There are a couple of chunks of zero-filled unused space in the fixed bank of the Japanese ROM, but I wouldn't be surprised if you're already using them for text.

Sorry for reposting this but I wanted to say that I'm just tickled that I actually know what I'm looking at right now (for once).

This project looks interesting, and I'll give it a shot on one condition: did you change the story at all? As long as you did not, I would like to play it. EDIT: You did not. Good on ya!
I never wanted to work in a pet shop, you know. I wanted to be...a lumberjack.

Chaos Rush

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #153 on: January 19, 2016, 09:20:42 pm »
Sorry for reposting this but I wanted to say that I'm just tickled that I actually know what I'm looking at right now (for once).

This project looks interesting, and I'll give it a shot on one condition: did you change the story at all? As long as you did not, I would like to play it. EDIT: You did not. Good on ya!
lol why would I do that? Are other "translations" notorious for doing that? Now, I know that translation projects don't usually have official titles, and perhaps it was misleading to call this "Final Fantasy II: Refurbished" which makes it sound like a hack as opposed to a simple retranslation, but for all intents and purposes this is simply a retranslation of Final Fantasy II for the NES. (And no, I did not retranslate the entire script from scratch, what I did was I looked at the GBA and PS1 scripts and came up with a new NES-sized script; to further clarify, the GBA script was translated from the Japanese GBA version which had a bunch of added lines that weren't in the original Famicom version, while the Japanese PS1 script was identical to the Famicom version, so when the content of the lines were clearly different I looked at the PS1 translation, and in cases where I didn't trust the PS1 translation I retranslated the line myself.) I'm not gonna go and say, "this is the 100% accurate translation that you've all been waiting for" like the FFIV J2e translation did, but I will say that this script reads far better than the Demiforce version and the Prototype version (and more accurate than both), and it's the best English version of 8-bit FFII out there. (In addition to that, it has the modern canonical character names)

Now despite all that of pointing out that this is merely a retranslation and not a hack, there IS another patch I'm working on that will make the game easier and less ridiculous (and maybe fix some bugs), but it will be a separate patch from the translation :)
Sole developer of STARLIGHT LEGACY intended to be released on Steam.
Discord: https://discord.gg/fTS5Q78

Spooniest

  • Hero Member
  • *****
  • Posts: 3143
  • Ain't got no berf cer-fi-ti-cate on me now
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #154 on: January 19, 2016, 09:35:43 pm »
Will the two patches be compatible with each other?
I never wanted to work in a pet shop, you know. I wanted to be...a lumberjack.

Chaos Rush

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #155 on: January 19, 2016, 09:40:19 pm »
Will the two patches be compatible with each other?
Yes, the gameplay only patch will affect gameplay only (it'll even be compatible with the Japanese version)
Sole developer of STARLIGHT LEGACY intended to be released on Steam.
Discord: https://discord.gg/fTS5Q78

Rodimus Primal

  • Hero Member
  • *****
  • Posts: 1043
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #156 on: January 20, 2016, 12:28:44 am »
I hope you get that B Button dash worked out. You might have noticed I got a little side tracked in testing out 1.2 further but I will get back to it.

Chaos Rush

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #157 on: January 20, 2016, 01:40:33 am »
I hope you get that B Button dash worked out. You might have noticed I got a little side tracked in testing out 1.2 further but I will get back to it.
No problem. It's going to be a little while before I submit it to the RHDN database anyway, since I want to see if I can get the expanded magic menu working in-battle. One issue though is that the battle menu code is located in PRG bank 0xC (0x30010 - 0x3400F). There doesn't appear to be a decent sized free space chunk in there large enough to hold a branching menu routine actually nvm, I think 0x31628 should do... Hopefully I can get it worked out by this weekend, but no guarantees.

I did get the B-Button dash working again, this time I inserted the routine at x3F760 (which I'm pretty sure is free space). Not sure if it's worth doing another release just to add it back in though, but nonetheless it will be back for the next release.

EDIT: Guys, I don't think the expanded magic menu is going to be possible, the only reason being lack of free space for the new routinenvm, realized that I could use bank 0xF since it's always swapped in. I've begun writing a routine and so far it automatically adjusts the X-coordinates, but there's not enough space in the allotted region (at 0x31628) to finish my routine to adjust the Y-coordinates.

For anyone curious, here's my routine so far:
Put 20 18 96 at 0x31CA9

At at 0x31628:
//These simply "restore" the original bytes, required so that the non-magic menus don't break
8D 47 02    //STA $0247
85 56   //STA $56
A6 5D      //LDX $005D
E0 04      //CPX $04
D0 20      //BNE $9649 (0c:9649/31659) //If we're not in the magic menu, then branch back to the old routine

//Check horizontal position
A5 53      //LDA $0053
C9 00//POS_1   //CMP #$00
F0 09      //BEQ to 0 horizontal position adjust
C9 01//POS_2   //CMP #$01
F0 0e      //BEQ to 1 horizontal position adjust

//IF THE X POSITION IS 3 OR 4, THEN YOU SHOULD REACH THIS CODE:
E9 02      //SBC #$02 //subtract 2 to get correct horizontal index
4C 25 96      //Jump to Pos 1

//0 HORIZONTAL POSITION ADJUST
69 07
8D 47 02
8D 4F 02
60

//1 HORIZONTAL POSITION ADJUST
69 56
8D 47 02
8D 4F 02
60      //RTS
//PLAN FOR Y-COORDINATE UPDATE:
-Check selected magic index
-if its "1st" or "2nd" horizontally, move vertically one tile up
=======================================================

...which leaves us with only 10 bytes left in the only free space region found in bank 0xC. The only way I see this getting resolved is through bank swapping, which I'm not sure how that works. Would it be possible to swap a bank mid-routine and swap it back after you do whatever you need to do? Turns out bank 0xF has some decent free space, and since it's always swapped in it's readily usable. I have a semi-working new magic menu routine, but it's not perfect yet. I got the cursor at the correct positions, but cycling through is kind of a weird order (due to reducing 4 columns to 2), but that shouldn't be too hard to fix.
« Last Edit: January 23, 2016, 04:07:02 pm by Chaos Rush »
Sole developer of STARLIGHT LEGACY intended to be released on Steam.
Discord: https://discord.gg/fTS5Q78

Rodimus Primal

  • Hero Member
  • *****
  • Posts: 1043
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #158 on: January 23, 2016, 02:32:12 pm »
Awesome news so far. I'm going to have to make some time to plow through the game this weekend.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6918
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Final Fantasy II: Refurbished
« Reply #159 on: January 23, 2016, 03:41:48 pm »
At at 0x31628:
//These simply "restore" the original bytes, required so that the non-magic menus don't break
8D 47 02    //STA $0247
85 56   //STA $56
A6 5D      //LDX $005D
E0 04      //CPX $04
D0 20      //BNE $9649 (0c:9649/31659) //If we're not in the magic menu, then branch back to the old routine

//Check horizontal position
A5 53      //LDA $0053
C9 00//POS_1   //CMP #$00
F0 09      //BEQ to 0 horizontal position adjust
C9 01//POS_2   //CMP #$01
F0 0e      //BEQ to 1 horizontal position adjust

//IF THE X POSITION IS 3 OR 4, THEN YOU SHOULD REACH THIS CODE:
E9 02      //SBC #$02 //subtract 2 to get correct horizontal index
4C 25 96      //Jump to Pos 1

//0 HORIZONTAL POSITION ADJUST
69 07
8D 47 02
8D 4F 02
60

//1 HORIZONTAL POSITION ADJUST
69 56
8D 47 02
8D 4F 02
60      //RTS
A couple notes about your ASM:
After an LDA instruction, CMP #$00 is unnecessary. It will already have the flag set if it's 0.
Although, when you use a SBC, you need a SEC instruction before it or it will be off by 1 (though maybe if you were short on space you could adjust the SBC instruction to compensate? I'm not certain, I've just done it the "accurate" way.) (also should be using CLC before ADC)
Those "Horizontal position adjust routines" end on several bytes of identical code. You could also optimize a few of those for space.
Just include one instance of 8D 47 02 8D 4F 02 60, and then from the other one, branch there. (with a JMP. Or... although the NES CPU is missing the BRA (branch always) instruction, you can fake it by using BEQ/BNE if you know the result will always/never be 0. Like that ADC #$07, if you know that is always going to result in a non-zero value, you can put a BNE after and will effectively work as a BRA)
"My watch says 30 chickens" Google, 2018