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

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

Vanya

  • Hero Member
  • *****
  • Posts: 1789
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #660 on: July 31, 2020, 11:03:20 am »
It's a beta screen shot of Seiken Densetsu: The Legend of Excalibur.
That is the game that eventually became Final Fantasy and who's title was repurposed for the Mana series.
I was just saying that the map screen in our project reminded me of it. :3

Byte Stuff:

Blue Magic and expanded Enemy Skills? Hell yeah!

More skills? Absolutely yes! Here's an idea. If we implement the elemental bonus dungeons, the skills from FF3, FF4, FF5, and FF6 could be found in each of those. And in the main game we can stick to the more universal ones and any that might be inspired by FF2.

More flags? Those are always useful. We would definitely need more for the second overworld and extra side-quests or whatever.

Bestiary!? F**** YEAH!!! (Don't think I need to elaborate further there.)

Keyword system? I'm kinda "meh" on this one. I don't think it's bad in and of itself, I just see it as being something that should stay unique to FF2. Plus if you don't want to do the interface then we would have to use them a different way. Either as a sort of equipment or use key item interface... Actually, if you really want to try adding them in, they could be used like key items. Specifically they could work like the Ruby does with Titan. Hell, you could even convert the "magic words" for the map into a keyword item and free up the button combo for something else.

Speaking of adding stuff to the game...

Here is an idea I had years ago. It's from my design document for a full remake of Final Fantasy.
I thought it would be cool to be able to learn things from more of the major supporting characters.
Specifically, I envisioned sub-classes, but the skill system is perfect for this as well.
So for instance, you could learn the Brew skill from Matoya, the Mug skill from Captain Bikke, and the Dance skill from "Arylon".
« Last Edit: July 31, 2020, 11:38:02 am by Vanya »

Jiggers

  • Sr. Member
  • ****
  • Posts: 415
    • View Profile
    • My Ko-Fi Page
Re: FF1 MMC5 Disassembly Updates
« Reply #661 on: July 31, 2020, 08:37:49 pm »
Re-centered all the maps, and tweaked a few... not so many bridges in Leifen anymore (so you can't crawl under them, that's silly...) Onrac has been re-done... 4 times, because its a silly map and I keep being able to see the other side when I thought I shouldn't.

AAAAND I have to re-do all the bank planning again because of the way maps are loaded. It turns out when you shift the 2 high bits into the 2 low bits then ORA with the original map bank, its helpful that the original map bank doesn't have, y'know, all 3 low bits set. Fixing it is not hard, but its another half hour of going over every file I need to swap and making sure everything's set up, and I'm tired now...

Looks like for the inventory compression, I just need to write a few short routines to manage the data, and have them be flexible enough to work for whatever's needed!



This map thing is more difficult than just changing the bank numbers I think.

FF1 did something cleverer by not having actual pointers to each map. The way we have it now:

Bank 0: 80, 90, A0, B0
Bank 1: C0, D0, E0, F0
Bank 2: 00, 10, 20, 30
Bank 3: 40, 50, 60, 70
Bank 4: 80, 90, A0, B0

The high byte of each pointer wraps--we could only use 1 extra bank of maps if we kept to this system... but the original game had it, I think, so that bank 0 was NOT using 80--Bank 1 was. So that it could then use the high bits shifted into low bits as the bank number...

80 1000
90 1001
A0 1010
B0 1011 <- all these become 0000,0010 = 2
C0 1100
D0 1101
E0 1110
F0 1111 <- all these become 0000,0011 = 3

Clever, but requires editing the ROM after its compiled to edit the pointers... And still has the wrapping problem that will screw up if we add too many more maps.

So I need to think up a system that will set the right bank, somehow. Had one before, but it was a little cumbersome, it involved just checking the map ID and comparing it to a defined number... "If map ID is over this number, use next bank"... Trying to think of a way that's more fluid and doesn't require micromanaging... not sure that's possible.

Update: for now, just doing it a dumb way. Easier than fiddling with bank IDs in Constants.inc, but takes up a byte for each map.

https://cdn.discordapp.com/attachments/505736168659353601/738962260956938290/unknown.png

I guess when you can't code smart, just make lists.



I dunno where the last 5 hours went but I think I'm close to making maps load more... hm... can't think of the word. But the data no longer has to be aligned to $400 bytes or anything like that. And some data is now shared, like palettes. And palettes can be mixed together easier without needing to take up $30 bytes for each map ID.

Now, each map has 3 ID codes for palettes. Main, Sprite, and In Room. Each byte then points to a 2-byte table, which is a pointer to the actual colour bytes. This seeeems complicated, but its not.

The sprites/NPCs are screwed up somehow though, I don't understand why since I didn't touch them. But I think I'm going to do the same thing here.

First, wipe the NPC data so its all 00s. Then each map has a "how many NPCs?" byte, and then the 2 byte pointer to their own table of data--or another map's, so maps with no sprites can share, and maps that only have a Fiend orb sprite or Sarda don't have to have two dozen 00s bulking up the ROM.

I really have trouble focusing on one part of the game at a time, don't I?





I think I messed up counting the IDs for Coneria Castle's palettes. Indoors looks like Earth Cave, and the sprites are all blue. And for some reason every character I switch to is red. Those are problems for tomorrow me! I think I did good tonight. Saved lots of bytes, now we can add more maps and... more tilesets!

Everyone wanted to go inside buildings in towns, right? Now if I could just figure out how teleports really worked...
« Last Edit: August 01, 2020, 04:57:06 am by Jiggers »
I know exactly what I'm doing. I just don't know what effect it's going to have.

I wrote some NES music! Its a legal ROM file. - I got a Ko-Fi page too.

Vanya

  • Hero Member
  • *****
  • Posts: 1789
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #662 on: August 01, 2020, 01:55:34 pm »
Everything you just posted is awesome. :3

Jiggers

  • Sr. Member
  • ****
  • Posts: 415
    • View Profile
    • My Ko-Fi Page
Re: FF1 MMC5 Disassembly Updates
« Reply #663 on: August 01, 2020, 06:09:25 pm »
What is best in life?

Compressing 1,024 bytes into 256.

Code: [Select]
TownAttributes:
;.byte $00,$00,$00,$55, $55,$55,$55,$55, $55,$55,$55,$55, $55,$55,$00,$00 ; Town
;.byte $55,$55,$55,$55, $55,$55,$55,$FF, $FF,$FF,$FF,$FF, $FF,$FF,$FF,$FF
;.byte $AA,$AA,$AA,$AA, $AA,$FF,$FF,$AA, $AA,$AA,$FF,$FF, $FF,$FF,$AA,$55
;.byte $55,$55,$00,$00, $00,$FF,$FF,$FF, $55,$00,$FF,$AA, $00,$00,$FF,$FF
;.byte $FF,$FF,$FF,$FF, $FF,$FF,$FF,$00, $AA,$FF,$FF,$FF, $FF,$FF,$FF,$FF
;.byte $FF,$FF,$FF,$FF, $FF,$FF,$FF,$FF, $FF,$FF,$FF,$FF, $FF,$FF,$FF,$FF
;.byte $FF,$FF,$FF,$FF, $FF,$FF,$FF,$FF, $FF,$FF,$FF,$FF, $FF,$FF,$FF,$FF
;.byte $FF,$FF,$FF,$FF, $FF,$FF,$FF,$FF, $FF,$FF,$FF,$FF, $FF,$00,$FF,$55

;00 = 00
;01 = 55
;10 = AA
;11 = FF

.byte %00000001, %01010101, %01010101, %01010000
.byte %01010101, %01010111, %11111111, %11111111
.byte %10101010, %10111110, %10101111, %11111001
.byte %01010000, %00111111, %01001101, %00001111
.byte %11111111, %11111100, %11111111, %11111111
.byte %11111111, %11111111, %11111111, %11111111
.byte %11111111, %11111111, %11111111, %11111111
.byte %11111111, %11111111, %11111111, %11001101

CastleAttributes:
;.byte $55,$55,$55,$55, $55,$55,$55,$55, $55,$00,$00,$00, $55,$00,$00,$00 ; Castle
;.byte $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00
;.byte $00,$AA,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00
;.byte $FF,$FF,$FF,$FF, $FF,$FF,$FF,$FF, $FF,$AA,$FF,$FF, $AA,$AA,$00,$00
;.byte $AA,$00,$00,$00, $FF,$FF,$00,$00, $FF,$FF,$00,$00, $FF,$FF,$FF,$FF
;.byte $FF,$FF,$FF,$FF, $FF,$FF,$00,$00, $FF,$55,$55,$55, $55,$55,$55,$55
;.byte $FF,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00
;.byte $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00

.byte %01010101, %01010101, %01000000, %01000000
.byte %00000000, %00000000, %00000000, %00000000
.byte %00100000, %00000000, %00000000, %00000000
.byte %11111111, %11111111, %11101111, %10100000
.byte %10000000, %11110000, %11110000, %11111111
.byte %11111111, %11110000, %11010101, %01010101
.byte %11000000, %00000000, %00000000, %00000000
.byte %00000000, %00000000, %00000000, %00000000

Thought about trying RLE compression here--it would save a few more bytes on average... but required a lot more silliness and would be more difficult to compress by hand, and wouldn't be easier to change the attributes of a single tile. With this system, I can chug out the compressed bytes in a few minutes each map, and even my non code friends are like, "Oh, I see it!" so it should be easy to edit as long as I keep the original decompressed version in comments for reference.
I know exactly what I'm doing. I just don't know what effect it's going to have.

I wrote some NES music! Its a legal ROM file. - I got a Ko-Fi page too.

Vanya

  • Hero Member
  • *****
  • Posts: 1789
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #664 on: August 01, 2020, 08:10:42 pm »
Nice!! That really is the best.

Jiggers

  • Sr. Member
  • ****
  • Posts: 415
    • View Profile
    • My Ko-Fi Page
Re: FF1 MMC5 Disassembly Updates
« Reply #665 on: August 04, 2020, 03:37:57 pm »
Hm... Magic Shops.

There are 20 magic shops, right?

Coneria: 2
Pravoka: 2
Elfland: 4
Melmond: 2
Crescent Lake: 2
Onrac: 2
Gaia: 4
Leifen: 2

Bother. White and Black, that's 10 shops each, out of 16. Which leaves 6 shops to teach 64 spells. But you need 8, so that leaves 8 spells not available in shops.

This means I have to make 2 more shop types for the other magic spells. Which means I have to re-do the way shop graphics are loaded.

I lost some steam finishing up map stuff (I still need to go to every map and test the minimap and adjust the byte tables so there's no more errors anywhere though), and going back to inventory management made me whiney so I took a little break. Seeing if I can get back into it today...



Okay, shop graphics wasn't too bad.

I have some data entry work needs doing if you're up for it, Vanya! Spell permission tables!

With 32 classes, there's 4 bytes of permissions for each spell.

The format should be:

.byte %011111011, %11111111, %01111011, %11111111

The first byte are the original 6 classes, so the first 0 there is the Fighter, and the next 0 is the BlackMage. The second byte are unused classes, for now--then the third byte are the adult classes. So again, Knight and Black Wizard are where those 0s are.

0 means the class can learn it. 1 means they can't.

CHANGING IT! 1 means they CAN, 0 means they can't.

So 128 rows of that. First four rows: White magic. Second four rows: Black magic. Third four rows: Green magic. Fourth four rows: Time magic. That's the first spell level! Then the pattern repeats for level 2 spells.

And I'll see if I can't get cheering in the magic shops once that's done!



Working on this right now is like trying to do a puzzle with a two year old on the loose, only the two year old is also you and you don't know if you ate any of the pieces.
« Last Edit: August 05, 2020, 02:45:51 am by Jiggers »
I know exactly what I'm doing. I just don't know what effect it's going to have.

I wrote some NES music! Its a legal ROM file. - I got a Ko-Fi page too.

Vanya

  • Hero Member
  • *****
  • Posts: 1789
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #666 on: August 05, 2020, 02:33:20 pm »
I can do that.
A little more info, tho.
The data for the expanded classes should be left zeroed, right?
Other than that it's just a matter of matching the existing classes and their spells, no?

Jiggers

  • Sr. Member
  • ****
  • Posts: 415
    • View Profile
    • My Ko-Fi Page
Re: FF1 MMC5 Disassembly Updates
« Reply #667 on: August 05, 2020, 04:26:50 pm »
Yep! Expanded classes are bytes 2 and 4. Leave them blank for now unless you already have ideas for your branch, then go ahead and get started on that. XD

Today's dumb thing:

Quote
] Jiggers: ..................... so a long while back I made this code that made the characters in Final Fantasy 1 throw their arms up in the air when you're in a weapon shot, to indicate they can equip the weapon the cursor is pointing at.
[15:09] Jiggers: And to make them stop doing that, I had it set so that there was an extra, invisible item in the text string that shows what the shop is selling... and item that no one could equip... then pointed the cursor to it, then back...
[15:10] Jiggers: I just realized... since I use 4 bits of a byte, where 1 indicates "can equip" and 0 indicates "can't equip" ... I could just set the whole byte to 0????
[15:10] Jiggers: I went through the most ridiculous workaround possible
[15:10] Jiggers: when I could have set it to 0
[15:10] Jiggers: I set things to 0 all the time!! Why didn't it occur to me?!?!

Slowly, but surely, I'm getting things done. I'm fairly confident I have both saved space by simplifying code AND made it so they can pose in magic shops... but I'm going to keep sifting through the shop/menu code until I don't see anything upsetting before I even try testing it again. Hoping for no more distractions.

Yesterday's distraction was, "I should put the permission bytes with the rest of the equipment data, then load it into RAM to read... oh no, the bank with weapon data is overflowing! I'll move the enemy data to bank B, I made lots of space there! And move all these .exports and .imports... okay! Oops, Bank B is overflowing. Okay I'll move the level up data tables..."

...and now that I just typed that out, I became aware of a potential bug that I just squashed (loading weapon data uses some of the battle pointers to put permission bytes in zero page, so a check for InBattle=1 skips loading those bytes and scrambling other stuff.) So that was another distraction.

Today's distraction is cleaning the house before the cat gets back from the vet so he won't recognize any of his marking spots...
I know exactly what I'm doing. I just don't know what effect it's going to have.

I wrote some NES music! Its a legal ROM file. - I got a Ko-Fi page too.

Vanya

  • Hero Member
  • *****
  • Posts: 1789
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #668 on: August 06, 2020, 02:41:59 am »
I'll get right on that.
But in the mean time, an anecdote.

Reading about your Shop Pose Workaround reminded me of a thing that happened ages ago.
To begin, I hate math. More specifically, I really don't like algebra and I have a really hard time wrapping my head around many of the concepts that others seem to pick up on really easily.
In contrast, I love geometry. I find it easy to understand.
So many moons ago when Game Maker was still in it's early days I was learning how to script GML since the visual interface was very limited.
I was putting together a little practice game that involved shooting randomly moving balls with cannons in the lower corners of the screen. I decided I wanted the cannons to have shields and that the balls should bounce off of them.
To my surprise, the Game Maker had only very basic collision at the time. As in it could only handle square objects.
Worse than that was the lack of realistic ricochet movement.
So I went online to find out how to calculate the trajectory of a ball bouncing off another ball.
There were no workarounds for me to find in this case.
I found that the way to calculate what I wanted was to use Trigonometry.
Well, that sucked because I never studied trig.
College Algebra was my road block so I never got passed it.
(I did defeat it in single combat, just never moved beyond while I was in school.)
Anyway, I wasn't going to let a little thing like not knowing the first thing about trig stop me.
So I spent about a month studying Trigonometry on my own until I clearly understood the calculations I needed to rebound a circle off a circular shield.
It was a pain in the ass, but I'm really proud that I was able to teach myself trig. :3



Reporting grunt work results! SER!
Data entry complete! SER!
Data layout prepped for future magic groups! SER!
Awaiting further orders! SER!
;P

Code: [Select]
;LV1--------------------------------------------
;      FTBRWB--   --------   KNMRWB--   --------
;      ihbMMM--   --------   niaWWW--   --------
.byte %00011000, %00000000, %10011000, %00000000 ;CURE - White Magic
.byte %00001000, %00000000, %00001000, %00000000 ;HARM
.byte %00011000, %00000000, %10011000, %00000000 ;FOG
.byte %00001000, %00000000, %10011000, %00000000 ;RUSE
.byte %00010100, %00000000, %01010100, %00000000 ;FIRE - Black Magic
.byte %00010100, %00000000, %01010100, %00000000 ;SLEP
.byte %00010100, %00000000, %01010100, %00000000 ;LOCK
.byte %00010100, %00000000, %01010100, %00000000 ;LIT
.byte %00000000, %00000000, %00000000, %00000000 ;???? - Green Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;???? -  Time Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
;LV2--------------------------------------------
;      FTBRWB--   --------   KNMRWB--   --------
;      ihbMMM--   --------   niaWWW--   --------
.byte %00011000, %00000000, %10011000, %00000000 ;LAMP - White Magic
.byte %00011000, %00000000, %10011000, %00000000 ;MUTE
.byte %00011000, %00000000, %10011000, %00000000 ;ALIT
.byte %00011000, %00000000, %10011000, %00000000 ;INVS
.byte %00010100, %00000000, %01010100, %00000000 ;ICE  - Black Magic
.byte %00010100, %00000000, %01010100, %00000000 ;DARK
.byte %00010100, %00000000, %01010100, %00000000 ;TMPR
.byte %00010100, %00000000, %01010100, %00000000 ;SLOW
.byte %00000000, %00000000, %00000000, %00000000 ;???? - Green Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;???? -  Time Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
;LV3--------------------------------------------
;      FTBRWB--   --------   KNMRWB--   --------
;      ihbMMM--   --------   niaWWW--   --------
.byte %00011000, %00000000, %10011000, %00000000 ;CUR2 - White Magic
.byte %00001000, %00000000, %00001000, %00000000 ;HRM2
.byte %00011000, %00000000, %10011000, %00000000 ;AFIR
.byte %00001000, %00000000, %00001000, %00000000 ;HEAL
.byte %00010100, %00000000, %01010100, %00000000 ;FIR2 - Black Magic
.byte %00010100, %00000000, %01010100, %00000000 ;HOLD
.byte %00010100, %00000000, %01010100, %00000000 ;LIT2
.byte %00010100, %00000000, %01010100, %00000000 ;LOK2
.byte %00000000, %00000000, %00000000, %00000000 ;???? - Green Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;???? -  Time Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
;LV4--------------------------------------------
;      FTBRWB--   --------   KNMRWB--   --------
;      ihbMMM--   --------   niaWWW--   --------
.byte %00011000, %00000000, %00011000, %00000000 ;PURE - White Magic
.byte %00001000, %00000000, %00001000, %00000000 ;FEAR
.byte %00011000, %00000000, %00011000, %00000000 ;AICE
.byte %00001000, %00000000, %00011000, %00000000 ;AMUT
.byte %00010100, %00000000, %01010100, %00000000 ;SLP2 - Black Magic
.byte %00010100, %00000000, %01010100, %00000000 ;FAST
.byte %00010100, %00000000, %01010100, %00000000 ;CONF
.byte %00010100, %00000000, %01010100, %00000000 ;ICE2
.byte %00000000, %00000000, %00000000, %00000000 ;???? - Green Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;???? -  Time Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
;LV5--------------------------------------------
;      FTBRWB--   --------   KNMRWB--   --------
;      ihbMMM--   --------   niaWWW--   --------
.byte %00011000, %00000000, %00011000, %00000000 ;CUR3 - White Magic
.byte %00001000, %00000000, %00011000, %00000000 ;LIFE
.byte %00001000, %00000000, %00001000, %00000000 ;HRM3
.byte %00001000, %00000000, %00001000, %00000000 ;HEL2
.byte %00010100, %00000000, %00010100, %00000000 ;FIR3 - Black Magic
.byte %00000100, %00000000, %00010100, %00000000 ;BANE
.byte %00000000, %00000000, %00010100, %00000000 ;WARP
.byte %00010100, %00000000, %00010100, %00000000 ;SLO2
.byte %00000000, %00000000, %00000000, %00000000 ;???? - Green Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;???? -  Time Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
;LV6--------------------------------------------
;      FTBRWB--   --------   KNMRWB--   --------
;      ihbMMM--   --------   niaWWW--   --------
.byte %00001000, %00000000, %00001000, %00000000 ;SOFT - White Magic
.byte %00000000, %00000000, %00011000, %00000000 ;EXIT
.byte %00001000, %00000000, %00011000, %00000000 ;FOG2
.byte %00001000, %00000000, %00011000, %00000000 ;INV2
.byte %00000100, %00000000, %00010100, %00000000 ;LIT3 - Black Magic
.byte %00000100, %00000000, %00000100, %00000000 ;RUB
.byte %00000100, %00000000, %00000100, %00000000 ;QAKE
.byte %00000100, %00000000, %00000100, %00000000 ;STUN
.byte %00000000, %00000000, %00000000, %00000000 ;???? - Green Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;???? -  Time Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
;LV7--------------------------------------------
;      FTBRWB--   --------   KNMRWB--   --------
;      ihbMMM--   --------   niaWWW--   --------
.byte %00000000, %00000000, %00001000, %00000000 ;CUR4 - White Magic
.byte %00000000, %00000000, %00001000, %00000000 ;HRM4
.byte %00001000, %00000000, %00011000, %00000000 ;ARUB
.byte %00001000, %00000000, %00001000, %00000000 ;HEL3
.byte %00000100, %00000000, %00010100, %00000000 ;ICE3 - Black Magic
.byte %00000000, %00000000, %00000100, %00000000 ;BRAK
.byte %00000000, %00000000, %00000100, %00000000 ;SABR
.byte %00000100, %00000000, %00000100, %00000000 ;BLND
.byte %00000000, %00000000, %00000000, %00000000 ;???? - Green Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;???? -  Time Magic
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
;LV8---------------------------------------------In Pathfinder Second Edition Terms:
;      FTBRWB--   --------   KNMRWB--   --------
;      ihbMMM--   --------   niaWWW--   --------
.byte %00000000, %00000000, %00001000, %00000000 ;LIF2 - Divine Tradition
.byte %00000000, %00000000, %00001000, %00000000 ;FADE
.byte %00000000, %00000000, %00001000, %00000000 ;WALL
.byte %00000000, %00000000, %00001000, %00000000 ;XFER
.byte %00000000, %00000000, %00000100, %00000000 ;NUKE - Arcane Tradition
.byte %00000000, %00000000, %00000100, %00000000 ;STOP
.byte %00000000, %00000000, %00000100, %00000000 ;ZAP!
.byte %00000000, %00000000, %00000100, %00000000 ;XXXX
.byte %00000000, %00000000, %00000000, %00000000 ;???? - Primal Tradition
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;???? - Occult Tradition
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????
.byte %00000000, %00000000, %00000000, %00000000 ;????

« Last Edit: August 06, 2020, 01:55:13 pm by Vanya »

Jiggers

  • Sr. Member
  • ****
  • Posts: 415
    • View Profile
    • My Ko-Fi Page
Re: FF1 MMC5 Disassembly Updates
« Reply #669 on: August 07, 2020, 02:36:44 pm »
Woohoo! That's all the work I need at the moment... I was going to ask if you wanted to check every floor of every dungeon for broken minimaps, but that's honestly just a tileset issue, and there's only 8, so I can do that when I get to it without trouble.

How's progress on the text stuff?

I thought I hated math. I think it turns out what I hated was pointless math; homework. I hated all of school, really. I only went to an actual school for less than a year of my life. My parents tried homeschooling, but it was the same problem. I hated doing it, so I didn't do it. I didn't see a point to any of the books and things they got me. So they basically gave up. Or what is called "Unschooling"? So instead of spending hours and hours being stuck in a room with people I don't like, I stayed home and did whatever I wanted to do. Which was reading, mostly. Then writing (and maybe I almost failed 8th grade Grammar, because it was more about memorizing terms than writing properly, and maybe I've won a handful of online writing contests...) Then tinkering with music (Around 18 hours of written materiel, over 400 midi files...) Dabbled in game modding here and there, when a game did something I hated and wanted to fix. And a whole bunch of other random job things. And now this. People keep saying, "You taught yourself Assembly, but you don't know C, or Javascript, or Python?" and I'm like, "Uh... yeah? Its not THAT hard to understand..." I guess you just have to want to do it. And for me, the want was hand in hand with necessity. Even though I felt like an idiot for 90% of the time...

I'll stop there before it gets too personal and ranty. :P

So do be proud! It's a great story!
I know exactly what I'm doing. I just don't know what effect it's going to have.

I wrote some NES music! Its a legal ROM file. - I got a Ko-Fi page too.

Vanya

  • Hero Member
  • *****
  • Posts: 1789
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #670 on: August 07, 2020, 03:04:33 pm »
Glad I could be helpful!
I might just check those mini-maps anyway. :P

Haven't put much of a dent in the text stuff yet.
Taking it slow and kinda sat on it for a long while.
Hell I don't even remember where I was or what I did. :P

When I have a kid that's how I want to handle their schooling.
I think we would be in a better position as a society if we taught kids the stuff they actually are interested in instead of force feeding them a ton crap they usually end up forgetting and not needing at all.
I think it's cool you got to have that experience.

And, thank you! :3

Jiggers

  • Sr. Member
  • ****
  • Posts: 415
    • View Profile
    • My Ko-Fi Page
Re: FF1 MMC5 Disassembly Updates
« Reply #671 on: August 07, 2020, 10:36:43 pm »
No worries!

I hit another distraction--sort of. Since I haven't done any work on it today, its less a distraction and more of an "ooh, what if I..."

I hopefully just added in the ability to break out of respond delay boxes in battle by pressing A or B. Doing so should immediately terminate the delay countdown and close the box. I may need to add another bit to that to make sure that holding down the button too long doesn't flash through other boxes accidentally...

Which reminded me that the battle logic does its own controller reading separate from every other menu in the game, because of course it does. Need to add that to the things I'd like to fix pile... Probably 100 bytes wasted on copy-pastes of the same dumb code to make sure the cursor doesn't go lightspeed, for every different menu box in battle... But not right now! Focus.

I WAS also thinking of making it so holding down a button speeds up battle animations as reasonably as possible... But digging into battle animation code again...  :banghead: Dunwanna...
I know exactly what I'm doing. I just don't know what effect it's going to have.

I wrote some NES music! Its a legal ROM file. - I got a Ko-Fi page too.

Vanya

  • Hero Member
  • *****
  • Posts: 1789
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #672 on: August 08, 2020, 04:09:19 am »
Oh, ick! Removing duplicate code is definitely a good thing to put on that list.
It's always better to be more modular.

Don't blame you for not wanting to mess with the battle animation stuff.
It looks like spaghetti to me when I try to read it.

Being able to get through the battle messages faster is always good.
In fact anything that we can do to minimize the number of messages, the better.
Any chance of a rudimentary damage pop-up?
That alone would cut back on a lot of extra messaging.

Jiggers

  • Sr. Member
  • ****
  • Posts: 415
    • View Profile
    • My Ko-Fi Page
Re: FF1 MMC5 Disassembly Updates
« Reply #673 on: August 08, 2020, 04:02:49 pm »
That's something I'm going to leave up to others. I put some fancy number sprites in the CHR RAM for battle. All that needs doing is to hijack the damage number conversion code, use that to string up some sprites instead of text, animate them in the correct position (using battle type to index the cursor positions with a hard-coded offset I imagine), at the right time.

The easiest part of that, to me, is the positioning. Then probably setting up the sprites... then its a toss up between getting the timing right in the logic, and animating. Just 'cos screwing with the flow of things never works out right the first time...
I know exactly what I'm doing. I just don't know what effect it's going to have.

I wrote some NES music! Its a legal ROM file. - I got a Ko-Fi page too.

Vanya

  • Hero Member
  • *****
  • Posts: 1789
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #674 on: August 08, 2020, 09:45:12 pm »
I would so do all that! :D
But I have no idea how to... yet.

Lenophis

  • Discord Staff
  • Hero Member
  • *****
  • Posts: 968
  • The return of the sombrero!
    • View Profile
    • Slick Productions
Re: FF1 MMC5 Disassembly Updates
« Reply #675 on: August 09, 2020, 02:34:38 pm »
In fact anything that we can do to minimize the number of messages, the better.
Any chance of a rudimentary damage pop-up?
That alone would cut back on a lot of extra messaging.
You have already seen a way to cut back on the messages. It started in FF3. Come on, you should know this one.

Unfortunately, that means adding sprites as pop-ups. Shouldn't be a *huge* issue, considering there wouldn't be that many as it is.


https://ff6randomizer.codeplex.com/ - Randomize your FF6 experience!

Vanya

  • Hero Member
  • *****
  • Posts: 1789
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #676 on: August 09, 2020, 05:05:12 pm »
You mean the MISS pop up?
That's the only other thing I can think of besides the status effect icons Jiggers already added.

Enemies flashing when they attack? I *think* that's already done too unless I just dreamed it.

Anything else?

Jiggers

  • Sr. Member
  • ****
  • Posts: 415
    • View Profile
    • My Ko-Fi Page
Re: FF1 MMC5 Disassembly Updates
« Reply #677 on: August 09, 2020, 08:38:33 pm »
I did add flashing enemies! Real proud of that one.

Amount of hits being tied to weapon swing animations could work?

I tidied up Stealing, Price Loading, and Treasure Chest stuff, because it turns out I DO need a distraction from inventory/shop menus. Which led me on to seeing about how to handle drawing item names again.

I read a neat trick somewhere, how instead of multiplying an index by 2 and using +1, as in:
Code: [Select]
     
ASL A
TAX
LDA lut_MagicNamePtrTbl, X   
STA text_ptr                       
LDA lut_MagicNamePtrTbl+1, X
STA text_ptr+1
You could instead split the pointer table into high and low bytes.
Code: [Select]
TAX
LDA lut_MagicNamePtrTbl_lo, X   
STA text_ptr                       
LDA lut_MagicNamePtrTbl_hi, X
STA text_ptr+1

I think I may need to do this... That would solve the issue of needing to see if doubling the item ID set carry because the ID was over $7F, and then loading from a different set of pointers marked with +$100, right?
I know exactly what I'm doing. I just don't know what effect it's going to have.

I wrote some NES music! Its a legal ROM file. - I got a Ko-Fi page too.

Vanya

  • Hero Member
  • *****
  • Posts: 1789
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #678 on: August 09, 2020, 11:35:15 pm »
Makes sense.

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #679 on: August 10, 2020, 12:37:26 am »
« Last Edit: August 10, 2020, 12:44:12 am by Cyneprepou4uk »
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension