Difference between revisions of "Yu-Gi-Oh! Worldwide Edition: Stairway to the Destined Duel:ROM map"

From Data Crystal
Jump to navigation Jump to search
Line 76: Line 76:
 
0x832B84 to 0x833C7F - Cards data array, containing ATK, DEF and other data.
 
0x832B84 to 0x833C7F - Cards data array, containing ATK, DEF and other data.
 
  bitmap:
 
  bitmap:
  ZZZx xxxA AAAA BBCC CCCC CCCD DDDD DDDD
+
  YYYY xxxA AAAA BBCC CCCC CCCD DDDD DDDD
  Z - Attribute
+
  Y - Attribute
 +
    0 - LIGHT
 +
    1 - DARK
 +
    2 - WATER
 +
    3 - FIRE
 +
    4 - EARTH
 +
    5 - WIND
 +
    6 - ---
 +
    7 - MAGIC
 +
    8 - TRAP
 +
    9 - DIVINE
 
  A - Card Type
 
  A - Card Type
 
     0 - [] (Monster)
 
     0 - [] (Monster)

Revision as of 19:59, 2 August 2022

Cards stats

Display card ATK

0800FC50 B570     push    r4-r6,r14                       ;
0800FC52 0400     lsl     r0,r0,10h                       ;
0800FC54 0C04     lsr     r4,r0,10h                       ;
0800FC56 0409     lsl     r1,r1,10h                       ;
0800FC58 0C0D     lsr     r5,r1,10h                       ;
0800FC5A 0412     lsl     r2,r2,10h                       ;
0800FC5C 0C16     lsr     r6,r2,10h                       ;
0800FC5E F7FFFFED bl      800FC3Ch                        ;
0800FC62 4809     ldr     r0,=2013E00h                    ;
0800FC64 8044     strh    r4,[r0,2h]                      ;
0800FC66 4809     ldr     r0,=7FFh                        ;
0800FC68 4020     and     r0,r4                           ;
0800FC6A 0080     lsl     r0,r0,2h                        ;
0800FC6C 4908     ldr     r1,=8832B84h                    ;
0800FC6E 1840     add     r0,r0,r1                        ;
0800FC70 6800     ldr     r0,[r0]                         ;
0800FC72 21F8     mov     r1,0F8h                         ;
0800FC74 0449     lsl     r1,r1,11h                       ;
0800FC76 4008     and     r0,r1                           ;
0800FC78 0D00     lsr     r0,r0,14h                       ;
0800FC7A 2815     cmp     r0,15h                          ;
0800FC7C DB0F     blt     800FC9Eh                        ;
0800FC7E 2817     cmp     r0,17h                          ;
0800FC80 DD08     ble     800FC94h                        ;
0800FC82 2818     cmp     r0,18h                          ;
0800FC84 D008     beq     800FC98h                        ;
0800FC86 E00A     b       800FC9Eh                        ;
0800FC88 3E00     sub     r6,0h                           ;
0800FC8A 0201     lsl     r1,r0,8h                        ;
0800FC8C 07FF     lsl     r7,r7,1Fh                       ;
0800FC8E 0000     lsl     r0,r0,0h                        ;
0800FC90 2B84     cmp     r3,84h                          ;
0800FC92 0883     lsr     r3,r0,2h                        ;
0800FC94 2000     mov     r0,0h                           ;
0800FC96 E00D     b       800FCB4h                        ;
0800FC98 20FA     mov     r0,0FAh                         ;
0800FC9A 0100     lsl     r0,r0,4h                        ;
0800FC9C E00A     b       800FCB4h                        ;
0800FC9E 480F     ldr     r0,=7FFh                        ;
0800FCA0 4020     and     r0,r4                           ;
0800FCA2 0080     lsl     r0,r0,2h                        ;
0800FCA4 4B0E     ldr     r3,=8832B84h                    ;
0800FCA6 18C0     add     r0,r0,r3                        ;r0 = 0x8832B84 + ((0x7FF & card_ID) << 2)
0800FCA8 6801     ldr     r1,[r0]                         ;r1 = [compressed_card_data_array]
0800FCAA 0389     lsl     r1,r1,0Eh                       ;
0800FCAC 0DC9     lsr     r1,r1,17h                       ;
0800FCAE 0088     lsl     r0,r1,2h                        ;
0800FCB0 1840     add     r0,r0,r1                        ;
0800FCB2 0040     lsl     r0,r0,1h                        ;r0 = DWORD(((r1 << 14 >> 23 << 2) + (r1 << 14 >> 23)) << 1)
0800FCB4 4A0B     ldr     r2,=2013E00h                    ;
0800FCB6 62D0     str     r0,[r2,2Ch]                     ;Store card ATK into [02013E2C]
0800FCB8 4808     ldr     r0,=7FFh                        ;
0800FCBA 4020     and     r0,r4                           ;
0800FCBC 0080     lsl     r0,r0,2h                        ;
0800FCBE 4908     ldr     r1,=8832B84h                    ;
0800FCC0 1840     add     r0,r0,r1                        ;r0 = 0x8832B84 + ((r0 & r4) << 2)
0800FCC2 6800     ldr     r0,[r0]                         ;
0800FCC4 21F8     mov     r1,0F8h                         ;
0800FCC6 0449     lsl     r1,r1,11h                       ;r1 = 0x1F00000
0800FCC8 4008     and     r0,r1                           ;r0  &= r1
0800FCCA 0D00     lsr     r0,r0,14h                       ;r0 >>= 20
0800FCCC 2815     cmp     r0,15h                          ;
0800FCCE DB10     blt     800FCF2h                        ;if (r0 < 21), branch to 0x800FCF2
0800FCD0 2817     cmp     r0,17h                          ;
0800FCD2 DD09     ble     800FCE8h                        ;if (r0 <= 23), branch to 0x800FCE8
0800FCD4 2818     cmp     r0,18h                          ;
0800FCD6 D009     beq     800FCECh                        ;if (r0 == 24), branch to 0x800FCEC
0800FCD8 E00B     b       800FCF2h                        ;else branch to 0x800FCF2
0800FCDA 0000     lsl     r0,r0,0h                        ;

Cards Data array

0x832B84 to 0x833C7F - Cards data array, containing ATK, DEF and other data.

bitmap:
YYYY xxxA AAAA BBCC CCCC CCCD DDDD DDDD
Y - Attribute
    0 - LIGHT
    1 - DARK
    2 - WATER
    3 - FIRE
    4 - EARTH
    5 - WIND
    6 - ---
    7 - MAGIC
    8 - TRAP
    9 - DIVINE
A - Card Type
    0 - [] (Monster)
    1 - Dragon
    2 - Zombie
    3 - Fiend
    4 - Pyro
    5 - Sea Serpent
    6 - Rock
    7 - Machine
    8 - Fish
    9 - Dinosaur
    A - Insect
    B - Beast
    C - Beast-Warrior
    D - Plant
    E - Aqua
    F - Warrior
   10 - Winged-Beast
   11 - Fairy
   12 - Spellcaster
   13 - Thunder
   14 - Reptile
   15 - Trap
   16 - Magic
   17 - Ticket ("Cannot be used in duel")
   18 - Divine-Beast ("Cannot be used in duel", displays the unused Divine Attribute, sets the card Level to 10, and displays blank values as the ATK stats)
B - Monster category
    0 - Normal Monster
    1 - Effect Monster
    2 - Fusion Monster
    3 - Ritual Monster
C - ATK ÷ 10
D - DEF ÷ 10

Take this example with Earthbound Spirit (ID #0001).

C8 64 30 A8 => 0xA83064C8
Card ATK :
=> DWORD(((0xA83064C8 << 14 >> 23 << 2) + (0xA83064C8 << 14 >> 23)) << 1) = 0d500
Or :
xxxx xxxx xxxx xxCC CCCC CCCx xxxx xxxx
0b000110010 = 0d50
50 × 10 = 500

Cards names

0x83663C - Card Names in 6 languages : Japanese, English, German, French, Italian, Spanish



Internal Data for Yu-Gi-Oh! Worldwide Edition: Stairway to the Destined Duel

ROM MapRAM MapText TableNotesTutorials