Z64

Please login or register.

Login with username, password and session length
Advanced search  

News:

Check out and improve the wiki!

Author Topic: Pokemon Monster Stadium 2 Extractor  (Read 3386 times)

spinout

  • Administrator
  • Sr. Member
  • *****
  • Posts: 307
    • View Profile
    • Email
Pokemon Monster Stadium 2 Extractor
« on: December 21, 2010, 09:20:05 AM »

ps_extractor.c

Extracts 30 or so files from Pokemon Monster Stadium 2 (J). I have yet to look into any other Pokemon game versions. This extractor works by looking for calls to the file load function and tracing the lui/addiu pairs that make up the arguments to those functions. The files are in a "PERS" or "PRES" archive, whatever those are. It's some Nintendo thing, some files are JPGs in PRESJPEG files, others are Yay0 compressed files in PERS-SZP archives.

This may or may not help with the extracted files:
http://www.amnoid.de/gc/index.html
« Last Edit: December 21, 2010, 06:21:28 PM by spinout »
Logged
biggrin.gif

Marshall

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • 64.vg
    • Email
Re: Pokemon Monster Stadium 2 Extractor
« Reply #1 on: December 21, 2010, 12:17:49 PM »

BUG REPORT!
>    else if(!strncmp(data+f->start, "PRESJPEG", 8))
>            strcat(fn, ".pres.jpg");

should be "pers" animrite?

spinout

  • Administrator
  • Sr. Member
  • *****
  • Posts: 307
    • View Profile
    • Email
Re: Pokemon Monster Stadium 2 Extractor
« Reply #2 on: December 21, 2010, 06:17:27 PM »

No.

The files are either PRESJPEG or PERS-SZP
« Last Edit: December 21, 2010, 06:19:12 PM by spinout »
Logged
biggrin.gif

xdaniel

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 295
    • ICQ Messenger - 136250978
    • View Profile
Re: Pokemon Monster Stadium 2 Extractor
« Reply #3 on: December 21, 2010, 06:58:56 PM »

#define FIL_LOAD_FUNC_JPN 0x800041C8
#define FIL_LOAD_FUNC_US  0x80004258
#define FIL_LOAD_FUNC_EUR 0x80004228


0x80004258 is valid for both US versions, 0x80004228 should be valid for all PAL versions.
Logged
cu xdaniel

Nanami - Desktop:

Kazari - Notebook:

spinout

  • Administrator
  • Sr. Member
  • *****
  • Posts: 307
    • View Profile
    • Email
Re: Pokemon Monster Stadium 2 Extractor
« Reply #4 on: December 21, 2010, 07:03:49 PM »

What are the 4-byte header codes for those versions? I made a version that picks up that based off of the CPSJ or CP2J whatever, and I'd like to add those.
Logged
biggrin.gif

xdaniel

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 295
    • ICQ Messenger - 136250978
    • View Profile
Re: Pokemon Monster Stadium 2 Extractor
« Reply #5 on: December 21, 2010, 07:10:26 PM »

NTSC US v1.0 and v1.1: NPOE
PAL English v1.0 and v1.1: NPOP
PAL French: NPOF
PAL German: NPOD
PAL Spanish: NPOS

Those are the ones I have, but I think there's at least an Italian version out there as well, which would probably be NPOI and have the same function address.
Logged
cu xdaniel

Nanami - Desktop:

Kazari - Notebook:

spinout

  • Administrator
  • Sr. Member
  • *****
  • Posts: 307
    • View Profile
    • Email
Re: Pokemon Monster Stadium 2 Extractor
« Reply #6 on: December 21, 2010, 07:17:07 PM »

Works with a shitload of versions now:

Source
Win32 binary (compiled with Windows tcc under wine)

Edit: I found another function, don't have time to implement:
Pokemon Monster Stadium 2 (J):
0x800043C4 - works the same way as the others...
« Last Edit: December 21, 2010, 07:38:17 PM by spinout »
Logged
biggrin.gif

Mallos31

  • Full Member
  • ***
  • Posts: 233
    • View Profile
    • Email
Re: Pokemon Monster Stadium 2 Extractor
« Reply #7 on: December 22, 2010, 04:49:13 AM »

I'm starting to try to learn OpenGL or something like that, make something to view Quest 64 models/animations or something. I'm just curious as to if I can figure it out. But I figure if I look at the code from some of these projects on here I can get it... but I was originally going to start with Pokemon Stadium files because I noticed how well-made the pokemon models were and I wanted to get them. LOL
Logged

spinout

  • Administrator
  • Sr. Member
  • *****
  • Posts: 307
    • View Profile
    • Email
Re: Pokemon Monster Stadium 2 Extractor
« Reply #8 on: December 22, 2010, 11:05:08 PM »

SRC:0x00001000(00001000) DEST:0x80000400 SIZ:00100004 PC:8000005C TYPE: bin
SRC:0x00000B70(00000B70) DEST:0x8008B370 SIZ:00000100 PC:8005B810 TYPE: bin
SRC:0x015C0000(015C0000) DEST:0x800E27F0 SIZ:0000001C PC:8005B810 TYPE: bin
SRC:0x015C0020(015C0020) DEST:0x800E27D0 SIZ:0000000C PC:8005B810 TYPE: bin
SRC:0x015C0020(015C0020) DEST:0x800E2810 SIZ:00000130 PC:8005B810 TYPE: bin
SRC:0x015C0150(015C0150) DEST:0x800DC620 SIZ:00003D50 PC:8005B810 TYPE: yay0
SRC:0x016F1880(016F1880) DEST:0x800E27D0 SIZ:00000008 PC:8005B810 TYPE: bin
SRC:0x016F1880(016F1880) DEST:0x800F0340 SIZ:00000024 PC:8005B810 TYPE: bin
SRC:0x016F18A4(016F18A4) DEST:0x800F0370 SIZ:0000000C PC:8005B810 TYPE: bin
SRC:0x016F18B4(016F18B4) DEST:0x800DC620 SIZ:00000360 PC:8005B810 TYPE: yay0
SRC:0x016F1C14(016F1C14) DEST:0x800DC620 SIZ:000012C0 PC:8005B810 TYPE: yay0
SRC:0x017215A4(017215A4) DEST:0x800E27D0 SIZ:0000000C PC:8005B810 TYPE: bin
SRC:0x017215A4(017215A4) DEST:0x800F24C0 SIZ:000002A4 PC:8005B810 TYPE: bin
SRC:0x01721854(01721854) DEST:0x800DC620 SIZ:00002BA0 PC:8005B810 TYPE: yay0
SRC:0x017C8254(017C8254) DEST:0x800E27D0 SIZ:0000000C PC:8005B810 TYPE: bin
SRC:0x017C8254(017C8254) DEST:0x800F5D70 SIZ:00000268 PC:8005B810 TYPE: bin
SRC:0x017C84C4(017C84C4) DEST:0x800DC620 SIZ:000008E0 PC:8005B810 TYPE: yay0
SRC:0x017DA934(017DA934) DEST:0x800E27D0 SIZ:00000008 PC:8005B810 TYPE: bin
SRC:0x017DA934(017DA934) DEST:0x800F7580 SIZ:0000002C PC:8005B810 TYPE: bin
SRC:0x0184F250(0184F250) DEST:0x800E27D0 SIZ:00000008 PC:8005B810 TYPE: bin
SRC:0x0184F250(0184F250) DEST:0x800F7630 SIZ:0000004C PC:8005B810 TYPE: bin
SRC:0x01972240(01972240) DEST:0x800E27D0 SIZ:00000008 PC:8005B810 TYPE: bin
SRC:0x01972240(01972240) DEST:0x800F96B0 SIZ:000004C4 PC:8005B810 TYPE: bin
SRC:0x01975C00(01975C00) DEST:0x800E27D0 SIZ:00000008 PC:8005B810 TYPE: bin
SRC:0x01975C00(01975C00) DEST:0x800F9B80 SIZ:0000001C PC:8005B810 TYPE: bin
SRC:0x01975C1C(01975C1C) DEST:0x800E27D0 SIZ:00000008 PC:8005B810 TYPE: bin
SRC:0x01975C1C(01975C1C) DEST:0x800FA890 SIZ:0000052C PC:8005B810 TYPE: bin
SRC:0x01A24740(01A24740) DEST:0x800E27D0 SIZ:00000008 PC:8005B810 TYPE: bin
SRC:0x01A24740(01A24740) DEST:0x800FADC0 SIZ:000014CC PC:8005B810 TYPE: bin
SRC:0x01FB5260(01FB5260) DEST:0x800FD990 SIZ:00000FC0 PC:8005B810 TYPE: bin
SRC:0x01FB6220(01FB6220) DEST:0x800FED20 SIZ:00000100 PC:8005B810 TYPE: bin
SRC:0x00285EB0(00285EB0) DEST:0x803FFA70 SIZ:00000018 PC:8005B810 TYPE: frag
SRC:0x00285EB0(00285EB0) DEST:0x8011B1B0 SIZ:00000560 PC:8005B810 TYPE: frag
SRC:0x004DCD80(004DCD80) DEST:0x803B49B0 SIZ:00000018 PC:8005B810 TYPE: pers.szp
SRC:0x004DCD80(004DCD80) DEST:0x803B3840 SIZ:00001000 PC:8005B810 TYPE: pers.szp
SRC:0x004DDD80(004DDD80) DEST:0x803B4840 SIZ:00000160 PC:8005B810 TYPE: bin
SRC:0x003B7090(003B7090) DEST:0x803B49B0 SIZ:00000018 PC:8005B810 TYPE: pers.szp
SRC:0x003B7090(003B7090) DEST:0x803B3EC0 SIZ:00000AE0 PC:8005B810 TYPE: pers.szp
SRC:0x016F81B4(016F81B4) DEST:0x800C2DD0 SIZ:00000400 PC:8005B810 TYPE: bin
SRC:0x016FDBB4(016FDBB4) DEST:0x800C31D0 SIZ:00000400 PC:8005B810 TYPE: bin
SRC:0x016F855C(016F855C) DEST:0x800C35D0 SIZ:00000400 PC:8005B810 TYPE: bin
SRC:0x016FDF5C(016FDF5C) DEST:0x800C39D0 SIZ:00000400 PC:8005B810 TYPE: bin
SRC:0x016F88FA(016F88FA) DEST:0x800C3DD0 SIZ:00000400 PC:8005B810 TYPE: bin
SRC:0x016FE2FA(016FE2FA) DEST:0x800C31D0 SIZ:00000400 PC:8005B810 TYPE: bin
SRC:0x016F8CA2(016F8CA2) DEST:0x800C2DD0 SIZ:00000400 PC:8005B810 TYPE: bin
SRC:0x016FE6A2(016FE6A2) DEST:0x800C39D0 SIZ:00000400 PC:8005B810 TYPE: bin
Logged
biggrin.gif

Mallos31

  • Full Member
  • ***
  • Posts: 233
    • View Profile
    • Email
Re: Pokemon Monster Stadium 2 Extractor
« Reply #9 on: December 23, 2010, 04:01:02 AM »

what the heck is a .szp file???
Logged

spinout

  • Administrator
  • Sr. Member
  • *****
  • Posts: 307
    • View Profile
    • Email
Re: Pokemon Monster Stadium 2 Extractor
« Reply #10 on: December 23, 2010, 08:28:30 AM »

dma.c

This is a modified 'dma.c' from M64+ which dumps identified files from a Pokemon game. To use it, get the latest M64P and replace source/mupen64plus-core/src/memory/dma.c with my dma.c, compile, and run a Pokemon game.

This is much better at extracting files than the extractor mentioned in my previous posts in this thread.
« Last Edit: December 24, 2010, 07:56:21 AM by spinout »
Logged
biggrin.gif

Mallos31

  • Full Member
  • ***
  • Posts: 233
    • View Profile
    • Email
Re: Pokemon Monster Stadium 2 Extractor
« Reply #11 on: December 28, 2010, 04:36:53 AM »

Yeah... no idea how to compile an entire thing like that... O.o I have only gotten as far as making one, big, file.
Logged

Jimmy130

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Pokemon Monster Stadium 2 Extractor
« Reply #12 on: February 21, 2011, 07:47:38 PM »

I extract all files with dma.c
http://dl.free.fr/tnxbLCRlT
files here for Pokemon 1&2JPN + 1USA
« Last Edit: April 24, 2012, 11:42:04 PM by Jimmy130 »
Logged