November 23, 2024, 03:57:12 AM

Author Topic: Can't figure out how to update arcade Blitz  (Read 24858 times)

dmgambone

  • Newbie
  • *
  • Posts: 21
    • View Profile
Can't figure out how to update arcade Blitz
« on: March 02, 2020, 09:36:31 PM »
I have the original '97 NFL Blitz.  I've recently purchased the upgrade kit to bring it up-to-date to 2000, but I really want to update it to be the 2017 NFL roster (SB 52 Philadelphia Eagles champions).

This might sound stupid, but I'm not able to find out where to start.  I saw there were some GitHub repos and I don't mind pulling the code and working that way.  But I'm must be missing how to get started with extracting file that the code will be able to access.

Is there any documentation on getting started to hack the arcade version of NFL Blitz?

jaker3

  • Administrator
  • Sr. Member
  • *****
  • Posts: 334
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #1 on: March 04, 2020, 07:44:05 PM »
Hey dmgambone,

Its a work in-progress. The player names in the arcade version are stored in sprite sheets. I've found the location of the sprite sheets and the data it uses to draw off them. Working on figuring out what the values mean so I can create a sprite generator for players.

dmgambone

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #2 on: March 07, 2020, 08:38:35 AM »
hi Jaker3, I'm guessing it's your repo I saw on GitHub.

I'd like to help you somehow.  I am a developer and work with C# so I can contribute if you're willing to give him some instructions on what's needed to get up and running and accessing the files and the location on any information you've gathered about the files on the drive.

jaker3

  • Administrator
  • Sr. Member
  • *****
  • Posts: 334
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #3 on: March 11, 2020, 06:37:25 PM »
Sounds good! I'm sure the repos you saw are mine haha. Currently most of the development I'm doing is in a separate tool. More of a POC to get things working. I'll try and get that out on github this week and send you some instructions on what I'm trying to do, for sure would love any help I can get :)

Thanks!

dmgambone

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #4 on: March 11, 2020, 07:49:22 PM »
Hi Jaker3,

Yes, I've seen your repos and did some thorough investigation around on pointers.  I actually started building out a new repo with all the information I was able to gather and document what I could.  It's in GitHub and I just added you so you can see what I did.

It's very early in the work as I just started it over the weekend.  There are a few areas of information I'm missing that I'm hoping you can help me understand, such as what the file pointers in the team record and player record points to, where are the images stored and what format are they, and where can I find the plays?

It would be great to be able to pull all this information together.  I'm primarily interested in the arcade version NFL Blitz (Classic or 2000), but can help with the other versions if needed.

jaker3

  • Administrator
  • Sr. Member
  • *****
  • Posts: 334
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #5 on: March 13, 2020, 08:23:08 PM »
Blah,

I literally had a whole bunch of info typed up then my session timed out... Going to get some things put in word, then out on git (code you have out there now looks great, btw!).

But pretty much, here is some quick info on the image formats used in blitz (the ones I know of).

The Images are the same images used in the NFL Blitz PC versions (99 ans 2000).

Here are the PC images:
http://www.mediafire.com/file/wzgreo0am0kvbyt/data.7z/file

The headers are 41 bytes from what I can tell.
There are 2 images formats:
RGB565
RGBA4444

offset 36 (decimal) tells you what image type the file is:
        rgb565 = 0x0A,
        rgba4444 = 0x0C

My idea was to make a console app to look up each image file in the arcade raw drive and record its offset. Open to better ideas though.

dmgambone

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #6 on: March 13, 2020, 08:56:24 PM »
Thanks for the image info and I look forward to the additional information.  Is there a data location that contains all these files or is that what you're trying to find out with the console app?  If I can start matching image data, I could probably figure out the records are stored in the data file.  41 bytes seems off to me, but it could be the image header itself.  I'll see if I can find anything out on those image formats.

Can you confirm something for me?  When you extract the CHD file, does it only extract a single large file or multiple files?  When I did it, it's a single large file but I see so many references to files.  I used this command: chdman extracthd -input blitz2k.chd -output blitz2k.bin

dmgambone

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #7 on: March 14, 2020, 09:22:49 AM »
Based on the info you gave me, here's what I was able to figure out:
It is a 40 byte header.  I actually believe it's a 10 uint32 header.  Based on that, this is what I believe is the record format of an image:

PositionPurpose
0?? - File Type? Always set to 0x8005 to indicate it's an image?
4?? - Unknown Value
8?? - Unknown Value
12?? - Unknown Value
16Width of image
20Height of image
24?? - Unknown Value
28?? - Unknown Value
32?? - Unknown Value
36The pixel format used in this image
40The actual pixel data as an array of int16 (`Width` * `Height` * 2)

I have the data file reader processing a RGBA4444 format into a class called Image.  Each pixel in the data is converted from uint16 to ImagePixel class that contains Red, Green, Blue, Alpha properties.  That was simple since and just need to do RGBA565 next.  I'll output some of these as PNG just so I can confirm they are correct.  Honestly, I don't think I'm keeping ImagePixel as it's a waste of space since we're not doing direct image manipulation and uint32 works just as well. 

The other thing I noticed is that all images are 256 pixels wide and the images basically wrap.  I'm sure one of those values in the header describes the wrapping, but haven't really analyzed multiple records yet.

jaker3

  • Administrator
  • Sr. Member
  • *****
  • Posts: 334
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #8 on: March 14, 2020, 10:08:56 AM »
Your cruising through this! Yeah it only extracts as one file, the raw hard drive dump.
I was planning on using the console app to find all these files. I don't think there is a standard file table :\ At least one I'm capable of figuring out. 

I'm thinking one of the unknown values could be related to mipmaps for the textures?




I'm pretty unorganized atm, but I'll try and get some information on the sprite sheets posted today also. You seem to have a better grasp on it, so hopefully its something easy.

dmgambone

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #9 on: March 14, 2020, 12:50:55 PM »
Yes, one of the values is mipmap level.  It's the 7th uin32.  The values are 0 (no mipmapping), 2, 4, 8. 

8 is what you will see in all of the LOD (level of details) images used for the uniforms (like CHIHLOD.WMS) or the banner page (BANPAGE.WMS).

The Ads only use 2 levels (ADS_D.WMS).

Looking at all the actual images, this makes sense.

I also found another file format: 0x0b == RGBA1555.  Basically colors are 5 bit channels, and alpha is 1 bit.


jaker3

  • Administrator
  • Sr. Member
  • *****
  • Posts: 334
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #10 on: March 14, 2020, 03:43:52 PM »
Nice!

Alright for the sprites what I've been doing is searching for the file name inside the bin (using HxD), doing this you can find the sprite sheet information. The names of the file can appear up to twice it seems.

For example: TMSEL00.WMS sprite sheet details  is at 57156B8

Here are the details I've worked out so far:
https://i.ibb.co/GHtSJWY/spritesheet.png


dmgambone

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #11 on: March 14, 2020, 04:48:58 PM »
What I've been seeing is that much of the data is stored in fixed record format, usually with all of them listed one right after the other.  Teams and Players were like that and I'm betting that the complete image list is stored the same way.  Just need to figure out that format.

What sometimes makes this a bit trickier is that the images you currently have are the PC version, but are not identical.  For example, I appear to have found the equivalent of CHEER501.WMS in the arcade data file, but the PC version does not have the title of 'The Cheerleaders' where the arcade version does.

I'm still working on the conversion of the image format to 32-bit RGBA.  I thought I had it correct, but when I output one of the images, it's wrong.  I'm trying to find a good reference image that is the same in the arcade as it is in PC game.   

dmgambone

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Can't figure out how to update arcade Blitz
« Reply #12 on: March 14, 2020, 05:36:09 PM »
FYI: Starting a new thread that is appropriately named.