November 23, 2024, 03:57:04 AM

Author Topic: External playbook editor  (Read 74879 times)

blitzmaster5000

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: External playbook editor
« Reply #60 on: July 22, 2016, 06:00:35 PM »
You could very well be right. I'm just not sure as of now if it will work or not - the main thing I'm worried about is not having pointers go to the correct offsets if we start moving things around.

Is the table at the very end with all the *.wms values only for images? Or does it include sound and other things?

edit: Well just found a quick and dirty way to get the game to load data that is past the image table - i.e., any sort of play data that may come after all the image table stuff.

All I did was increase the number of plays in 0xC @ 150c40. what happens is it will load in however many lines of code there are even after the *wms table. Therefore, one could presumably just stick code in here - both for the 2001 plays as well as the play data for custom plays made with the play editor.

Only major issue I foresee doing things this way is that it will probably affect the way the your graphic editor tool works, as there will be lots of data in here now that will need to be "moved down" when you import new images into the ROM.
« Last Edit: July 22, 2016, 06:51:19 PM by blitzmaster5000 »

blitzmaster5000

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: External playbook editor
« Reply #61 on: August 04, 2016, 09:40:43 AM »
Jake,

I'm working on a new ROM that has all the play data consolidated so that I'm not over-writing existing parts. My plan is to stick it after the table  at the end of the ROM like you said and use the modification I mentioned above where I change the 0xC value to be larger to migrate all the code into memory.

Before I do this, I was thinking that it would be best to leave some empty space right after the end of the current table so that if one wants to import more graphics, there will still be space between the end of the table and the new play code. Is this the way to do it? I was going to leave about 0x1000 empty lines for future graphics. Let me know if you think this is best.

jaker3

  • Administrator
  • Sr. Member
  • *****
  • Posts: 334
    • View Profile
Re: External playbook editor
« Reply #62 on: August 07, 2016, 06:44:08 PM »
Hmm, if we inserted it into the actual table then we wouldn't need to worry about additional graphics (they'd be inserted after). We could even look into inserting it as the first entry in the table. That way a user could just update the play file whenever they want additional plays.

blitzmaster5000

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: External playbook editor
« Reply #63 on: August 08, 2016, 09:32:29 AM »
But isn't the table at the very end (the part w/ all the *.wms lines)? Where does the table you're referring to start? I think I maybe thinking of a different thing than what you're suggesting.

jaker3

  • Administrator
  • Sr. Member
  • *****
  • Posts: 334
    • View Profile
Re: External playbook editor
« Reply #64 on: August 09, 2016, 08:27:26 AM »
Hey Blitzmaster,

Yeah the table starts at around FCE7D0. This table essentially index's the files. prior to this table is where all the files are stored. I was wondering if it would be possible to just insert the plays into the table so when additional files are inserted they are aware of the play data and would just be inserted afterwards. So you would insert the play data just like you would insert a graphic file.

blitzmaster5000

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: External playbook editor
« Reply #65 on: August 10, 2016, 11:13:31 AM »
This could work depending on if when we add the data and subsequently moves the table down, any sort of pointer does not get messed up.

Also, unfortunately adding the default play data (not custom plays from the editor) is not simple. There are many places that need pointers updated/inserted that then need to read the correct address from RAM. I was planning on only adding the first page of 2001 (like I said previously I've already done this, I'm just grouping it all together now at the end once we determine the best place to put it), as it's really tedious to find all the exact play data for every player. There are about 4 levels of pointers/data for every player, so you can imagine it gets messy very quickly, not to mention that the play data does not indicate when it terminates for a given route, which makes finding the necessary data annoyingly difficult.

On the other hand, your idea of adding the custom playbook data to the ROM should now work. I will have to modify the function that reads in the memory pak as we will now be reading the ROM instead now, but I don't think that should be too difficult. I can add a custom cheat that can be triggered to "use custom plays", allowing one to use their own plays straight from the ROM. Additinally, if multiple people are trying to use their own custom plays, we can make the cheat look at which player it is and load that specific data. So here's the work-flow:

1. Create custom plays using your custom editor
2. Save files to ROM (once we determine the best place for the data)
3. Create custom cheat hack to turn on the custom playbook
4. Depending on the controller number, load in that custom data for that player

The main thing I see that could be problematic is (3): anyone could technically load in anyone else's custom playbook. We could have up to 4 custom cheats, one for each player though. Or the alternative is (4), where it's all based on one cheat, but depending on which controller you are, it will load that playbook from the ROM.

Let me know what you think is the best way. I'm wondering if we could somehow have the custom editor actually generate a "custom cheat", where the owner of the playbook puts in his own button combination, sort of like a PIN number.

jaker3

  • Administrator
  • Sr. Member
  • *****
  • Posts: 334
    • View Profile
Re: External playbook editor
« Reply #66 on: November 09, 2016, 11:41:20 AM »
The external playbook editor now loads all playbooks and plays correctly. (for offensive plays) all thats left is saving. I'm traveling to Nashville this week for the packers game but hope to find time to add this functionality soon. Just wanted to keep everyone updated to let you know the project is not dead.

blitzmaster5000

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: External playbook editor
« Reply #67 on: November 09, 2016, 04:05:59 PM »
Hi Jake,

That's awesome news! I think with the latest patch I released, the next big thing is putting the 2001 plays and the custom plays into the ROM. Like I said before, I think we could possibly put the custom playbook data somewhere earlier into the ROM, but if not, we can still put it at the end (which is where I'm putting the 2001 play data anyway). We just need to update the function that loads in the data to look at the correct addresses depending on where we decide to put it which will be super easy.

I'm still erring on the side of putting it at the end of the ROM as it will be much easier to find and we know for sure that all that code can be loaded during an actual match. If you get a beta working of the external editor, feel free to send it over so I could try giving it a test.

Also, as i'm sure you know, I think think a bot is spamming one of the other blitz 2015 hack post.

jaker3

  • Administrator
  • Sr. Member
  • *****
  • Posts: 334
    • View Profile
Re: External playbook editor
« Reply #68 on: November 30, 2016, 08:50:20 PM »
still chugging along with the play editor, added the ability to add new plays and new playbooks. Going to try and make a quick and dirty save to memory pack function hopefully sooner then later to try it out...

blitzmaster5000

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: External playbook editor
« Reply #69 on: December 01, 2016, 04:02:42 PM »
Sounds good! I was thinking I could actually go ahead and try and make a few stock plays in the editor, copy the data off the memory pak file, and stick it in the end of the ROM. I could then try and modify the function that loads in all the play data for the custom plays to read from there instead of the memory pak. That way, once you have the external editor ready, it will be ready to go immediately. It would just be a matter of figuring out how to make the game determine when to read the plays (i.e. - I'm not sure if we would still need to "load custom playbook" and put in the pin/name of playbook).

jaker3

  • Administrator
  • Sr. Member
  • *****
  • Posts: 334
    • View Profile
Re: External playbook editor
« Reply #70 on: December 07, 2016, 05:38:10 PM »
sounds good. For sure would be nice to remove the need for a pin and user.

blitzmaster5000

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: External playbook editor
« Reply #71 on: December 10, 2016, 02:55:03 PM »
Alright I got the game to read plays from the ROM instead of the memory pak. It still uses the PIN/plabook name to load it though.

The question now is developing a new way to be able to load all the plays instead of using the PIN. I will see if I can use a custom cheat to load up the plays next.

blitzmaster5000

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: External playbook editor
« Reply #72 on: December 15, 2016, 06:25:05 PM »
okay I think I have an idea for how we can easily load custom playbooks:

Instead of just deleting the "use team plays" cheat like I have it right now, we could have it activate a certain playbook. If that's not the correct one, then if the player puts in the cheat again, it reads the next playbook, and so on (up to 4 custom books in a ROM, although I guess we could techinically store more). We can have the cheat display "XX's book" where XX = playbook name in the playbook (we can easily read this value from the stored book) that way the player knows which book is loaded. So if they want to play with their own book but theirs is the 4th one in the ROM, they would enter the cheat 4 times and it would load that specific one. We can add a counter that will then reset and go back to the first book, and then repeat.

I thought about having multiple players have their own codes, but this is tricky - i would mean we would have to add a bit of code to each cheat (all 30 or so) that checks to see if a playbook is activated by it. That's just too much work, so I think the above will work better. I'll see if I can get a prototype version working soon.

jaker3

  • Administrator
  • Sr. Member
  • *****
  • Posts: 334
    • View Profile
Re: External playbook editor
« Reply #73 on: December 18, 2016, 09:55:08 AM »
awesome update! what is the address your using in the rom? Have a patch? I could start working on saving/reading it to the rom.

blitzmaster5000

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: External playbook editor
« Reply #74 on: December 18, 2016, 09:13:26 PM »
Sure I could post the patch for testing, but there are a few things we really need to figure out before getting all the code in there:

1. Where we will be injecting the custom play data - enough room for up to 4 players (we can calculate how much space this is to figure out). I currently have it pasted just after the last line of code in the ROM (the image table).

2. How these addresses will change if we add more images to the ROM - we need to make sure that we have permenant RAM addresses to read/write from. We don't want the game to be able to add more images and then change the RAM addresses we need to call from. This will screw up all the new code that will actually bring in the play data for each player.

So I guess one question I have is should leave like 0x1000 bits of empty space between the end of the image table and the custom data so that if you import new images, it will not shift the custom play data? We need those addresses to stay constant. Also, I noticed that increasing the amount of RAM by a large amount loaded in after the image table (by increasing that value at 154140), it can drastically affect game performance, so we need to be sure where the custom data is stored isn't too far down into the empty area of the ROM.