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

Author Topic: FF1 MMC5 Disassembly Updates  (Read 47140 times)

Vanya

  • Hero Member
  • *****
  • Posts: 1440
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #200 on: April 14, 2019, 03:16:05 am »
Groovy! Glad I can be of use.

Disch

  • Hero Member
  • *****
  • Posts: 2710
  • NES Junkie
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #201 on: April 14, 2019, 01:03:16 pm »
Should I start a branch too for all the tinkering I'm doing?

New branches are free and you can have as many as you need.  Don't be afraid to branch!

In general, best practice with git is to always be working in a branch, and only bring things back into master once you're sure they're stable.  That way master is always in a good, stable state and if something gets really screwed up you can always easily fall back to the latest master.


EDIT:

So I'm looking into the audio thing because that broken tempo is REALLY noticeable to me.  I suspected it had something to do with the name/HP box at the bottom since that seems to be the biggest change.  While looking into it I stumbled upon this:

Code: [Select]
DrawCharacterStatus:
[snip]
    JMP DrawComplexString ;  Draw Complex String, then exit!
   
    ;(these don't seem to have any effect on being taken out)
    ;JSR BattleUpdatePPU                 ; reset scroll
    ;JSR BattleUpdateAudio               ; update audio for the frame we just waited for

*cough*that last line*cough*

Though even after putting that last line back in, there still is some pause when undrawing boxes.  I'll continue digging.
« Last Edit: April 14, 2019, 01:22:45 pm by Disch »

Jiggers

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #202 on: April 14, 2019, 04:30:00 pm »
I've been looking today, too. I'm actually just wrapping up re-doing that whole status drawing part, going back to how the original game did it... sorta. At least ditching DrawComplexString to do it. But DrawComplexString plays audio while drawing its frames, doesn't it? Maybe it doesn't do the battle SFX properly, but... Don't see why it would stutter the music... The "Ready?" message uses it, too. Mostly I notice the stutter when casting an all-enemies magic spell, somewhere between drawing the damage and undrawing the "Terminated" and damage boxes all the way.

Edit: And pushed. Pretty proud of this one! Also moved the characters back one tile.

Question: Is 999 the highest damage you can do, or can it go over that?
« Last Edit: April 14, 2019, 04:58:00 pm by Jiggers »
I know exactly what I'm doing. I just don't know what effect it's going to have.

Disch

  • Hero Member
  • *****
  • Posts: 2710
  • NES Junkie
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #203 on: April 14, 2019, 05:34:49 pm »
Pretty sure you can one hit KO Chaos in the original game, so damage goes up to at least 4 digits if not the full 65535.

Jiggers

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #204 on: April 14, 2019, 06:45:06 pm »
Gosh. Alright then, I should adjust the damage box another tile wider...

One more update pushed. I think Vanya will like this one.

Party Generation screen, though--not sure what to do about that. Did anyone like the characters on the black background? I changed it back so the three screens on the intro screen have the same style.

Edit: Anyone have experience with Tile Layer Pro? Trying to copy-paste some tiles but the paste just floats over the tileset and won't save over the tiles I want to erase. Update: Figured it out, but this program keeps crashing, and YY-CHR can't read the .dat files with enemy tiles... Update 2: Alright, figured out how not to crash the program. Now just... to undo what I did.



Not sure a battlefield can get any cooler than this though. Those ogres must be needing some therapy after all that shade thrown at them!

Final Update:



Re-arranged all the icons and some letters. $C1 is now not ever used as a space when there's $FF to use. Out of Battle ailments have a coloured background for the menu, the rest have a black background for battle. Consolidated a lot of the icons so they make more sense (mostly); item icons by themselves, ailment icons by themselves. Some battle icons are merged in with every enemy chr data, so they're not shown here. So there's 7 or 9ish free tiles to use for things later. Shop chr also has its own tiles that are used by the shops and the intro text! Phew.

Next I might focus on cleaning up shop messaging and making use of the message box in the equip and magic screens better.
« Last Edit: April 14, 2019, 09:28:05 pm by Jiggers »
I know exactly what I'm doing. I just don't know what effect it's going to have.

Vanya

  • Hero Member
  • *****
  • Posts: 1440
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #205 on: April 14, 2019, 10:34:25 pm »
Which Status icons represent what?
I got stunned yesterday and the icon looked like it was half way between a sparkle and poison.


One more update pushed. I think Vanya will like this one.

Yes. Yes I do.
« Last Edit: April 14, 2019, 10:44:28 pm by Vanya »

Jiggers

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #206 on: April 14, 2019, 10:44:56 pm »
Yeah, wasn't sure how to represent that... so:

Death: Broken heart
Stone: Shiny Egg (someone please make a better icon)
Poison: Skull'n'Crossbones
Dark: Sunglasses
Stun: That sparkly lookin' thing.
Asleep: Zz
Mute: ?? (also wasn't sure how to represent being too befuddled to cast magic...)

I'm pushing my changes to my own branch now, in case I screw something up. But somehow poison started displaying garbled text while undrawing the boxes again, and I don't know why.
I know exactly what I'm doing. I just don't know what effect it's going to have.

Mari42

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #207 on: April 14, 2019, 11:01:03 pm »
Yeah, wasn't sure how to represent that... so:

Death: Broken heart
Stone: Shiny Egg (someone please make a better icon)
Poison: Skull'n'Crossbones
Dark: Sunglasses
Stun: That sparkly lookin' thing.
Asleep: Zz
Mute: ?? (also wasn't sure how to represent being too befuddled to cast magic...)

I'm pushing my changes to my own branch now, in case I screw something up. But somehow poison started displaying garbled text while undrawing the boxes again, and I don't know why.

Mute is the dialogue with 3 period marks (dots I'm mean). If the enemies mutes spell the player, then the player can't cast magic. If player cast mute to the enemies, then enemies can't. :laugh:

And yes I have used the heal in battle, and that is why that causes the problem according to what you discovered.
« Last Edit: April 14, 2019, 11:10:21 pm by Mari42 »

Vanya

  • Hero Member
  • *****
  • Posts: 1440
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #208 on: April 14, 2019, 11:36:12 pm »
(someone please make a better icon)

I'm on that one.
Will probably evaluate them all for myself.

Jiggers

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #209 on: April 15, 2019, 05:54:54 pm »
I guess this might do for mute. I did try to make this icon before, but the problem was the three dots don't fit. But if the dialogue bubble is grey instead of white...? Otherwise it looks like an ocarina.



Having github problems now. I wanted to switch back to master to push a bug fix, it said I had to commit my changes to my own branch before doing that... wasn't ready for that, but I did it anyway, and then switching to master, it deleted all my changes in my local files. :(

How would I just upload the shop tile bug fix in my branch to the master?
I know exactly what I'm doing. I just don't know what effect it's going to have.

Disch

  • Hero Member
  • *****
  • Posts: 2710
  • NES Junkie
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #210 on: April 15, 2019, 06:00:49 pm »
Quote
it said I had to commit my changes to my own branch before doing that... wasn't ready for that, but I did it anyway, and then switching to master, it deleted all my changes in my local files.

How would I just upload the shop tile bug fix in my branch to the master?

1)  Yes, you generally should commit (or at least stash) all changes before you switch branches, otherwise things can get messy.
2)  If you committed, then nothing was deleted.  Your changes still exist on your branch and will "reappear" when you switch back to it.
3)  Merging a single commit or a series of commits from one branch to another is called "cherry picking".  It can be done but is not quite so straightforward depending on what client you're using.  Again, I don't have experience with github desktop but I can probably figure out how to do it with smartgit.


Are all the relevant changes to that fix in your 'Fixing shop tile bug' commit?  If so, I'll see if I can branch off of master, cherry pick that commit, then merge that into master without taking your whole branch.


EDIT:  Okay I've cherry picked that commit and pushed it to the 'shopfix' branch.  I'm not ENTIRELY sure I did it properly, though, as the character creation screen seems a bit messed up (actually it's messed up in master, too).  Still I'd give that branch a once over to make sure it has the fix, then merge it into master if it does.
« Last Edit: April 15, 2019, 06:14:52 pm by Disch »

Mari42

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #211 on: April 15, 2019, 06:15:03 pm »
I guess this might do for mute. I did try to make this icon before, but the problem was the three dots don't fit. But if the dialogue bubble is grey instead of white...? Otherwise it looks like an ocarina.



That looks perfect tho. However, the dialogue is white and the dots are black. That should make it better.

Jiggers

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #212 on: April 15, 2019, 07:26:49 pm »
Are all the relevant changes to that fix in your 'Fixing shop tile bug' commit?  If so, I'll see if I can branch off of master, cherry pick that commit, then merge that into master without taking your whole branch.

Yeah, its just changing one byte in Bank E and then removing the Japanese text in the shop tileset so there's at least one blank tile above $7A. Gar, didn't realize the naming screen was like that, though... All that takes to fix should be changing JSR ClearNT_FillBackground to just ClearNT, under DoNameInput. Not sure the FillBackground version is used anymore, then.

... and I feel so stupid for forgetting basic graphic design concepts...



So, Bank D ran out of space after I added some stuff to the music code again, so next project is going to be moving the puzzle game data to its own bank. And THEN I'll focus on cleaning up the shop messages and menu stuff...?
I know exactly what I'm doing. I just don't know what effect it's going to have.

Mari42

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #213 on: April 15, 2019, 07:27:58 pm »
Yeah, its just changing one byte in Bank E and then removing the Japanese text in the shop tileset so there's at least one blank tile above $7A. Gar, didn't realize the naming screen was like that, though... All that takes to fix should be changing JSR ClearNT_FillBackground to just ClearNT, under DoNameInput. Not sure the FillBackground version is used anymore, then.

... and I feel so stupid for forgetting basic graphic design concepts...



NOW, thats better! :thumbsup: You're not that stupid. It takes time to recognized the concept, so you'll know what graphic that makes it better for the game.
« Last Edit: April 15, 2019, 07:45:43 pm by Mari42 »

Jiggers

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #214 on: April 15, 2019, 09:30:26 pm »
The shield icon on the naming screen is fixed in my branch! Not sure if I did any more changes to bank E that aren't in the master, though...

I made a new bank, $11, for the puzzle and story code from Bank D. So now Bank D is purely music!

I added a light delay to all the looping songs, and a new music code to help. Instead of using the $F4 command to halve the volume, the delays use $F6 to turn the volume down even further.

For most of the songs, there's an eighth note delay on square 2 (usually the accompaniment) and a slightly longer delay (somewhere between a quarter note and an eighth note) for the melodies. For Temple of Fiends and Sea Shrine, the melody is delayed by a quarter note to make it more atmospheric. For Sky Castle, both use the between-length delay to make it sound more... off. The Airship's notes are too fast for a longer delay, so both tracks use the eighth note length. Shop music still sounds a bit off to me, but it always did. :P

If anyone downloads that to check it out, lemme know if the songs sound too awkward, or if it adds just a nice touch of depth?
I know exactly what I'm doing. I just don't know what effect it's going to have.

Vanya

  • Hero Member
  • *****
  • Posts: 1440
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #215 on: April 16, 2019, 02:05:10 am »
I’ll check it out when I get home.
Out doing laundry now.


EDIT:
Ok, I had a listen.
I gotta say I'm kinda torn on this. I love reverb in my NES music for sure, but I'm not sure that all the songs need it.

I think maybe that it should be reserved mostly for dungeon themes; "Sea Shrine", "Sky Castle", "Temple of Fiends", "Marsh Cave [New]", and "Earth Cave / Gurgu" all work well and sound 'right' with this effect on.
"Prelude" might sound great with reverb, and in "Slain" it really emphasizes the somberness.
"Castle" probably works, too; emphasizes the grandeur you might expect from royalty.


Quick question, where do I find the spell attributes?
It has always ticked me off that Red Mages can't learn Blink.


EDIT2:
The magic shops in your branch are not selling me spells even if I have enough $$$.

Also, you don't have the Skill command and the blank command at the end makes characters walk forward with repeated use.

And, the Battle Menu color option is great, but couldn't/shouldn't it affect all menus?

Suggestion, place the right arrow icon one more space to the right so it looks cleaner and more symmetrical.
« Last Edit: April 16, 2019, 05:22:08 am by Vanya »

Jiggers

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #216 on: April 16, 2019, 03:36:20 pm »
lut_MagicPermisPtr for who can learn what spells. I was going to convert them to binary so its easier to edit, but I can't seem to macro the hex-to-binary plugin I have...

Thanks for the feedback! It is a bit much on some songs... I need to go through the soundtrack with a proper viewer to see where the melody is coming from, and maybe only have a little echo on that, and not on the second channel, which is what can really muddy things up. Prelude and the new Marsh Cave song I worked on with the echo in mind, but the rest, its just guesswork at what might sound good.

Not sure about the menu colours though. Maybe it could be another option. To me, anything other than blue or black makes the sprites look weird.

I took the Skill option out for now because I'm gonna make it a patch and try to upload it when things are more stable, and putting skills in is going to be a weeks or months-long project.

Finished up re-working the shop dialogue, but I haven't pushed it.

Found a bunch of equip shop bugs... I'm really running out of steam lately though. So when I feel up to it I'm gonna try and prioritize REALLY re-writing the shop code. These logic branches are a headache. Right now everything mostly works, but I've got this Rune sword and when I sell it, then cancel at "2500 G okay?", everyone gets a ! icon beside them???
« Last Edit: April 16, 2019, 09:07:45 pm by Jiggers »
I know exactly what I'm doing. I just don't know what effect it's going to have.

Disch

  • Hero Member
  • *****
  • Posts: 2710
  • NES Junkie
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #217 on: April 16, 2019, 10:26:13 pm »
I'm really running out of steam lately though.

Don't burn yourself out.  If you need a break, take one.

Vanya

  • Hero Member
  • *****
  • Posts: 1440
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #218 on: April 17, 2019, 04:14:40 am »
Don't burn yourself out.  If you need a break, take one.

I concur.

Jiggers

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #219 on: April 17, 2019, 08:32:46 pm »
Not so much burn out, I guess... Just gross mood swings lately.  :P Heck, I do this to ignore my moods, so stopping might not be an option...

So here's a bunch of shop logic. This is the first time I've actually thought ahead about this and wrote it down--I tried to make a flowchart but that got too confusing for me.

Code: [Select]
Enter Shop
"Welcome!"
Skip Loop dialogue, goto Buy/Sell/Exit option

Loop:
"How can I help you?"

Option:
Buy  -> Goto Buy
Sell -> Goto Sell
Exit -- Exit
B -- Exit

Buy:
"What'll it be?"
(Draw item list.)

Option:
(Choose 1-5)
B -> Undraw Item box > goto Loop
A ->

Select Amount-Buy:
Item > Item is full > "You can't carry any more!" > A/B button wait > goto Buy
Magic > Item is full > "That spell is sold out" > A/B button wait > goto Buy
Equipment > Item Is full > "You can't carry any more!" > A/B button wait > goto Buy
Item is not full > "How many?"

Option:
Left  -> Decrease purchase amount (1 item minimum)
Right -> Increase purchase amount (Item: max out at 99 items or 65000 gold) (Magic: Max out at 4) (Equipment: Max out at 16)
B - > Goto Buy
A - >

Confirm Purchase:
"X gold, okay?"

Option:
B - > "Okay, anything else?" > goto Buy:Option
A - >

Item > Player does not have enough money > "You don't have enough money!" > A/B button wait > return to Select Amount-Buy (re-draw "how many?")
Item > Conditions met > Pay > "Thank you! Anything else?" > Goto Buy:Option (do not re-draw list)

Magic > Player does not have enough money > "You don't have enough money!" > A/B button wait > return to Select Amount-Buy (re-draw "how many?")
Magic > Conditions met > Pay > "Thank you! Anything else" > goto Buy:Option (do not re-draw list)

Equipment > Player does not have enough money > "You don't have enough money!" > A/B button wait > return to Select Amount-Buy (re-draw "how many?")
Equipment > Conditions met > If amount equals 1 then goto Equip Now? | If amount over 1 then goto Store Equipment

Equip Now?:
"Do you want to equip it now?"

Option:
B --> goto Select Amount-Buy
No --> goto Store Equipment
Yes -->

(Load Character name list.)

Option: Choose character
B --> goto Equip Now
A -->

Can chosen Character equip it?
No -> "You can't equip that!" -> goto Option: Choose character
Yes ->

Does character have something else equipped?
No -> Pay, update gold > "Thank you! Anything else?" > Goto Buy:Option (do not re-draw list)
Yes ->

Is the equipped item slot over 99 in quantity?
No -> Pay, update gold > "Thank you! Anything else?" > Goto Buy:Option (do not re-draw list)
Yes -> "I'll put it in your bags." > A/B button wait > goto Store Equipment

Store Equipment:
Pay, update gold > "Thank you! Anything else" > goto Buy:Option (do not re-draw list)


________________________

Sell:
"What do you have for me?"
(Load inventory list.)

Option:
(Choose 1-5 per page)
A -> Goto Select Amount:Sell
B -> Undraw Item box > goto Loop

Select Amount:Sell:
"How many?"

All shop types - limit price to 65000

Option:
Left  -> Decrease purchase amount (1 item minimum)
Right -> Increase purchase amount (max: total player has)
B - > Goto Sell:Option
A - >

Confirm Sell:
"X gold, okay?"

Option:
B - > "Okay, anything else?" > goto Sell:Option (do not re-draw list)
A - > "Hope I can move this stock..." > Update gold > A/B button wait > goto Sell (reload inventory list)

Anything look weird? I tried to note down everywhere a box would update, but some of it is kind of circular. Anywhere there's "quotes", that implies the shopkeeper's text box updates.

I thought having a limit of 16 weapon/armors would be fitting. You can go over the limit by opening treasure chests, but shopkeepers are just like "WTF do you need that many for, no!". So 16 allows each character to equip 4 of whatever it is. Because eventually I want to work in dual-wielding...

I've been thinking for a few months about making a kind of perk/skill/trait system like FF5's. You pick one or two at character creation, and then 1-2 more after bringing Bahamut the rat tail. It would be the usual stuff like...

Two-handed (weapon stronger without shield)
Dual-wield (equip weapon in shield slot)
Counter (chance to attack enemy that physically attacked you)

Actually, I had a list, I'll just post that up... This is more class-based though.

Code: [Select]
Fighter
Swordsman     - Swords have higher stats the less armour is equipped
Cleric Stance - Hammers and axes have higher stats, deal more damage to undead and were enemies; can't equip swords
Guardian      - Automatically block a portion of attacks to the lower rows while above 25% health


Thief
Mugger        - Steal money when landing critical hits,
Shadowwalker  - Slip into hiding at the start of every battle
Dual Wield    - Equip two weapons, but much lower luck/speed

BlackBelt
Revenge       - Chance to ounter enemy attacks
Barbaric      - Magic does less damage and status effects are less likely to happen, deals more damage to giant type enemies
Dragon Fist   - Deals more damage to dragon type enemies,

Red Mage
Duelist       - Increase attack at the cost of intelligence; Randomly lands another non-critical hit
Purple Mage   - Increase potency of black magic, decrease potency of white magic; learns less white magic spells
Pink Mage     - Increase potency of white magic, decrease potency of black magic; learns less black magic spells

White Mage
Bardic        - Status-effect spells have higher potency; Harm spells damage were and regenerative enemies too
Battle Mage   - Strength is boosted, can equip heavier equipment and axes, but has lower luck/speed
14th          - Cure spells have a regenerative effect on top of their original potency

Black Mage
Group Caster  - Single-target spells are now target-all with a slight potency decrease; Naturally target-all spells have a slight increase.
Insidious     - Status-effect spells have a higher chance to hit and increased potency, damage spells have reduced potency
Focused       - All spells are single-target, but with highly increased potency

I never finished coming up with ideas and balancing them as you can see...

Speaking of intelligence... anyone wanna try adding that in to the battle code?
I know exactly what I'm doing. I just don't know what effect it's going to have.