If you are still using the old URL (datacrystal.romhacking.net), please update your bookmarks! The old URL may stop working soon.
The current URL is datacrystal.tcrf.net.
The current URL is datacrystal.tcrf.net.
Yu-Gi-Oh! Worldwide Edition: Stairway to the Destined Duel/ROM map
Jump to navigation
Jump to search
The following article is a ROM map for Yu-Gi-Oh! Worldwide Edition: Stairway to the Destined Duel.
0x884 (prepare duel data ?)
08000884 0105 lsl r5,r0,4h ; 08000886 0000 lsl r0,r0,0h ; 08000888 0307 lsl r7,r0,0Ch ; 0800088A 0000 lsl r0,r0,0h ; 0800088C B5F0 push r4-r7,r14 ; 0800088E 4657 mov r7,r10 ; 08000890 464E mov r6,r9 ; 08000892 4645 mov r5,r8 ; 08000894 B4E0 push r5-r7 ; 08000896 4849 ldr r0,=5000200h ; 08000898 4949 ldr r1,=8385104h ; 0800089A 468A mov r10,r1 ; 0800089C 2220 mov r2,20h ; 0800089E F088F9F7 bl 8088C90h ; 080008A2 2020 mov r0,20h ; 080008A4 2110 mov r1,10h ; 080008A6 F087FD0F bl 80882C8h ; 080008AA 4846 ldr r0,=0C0Fh ; 080008AC 4681 mov r9,r0 ; 080008AE 4C46 ldr r4,=8372FBAh ;r4 = pointer_to_in_game_text 080008B0 2009 mov r0,9h ; 080008B2 2109 mov r1,9h ; 080008B4 464A mov r2,r9 ; 080008B6 1C23 mov r3,r4 ; 080008B8 F087FFA4 bl 8088804h ; 080008BC 4943 ldr r1,=0C07h ; 080008BE 4688 mov r8,r1 ; 080008C0 2008 mov r0,8h ; 080008C2 2108 mov r1,8h ; 080008C4 4642 mov r2,r8 ; 080008C6 1C23 mov r3,r4 ; 080008C8 F087FF9C bl 8088804h ; 080008CC 4E40 ldr r6,=0C01h ; 080008CE 2073 mov r0,73h ; 080008D0 210B mov r1,0Bh ; 080008D2 1C32 mov r2,r6 ; 080008D4 1C23 mov r3,r4 ; 080008D6 F087FF95 bl 8088804h ; 080008DA 4D3E ldr r5,=0C0Dh ; 080008DC 2072 mov r0,72h ; 080008DE 210A mov r1,0Ah ; 080008E0 1C2A mov r2,r5 ; 080008E2 1C23 mov r3,r4 ; 080008E4 F087FF8E bl 8088804h ; 080008E8 340A add r4,0Ah ; 080008EA 2001 mov r0,1h ; 080008EC 2129 mov r1,29h ; 080008EE 464A mov r2,r9 ; 080008F0 1C23 mov r3,r4 ; 080008F2 F087FF87 bl 8088804h ; 080008F6 2000 mov r0,0h ; 080008F8 2128 mov r1,28h ; 080008FA 4642 mov r2,r8 ; 080008FC 1C23 mov r3,r4 ; 080008FE F087FF81 bl 8088804h ; 08000902 2069 mov r0,69h ; 08000904 212B mov r1,2Bh ; 08000906 1C32 mov r2,r6 ; 08000908 1C23 mov r3,r4 ; 0800090A F087FF7B bl 8088804h ; 0800090E 2068 mov r0,68h ; 08000910 212A mov r1,2Ah ; 08000912 1C2A mov r2,r5 ; 08000914 1C23 mov r3,r4 ; 08000916 F087FF75 bl 8088804h ; 0800091A 482F ldr r0,=6014000h ; 0800091C 2100 mov r1,0h ; 0800091E F088F89B bl 8088A58h ; 08000922 24A0 mov r4,0A0h ; 08000924 04E4 lsl r4,r4,13h ; 08000926 1C20 mov r0,r4 ; 08000928 4651 mov r1,r10 ; 0800092A 2220 mov r2,20h ; 0800092C F088F9A2 bl 8088C74h ; 08000930 2000 mov r0,0h ; 08000932 8020 strh r0,[r4] ; 08000934 4B29 ldr r3,=8A9E708h ; 08000936 2000 mov r0,0h ; 08000938 2110 mov r1,10h ; 0800093A 2220 mov r2,20h ; 0800093C F085FBF2 bl 8086124h ; 08000940 2080 mov r0,80h ; 08000942 00C0 lsl r0,r0,3h ; 08000944 4B26 ldr r3,=8A9F8DCh ; 08000946 2120 mov r1,20h ; 08000948 22A0 mov r2,0A0h ; 0800094A F085FBEB bl 8086124h ; 0800094E 2480 mov r4,80h ; 08000950 0124 lsl r4,r4,4h ; 08000952 2294 mov r2,94h ; 08000954 0052 lsl r2,r2,1h ; 08000956 4B23 ldr r3,=8AA0BECh ; 08000958 1C20 mov r0,r4 ; 0800095A 2130 mov r1,30h ; 0800095C F085FBE2 bl 8086124h ; 08000960 22AE mov r2,0AEh ; 08000962 0052 lsl r2,r2,1h ; 08000964 4B20 ldr r3,=8AA1214h ; 08000966 1C20 mov r0,r4 ; 08000968 2140 mov r1,40h ; 0800096A F085FBDB bl 8086124h ; 0800096E 2400 mov r4,0h ; 08000970 271F mov r7,1Fh ; 08000972 26F8 mov r6,0F8h ; 08000974 00B6 lsl r6,r6,2h ; 08000976 25F8 mov r5,0F8h ; 08000978 01ED lsl r5,r5,7h ; 0800097A 0063 lsl r3,r4,1h ; 0800097C 481B ldr r0,=5000180h ; 0800097E 181B add r3,r3,r0 ; 08000980 8819 ldrh r1,[r3] ; 08000982 221F mov r2,1Fh ; 08000984 400A and r2,r1 ; 08000986 1C08 mov r0,r1 ; 08000988 4030 and r0,r6 ; 0800098A 4029 and r1,r5 ; 0800098C 0852 lsr r2,r2,1h ; 0800098E 403A and r2,r7 ; 08000990 0840 lsr r0,r0,1h ; 08000992 4030 and r0,r6 ; 08000994 0849 lsr r1,r1,1h ; 08000996 4029 and r1,r5 ; 08000998 4302 orr r2,r0 ; 0800099A 4311 orr r1,r2 ; 0800099C 8019 strh r1,[r3] ; 0800099E 3401 add r4,1h ; 080009A0 2C0F cmp r4,0Fh ; 080009A2 DDEA ble 800097Ah ; 080009A4 4812 ldr r0,=3004876h ; 080009A6 4913 ldr r1,=8228570h ; 080009A8 2220 mov r2,20h ; 080009AA F088F963 bl 8088C74h ; 080009AE BC38 pop r3-r5 ; 080009B0 4698 mov r8,r3 ; 080009B2 46A1 mov r9,r4 ; 080009B4 46AA mov r10,r5 ; 080009B6 BCF0 pop r4-r7 ; 080009B8 BC01 pop r0 ; 080009BA 4700 bx r0 ;
Starter Deck
Add card to either Player's Main Deck or Fusion, and to Trunk
0800E3FC B510 push r4,r14 ; 0800E3FE 0400 lsl r0,r0,10h ; 0800E400 0C03 lsr r3,r0,10h ; 0800E402 2400 mov r4,0h ;r4 = 0 0800E404 4A0A ldr r2,=7FFh ;r2 = 2047 0800E406 401A and r2,r3 ;r2 = card_id & 2047 0800E408 0090 lsl r0,r2,2h ;r0 = card_id << 2 0800E40A 490A ldr r1,=8832B84h ;r1 = pointer to Cards stats array 0800E40C 1840 add r0,r0,r1 ; 0800E40E 6800 ldr r0,[r0] ;r0 = card_stats 0800E410 21F8 mov r1,0F8h ; 0800E412 0449 lsl r1,r1,11h ;r1 = 0x1F00000 0800E414 4008 and r0,r1 ; 0800E416 0D00 lsr r0,r0,14h ;r0 = (card_stats & 0x1F00000) >> 0x14 0800E418 2814 cmp r0,14h ; 0800E41A D845 bhi 800E4A8h ;if (card_type == trap_magic_or_devine_beast), branch to 0x800E4A8 0800E41C 0050 lsl r0,r2,1h ;r0 = card_id << 1 0800E41E 4906 ldr r1,=8833C80h ;r1 = pointer_to_internal_card_ids 0800E420 1840 add r0,r0,r1 ; 0800E422 8801 ldrh r1,[r0] ;r1 = internal_card_id 0800E424 4805 ldr r0,=776h ;r0 = 0d1910 0800E426 4281 cmp r1,r0 ; 0800E428 D10A bne 800E440h ;if (internal_card_id ≠ OBELISK_THE_TOURMENTOR), branch to 0x800E440 ; this should always be TRUE even in DM6, since devine_beast branches out at 0x800E41C 0800E42A 2003 mov r0,3h ;else r0 = 3 0800E42C E039 b 800E4A2h ;branch to 0x800E4A2 ... 0800E440 4281 cmp r1,r0 ; 0800E442 DB05 blt 800E450h ;if (internal_card_id ≠ devine_beast_or_token_or_alternate_art), branch to 0x800E450 0800E444 20EF mov r0,0EFh ; 0800E446 00C0 lsl r0,r0,3h ;r0 = THE_WINGED_DRAGON_OF_RA 0800E448 4281 cmp r1,r0 ; 0800E44A DC01 bgt 800E450h ;if (internal_card_id == token_or_alternate_art), branch to 0x800E450 0800E44C 2001 mov r0,1h ;else r0 = 1 0800E44E E028 b 800E4A2h ;branch to 0x800E4A2 0800E450 4808 ldr r0,=7FFh ;r0 = 2047 0800E452 4018 and r0,r3 ;r0 = card_id & 2047 0800E454 0080 lsl r0,r0,2h ;r0 = card_id << 2 0800E456 4908 ldr r1,=8832B84h ;r1 = pointer_to_cards_stats_array 0800E458 1840 add r0,r0,r1 ; 0800E45A 6800 ldr r0,[r0] ;r0 = card_stats 0800E45C 21F8 mov r1,0F8h ; 0800E45E 0449 lsl r1,r1,11h ;r1 = 0x1F00000 0800E460 4008 and r0,r1 ; 0800E462 0D00 lsr r0,r0,14h ;r0 = (card_stats & 0x1F00000) >> 0x14 0800E464 2816 cmp r0,16h ; 0800E466 D00C beq 800E482h ;if (card_type == magic), branch to 0x800E482 0800E468 2816 cmp r0,16h ; 0800E46A DC07 bgt 800E47Ch ;else if (card_type == ticket_or_divine_beast), branch to 0x800E47C 0800E46C 2815 cmp r0,15h ; 0800E46E D00A beq 800E486h ;else if (card_type == trap), branch to 0x800E486 0800E470 E00D b 800E48Eh ;else branch to 0x800E48E ... 0800E47C 2817 cmp r0,17h ; 0800E47E D004 beq 800E48Ah ;if (card_type == ticket), branch to 0x800E48A 0800E480 E005 b 800E48Eh ;else branch to 0x800E48E ; card_type is assumed to be monster 0800E482 2007 mov r0,7h ;r0 = 7 ; card_type == magic 0800E484 E00D b 800E4A2h ;branch to 0x800E4A2 0800E486 2008 mov r0,8h ;r0 = 8 ; card_type == trap 0800E488 E00B b 800E4A2h ;branch to 0x800E4A2 0800E48A 2009 mov r0,9h ;r0 = 9 ; card_type == ticket 0800E48C E009 b 800E4A2h ;branch to 0x800E4A2 0800E48E 4809 ldr r0,=7FFh ;r0 = 2047 0800E490 4018 and r0,r3 ;r0 = card_id & 2047 0800E492 0080 lsl r0,r0,2h ;;r0 = card_id << 2 0800E494 4908 ldr r1,=8832B84h ;r1 = pointer_to_cards_stats_array 0800E496 1840 add r0,r0,r1 ; 0800E498 6800 ldr r0,[r0] ;r0 = card_stats 0800E49A 21C0 mov r1,0C0h ; 0800E49C 0309 lsl r1,r1,0Ch ;r1 = 0xC0000 0800E49E 4008 and r0,r1 ; 0800E4A0 0C80 lsr r0,r0,12h ; 0800E4A2 2802 cmp r0,2h ;(magic, trap and ticket branch to here) 0800E4A4 D100 bne 800E4A8h ;if (card_category ≠ FUSION_MONSTER), skip next instruction 0800E4A6 2401 mov r4,1h ;r4 = 1 0800E4A8 2C00 cmp r4,0h ; 0800E4AA D107 bne 800E4BCh ;if (not_main_deck_card), branch to 0x800E4BC 0800E4AC 1C18 mov r0,r3 ;r0 = card_id 0800E4AE F07CFD5D bl 808AF6Ch ;add to cards in Player's Deck and in Trunk 0800E4B2 E006 b 800E4C2h ;exit this function 0800E4BC 1C18 mov r0,r3 ; 0800E4BE F07CFDB9 bl 808B034h ;add to Fusion Deck ? 0800E4C2 BC10 pop r4 ; 0800E4C4 BC01 pop r0 ; 0800E4C6 4700 bx r0 ;
Generate Starter Deck
- Arguments:
- r0: Starter Deck chosen, used to calculate the offset to the extra cards
0800E4C8 B5F0 push r4-r7,r14 ; 0800E4CA 1C05 mov r5,r0 ;r5 = starter_deck_id 0800E4CC 2400 mov r4,0h ;r4 = 0 0800E4CE 4F05 ldr r7,=0FFFFh ;r7 = 0xFFFF 0800E4D0 4E05 ldr r6,=7CFh ;r6 = 0d1999 0800E4D2 4906 ldr r1,=8230854h ;:loop_start ; r1 = pointer_to_starter_deck_guaranteed_cards 0800E4D4 0060 lsl r0,r4,1h ;r0 = number_of_cards_in_player_deck << 1 0800E4D6 1840 add r0,r0,r1 ;r0 = pointer_to_current_card_in_starter_deck 0800E4D8 8801 ldrh r1,[r0] ;r1 = internal_card_id 0800E4DA 1C08 mov r0,r1 ;r0 = internal_card_id 0800E4DC 42B9 cmp r1,r7 ; 0800E4DE D107 bne 800E4F0h ;if (internal_card_id ≠ 0xFFF), branch to 0x800E4F0 0800E4E0 2000 mov r0,0h ;else internal_card_id = 0 0800E4E2 E01C b 800E51Eh ;branch to 0x800E51E 0800E4E4 FFFF bl lr+0FFEh ; ... 0800E4F0 42B1 cmp r1,r6 ; 0800E4F2 D80B bhi 800E50Ch ;if (internal_card_id = alternate_artwork_card), branch to 0x800E50C 0800E4F4 4A03 ldr r2,=7FFh ;r2 = 2047 0800E4F6 1C10 mov r0,r2 ;r0 = 2047 0800E4F8 4001 and r1,r0 ;r1 = internal_card_id & 2047 0800E4FA 0048 lsl r0,r1,1h ;r0 = internal_card_id << 1 0800E4FC 4902 ldr r1,=88355FCh ;r1 = pointer_to_card_ids_array 0800E4FE 1840 add r0,r0,r1 ; 0800E500 8800 ldrh r0,[r0] ;r0 = card_id 0800E502 E00C b 800E51Eh ;branch to 0x800E51E ... 0800E50C 4A11 ldr r2,=0FFFFF830h ; 0800E50E 1880 add r0,r0,r2 ;r0 = internal_card_id - 2000 0800E510 4911 ldr r1,=7FFh ;r1 = 2047 0800E512 4008 and r0,r1 ;r0 = internal_card_id & 2047 0800E514 0040 lsl r0,r0,1h ;r0 = internal_card_id << 1 0800E516 4911 ldr r1,=88355FCh ;r1 = pointer_to_card_ids_array 0800E518 1840 add r0,r0,r1 ; 0800E51A 8800 ldrh r0,[r0] ;r0 = card_id 0800E51C 3001 add r0,1h ;card_id++ ; alternate_artwork_card_id is always one more than original_artwork_card_id 0800E51E 0400 lsl r0,r0,10h ; 0800E520 0C00 lsr r0,r0,10h ;card_id &= 0xFFFF 0800E522 F7FFFF6B bl 800E3FCh ;Add card to either Player's Main Deck or Fusion, and to Trunk 0800E526 3401 add r4,1h ;number_of_cards_in_player_deck++ 0800E528 2C23 cmp r4,23h ; 0800E52A D9D2 bls 800E4D2h ;if (number_of_cards_in_player_deck ≤ 35), loop to 0x800E4D2 0800E52C F07CFA42 bl 808A9B4h ;PRNG - LCG rand() 0800E530 2101 mov r1,1h ; 0800E532 4008 and r0,r1 ;r0 = PRN & 1 0800E534 0041 lsl r1,r0,1h ;r1 = (PRN % 1) << 1 0800E536 1809 add r1,r1,r0 ;r1 = ((PRN % 1) << 1) + (PRN % 1) 0800E538 1869 add r1,r5,r1 ;r1 += starter_deck_id 0800E53A 2400 mov r4,0h ;extra_cards_added = 0 0800E53C 4A08 ldr r2,=823089Ch ;r2 = pointer_to_starter_deck_extra_cards 0800E53E 0088 lsl r0,r1,2h ;r0 = (((PRN % 1) << 1) + (PRN % 1) + starter_deck_id) << 2 0800E540 1840 add r0,r0,r1 ; 0800E542 0040 lsl r0,r0,1h ; 0800E544 1885 add r5,r0,r2 ;r5 = pointer_to_extra_card 0800E546 8829 ldrh r1,[r5] ;:loop_start ; r1 = internal_card_id 0800E548 1C0A mov r2,r1 ; 0800E54A 4806 ldr r0,=0FFFFh ; 0800E54C 4281 cmp r1,r0 ; 0800E54E D10B bne 800E568h ; 0800E550 2000 mov r0,0h ; 0800E552 E024 b 800E59Eh ; ... 0800E568 4805 ldr r0,=7CFh ;r6 = 0d1999 0800E56A 4281 cmp r1,r0 ; 0800E56C D80E bhi 800E58Ch ;if (internal_card_id = alternate_artwork_card), branch to 0x800E58C 0800E56E 4A05 ldr r2,=7FFh ;r2 = 2047 0800E570 1C10 mov r0,r2 ;r0 = 2047 0800E572 4001 and r1,r0 ;r1 = internal_card_id & 2047 0800E574 0048 lsl r0,r1,1h ; 0800E576 4904 ldr r1,=88355FCh ;r1 = pointer_to_card_ids_array 0800E578 1840 add r0,r0,r1 ; 0800E57A 8800 ldrh r0,[r0] ;r0 = card_id 0800E57C E00F b 800E59Eh ;branch to 0x800E59E ... 0800E58C 4909 ldr r1,=0FFFFF830h ; 0800E58E 1850 add r0,r2,r1 ;r0 = internal_card_id - 2000 0800E590 4909 ldr r1,=7FFh ;r1 = 2047 0800E592 4008 and r0,r1 ;r0 = internal_card_id & 2047 0800E594 0040 lsl r0,r0,1h ;r0 = internal_card_id << 1 0800E596 4A09 ldr r2,=88355FCh ;r2 = pointer_to_card_ids_array 0800E598 1880 add r0,r0,r2 ; 0800E59A 8800 ldrh r0,[r0] ;r0 = card_id 0800E59C 3001 add r0,1h ;card_id++ ; alternate_artwork_card_id is always one more than original_artwork_card_id 0800E59E 0400 lsl r0,r0,10h ; 0800E5A0 0C00 lsr r0,r0,10h ;card_id &= 0xFFFF 0800E5A2 F7FFFF2B bl 800E3FCh ;Add card to either Player's Main Deck or Fusion, and to Trunk 0800E5A6 3502 add r5,2h ; 0800E5A8 3401 add r4,1h ;extra_cards_added++ 0800E5AA 2C04 cmp r4,4h ; 0800E5AC DDCB ble 800E546h ;if (extra_cards_added ≤ 4), loop to 0x800E546 0800E5AE BCF0 pop r4-r7 ; 0800E5B0 BC01 pop r0 ; 0800E5B2 4700 bx r0 ;
0xEC18 - Display non-Monster card info ?
0800EC18 6820 ldr r0,[r4] ;r0 = card_stats 0800EC1A 21F8 mov r1,0F8h ; 0800EC1C 0449 lsl r1,r1,11h ;r1 = 0x1F00000 0800EC1E 4008 and r0,r1 ; 0800EC20 0D00 lsr r0,r0,14h ;r0 = (card_stats & 0x1F00000) >> 0x14 0800EC22 2815 cmp r0,15h ; 0800EC24 DB08 blt 800EC38h ;if (card_type ≠ trap_magic_or_devine_beast), branch to 0x800EC38 0800EC26 2817 cmp r0,17h ; 0800EC28 DD02 ble 800EC30h ;if (card_type == trap_magic_or_ticket), branch to 0x800EC30 0800EC2A 2818 cmp r0,18h ; 0800EC2C D002 beq 800EC34h ;if (card_type == devine_beast), branch to 0x800EC34 0800EC2E E003 b 800EC38h ;else, branch to 0x, branch to 0x800EC38 0800EC30 2000 mov r0,0h ;r0 = 0 0800EC32 E006 b 800EC42h ;branch to 0x800EC42 0800EC34 200A mov r0,0Ah ;r0 = 10 0800EC36 E004 b 800EC42h ;branch to 0x800EC42 0800EC38 6820 ldr r0,[r4] ; 0800EC3A 21F0 mov r1,0F0h ; 0800EC3C 0549 lsl r1,r1,15h ; 0800EC3E 4008 and r0,r1 ; 0800EC40 0E40 lsr r0,r0,19h ;r0 = monster_level 0800EC42 4283 cmp r3,r0 ; 0800EC44 DBDE blt 800EC04h ; 0800EC46 AB06 add r3,sp,18h ; 0800EC48 4808 ldr r0,=2011C20h ;r1 = pointer to Player's Trunk 0800EC4A 227F mov r2,7Fh ; 0800EC4C 7900 ldrb r0,[r0,4h] ; 0800EC4E 4002 and r2,r0 ; 0800EC50 2A01 cmp r2,1h ; 0800EC52 D01D beq 800EC90h ; 0800EC54 2A02 cmp r2,2h ; 0800EC56 D017 beq 800EC88h ; 0800EC58 2A03 cmp r2,3h ; 0800EC5A D011 beq 800EC80h ; 0800EC5C 2A04 cmp r2,4h ; 0800EC5E D00B beq 800EC78h ; 0800EC60 4903 ldr r1,=836E902h ; 0800EC62 2A05 cmp r2,5h ; 0800EC64 D115 bne 800EC92h ; 0800EC66 4903 ldr r1,=8384854h ; 0800EC68 E013 b 800EC92h ; ... 0800EC78 4900 ldr r1,=838037Eh ; 0800EC7A E00A b 800EC92h ; 0800EC7C 037E lsl r6,r7,0Dh ; 0800EC7E 0838 lsr r0,r7,20h ; 0800EC80 4900 ldr r1,=837BDFEh ; 0800EC82 E006 b 800EC92h ; 0800EC84 BDFE pop r1-r7,r15 ; 0800EC86 0837 lsr r7,r6,20h ; 0800EC88 4900 ldr r1,=83772B0h ; 0800EC8A E002 b 800EC92h ; 0800EC8C 72B0 strb r0,[r6,0Ah] ; 0800EC8E 0837 lsr r7,r6,20h ; 0800EC90 4916 ldr r1,=8372C36h ; 0800EC92 1C18 mov r0,r3 ; 0800EC94 F07AF80C bl 8088CB0h ; 0800EC98 4B15 ldr r3,=82308D8h ; 0800EC9A 4816 ldr r0,=7FFh ; 0800EC9C 4038 and r0,r7 ; 0800EC9E 0080 lsl r0,r0,2h ; 0800ECA0 4915 ldr r1,=8832B84h ; 0800ECA2 1840 add r0,r0,r1 ; 0800ECA4 6802 ldr r2,[r0] ; 0800ECA6 20F8 mov r0,0F8h ; 0800ECA8 0440 lsl r0,r0,11h ; 0800ECAA 4002 and r2,r0 ; 0800ECAC 0D12 lsr r2,r2,14h ; 0800ECAE 4C13 ldr r4,=2011C20h ; 0800ECB0 7920 ldrb r0,[r4,4h] ; 0800ECB2 0641 lsl r1,r0,19h ; 0800ECB4 0DC9 lsr r1,r1,17h ; 0800ECB6 0050 lsl r0,r2,1h ; 0800ECB8 1880 add r0,r0,r2 ; 0800ECBA 00C0 lsl r0,r0,3h ; 0800ECBC 1809 add r1,r1,r0 ; 0800ECBE 18C9 add r1,r1,r3 ; 0800ECC0 6809 ldr r1,[r1] ; 0800ECC2 A806 add r0,sp,18h ; 0800ECC4 F07AF800 bl 8088CC8h ; 0800ECC8 A806 add r0,sp,18h ; 0800ECCA 227F mov r2,7Fh ; 0800ECCC 7924 ldrb r4,[r4,4h] ; 0800ECCE 4022 and r2,r4 ; 0800ECD0 2A01 cmp r2,1h ; 0800ECD2 D025 beq 800ED20h ; 0800ECD4 2A02 cmp r2,2h ; 0800ECD6 D01F beq 800ED18h ; 0800ECD8 2A03 cmp r2,3h ; 0800ECDA D019 beq 800ED10h ; 0800ECDC 2A04 cmp r2,4h ; 0800ECDE D013 beq 800ED08h ; 0800ECE0 4907 ldr r1,=836E906h ; 0800ECE2 2A05 cmp r2,5h ; 0800ECE4 D11D bne 800ED22h ; 0800ECE6 4907 ldr r1,=8384856h ; 0800ECE8 E01B b 800ED22h ;
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] ;r4 = card_id 0800FC66 4809 ldr r0,=7FFh ; 0800FC68 4020 and r0,r4 ; 0800FC6A 0080 lsl r0,r0,2h ;Ensures card_id < 2048 0800FC6C 4908 ldr r1,=8832B84h ; 0800FC6E 1840 add r0,r0,r1 ;r0 = 0x8832B84 + ((card_ID & 0x7FF) << 2) 0800FC70 6800 ldr r0,[r0] ;r0 = [compressed_card_data_array] 0800FC72 21F8 mov r1,0F8h ; 0800FC74 0449 lsl r1,r1,11h ; 0800FC76 4008 and r0,r1 ;r0 &= 0x1F00000 0800FC78 0D00 lsr r0,r0,14h ;r0 >> 20 0800FC7A 2815 cmp r0,15h ; 0800FC7C DB0F blt 800FC9Eh ;if (card_type < 0x15 [is a monster card]), branch to 0x800FC9E 0800FC7E 2817 cmp r0,17h ; 0800FC80 DD08 ble 800FC94h ;if (card_type ≤ 0x17 [is not a monster card]), branch to 0x800FC94 0800FC82 2818 cmp r0,18h ; 0800FC84 D008 beq 800FC98h ;if (card_type == DIVINE_BEAST), branch to 0x800FC98 0800FC86 E00A b 800FC9Eh ;else branch to 0x800FC9E (default for Monster cards) 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 ;if (card_type ≤ 0x17 [is not a monster card]), ATK = 0 0800FC96 E00D b 800FCB4h ;branch to 0x800FCB4 (store 0 into [0x2013E2C]) 0800FC98 20FA mov r0,0FAh ;if (card_type == DIVINE_BEAST) ... 0800FC9A 0100 lsl r0,r0,4h ;ATK = 4000 0800FC9C E00A b 800FCB4h ;branch to 0x800FCB4 (store 4000 into [0x2013E2C]) 0800FC9E 480F ldr r0,=7FFh ;if (card_type < 0x15 [is a monster card]) 0800FCA0 4020 and r0,r4 ;Ensures card_id < 2048 0800FCA2 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 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 [0x02013E2C] 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 (card_type < 0x15), branch to 0x800FCF2 0800FCD0 2817 cmp r0,17h ; 0800FCD2 DD09 ble 800FCE8h ;if (card_type ≤ 0x17), branch to 0x800FCE8 0800FCD4 2818 cmp r0,18h ; 0800FCD6 D009 beq 800FCECh ;if (card_type == DIVINE_BEAST), branch to 0x800FCEC 0800FCD8 E00B b 800FCF2h ;else branch to 0x800FCF2 (default for Monster cards) 0800FCDA 0000 lsl r0,r0,0h ;
0x10A80 - r0 = 0; pop r4, bx pop r1
08010A80 2000 mov r0,0h ; 08010A82 BC10 pop r4 ; 08010A84 BC02 pop r1 ; 08010A86 4708 bx r1 ;
Copies card drawn in hand
08010A88 6809 ldr r1,[r1] ;r1 = card_drawn 08010A8A 6001 str r1,[r0] ;store it in EWRAM 08010A8C 4770 bx r14 ;
0x10A8E
08010A90 6803 ldr r3,[r0] ; 08010A92 680A ldr r2,[r1] ; 08010A94 6002 str r2,[r0] ; 08010A96 600B str r3,[r1] ; 08010A98 4770 bx r14 ;
0x8010A88 (copies halfword corresponding to a card in Deck to the next Deck slot ?)
Arguments:
- r0 = 0x20197A8 + ((1 & is_cpu_deck_flag) × 0xD64) + (number_of_cards_in_deck << 2)
- r1 = ((1 & is_cpu_deck_flag) × 0xD64) + (number_of_cards_in_deck << 2) - 4
08010A88 6809 ldr r1,[r1] ;4 145756 08010A8A 6001 str r1,[r0] ;10 145766 08010A8C 4770 bx r14 ;8 145774
0x8010A90
08010A90 6803 ldr r3,[r0] ; 08010A92 680A ldr r2,[r1] ; 08010A94 6002 str r2,[r0] ; 08010A96 600B str r3,[r1] ; 08010A98 4770 bx r14 ;
0x11398
08011398 B5F0 push r4-r7,r14 ; 0801139A 1C0B mov r3,r1 ; 0801139C 4C15 ldr r4,=2018FE4h ; 0801139E 2101 mov r1,1h ; 080113A0 4001 and r1,r0 ; 080113A2 4815 ldr r0,=0D64h ; 080113A4 4341 mul r1,r0 ; 080113A6 190A add r2,r1,r4 ; 080113A8 78D0 ldrb r0,[r2,3h] ;r0 = number_of_cards_in_deck 080113AA 2800 cmp r0,0h ; 080113AC D01E beq 80113ECh ;if (number_of_cards_in_deck == 0), exit this subroutine 080113AE 78D0 ldrb r0,[r2,3h] ;r0 = number_of_cards_in_deck 080113B0 4343 mul r3,r0 ; 080113B2 2B00 cmp r3,0h ; 080113B4 DD1A ble 80113ECh ; 080113B6 4D11 ldr r5,=7C4h ; 080113B8 1960 add r0,r4,r5 ; 080113BA 180F add r7,r1,r0 ;r7 = pointer_to_deck 080113BC 1C1D mov r5,r3 ; 080113BE 1C16 mov r6,r2 ; 080113C0 F079FAF8 bl 808A9B4h ;PRNG - LCG rand() 080113C4 78F1 ldrb r1,[r6,3h] ; 080113C6 F083FAF3 bl 80949B0h ; 080113CA 1C04 mov r4,r0 ; 080113CC F079FAF2 bl 808A9B4h ;PRNG - LCG rand() 080113D0 78F1 ldrb r1,[r6,3h] ; 080113D2 F083FAED bl 80949B0h ; 080113D6 1C01 mov r1,r0 ; 080113D8 00A4 lsl r4,r4,2h ; 080113DA 193C add r4,r7,r4 ; 080113DC 0089 lsl r1,r1,2h ; 080113DE 1879 add r1,r7,r1 ; 080113E0 1C20 mov r0,r4 ; 080113E2 F7FFFB55 bl 8010A90h ; 080113E6 3D01 sub r5,1h ; 080113E8 2D00 cmp r5,0h ; 080113EA D1E9 bne 80113C0h ; 080113EC BCF0 pop r4-r7 ; 080113EE BC01 pop r0 ; 080113F0 4700 bx r0 ;
Remove specified card from deck
- Arguments:
- r0: 0 is Player's Deck, 1 is CPU's Deck
08011400 B5F0 push r4-r7,r14 ; 08011402 464F mov r7,r9 ; 08011404 4646 mov r6,r8 ; 08011406 B4C0 push r6,r7 ; 08011408 1C0C mov r4,r1 ; 0801140A 4B14 ldr r3,=2018FE4h ; 0801140C 2101 mov r1,1h ; 0801140E 4001 and r1,r0 ; 08011410 4813 ldr r0,=0D64h ; 08011412 4341 mul r1,r0 ; 08011414 18CD add r5,r1,r3 ; 08011416 78E8 ldrb r0,[r5,3h] ;r0 = number_of_cards_in_deck 08011418 4284 cmp r4,r0 ; 0801141A DA25 bge 8011468h ; 0801141C 4E11 ldr r6,=7C4h ;r6 = 0d1988, excludes alternate art cards 0801141E 1998 add r0,r3,r6 ; 08011420 180F add r7,r1,r0 ; 08011422 00A6 lsl r6,r4,2h ; 08011424 19B8 add r0,r7,r6 ; 08011426 4681 mov r9,r0 ; 08011428 1C10 mov r0,r2 ; 0801142A 4649 mov r1,r9 ; 0801142C F7FFFB2C bl 8010A88h ; 08011430 78E8 ldrb r0,[r5,3h] ; 08011432 3801 sub r0,1h ;number_of_cards_in_deck-- 08011434 70E8 strb r0,[r5,3h] ; 08011436 4284 cmp r4,r0 ; 08011438 DA0D bge 8011456h ; 0801143A 46A8 mov r8,r5 ; 0801143C 3604 add r6,4h ; 0801143E 464D mov r5,r9 ; 08011440 19B9 add r1,r7,r6 ; 08011442 1C28 mov r0,r5 ; 08011444 F7FFFB20 bl 8010A88h ; 08011448 3604 add r6,4h ; 0801144A 3504 add r5,4h ; 0801144C 3401 add r4,1h ; 0801144E 4641 mov r1,r8 ; 08011450 78C9 ldrb r1,[r1,3h] ; 08011452 428C cmp r4,r1 ; 08011454 DBF4 blt 8011440h ; 08011456 2001 mov r0,1h ; 08011458 E007 b 801146Ah ;
0x11468
08011468 2000 mov r0,0h ; 0801146A BC18 pop r3,r4 ; 0801146C 4698 mov r8,r3 ; 0801146E 46A1 mov r9,r4 ; 08011470 BCF0 pop r4-r7 ; 08011472 BC02 pop r1 ; 08011474 4708 bx r1 ;
Copy Player's deck to EW_20197A8
080116AC B5F0 push r4-r7,r14 ; 080116AE 464F mov r7,r9 ; 080116B0 4646 mov r6,r8 ; 080116B2 B4C0 push r6,r7 ; 080116B4 4C31 ldr r4,=20197A8h ;r4 = pointer_to_player_deck 080116B6 21A0 mov r1,0A0h ; 080116B8 0049 lsl r1,r1,1h ;r1 = 320 080116BA 1C20 mov r0,r4 ;r0 = pointer_to_player_deck 080116BC F077FACC bl 8088C58h ;Blanks specified RAM area 080116C0 482F ldr r0,=0FFFFF83Ch ; 080116C2 1821 add r1,r4,r0 ; 080116C4 2000 mov r0,0h ; 080116C6 70C8 strb r0,[r1,3h] ; 080116C8 2300 mov r3,0h ; 080116CA 4E2E ldr r6,=2011C20h ; 080116CC 4A2E ldr r2,=20C8h ; 080116CE 18B0 add r0,r6,r2 ;r0 = pointer_to_number_of_cards_in_player_deck 080116D0 8807 ldrh r7,[r0] ;r7 = number_of_cards_in_player_deck 080116D2 42BB cmp r3,r7 ; 080116D4 DA20 bge 8011718h ; 080116D6 4A2D ldr r2,=0FFFFF000h ; 080116D8 4690 mov r8,r2 ; 080116DA 2711 mov r7,11h ; 080116DC 427F neg r7,r7 ; 080116DE 46BC mov r12,r7 ; 080116E0 1C0D mov r5,r1 ; 080116E2 4681 mov r9,r0 ; 080116E4 1C22 mov r2,r4 ; 080116E6 482A ldr r0,=2008h ; 080116E8 1834 add r4,r6,r0 ; 080116EA 492A ldr r1,=0FFFh ; 080116EC 1C0E mov r6,r1 ; 080116EE 8821 ldrh r1,[r4] ;r1 = card_id 080116F0 4031 and r1,r6 ; 080116F2 4640 mov r0,r8 ; 080116F4 8817 ldrh r7,[r2] ; 080116F6 4038 and r0,r7 ; 080116F8 4308 orr r0,r1 ; 080116FA 8010 strh r0,[r2] ;Store card_id in [r2] 080116FC 4660 mov r0,r12 ; 080116FE 7851 ldrb r1,[r2,1h] ; 08011700 4008 and r0,r1 ; 08011702 7050 strb r0,[r2,1h] ; 08011704 78E8 ldrb r0,[r5,3h] ; 08011706 3001 add r0,1h ; 08011708 70E8 strb r0,[r5,3h] ; 0801170A 3204 add r2,4h ; 0801170C 3402 add r4,2h ; 0801170E 3301 add r3,1h ; 08011710 464F mov r7,r9 ; 08011712 883F ldrh r7,[r7] ; 08011714 42BB cmp r3,r7 ; 08011716 DBEA blt 80116EEh ; 08011718 491F ldr r1,=2018FE4h ; 0801171A 2000 mov r0,0h ; 0801171C 7148 strb r0,[r1,5h] ; 0801171E 2300 mov r3,0h ; 08011720 4C18 ldr r4,=2011C20h ; 08011722 4A1E ldr r2,=20CCh ; 08011724 18A0 add r0,r4,r2 ; 08011726 8807 ldrh r7,[r0] ; 08011728 42BB cmp r3,r7 ; 0801172A DA21 bge 8011770h ; 0801172C 4A17 ldr r2,=0FFFFF000h ; 0801172E 4690 mov r8,r2 ; 08011730 2711 mov r7,11h ; 08011732 427F neg r7,r7 ; 08011734 46BC mov r12,r7 ; 08011736 1C0D mov r5,r1 ; 08011738 4681 mov r9,r0 ; 0801173A 4819 ldr r0,=0A44h ; 0801173C 182A add r2,r5,r0 ; 0801173E 4919 ldr r1,=209Eh ; 08011740 1864 add r4,r4,r1 ; 08011742 4F14 ldr r7,=0FFFh ; 08011744 1C3E mov r6,r7 ; 08011746 8821 ldrh r1,[r4] ; 08011748 4031 and r1,r6 ; 0801174A 4640 mov r0,r8 ; 0801174C 8817 ldrh r7,[r2] ; 0801174E 4038 and r0,r7 ; 08011750 4308 orr r0,r1 ; 08011752 8010 strh r0,[r2] ; 08011754 4660 mov r0,r12 ; 08011756 7851 ldrb r1,[r2,1h] ; 08011758 4008 and r0,r1 ; 0801175A 7050 strb r0,[r2,1h] ; 0801175C 7968 ldrb r0,[r5,5h] ; 0801175E 3001 add r0,1h ; 08011760 7168 strb r0,[r5,5h] ; 08011762 3204 add r2,4h ; 08011764 3402 add r4,2h ; 08011766 3301 add r3,1h ; 08011768 464F mov r7,r9 ; 0801176A 883F ldrh r7,[r7] ; 0801176C 42BB cmp r3,r7 ; 0801176E DBEA blt 8011746h ; 08011770 BC18 pop r3,r4 ; 08011772 4698 mov r8,r3 ; 08011774 46A1 mov r9,r4 ; 08011776 BCF0 pop r4-r7 ; 08011778 BC01 pop r0 ; 0801177A 4700 bx r0 ;
Life Points management
Increase Player or CPU's Life Points
- Increases displayed Life Points by 100 increments until the total Life Points gain is completed.
- Arguments:
- r2 : total life points gain amount
- r5 : ?
- r6 : 0 for Player, 1 for CPU
- r7 : pointer to remaining amount of Life Points to increase (minus an offset of 2)
0801CD14 B5F0 push r4-r7,r14 ; 0801CD16 4657 mov r7,r10 ; 0801CD18 464E mov r6,r9 ; 0801CD1A 4645 mov r5,r8 ; 0801CD1C B4E0 push r5-r7 ; 0801CD1E 0400 lsl r0,r0,10h ; 0801CD20 0C05 lsr r5,r0,10h ; 0801CD22 4F0F ldr r7,=20182C0h ; 0801CD24 8838 ldrh r0,[r7] ; 0801CD26 0BC6 lsr r6,r0,0Fh ;r6 = [EW_20182C0] >> 15 0801CD28 2068 mov r0,68h ;r0 = 0x68 0801CD2A 4370 mul r0,r6 ; 0801CD2C 3008 add r0,8h ; 0801CD2E 4684 mov r12,r0 ; 0801CD30 0070 lsl r0,r6,1h ; 0801CD32 1980 add r0,r0,r6 ; 0801CD34 00C0 lsl r0,r0,3h ; 0801CD36 2158 mov r1,58h ; 0801CD38 1A09 sub r1,r1,r0 ;r1 = 0x58 - r0 0801CD3A 200D mov r0,0Dh ; 0801CD3C 2D00 cmp r5,0h ; 0801CD3E D000 beq 801CD42h ; 0801CD40 200C mov r0,0Ch ; 0801CD42 4682 mov r10,r0 ; 0801CD44 4A07 ldr r2,=80Ah ; 0801CD46 19D2 add r2,r2,r7 ; 0801CD48 4691 mov r9,r2 ; 0801CD4A 7812 ldrb r2,[r2] ; 0801CD4C 0650 lsl r0,r2,19h ; 0801CD4E 0E44 lsr r4,r0,19h ; 0801CD50 2C01 cmp r4,1h ; 0801CD52 D037 beq 801CDC4h ; 0801CD54 2C01 cmp r4,1h ; 0801CD56 DC07 bgt 801CD68h ; 0801CD58 2C00 cmp r4,0h ; 0801CD5A D009 beq 801CD70h ; 0801CD5C E15A b 801D014h ; 0801CD5E 0000 lsl r0,r0,0h ; 0801CD60 82C0 strh r0,[r0,16h] ; 0801CD62 0201 lsl r1,r0,8h ; 0801CD64 080A lsr r2,r1,20h ; 0801CD66 0000 lsl r0,r0,0h ; 0801CD68 2C02 cmp r4,2h ; 0801CD6A D100 bne 801CD6Eh ; 0801CD6C E07C b 801CE68h ; 0801CD6E E151 b 801D014h ; 0801CD70 480C ldr r0,=50003E0h ; 0801CD72 490D ldr r1,=89B99D4h ; 0801CD74 2220 mov r2,20h ; 0801CD76 F06BFF8B bl 8088C90h ; 0801CD7A 480C ldr r0,=6016C80h ; 0801CD7C 490C ldr r1,=89B9BD4h ; 0801CD7E 22C0 mov r2,0C0h ; 0801CD80 0112 lsl r2,r2,4h ; 0801CD82 F06BFF85 bl 8088C90h ; 0801CD86 480B ldr r0,=201CCB0h ; 0801CD88 4B0B ldr r3,=85Ch ; 0801CD8A 18C0 add r0,r0,r3 ; 0801CD8C 6004 str r4,[r0] ; 0801CD8E 2000 mov r0,0h ; 0801CD90 2100 mov r1,0h ; 0801CD92 F00FFAC3 bl 802C31Ch ; 0801CD96 4809 ldr r0,=80Ch ; 0801CD98 1839 add r1,r7,r0 ; 0801CD9A 4809 ldr r0,=0FFFFF01Fh ; 0801CD9C 880A ldrh r2,[r1] ; 0801CD9E 4010 and r0,r2 ; 0801CDA0 8008 strh r0,[r1] ; 0801CDA2 E052 b 801CE4Ah ; 0801CDA4 03E0 lsl r0,r4,0Fh ; 0801CDA6 0500 lsl r0,r0,14h ; 0801CDA8 99D4 ldr r1,[sp,350h] ; 0801CDAA 089B lsr r3,r3,2h ; 0801CDAC 6C80 ldr r0,[r0,48h] ; 0801CDAE 0601 lsl r1,r0,18h ; 0801CDB0 9BD4 ldr r3,[sp,350h] ; 0801CDB2 089B lsr r3,r3,2h ; 0801CDB4 CCB0 ldmia [r4]!,r4,r5,r7 ; 0801CDB6 0201 lsl r1,r0,8h ; 0801CDB8 085C lsr r4,r3,1h ; 0801CDBA 0000 lsl r0,r0,0h ; 0801CDBC 080C lsr r4,r1,20h ; 0801CDBE 0000 lsl r0,r0,0h ; 0801CDC0 F01FFFFF bl 803CDC2h ; 0801CDC4 887A ldrh r2,[r7,2h] ; 0801CDC6 2D00 cmp r5,0h ; 0801CDC8 D100 bne 801CDCCh ; 0801CDCA 4252 neg r2,r2 ; 0801CDCC 426B neg r3,r5 ; 0801CDCE 432B orr r3,r5 ; 0801CDD0 0FDB lsr r3,r3,1Fh ; 0801CDD2 4660 mov r0,r12 ; 0801CDD4 F7FFFF56 bl 801CC84h ; 0801CDD8 4814 ldr r0,=80Ch ; 0801CDDA 183D add r5,r7,r0 ; 0801CDDC 8829 ldrh r1,[r5] ; 0801CDDE 0508 lsl r0,r1,14h ; 0801CDE0 0E40 lsr r0,r0,19h ; 0801CDE2 2859 cmp r0,59h ; 0801CDE4 DC2A bgt 801CE3Ch ; 0801CDE6 3001 add r0,1h ; 0801CDE8 267F mov r6,7Fh ; 0801CDEA 4030 and r0,r6 ; 0801CDEC 0140 lsl r0,r0,5h ; 0801CDEE 4B10 ldr r3,=0FFFFF01Fh ; 0801CDF0 1C1A mov r2,r3 ; 0801CDF2 400A and r2,r1 ; 0801CDF4 4302 orr r2,r0 ; 0801CDF6 802A strh r2,[r5] ; 0801CDF8 490E ldr r1,=3000040h ; 0801CDFA 2080 mov r0,80h ; 0801CDFC 0080 lsl r0,r0,2h ; 0801CDFE 8889 ldrh r1,[r1,4h] ; 0801CE00 4008 and r0,r1 ; 0801CE02 2800 cmp r0,0h ; 0801CE04 D105 bne 801CE12h ; 0801CE06 480C ldr r0,=201CCB0h ; 0801CE08 7800 ldrb r0,[r0] ; 0801CE0A 4004 and r4,r0 ;r4 &= r0 0801CE0C 2C00 cmp r4,0h ; 0801CE0E D100 bne 801CE12h ; 0801CE10 E10A b 801D028h ; 0801CE12 0510 lsl r0,r2,14h ; 0801CE14 0E40 lsr r0,r0,19h ; 0801CE16 284F cmp r0,4Fh ; 0801CE18 DD00 ble 801CE1Ch ; 0801CE1A E105 b 801D028h ; 0801CE1C 3007 add r0,7h ; 0801CE1E 4030 and r0,r6 ; 0801CE20 0140 lsl r0,r0,5h ; 0801CE22 401A and r2,r3 ; 0801CE24 4302 orr r2,r0 ; 0801CE26 802A strh r2,[r5] ; 0801CE28 E0FE b 801D028h ; 0801CE2A 0000 lsl r0,r0,0h ; 0801CE2C 080C lsr r4,r1,20h ; 0801CE2E 0000 lsl r0,r0,0h ; 0801CE30 F01FFFFF bl 803CE32h ; 0801CE34 0040 lsl r0,r0,1h ; 0801CE36 0300 lsl r0,r0,0Ch ; 0801CE38 CCB0 ldmia [r4]!,r4,r5,r7 ; 0801CE3A 0201 lsl r1,r0,8h ; 0801CE3C 4650 mov r0,r10 ; 0801CE3E F06FF801 bl 808BE44h ; 0801CE42 4808 ldr r0,=0FFFFF01Fh ; 0801CE44 8829 ldrh r1,[r5] ; 0801CE46 4008 and r0,r1 ; 0801CE48 8028 strh r0,[r5] ; 0801CE4A 464B mov r3,r9 ; 0801CE4C 781A ldrb r2,[r3] ; 0801CE4E 0651 lsl r1,r2,19h ; 0801CE50 0E49 lsr r1,r1,19h ; 0801CE52 3101 add r1,1h ; 0801CE54 207F mov r0,7Fh ; 0801CE56 4001 and r1,r0 ; 0801CE58 2080 mov r0,80h ; 0801CE5A 4240 neg r0,r0 ; 0801CE5C 4010 and r0,r2 ; 0801CE5E 4308 orr r0,r1 ; 0801CE60 7018 strb r0,[r3] ; 0801CE62 E0E1 b 801D028h ; 0801CE64 F01FFFFF bl 803CE66h ; 0801CE68 4807 ldr r0,=2018FE4h ; 0801CE6A 4680 mov r8,r0 ; 0801CE6C 4807 ldr r0,=0D64h ; 0801CE6E 4370 mul r0,r6 ; 0801CE70 4643 mov r3,r8 ; 0801CE72 18C4 add r4,r0,r3 ;r4 = pointer_to_life_points 0801CE74 8820 ldrh r0,[r4] ;r0 = life_points 0801CE76 2800 cmp r0,0h ; 0801CE78 D10A bne 801CE90h ;if (life_points ≠ 0), branch to 0x801CE90 0801CE7A 2103 mov r1,3h ; 0801CE7C 2080 mov r0,80h ; 0801CE7E 4240 neg r0,r0 ; 0801CE80 4010 and r0,r2 ; 0801CE82 4308 orr r0,r1 ; 0801CE84 4649 mov r1,r9 ;r1 = points to ? in EWRAM 0801CE86 E0CE b 801D026h ;branch to 0x801D026; store r0 in [r1] ... 0801CE90 887A ldrh r2,[r7,2h] ;r2 = remaining_life_points_gain 0801CE92 2D00 cmp r5,0h ; 0801CE94 D100 bne 801CE98h ; 0801CE96 4252 neg r2,r2 ; 0801CE98 426B neg r3,r5 ; 0801CE9A 432B orr r3,r5 ; 0801CE9C 0FDB lsr r3,r3,1Fh ; 0801CE9E 4660 mov r0,r12 ; 0801CEA0 F7FFFEF0 bl 801CC84h ; 0801CEA4 8878 ldrh r0,[r7,2h] ;r0 = remaining_life_points_gain 0801CEA6 1C01 mov r1,r0 ; 0801CEA8 2963 cmp r1,63h ; 0801CEAA D93B bls 801CF24h ;if (remaining_life_points_gain ≤ 99), branch to 0x801CF24 0801CEAC 3864 sub r0,64h ;remaining_life_points_gain-= 100 0801CEAE 8078 strh r0,[r7,2h] ;Store remaining_life_points_gain in [pointer_to_remaining_life_points_gain] 0801CEB0 2D00 cmp r5,0h ; 0801CEB2 D003 beq 801CEBCh ; 0801CEB4 8820 ldrh r0,[r4] ;r0 = life_points 0801CEB6 3064 add r0,64h ;life_points += 100 0801CEB8 8020 strh r0,[r4] ;store life_points in [pointer_to_life_points] 0801CEBA E004 b 801CEC6h ; 0801CEBC 4640 mov r0,r8 ; 0801CEBE 1C31 mov r1,r6 ; 0801CEC0 2264 mov r2,64h ; 0801CEC2 F7F3FD41 bl 8010948h ; 0801CEC6 4912 ldr r1,=2018FE4h ; 0801CEC8 4812 ldr r0,=0D64h ; 0801CECA 4370 mul r0,r6 ; 0801CECC 1840 add r0,r0,r1 ;r0 = pointer_to_life_points 0801CECE 8801 ldrh r1,[r0] ;r1 = life_points 0801CED0 1C30 mov r0,r6 ; 0801CED2 F056FBD9 bl 8073688h ; 0801CED6 4810 ldr r0,=20182C0h ; 0801CED8 4A10 ldr r2,=80Ch ; 0801CEDA 1884 add r4,r0,r2 ; 0801CEDC 8822 ldrh r2,[r4] ; 0801CEDE 0511 lsl r1,r2,14h ; 0801CEE0 0E49 lsr r1,r1,19h ; 0801CEE2 3101 add r1,1h ;r1++ 0801CEE4 207F mov r0,7Fh ;r0 = 127 0801CEE6 4001 and r1,r0 ; 0801CEE8 0149 lsl r1,r1,5h ; 0801CEEA 4D0D ldr r5,=0FFFFF01Fh ; 0801CEEC 1C28 mov r0,r5 ; 0801CEEE 4010 and r0,r2 ; 0801CEF0 4308 orr r0,r1 ; 0801CEF2 8020 strh r0,[r4] ; 0801CEF4 0500 lsl r0,r0,14h ; 0801CEF6 0E40 lsr r0,r0,19h ; 0801CEF8 280A cmp r0,0Ah ; 0801CEFA DC00 bgt 801CEFEh ; 0801CEFC E094 b 801D028h ; 0801CEFE 4650 mov r0,r10 ; 0801CF00 F06EFFA0 bl 808BE44h ; 0801CF04 1C28 mov r0,r5 ; 0801CF06 8823 ldrh r3,[r4] ; 0801CF08 4018 and r0,r3 ; 0801CF0A 8020 strh r0,[r4] ; 0801CF0C E08C b 801D028h ; 0801CF0E 0000 lsl r0,r0,0h ; 0801CF10 8FE4 ldrh r4,[r4,3Eh] ; 0801CF12 0201 lsl r1,r0,8h ; 0801CF14 0D64 lsr r4,r4,15h ; 0801CF16 0000 lsl r0,r0,0h ; 0801CF18 82C0 strh r0,[r0,16h] ; 0801CF1A 0201 lsl r1,r0,8h ; 0801CF1C 080C lsr r4,r1,20h ; 0801CF1E 0000 lsl r0,r0,0h ; 0801CF20 F01FFFFF bl 803CF22h ; 0801CF24 2909 cmp r1,9h ; 0801CF26 D939 bls 801CF9Ch ; 0801CF28 380A sub r0,0Ah ; 0801CF2A 8078 strh r0,[r7,2h] ; 0801CF2C 2D00 cmp r5,0h ; 0801CF2E D003 beq 801CF38h ; 0801CF30 8820 ldrh r0,[r4] ;r0 = life_points 0801CF32 300A add r0,0Ah ;life_points +=10 0801CF34 8020 strh r0,[r4] ;store life_points in [pointer_to_life_points] 0801CF36 E004 b 801CF42h ; 0801CF38 4640 mov r0,r8 ; 0801CF3A 1C31 mov r1,r6 ; 0801CF3C 220A mov r2,0Ah ; 0801CF3E F7F3FD03 bl 8010948h ; 0801CF42 4911 ldr r1,=2018FE4h ; 0801CF44 4811 ldr r0,=0D64h ; 0801CF46 4370 mul r0,r6 ; 0801CF48 1840 add r0,r0,r1 ; 0801CF4A 8801 ldrh r1,[r0] ;r1 = life_points 0801CF4C 1C30 mov r0,r6 ; 0801CF4E F056FB9B bl 8073688h ; 0801CF52 480F ldr r0,=20182C0h ; 0801CF54 490F ldr r1,=80Ch ; 0801CF56 1844 add r4,r0,r1 ; 0801CF58 8822 ldrh r2,[r4] ; 0801CF5A 0511 lsl r1,r2,14h ; 0801CF5C 0E49 lsr r1,r1,19h ; 0801CF5E 3101 add r1,1h ;r1++ 0801CF60 207F mov r0,7Fh ;r0 = 127 0801CF62 4001 and r1,r0 ; 0801CF64 0149 lsl r1,r1,5h ; 0801CF66 4D0C ldr r5,=0FFFFF01Fh ; 0801CF68 1C28 mov r0,r5 ; 0801CF6A 4010 and r0,r2 ; 0801CF6C 4308 orr r0,r1 ; 0801CF6E 8020 strh r0,[r4] ; 0801CF70 0500 lsl r0,r0,14h ; 0801CF72 0E40 lsr r0,r0,19h ; 0801CF74 280A cmp r0,0Ah ; 0801CF76 DD57 ble 801D028h ; 0801CF78 4650 mov r0,r10 ; 0801CF7A F06EFF63 bl 808BE44h ; 0801CF7E 1C28 mov r0,r5 ; 0801CF80 8822 ldrh r2,[r4] ; 0801CF82 4010 and r0,r2 ; 0801CF84 8020 strh r0,[r4] ; 0801CF86 E04F b 801D028h ; 0801CF88 8FE4 ldrh r4,[r4,3Eh] ; 0801CF8A 0201 lsl r1,r0,8h ; 0801CF8C 0D64 lsr r4,r4,15h ; 0801CF8E 0000 lsl r0,r0,0h ; 0801CF90 82C0 strh r0,[r0,16h] ; 0801CF92 0201 lsl r1,r0,8h ; 0801CF94 080C lsr r4,r1,20h ; 0801CF96 0000 lsl r0,r0,0h ; 0801CF98 F01FFFFF bl 803CF9Ah ; 0801CF9C 2900 cmp r1,0h ; 0801CF9E D039 beq 801D014h ; 0801CFA0 3801 sub r0,1h ; 0801CFA2 8078 strh r0,[r7,2h] ; 0801CFA4 2D00 cmp r5,0h ; 0801CFA6 D003 beq 801CFB0h ; 0801CFA8 8820 ldrh r0,[r4] ; 0801CFAA 3001 add r0,1h ; 0801CFAC 8020 strh r0,[r4] ; 0801CFAE E004 b 801CFBAh ; 0801CFB0 4640 mov r0,r8 ; 0801CFB2 1C31 mov r1,r6 ; 0801CFB4 2201 mov r2,1h ; 0801CFB6 F7F3FCC7 bl 8010948h ; 0801CFBA 4911 ldr r1,=2018FE4h ; 0801CFBC 4811 ldr r0,=0D64h ; 0801CFBE 4370 mul r0,r6 ; 0801CFC0 1840 add r0,r0,r1 ; 0801CFC2 8801 ldrh r1,[r0] ; 0801CFC4 1C30 mov r0,r6 ; 0801CFC6 F056FB5F bl 8073688h ; 0801CFCA 480F ldr r0,=20182C0h ; 0801CFCC 4B0F ldr r3,=80Ch ; 0801CFCE 18C4 add r4,r0,r3 ; 0801CFD0 8822 ldrh r2,[r4] ; 0801CFD2 0511 lsl r1,r2,14h ; 0801CFD4 0E49 lsr r1,r1,19h ; 0801CFD6 3101 add r1,1h ; 0801CFD8 207F mov r0,7Fh ; 0801CFDA 4001 and r1,r0 ; 0801CFDC 0149 lsl r1,r1,5h ; 0801CFDE 4D0C ldr r5,=0FFFFF01Fh ; 0801CFE0 1C28 mov r0,r5 ; 0801CFE2 4010 and r0,r2 ; 0801CFE4 4308 orr r0,r1 ; 0801CFE6 8020 strh r0,[r4] ; 0801CFE8 0500 lsl r0,r0,14h ; 0801CFEA 0E40 lsr r0,r0,19h ; 0801CFEC 280A cmp r0,0Ah ; 0801CFEE DD1B ble 801D028h ; 0801CFF0 4650 mov r0,r10 ; 0801CFF2 F06EFF27 bl 808BE44h ; 0801CFF6 1C28 mov r0,r5 ; 0801CFF8 8821 ldrh r1,[r4] ; 0801CFFA 4008 and r0,r1 ; 0801CFFC 8020 strh r0,[r4] ; 0801CFFE E013 b 801D028h ; 0801D000 8FE4 ldrh r4,[r4,3Eh] ; 0801D002 0201 lsl r1,r0,8h ; 0801D004 0D64 lsr r4,r4,15h ; 0801D006 0000 lsl r0,r0,0h ; 0801D008 82C0 strh r0,[r0,16h] ; 0801D00A 0201 lsl r1,r0,8h ; 0801D00C 080C lsr r4,r1,20h ; 0801D00E 0000 lsl r0,r0,0h ; 0801D010 F01FFFFF bl 803D012h ; 0801D014 F00FFA10 bl 802C438h ; 0801D018 4907 ldr r1,=20182C0h ; 0801D01A 4A08 ldr r2,=80Dh ; 0801D01C 1889 add r1,r1,r2 ; 0801D01E 2021 mov r0,21h ; 0801D020 4240 neg r0,r0 ; 0801D022 780B ldrb r3,[r1] ; 0801D024 4018 and r0,r3 ; 0801D026 7008 strb r0,[r1] ; 0801D028 BC38 pop r3-r5 ; 0801D02A 4698 mov r8,r3 ; 0801D02C 46A1 mov r9,r4 ; 0801D02E 46AA mov r10,r5 ; 0801D030 BCF0 pop r4-r7 ; 0801D032 BC01 pop r0 ; 0801D034 4700 bx r0 ;
Deck management during Duels ?
Part I of drawing a card from deck ? (Player and CPU)
08023098 B5F0 push r4-r7,r14 ; 0802309A 4657 mov r7,r10 ; 0802309C 464E mov r6,r9 ; 0802309E 4645 mov r5,r8 ; 080230A0 B4E0 push r5-r7 ; 080230A2 B084 add sp,-10h ; 080230A4 1C05 mov r5,r0 ; 080230A6 9100 str r1,[sp] ; 080230A8 4A47 ldr r2,=2018FE4h ; 080230AA 2001 mov r0,1h ; 080230AC 4028 and r0,r5 ; 080230AE 4947 ldr r1,=0D64h ; 080230B0 4348 mul r0,r1 ; 080230B2 1880 add r0,r0,r2 ; 080230B4 7880 ldrb r0,[r0,2h] ; 080230B6 4680 mov r8,r0 ; 080230B8 4E45 ldr r6,=519h ; 080230BA 1C28 mov r0,r5 ; 080230BC 1C31 mov r1,r6 ; 080230BE F7EEFCC9 bl 8011A54h ; 080230C2 1C04 mov r4,r0 ; 080230C4 2C00 cmp r4,0h ; 080230C6 DD14 ble 80230F2h ; 080230C8 2273 mov r2,73h ; 080230CA 2D00 cmp r5,0h ; 080230CC D000 beq 80230D0h ; 080230CE 4A41 ldr r2,=8073h ; 080230D0 0070 lsl r0,r6,1h ; 080230D2 4941 ldr r1,=88355FCh ;r1 = pointer_to_card_ids_array 080230D4 1840 add r0,r0,r1 ; 080230D6 8801 ldrh r1,[r0] ;r1 = card_id 080230D8 1C10 mov r0,r2 ; 080230DA 2201 mov r2,1h ; 080230DC 2300 mov r3,0h ; 080230DE F003F9F7 bl 80264D0h ; 080230E2 0161 lsl r1,r4,5h ; 080230E4 1B09 sub r1,r1,r4 ; 080230E6 0089 lsl r1,r1,2h ; 080230E8 1909 add r1,r1,r4 ; 080230EA 0089 lsl r1,r1,2h ; 080230EC 1C28 mov r0,r5 ; 080230EE F7FFFFA3 bl 8023038h ; 080230F2 2200 mov r2,0h ; 080230F4 4692 mov r10,r2 ; 080230F6 9B00 ldr r3,[sp] ; 080230F8 459A cmp r10,r3 ; 080230FA DB00 blt 80230FEh ; 080230FC E10F b 802331Eh ; 080230FE 2001 mov r0,1h ; 08023100 4028 and r0,r5 ; 08023102 07C1 lsl r1,r0,1Fh ; 08023104 9103 str r1,[sp,0Ch] ; 08023106 4931 ldr r1,=0D64h ; 08023108 1C02 mov r2,r0 ; 0802310A 434A mul r2,r1 ; 0802310C 9201 str r2,[sp,4h] ; 0802310E 4833 ldr r0,=20197A8h ; 08023110 9B01 ldr r3,[sp,4h] ; 08023112 1818 add r0,r3,r0 ; 08023114 4652 mov r2,r10 ; 08023116 0091 lsl r1,r2,2h ; 08023118 1847 add r7,r0,r1 ; 0802311A 2300 mov r3,0h ; 0802311C 9302 str r3,[sp,8h] ; 0802311E 4699 mov r9,r3 ; 08023120 2061 mov r0,61h ; 08023122 2D00 cmp r5,0h ;likely comparing if the card is owned by Player or CPU 08023124 D000 beq 8023128h ; 08023126 482E ldr r0,=8061h ; 08023128 2101 mov r1,1h ; 0802312A 2201 mov r2,1h ; 0802312C 2300 mov r3,0h ; 0802312E F003F9CF bl 80264D0h ; 08023132 6839 ldr r1,[r7] ;r1 = card on top of deck 08023134 04C8 lsl r0,r1,13h ; 08023136 0FC0 lsr r0,r0,1Fh ;r0 = 0 if Player's card, 1 if CPU's card 08023138 42A8 cmp r0,r5 ; 0802313A D066 beq 802320Ah ;get out if the card is owned by same player / CPU 0802313C 0388 lsl r0,r1,0Eh ; 0802313E 2800 cmp r0,0h ; 08023140 DA63 bge 802320Ah ; 08023142 0548 lsl r0,r1,15h ; 08023144 0D00 lsr r0,r0,14h ; 08023146 4927 ldr r1,=8833C80h ;r1 = pointer_to_internal_card_ids 08023148 1840 add r0,r0,r1 ; 0802314A 4927 ldr r1,=2FAh ; 0802314C 8800 ldrh r0,[r0] ; 0802314E 4288 cmp r0,r1 ; 08023150 D15B bne 802320Ah ; 08023152 1C28 mov r0,r5 ; 08023154 F7EEFF0E bl 8011F74h ; 08023158 1C04 mov r4,r0 ; 0802315A 2201 mov r2,1h ; 0802315C 9202 str r2,[sp,8h] ; 0802315E 4691 mov r9,r2 ; 08023160 2073 mov r0,73h ; 08023162 2D00 cmp r5,0h ; 08023164 D000 beq 8023168h ; 08023166 481B ldr r0,=8073h ; 08023168 6839 ldr r1,[r7] ; 0802316A 0509 lsl r1,r1,14h ; 0802316C 0D09 lsr r1,r1,14h ; 0802316E 2201 mov r2,1h ; 08023170 2300 mov r3,0h ; 08023172 F003F9AD bl 80264D0h ; 08023176 2C00 cmp r4,0h ; 08023178 DB3C blt 80231F4h ; 0802317A 26C4 mov r6,0C4h ; 0802317C 2D00 cmp r5,0h ; 0802317E D000 beq 8023182h ; 08023180 4E1A ldr r6,=80C4h ; 08023182 6839 ldr r1,[r7] ; 08023184 0509 lsl r1,r1,14h ; 08023186 0D09 lsr r1,r1,14h ; 08023188 230F mov r3,0Fh ; 0802318A 4642 mov r2,r8 ; 0802318C 401A and r2,r3 ; 0802318E 0112 lsl r2,r2,4h ; 08023190 1C20 mov r0,r4 ; 08023192 4018 and r0,r3 ; 08023194 4302 orr r2,r0 ; 08023196 23C0 mov r3,0C0h ; 08023198 009B lsl r3,r3,2h ; 0802319A 1C18 mov r0,r3 ; 0802319C 4302 orr r2,r0 ; 0802319E 1C30 mov r0,r6 ; 080231A0 2300 mov r3,0h ; 080231A2 F003F995 bl 80264D0h ; 080231A6 2090 mov r0,90h ; 080231A8 2D00 cmp r5,0h ; 080231AA D000 beq 80231AEh ; 080231AC 4810 ldr r0,=8090h ; 080231AE 0421 lsl r1,r4,10h ; 080231B0 0C09 lsr r1,r1,10h ; 080231B2 220D mov r2,0Dh ; 080231B4 2300 mov r3,0h ; 080231B6 F003F98B bl 80264D0h ; 080231BA 1C28 mov r0,r5 ; 080231BC 21FA mov r1,0FAh ; 080231BE 0089 lsl r1,r1,2h ; 080231C0 F7FFFEAA bl 8022F18h ; 080231C4 E021 b 802320Ah ;
Part II of drawing a card from deck ? (Player and CPU)
0802320A 491D ldr r1,=2018FE4h ; 0802320C 9B01 ldr r3,[sp,4h] ;offset to either Player's cards or CPU's cards 0802320E 1858 add r0,r3,r1 ; 08023210 7AC0 ldrb r0,[r0,0Bh] ;r0 = ? 08023212 0740 lsl r0,r0,1Dh ; 08023214 2800 cmp r0,0h ; 08023216 D077 beq 8023308h ;if (r0 << 1D == 0), branch to 0x8023308 08023218 481A ldr r0,=1AC8h ; 0802321A 1809 add r1,r1,r0 ; 0802321C 2080 mov r0,80h ; 0802321E 7809 ldrb r1,[r1] ; 08023220 4008 and r0,r1 ; 08023222 2800 cmp r0,0h ; 08023224 D170 bne 8023308h ; 08023226 9902 ldr r1,[sp,8h] ; 08023228 2900 cmp r1,0h ; 0802322A D16D bne 8023308h ; 0802322C 6838 ldr r0,[r7] ; 0802322E 0500 lsl r0,r0,14h ; 08023230 0D04 lsr r4,r0,14h ; 08023232 2273 mov r2,73h ; 08023234 2D00 cmp r5,0h ; 08023236 D000 beq 802323Ah ; 08023238 4A13 ldr r2,=8073h ; 0802323A 4814 ldr r0,=8835B24h ; 0802323C 8801 ldrh r1,[r0] ; 0802323E 1C10 mov r0,r2 ; 08023240 2201 mov r2,1h ; 08023242 2300 mov r3,0h ; 08023244 F003F944 bl 80264D0h ; 08023248 1C28 mov r0,r5 ; 0802324A 1C21 mov r1,r4 ; 0802324C F7FFFE54 bl 8022EF8h ; 08023250 4A0F ldr r2,=7FFh ; 08023252 1C11 mov r1,r2 ; 08023254 1C20 mov r0,r4 ; 08023256 4008 and r0,r1 ; 08023258 0080 lsl r0,r0,2h ; 0802325A 4B0E ldr r3,=8832B84h ; 0802325C 18C0 add r0,r0,r3 ; 0802325E 6800 ldr r0,[r0] ; 08023260 21F8 mov r1,0F8h ; 08023262 0449 lsl r1,r1,11h ; 08023264 4008 and r0,r1 ; 08023266 0D00 lsr r0,r0,14h ; 08023268 2814 cmp r0,14h ; 0802326A D84D bhi 8023308h ; 0802326C 2815 cmp r0,15h ; 0802326E DB18 blt 80232A2h ; 08023270 2817 cmp r0,17h ; 08023272 DD11 ble 8023298h ; 08023274 2818 cmp r0,18h ; 08023276 D011 beq 802329Ch ; 08023278 E013 b 80232A2h ; 0802327A 0000 lsl r0,r0,0h ; 0802327C 80C0 strh r0,[r0,6h] ; 0802327E 0000 lsl r0,r0,0h ; 08023280 8FE4 ldrh r4,[r4,3Eh] ; 08023282 0201 lsl r1,r0,8h ; 08023284 1AC8 sub r0,r1,r3 ; 08023286 0000 lsl r0,r0,0h ; 08023288 8073 strh r3,[r6,2h] ; 0802328A 0000 lsl r0,r0,0h ; 0802328C 5B24 ldrh r4,[r4,r4] ; 0802328E 0883 lsr r3,r0,2h ; 08023290 07FF lsl r7,r7,1Fh ; 08023292 0000 lsl r0,r0,0h ; 08023294 2B84 cmp r3,84h ; 08023296 0883 lsr r3,r0,2h ; 08023298 2100 mov r1,0h ; 0802329A E00F b 80232BCh ; 0802329C 21FA mov r1,0FAh ; 0802329E 0109 lsl r1,r1,4h ; 080232A0 E00C b 80232BCh ; 080232A2 4830 ldr r0,=7FFh ; 080232A4 1C01 mov r1,r0 ; 080232A6 1C20 mov r0,r4 ; 080232A8 4008 and r0,r1 ; 080232AA 0080 lsl r0,r0,2h ; 080232AC 492E ldr r1,=8832B84h ; 080232AE 1840 add r0,r0,r1 ; 080232B0 6801 ldr r1,[r0] ; 080232B2 0389 lsl r1,r1,0Eh ; 080232B4 0DC9 lsr r1,r1,17h ; 080232B6 0088 lsl r0,r1,2h ; 080232B8 1840 add r0,r0,r1 ; 080232BA 0041 lsl r1,r0,1h ; 080232BC 482B ldr r0,=5DBh ; 080232BE 4281 cmp r1,r0 ; 080232C0 D922 bls 8023308h ; 080232C2 20C0 mov r0,0C0h ; 080232C4 2D00 cmp r5,0h ; 080232C6 D000 beq 80232CAh ; 080232C8 4829 ldr r0,=80C0h ; 080232CA 4642 mov r2,r8 ; 080232CC 0411 lsl r1,r2,10h ; 080232CE 0C09 lsr r1,r1,10h ; 080232D0 2201 mov r2,1h ; 080232D2 2300 mov r3,0h ; 080232D4 F003F8FC bl 80264D0h ; 080232D8 4B22 ldr r3,=7FFh ; 080232DA 1C19 mov r1,r3 ; 080232DC 1C20 mov r0,r4 ; 080232DE 4008 and r0,r1 ; 080232E0 0040 lsl r0,r0,1h ; 080232E2 4924 ldr r1,=8833C80h ; 080232E4 1840 add r0,r0,r1 ; 080232E6 4924 ldr r1,=4DAh ; 080232E8 8800 ldrh r0,[r0] ; 080232EA 4288 cmp r0,r1 ; 080232EC D10A bne 8023304h ; 080232EE 201F mov r0,1Fh ; 080232F0 4028 and r0,r5 ; 080232F2 0400 lsl r0,r0,10h ; 080232F4 4921 ldr r1,=3A600000h ; 080232F6 4308 orr r0,r1 ; 080232F8 9A03 ldr r2,[sp,0Ch] ; 080232FA 4310 orr r0,r2 ; 080232FC 4320 orr r0,r4 ; 080232FE 2100 mov r1,0h ; 08023300 F003FFDC bl 80272BCh ; 08023304 2301 mov r3,1h ; 08023306 4699 mov r9,r3 ; 08023308 4648 mov r0,r9 ;r0 = r9 0802330A 2800 cmp r0,0h ; 0802330C D101 bne 8023312h ;if (r0 ≠ 0), skip next two instructions 0802330E 2101 mov r1,1h ;r1 = 1 08023310 4488 add r8,r1 ;r8 += r1 08023312 2201 mov r2,1h ;r2 = 1 08023314 4492 add r10,r2 ;r10 += r2 08023316 9B00 ldr r3,[sp] ; 08023318 459A cmp r10,r3 ; 0802331A DA00 bge 802331Eh ; 0802331C E6F7 b 802310Eh ; 0802331E 4818 ldr r0,=2018FE0h ; 08023320 4918 ldr r1,=1B12h ; 08023322 1846 add r6,r0,r1 ; 08023324 201C mov r0,1Ch ;r0 = 0x1C ; 0d28 08023326 7832 ldrb r2,[r6] ; 08023328 4010 and r0,r2 ; 0802332A 2800 cmp r0,0h ; 0802332C D012 beq 8023354h ;if ((r0 & r2) == 0), exit this function 0802332E 2401 mov r4,1h ; 08023330 1B60 sub r0,r4,r5 ; 08023332 F030F9BB bl 80536ACh ; 08023336 7836 ldrb r6,[r6] ; 08023338 07B0 lsl r0,r6,1Eh ; 0802333A 0FC0 lsr r0,r0,1Fh ; 0802333C 1A24 sub r4,r4,r0 ; 0802333E 062A lsl r2,r5,18h ; 08023340 0E12 lsr r2,r2,18h ; 08023342 2001 mov r0,1h ; 08023344 1B40 sub r0,r0,r5 ; 08023346 0600 lsl r0,r0,18h ; 08023348 0A00 lsr r0,r0,8h ; 0802334A 4302 orr r2,r0 ; 0802334C 1C20 mov r0,r4 ; 0802334E 211A mov r1,1Ah ; 08023350 F02BFFEA bl 804F328h ; 08023354 B004 add sp,10h ; 08023356 BC38 pop r3-r5 ; 08023358 4698 mov r8,r3 ; 0802335A 46A1 mov r9,r4 ; 0802335C 46AA mov r10,r5 ; 0802335E BCF0 pop r4-r7 ; 08023360 BC01 pop r0 ; 08023362 4700 bx r0 ;
0x24946
08024948 B500 push r14 ; 0802494A F002FB33 bl 8026FB4h ; 0802494E 490A ldr r1,=2015BE8h ; 08024950 2002 mov r0,2h ; 08024952 4240 neg r0,r0 ; 08024954 784A ldrb r2,[r1,1h] ; 08024956 4010 and r0,r2 ; 08024958 7048 strb r0,[r1,1h] ; 0802495A F7ECFEA7 bl 80116ACh ; 0802495E 2000 mov r0,0h ; 08024960 2108 mov r1,8h ; 08024962 F7ECFD19 bl 8011398h ; 08024966 F046FC7B bl 806B260h ;CPU Deck generation global subroutine 0802496A 2001 mov r0,1h ; 0802496C 2108 mov r1,8h ; 0802496E F7ECFD13 bl 8011398h ;Duel initialization, decks shuffling 08024972 2001 mov r0,1h ; 08024974 BC02 pop r1 ; 08024976 4708 bx r1 ;
Resolve card played, handles prompts
08026CC4 B5F0 push r4-r7,r14 ; 08026CC6 4647 mov r7,r8 ; 08026CC8 B480 push r7 ; 08026CCA 4806 ldr r0,=2018FE0h ; 08026CCC 21DA mov r1,0DAh ; 08026CCE 0149 lsl r1,r1,5h ; 08026CD0 1840 add r0,r0,r1 ; 08026CD2 7800 ldrb r0,[r0] ;r0 = [EW_201AB20] 08026CD4 2801 cmp r0,1h ; 08026CD6 D067 beq 8026DA8h ; 08026CD8 2801 cmp r0,1h ; 08026CDA DC05 bgt 8026CE8h ; 08026CDC 2800 cmp r0,0h ; 08026CDE D006 beq 8026CEEh ; 08026CE0 E0D4 b 8026E8Ch ; 08026CE2 0000 lsl r0,r0,0h ; 08026CE4 8FE0 ldrh r0,[r4,3Eh] ; 08026CE6 0201 lsl r1,r0,8h ; 08026CE8 2802 cmp r0,2h ; 08026CEA D06D beq 8026DC8h ; 08026CEC E0CE b 8026E8Ch ; 08026CEE 4F48 ldr r7,=20182C0h ; 08026CF0 4A48 ldr r2,=808h ; 08026CF2 18BD add r5,r7,r2 ; 08026CF4 8828 ldrh r0,[r5] ; 08026CF6 2800 cmp r0,0h ; 08026CF8 D100 bne 8026CFCh ;if there's no Yes/No Chain prompt, skip next instruction 08026CFA E0C7 b 8026E8Ch ;else branch to 0x8026E8C (loops back to this function until the Yes/No prompt is no longer present) 08026CFC 1C3E mov r6,r7 ; 08026CFE 3608 add r6,8h ; 08026D00 1C38 mov r0,r7 ; 08026D02 1C31 mov r1,r6 ; 08026D04 2208 mov r2,8h ; 08026D06 F061FFB5 bl 8088C74h ; 08026D0A 8828 ldrh r0,[r5] ; 08026D0C 3801 sub r0,1h ; 08026D0E 8028 strh r0,[r5] ; 08026D10 2400 mov r4,0h ; 08026D12 4284 cmp r4,r0 ; 08026D14 DA0E bge 8026D34h ; 08026D16 46A8 mov r8,r5 ; 08026D18 1C3D mov r5,r7 ; 08026D1A 3510 add r5,10h ; 08026D1C 1C30 mov r0,r6 ; 08026D1E 1C29 mov r1,r5 ; 08026D20 2208 mov r2,8h ; 08026D22 F061FFA7 bl 8088C74h ; 08026D26 3608 add r6,8h ; 08026D28 3508 add r5,8h ; 08026D2A 3401 add r4,1h ; 08026D2C 4640 mov r0,r8 ; 08026D2E 8800 ldrh r0,[r0] ; 08026D30 4284 cmp r4,r0 ; 08026D32 DBF3 blt 8026D1Ch ; 08026D34 4E38 ldr r6,=2017CB0h ; 08026D36 4939 ldr r1,=307h ; 08026D38 1874 add r4,r6,r1 ; 08026D3A 2002 mov r0,2h ;r0 = 2 08026D3C 7822 ldrb r2,[r4] ;r2 = EW_2017FB7 08026D3E 4310 orr r0,r2 ;r0 |= r2 08026D40 7020 strb r0,[r4] ;sotre r0 in EW_2017FB7 08026D42 4D33 ldr r5,=20182C0h ; 08026D44 4836 ldr r0,=80Dh ; 08026D46 1829 add r1,r5,r0 ; 08026D48 2020 mov r0,20h ; 08026D4A 780A ldrb r2,[r1] ; 08026D4C 4310 orr r0,r2 ; 08026D4E 7008 strb r0,[r1] ; 08026D50 4934 ldr r1,=2015BE8h ; 08026D52 2001 mov r0,1h ; 08026D54 7849 ldrb r1,[r1,1h] ; 08026D56 4008 and r0,r1 ; 08026D58 2800 cmp r0,0h ; 08026D5A D011 beq 8026D80h ; 08026D5C 4832 ldr r0,=0F041h ; 08026D5E 1C29 mov r1,r5 ; 08026D60 2208 mov r2,8h ; 08026D62 F003FCD3 bl 802A70Ch ; 08026D66 2003 mov r0,3h ; 08026D68 4240 neg r0,r0 ; 08026D6A 7821 ldrb r1,[r4] ; 08026D6C 4008 and r0,r1 ; 08026D6E 7020 strb r0,[r4] ; 08026D70 2280 mov r2,80h ; 08026D72 0092 lsl r2,r2,2h ; 08026D74 18B0 add r0,r6,r2 ; 08026D76 2100 mov r1,0h ; 08026D78 8001 strh r1,[r0] ; 08026D7A 3202 add r2,2h ; 08026D7C 18B0 add r0,r6,r2 ; 08026D7E 8001 strh r1,[r0] ; 08026D80 482A ldr r0,=80Ah ; 08026D82 1829 add r1,r5,r0 ; 08026D84 2080 mov r0,80h ; 08026D86 4240 neg r0,r0 ; 08026D88 780A ldrb r2,[r1] ; 08026D8A 4010 and r0,r2 ; 08026D8C 7008 strb r0,[r1] ; 08026D8E 4828 ldr r0,=80Ch ; 08026D90 1829 add r1,r5,r0 ; 08026D92 4828 ldr r0,=0FFFFF01Fh ; 08026D94 880A ldrh r2,[r1] ; 08026D96 4010 and r0,r2 ; 08026D98 8008 strh r0,[r1] ; 08026D9A 4827 ldr r0,=2018FE0h ; 08026D9C 21DA mov r1,0DAh ; 08026D9E 0149 lsl r1,r1,5h ; 08026DA0 1840 add r0,r0,r1 ; 08026DA2 7801 ldrb r1,[r0] ; 08026DA4 3101 add r1,1h ; 08026DA6 7001 strb r1,[r0] ; 08026DA8 F7FFFBBA bl 8026520h ; 08026DAC 4818 ldr r0,=20182C0h ; 08026DAE 4A1C ldr r2,=80Dh ; 08026DB0 1880 add r0,r0,r2 ; 08026DB2 7800 ldrb r0,[r0] ; 08026DB4 0680 lsl r0,r0,1Ah ; 08026DB6 2800 cmp r0,0h ; 08026DB8 DB5B blt 8026E72h ; 08026DBA 481F ldr r0,=2018FE0h ; 08026DBC 21DA mov r1,0DAh ; 08026DBE 0149 lsl r1,r1,5h ; 08026DC0 1840 add r0,r0,r1 ; 08026DC2 7801 ldrb r1,[r0] ; 08026DC4 3101 add r1,1h ; 08026DC6 7001 strb r1,[r0] ; 08026DC8 4913 ldr r1,=2017CB0h ; 08026DCA 4A14 ldr r2,=307h ; 08026DCC 1888 add r0,r1,r2 ; 08026DCE 7800 ldrb r0,[r0] ; 08026DD0 0780 lsl r0,r0,1Eh ; 08026DD2 0FC2 lsr r2,r0,1Fh ; 08026DD4 2A00 cmp r2,0h ; 08026DD6 D135 bne 8026E44h ; 08026DD8 4818 ldr r0,=202h ; 08026DDA 1809 add r1,r1,r0 ; 08026DDC 8808 ldrh r0,[r1] ; 08026DDE 3001 add r0,1h ; 08026DE0 8008 strh r0,[r1] ; 08026DE2 0400 lsl r0,r0,10h ; 08026DE4 0C00 lsr r0,r0,10h ; 08026DE6 2877 cmp r0,77h ; 08026DE8 D943 bls 8026E72h ; 08026DEA 800A strh r2,[r1] ; 08026DEC 20EF mov r0,0EFh ; 08026DEE 0200 lsl r0,r0,8h ; 08026DF0 2100 mov r1,0h ; 08026DF2 2200 mov r2,0h ; 08026DF4 2300 mov r3,0h ; 08026DF6 F003FC69 bl 802A6CCh ; 08026DFA F065F893 bl 808BF24h ; 08026DFE 490E ldr r1,=2018FE0h ; 08026E00 4A0F ldr r2,=1B12h ; 08026E02 1889 add r1,r1,r2 ; 08026E04 2020 mov r0,20h ; 08026E06 780A ldrb r2,[r1] ; 08026E08 4310 orr r0,r2 ; 08026E0A 7008 strb r0,[r1] ; 08026E0C E03E b 8026E8Ch ;
Deck management routines
Add card to Player or CPU's deck, main routine
- 0x67864 - Arguments:
- r0: 0 is Player's Deck, 1 is CPU's Deck
- r1: card_internal_id
08067864 B5F0 push r4-r7,r14 ; 08067866 464F mov r7,r9 ; 08067868 4646 mov r6,r8 ; 0806786A B4C0 push r6,r7 ; 0806786C 4680 mov r8,r0 ;r8 = 1 if it comes from the CPU opponent's deck main cards subroutines 0806786E 0409 lsl r1,r1,10h ; 08067870 0C0A lsr r2,r1,10h ; 08067872 4802 ldr r0,=0FFFFh ; 08067874 4282 cmp r2,r0 ; 08067876 D103 bne 8067880h ;if (card_internal_id ≠ 0xFFFF), branch to 0x8067880 08067878 2000 mov r0,0h ; 0806787A E018 b 80678AEh ;branch to next subroutine 0806787C FFFF bl lr+0FFEh ; 0806787E 0000 - 08067880 4804 ldr r0,=7CFh ; 08067882 4282 cmp r2,r0 ; 08067884 D80A bhi 806789Ch ;if (card_internal_id > 1999), branch to 0x806789C (either this is an alternate art card, or the card_internal_id is invalid) 08067886 3030 add r0,30h ; 08067888 4010 and r0,r2 ; 0806788A 0040 lsl r0,r0,1h ;r0 = (card_internal_id & 2047) << 1 0806788C 4902 ldr r1,=88355FCh ;r1 = pointer_to_card_ids_array 0806788E 1840 add r0,r0,r1 ; 08067890 8800 ldrh r0,[r0] ;r0 = actual card_id 08067892 E00C b 80678AEh ;branch to next subroutine
Check if internal_card_id is valid, and branch depending on card_type
080678AE 0400 lsl r0,r0,10h ; 080678B0 0C00 lsr r0,r0,10h ; 080678B2 4681 mov r9,r0 ;r9 = card_id 080678B4 4810 ldr r0,=0FFFh ; 080678B6 4282 cmp r2,r0 ; 080678B8 D900 bls 80678BCh ;if (internal_card_id ≤ 4095), branch to 0x80678BC 080678BA E0C6 b 8067A4Ah ;else branch to 0x8067A4A 080678BC 4A0C ldr r2,=7FFh ; 080678BE 464D mov r5,r9 ;r5 = card_id 080678C0 402A and r2,r5 ; 080678C2 0090 lsl r0,r2,2h ;r0 = (card_id & 0x7FF) << 2 080678C4 490D ldr r1,=8832B84h ;r1 = pointer to Cards stats array 080678C6 1840 add r0,r0,r1 ;r0 = 0x8832B84 + ((card_id & 0x7FF) << 2) 080678C8 6800 ldr r0,[r0] ;r0 = card_stats 080678CA 21F8 mov r1,0F8h ; 080678CC 0449 lsl r1,r1,11h ;r1 = 0x1F00000 080678CE 4008 and r0,r1 ; 080678D0 0D00 lsr r0,r0,14h ;(card_stats & 0x1F00000) >> 0x14 080678D2 2814 cmp r0,14h ; 080678D4 D900 bls 80678D8h ;if (non_devine_beast_monster), branch to 0x80678D8 080678D6 E07D b 80679D4h ;else branch to 0x80679D4 ; Trap / Magic / Ticket / Divine-Beast 080678D8 0050 lsl r0,r2,1h ;r0 = (card_id & 0x7FF) << 4 080678DA 4A09 ldr r2,=8833C80h ;r2 = pointer_to_internal_card_ids 080678DC 1880 add r0,r0,r2 ; 080678DE 8801 ldrh r1,[r0] ;r1 = internal_card_id 080678E0 4808 ldr r0,=776h ;r0 = 1910 080678E2 4281 cmp r1,r0 ; 080678E4 D110 bne 8067908h ;if (internal_card_id ≠ OBELISK_THE_TOURMENTOR), branch to 0x8067908 080678E6 2003 mov r0,3h ;else r0 = 3 080678E8 E040 b 806796Ch ;branch to 0x806796C
0X80679D4 (called by 0x80678AE if card_type is Trap / Magic / Ticket / Divine-Beast)
080679D4 4B20 ldr r3,=2018FE4h ;r3 = 0x2018FE4 080679D6 2001 mov r0,1h ;r0 = 1 080679D8 4645 mov r5,r8 ;r8 = 1 if it comes from the CPU opponent's deck main cards subroutines 080679DA 4028 and r0,r5 ;r0 = 1 & is_cpu_deck_flag 080679DC 491F ldr r1,=0D64h ;r1 = 0xD64 080679DE 1C02 mov r2,r0 ; 080679E0 434A mul r2,r1 ; 080679E2 18D0 add r0,r2,r3 ;r0 = 0x2018FE4 + ((1 & is_cpu_deck_flag) × 0xD64) 080679E4 78C4 ldrb r4,[r0,3h] ;r4 = number_of_cards_in_deck 080679E6 2C00 cmp r4,0h ; 080679E8 DD0E ble 8067A08h ;if (number_of_cards_in_deck ≤ 0), branch to 0x8067A08 080679EA 00A1 lsl r1,r4,2h ; 080679EC 1F0E sub r6,r1,4 ;r6 = (number_of_cards_in_deck << 2) - 4 080679EE 4D1C ldr r5,=7C4h ; 080679F0 1958 add r0,r3,r5 ; 080679F2 1817 add r7,r2,r0 ; 080679F4 19CD add r5,r1,r7 ; 080679F6 19B9 add r1,r7,r6 ;r1 = ((1 & is_cpu_deck_flag) × 0xD64) + (number_of_cards_in_deck << 2) - 4 080679F8 1C28 mov r0,r5 ;r0 = 0x20197A8 + ((1 & is_cpu_deck_flag) × 0xD64) + (number_of_cards_in_deck << 2) 080679FA F7A9F845 bl 8010A88h ;call 0x8010A88 (copies halfword corresponding to a card in Deck (r1 pointer) to the next Deck slot (r0 pointer) ?) 080679FE 3E04 sub r6,4h ;r6 = (number_of_cards_in_deck << 2) - 8 08067A00 3D04 sub r5,4h ;r5 = 0x20197A8 + ((1 & is_cpu_deck_flag) × 0xD64) + (number_of_cards_in_deck << 2) - 4 08067A02 3C01 sub r4,1h ;r4 = number_of_cards_in_deck - 1 08067A04 2C00 cmp r4,0h ; 08067A06 DCF6 bgt 80679F6h ;if ((number_of_cards_in_deck - 1) > 0), loop to 0x80679F6 ? (I assume it loops over each card ?) 08067A08 4A13 ldr r2,=2018FE4h ; 08067A0A 2001 mov r0,1h ; 08067A0C 4641 mov r1,r8 ; 08067A0E 4008 and r0,r1 ; 08067A10 4912 ldr r1,=0D64h ; 08067A12 1C03 mov r3,r0 ; 08067A14 434B mul r3,r1 ; 08067A16 1899 add r1,r3,r2 ; 08067A18 78C8 ldrb r0,[r1,3h] ;r0 = number_of_cards_in_deck 08067A1A 3001 add r0,1h ; 08067A1C 70C8 strb r0,[r1,3h] ;store number_of_cards_in_deck++ 08067A1E 4D10 ldr r5,=7C4h ; 08067A20 1952 add r2,r2,r5 ; 08067A22 189B add r3,r3,r2 ; 08067A24 490F ldr r1,=0FFFh ; 08067A26 1C08 mov r0,r1 ; 08067A28 4649 mov r1,r9 ; 08067A2A 4001 and r1,r0 ; 08067A2C 480E ldr r0,=0FFFFF000h ; 08067A2E 881A ldrh r2,[r3] ; 08067A30 4010 and r0,r2 ; 08067A32 4308 orr r0,r1 ; 08067A34 8018 strh r0,[r3] ; 08067A36 2001 mov r0,1h ; 08067A38 4645 mov r5,r8 ; 08067A3A 4005 and r5,r0 ; 08067A3C 0129 lsl r1,r5,4h ; 08067A3E 2011 mov r0,11h ; 08067A40 4240 neg r0,r0 ; 08067A42 785A ldrb r2,[r3,1h] ; 08067A44 4010 and r0,r2 ; 08067A46 4308 orr r0,r1 ; 08067A48 7058 strb r0,[r3,1h] ; 08067A4A BC18 pop r3,r4 ; 08067A4C 4698 mov r8,r3 ; 08067A4E 46A1 mov r9,r4 ; 08067A50 BCF0 pop r4-r7 ; 08067A52 BC01 pop r0 ; 08067A54 4700 bx r0 ;
0x67A6C (Remove a specific card ?)
- Arguments:
- r0 : 0 for Player's Deck, 1 for CPU's Deck
- r1 : card_internal_id
08067A6C B5F0 push r4-r7,r14 ; 08067A6E B081 add sp,-4h ; 08067A70 1C06 mov r6,r0 ; 08067A72 0409 lsl r1,r1,10h ; 08067A74 0C0F lsr r7,r1,10h ;r7 = card_internal_id 08067A76 2400 mov r4,0h ;r4 = 0 08067A78 490F ldr r1,=2018FE4h ; 08067A7A 2201 mov r2,1h ; 08067A7C 4032 and r2,r6 ; 08067A7E 4B0F ldr r3,=0D64h ; 08067A80 1C10 mov r0,r2 ; 08067A82 4358 mul r0,r3 ; 08067A84 1840 add r0,r0,r1 ;r0 = pointer to either Player's Deck or CPU's Deck 08067A86 78C0 ldrb r0,[r0,3h] ;r0 = number_of_cards_in_deck 08067A88 4284 cmp r4,r0 ; 08067A8A DA26 bge 8067ADAh ; 08067A8C 1C15 mov r5,r2 ; 08067A8E 00A1 lsl r1,r4,2h ;r1 = r4 << 2 ; :loop_start 08067A90 1C28 mov r0,r5 ; 08067A92 4358 mul r0,r3 ; 08067A94 1809 add r1,r1,r0 ; 08067A96 480A ldr r0,=20197A8h ; 08067A98 1809 add r1,r1,r0 ; 08067A9A 6808 ldr r0,[r1] ;r0 = current_card_id 08067A9C 0540 lsl r0,r0,15h ; 08067A9E 0D00 lsr r0,r0,14h ; 08067AA0 4908 ldr r1,=8833C80h ;r1 = pointer_to_internal_card_ids 08067AA2 1840 add r0,r0,r1 ; 08067AA4 8800 ldrh r0,[r0] ;r0 = card_internal_id 08067AA6 42B8 cmp r0,r7 ; 08067AA8 D10E bne 8067AC8h ;if (card_internal_id ≠ r7), branch to 0x8067AC8 08067AAA 1C30 mov r0,r6 ; 08067AAC 1C21 mov r1,r4 ; 08067AAE 466A mov r2,r13 ; 08067AB0 F7A9FCA6 bl 8011400h ; 08067AB4 E009 b 8067ACAh ; ... 08067AC8 3401 add r4,1h ;number_of_cards_checked++ 08067ACA 4906 ldr r1,=2018FE4h ; 08067ACC 4B06 ldr r3,=0D64h ; 08067ACE 1C28 mov r0,r5 ; 08067AD0 4358 mul r0,r3 ; 08067AD2 1840 add r0,r0,r1 ;r0 = pointer to either Player's Deck or CPU's Deck 08067AD4 78C0 ldrb r0,[r0,3h] ;r0 = number_of_cards_in_deck 08067AD6 4284 cmp r4,r0 ; 08067AD8 DBD9 blt 8067A8Eh ;if (number_of_cards_checked < number_of_cards_in_deck), loop to :loop_start 08067ADA B001 add sp,4h ; 08067ADC BCF0 pop r4-r7 ; 08067ADE BC01 pop r0 ; 08067AE0 4700 bx r0 ;
Counts number of a specific card in deck
- Arguments:
- r0 : 0 for Player's Deck, 1 for CPU's Deck
- r1 : checked_card_internal_id
- Return values:
- r0 : number of copies of checked_card in the deck
08067AEC B570 push r4-r6,r14 ; 08067AEE 0409 lsl r1,r1,10h ; 08067AF0 0C0D lsr r5,r1,10h ;r5 = checked_card_internal_id 08067AF2 2300 mov r3,0h ;r3 = 0 08067AF4 4C0F ldr r4,=2018FE4h ; 08067AF6 2101 mov r1,1h ; 08067AF8 4001 and r1,r0 ; 08067AFA 480F ldr r0,=0D64h ; 08067AFC 4341 mul r1,r0 ; 08067AFE 1908 add r0,r1,r4 ;r4 = pointer to either Player's Deck or CPU's Deck 08067B00 78C2 ldrb r2,[r0,3h] ;r2 = number_of_cards_in_deck 08067B02 4293 cmp r3,r2 ; 08067B04 DA12 bge 8067B2Ch ; 08067B06 4E0D ldr r6,=7C4h ;r6 = 0d1988, excludes alternate art cards 08067B08 19A0 add r0,r4,r6 ; 08067B0A 1809 add r1,r1,r0 ; 08067B0C 363B add r6,3Bh ;r6 = 0x7FF 08067B0E 4C0C ldr r4,=8833C80h ;pointer_to_array_of_internal_card_ids 08067B10 6808 ldr r0,[r1] ;r0 = real_card_id 08067B12 0500 lsl r0,r0,14h ; 08067B14 0D00 lsr r0,r0,14h ; 08067B16 4030 and r0,r6 ;Ensures real_card_id is not negative and is in range [0;2047] 08067B18 0040 lsl r0,r0,1h ; 08067B1A 1900 add r0,r0,r4 ;r0 = pointer_to_internal_card_id 08067B1C 8800 ldrh r0,[r0] ;r0 = internal_card_id 08067B1E 42A8 cmp r0,r5 ; 08067B20 D100 bne 8067B24h ;if (current_card_internal_id ≠ checked_card_internal_id), skips next instruction 08067B22 3301 add r3,1h ;r3++ 08067B24 3104 add r1,4h ; 08067B26 3A01 sub r2,1h ;cards_remaining_to_check-- 08067B28 2A00 cmp r2,0h ; 08067B2A D1F1 bne 8067B10h ;If there are still cards to check in the Deck, loop to 0x8067B10 08067B2C 1C18 mov r0,r3 ;r0 = number of copies of checked_card in the deck 08067B2E BC70 pop r4-r6 ; 08067B30 BC02 pop r1 ; 08067B32 4708 bx r1 ;
Remove cards exceeding Banned and Restricted allowed copies
- 0x67B44 - Arguments:
- r0 : 0 for Player's deck, 1 for CPU's deck
08067B44 B5F0 push r4-r7,r14 ; 08067B46 464F mov r7,r9 ; 08067B48 4646 mov r6,r8 ; 08067B4A B4C0 push r6,r7 ; 08067B4C 4681 mov r9,r0 ;r9 = boolean indicating Player or CPU deck 08067B4E 2700 mov r7,0h ; 08067B50 4914 ldr r1,=2018FE4h ; 08067B52 2201 mov r2,1h ; 08067B54 4002 and r2,r0 ; 08067B56 4B14 ldr r3,=0D64h ; 08067B58 1C10 mov r0,r2 ; 08067B5A 4358 mul r0,r3 ; 08067B5C 1840 add r0,r0,r1 ; 08067B5E 78C0 ldrb r0,[r0,3h] ;r0 = r0 = number_of_cards_in_deck 08067B60 4287 cmp r7,r0 ; 08067B62 DA32 bge 8067BCAh ; 08067B64 4690 mov r8,r2 ; 08067B66 00B9 lsl r1,r7,2h ;:loop_start 08067B68 4640 mov r0,r8 ; 08067B6A 4358 mul r0,r3 ; 08067B6C 1809 add r1,r1,r0 ; 08067B6E 480F ldr r0,=20197A8h ; 08067B70 1809 add r1,r1,r0 ; 08067B72 680C ldr r4,[r1] ;r4 = current_card_id 08067B74 0524 lsl r4,r4,14h ; 08067B76 0D24 lsr r4,r4,14h ; 08067B78 480D ldr r0,=7FFh ; 08067B7A 1C01 mov r1,r0 ; 08067B7C 1C20 mov r0,r4 ; 08067B7E 4008 and r0,r1 ;Ensures current_card_id is not negative and is in range [0;2047] 08067B80 0040 lsl r0,r0,1h ;r0 = current_card_id << 1 08067B82 490C ldr r1,=8833C80h ; 08067B84 1846 add r6,r0,r1 ; 08067B86 8831 ldrh r1,[r6] ;r1 = card_internal_id_to_check 08067B88 4648 mov r0,r9 ;r0 = player_or_cpu_deck_flag 08067B8A F7FFFFAF bl 8067AECh ;Counts number of a specific card in deck 08067B8E 1C05 mov r5,r0 ;r5 = number of copies of card_internal_id_to_check in the deck 08067B90 1C20 mov r0,r4 ;r0 = current_card_id 08067B92 F023F821 bl 808ABD8h ;Check Banned and Restricted cards 08067B96 4285 cmp r5,r0 ; 08067B98 DD0E ble 8067BB8h ;if (copies_of_card_in_deck ≤ max_card_quantity_allowed), branch to 8067BB8 08067B9A 8831 ldrh r1,[r6] ;r1 = internal_card_id 08067B9C 4648 mov r0,r9 ;r0 = player_or_cpu_deck_flag 08067B9E F7FFFF65 bl 8067A6Ch ;Remove a card 08067BA2 E00A b 8067BBAh ;Branch to 0x8067BBA ... 08067BB8 3701 add r7,1h ;number_of_cards_checked++ 08067BBA 4907 ldr r1,=2018FE4h ; 08067BBC 4B07 ldr r3,=0D64h ; 08067BBE 4640 mov r0,r8 ; 08067BC0 4358 mul r0,r3 ; 08067BC2 1840 add r0,r0,r1 ; 08067BC4 78C0 ldrb r0,[r0,3h] ;r0 = number_of_cards_in_deck 08067BC6 4287 cmp r7,r0 ; 08067BC8 DBCD blt 8067B66h ;if (number_of_cards_checked < number_of_cards_in_deck), loop to 0x8067B66 (loop_start) 08067BCA BC18 pop r3,r4 ; 08067BCC 4698 mov r8,r3 ; 08067BCE 46A1 mov r9,r4 ; 08067BD0 BCF0 pop r4-r7 ; 08067BD2 BC01 pop r0 ; 08067BD4 4700 bx r0 ;
Check cards in Player's Deck - main routine
- Arguments:
- r0 : probably a boolean determining if we're currently altering Player's Deck or CPU's Deck
- r1 : Pointer to # of each type of cards in Player's deck
08067BE0 B5F0 push r4-r7,r14 ; 08067BE2 464F mov r7,r9 ; 08067BE4 4646 mov r6,r8 ; 08067BE6 B4C0 push r6,r7 ; 08067BE8 B081 add sp,-4h ; 08067BEA 4681 mov r9,r0 ; 08067BEC 1C0D mov r5,r1 ; 08067BEE 2D00 cmp r5,0h ; 08067BF0 D101 bne 8067BF6h ; 08067BF2 F000FD6B bl 80686CCh ; 08067BF6 1C28 mov r0,r5 ; 08067BF8 2174 mov r1,74h ;r1 = 116 08067BFA F021F82D bl 8088C58h ;Blanks specified RAM area 08067BFE 2000 mov r0,0h ;r0 = 0 08067C00 4680 mov r8,r0 ;r8 = 0 08067C02 4919 ldr r1,=2018FE4h ; 08067C04 2001 mov r0,1h ;r0 = 1 08067C06 464A mov r2,r9 ;r2 = r9 08067C08 4010 and r0,r2 ;r0 & r2 08067C0A 4A18 ldr r2,=0D64h ;r2 = 0xD64 08067C0C 4350 mul r0,r2 ;r0 ×= r2 08067C0E 1840 add r0,r0,r1 ;r0 += r1 08067C10 78C0 ldrb r0,[r0,3h] ;r0 = quantity_of_cards_in_deck 08067C12 4580 cmp r8,r0 ; 08067C14 DB01 blt 8067C1Ah ;if (r8 < quantity_of_cards_in_deck), branch to the Super-long routine checking a lot of card IDs in the deck 08067C16 F000FD46 bl 80686A6h ;
Super-long routine checking cards in Deck
08067C1A 4C15 ldr r4,=7FFh ; 08067C1C 1C27 mov r7,r4 ;r7 = 0x7FF 08067C1E 23F8 mov r3,0F8h ; 08067C20 045B lsl r3,r3,11h ; 08067C22 2001 mov r0,1h ; 08067C24 4649 mov r1,r9 ; 08067C26 4008 and r0,r1 ; 08067C28 4644 mov r4,r8 ; 08067C2A 00A1 lsl r1,r4,2h ; 08067C2C 4350 mul r0,r2 ; 08067C2E 1809 add r1,r1,r0 ; 08067C30 4810 ldr r0,=20197A8h ;r0 = pointer_to_player_deck_during_duel 08067C32 1809 add r1,r1,r0 ;r1 = pointer_to_player_deck_during_duel + pointer_position_in_player_deck 08067C34 6808 ldr r0,[r1] ;r0 = card_id 08067C36 0500 lsl r0,r0,14h ; 08067C38 0D06 lsr r6,r0,14h ; 08067C3A 1C31 mov r1,r6 ;r1 = card_id 08067C3C 4039 and r1,r7 ;r1 & 0x7FF (ensures card_id < 2048) 08067C3E 0088 lsl r0,r1,2h ;r0 = card_id << 2 08067C40 4C0D ldr r4,=8832B84h ;r4 = pointer_to_card_stats_array 08067C42 1902 add r2,r0,r4 ; 08067C44 6810 ldr r0,[r2] ;r0 = card_stats 08067C46 4018 and r0,r3 ; 08067C48 0D00 lsr r0,r0,14h ;r0 = card_type 08067C4A 2815 cmp r0,15h ; 08067C4C D01A beq 8067C84h ;if (card_type == TRAP), branch to 08067C84 08067C4E 2816 cmp r0,16h ; 08067C50 D100 bne 8067C54h ;if (card_type ≠ MAGIC), branch to 08067C54 08067C52 E128 b 8067EA6h ;else if (card_type == MAGIC), branch to 08067EA6 08067C54 0048 lsl r0,r1,1h ;...if (card_type ≠ TRAP && card_type ≠ MAGIC), r0 = current_card_id << 1 08067C56 4909 ldr r1,=8833C80h ;r1 = pointer_to_internal_cards_ids_array 08067C58 1840 add r0,r0,r1 ;r0 = pointer_to_internal_cards_ids_array + (current_card_id << 1) 08067C5A 8801 ldrh r1,[r0] ;r1 = internal_card_id 08067C5C 4808 ldr r0,=776h ; 08067C5E 4281 cmp r1,r0 ; 08067C60 D000 beq 8067C64h ;if (r1 == 0d1910 [OBELISK_THE_TOURMENTOR in DM6, unused]), branch to 08067C64 08067C62 E20D b 8068080h ;else branch to 08068080 08067C64 2003 mov r0,3h ;r0 = 3 08067C66 E238 b 80680DAh ;branch to 080680DA 08067C68 8FE4 ldrh r4,[r4,3Eh] ; 08067C6A 0201 lsl r1,r0,8h ; 08067C6C 0D64 lsr r4,r4,15h ; 08067C6E 0000 lsl r0,r0,0h ; 08067C70 07FF lsl r7,r7,1Fh ; 08067C72 0000 lsl r0,r0,0h ; 08067C74 97A8 str r7,[sp,2A0h] ; 08067C76 0201 lsl r1,r0,8h ; 08067C78 2B84 cmp r3,84h ; 08067C7A 0883 lsr r3,r0,2h ; 08067C7C 3C80 sub r4,80h ; 08067C7E 0883 lsr r3,r0,2h ; 08067C80 0776 lsl r6,r6,1Dh ; 08067C82 0000 lsl r0,r0,0h ; 08067C84 6968 ldr r0,[r5,14h] ;...if (card_type == TRAP) 08067C86 3001 add r0,1h ; 08067C88 6168 str r0,[r5,14h] ;increment number of Trap cards in the deck stored in IWRAM 08067C8A 6811 ldr r1,[r2] ;r1 = [r2] 08067C8C 1C08 mov r0,r1 ;r0 = r1 08067C8E 4018 and r0,r3 ; 08067C90 0D00 lsr r0,r0,14h ;r0 = card_type 08067C92 2816 cmp r0,16h ; 08067C94 DC06 bgt 8067CA4h ;if (card_type in [TICKET, DIVINE_BEAST]), branch to 0x8067CA4 (sets the card_category to 0) 08067C96 2815 cmp r0,15h ; 08067C98 DB04 blt 8067CA4h ; 08067C9A 20E0 mov r0,0E0h ; 08067C9C 0300 lsl r0,r0,0Ch ;r0 = 0xE00000 08067C9E 4001 and r1,r0 ;r1 &= r0 08067CA0 0C48 lsr r0,r1,11h ;r0 = r1 >> 17 08067CA2 E000 b 8067CA6h ;branch to 08067CA6 08067CA4 2000 mov r0,0h ;Fail-safe if card_type > 0x16 (TICKET, DIVINE_BEAST, or glitch card) 08067CA6 2803 cmp r0,3h ; 08067CA8 D009 beq 8067CBEh ;if (card_category == EQUIP_CARD), branch to 08067CBE 08067CAA 2803 cmp r0,3h ; 08067CAC DC02 bgt 8067CB4h ;if (card_category in [CONTINOUS, QUICK_PLAY, RITUAL]), branch to 08067CB4 08067CAE 2802 cmp r0,2h ; 08067CB0 D00D beq 8067CCEh ;if (card_category == FIELD), branch to 08067CCE 08067CB2 E013 b 8067CDCh ;else branch to 08067CDC 08067CB4 2804 cmp r0,4h ; 08067CB6 D006 beq 8067CC6h ;if (card_category == CONTINOUS), branch to 08067CC6 08067CB8 2805 cmp r0,5h ; 08067CBA D00C beq 8067CD6h ;if (card_category == QUICK_PLAY), branch to 08067CD6 08067CBC E00E b 8067CDCh ;else branch to 08067CDC 08067CBE 6A28 ldr r0,[r5,20h] ;r0 = number_of_EQUIP_CARD_in_player_deck 08067CC0 3001 add r0,1h ; 08067CC2 6228 str r0,[r5,20h] ;number_of_EQUIP_CARD_in_player_deck++ 08067CC4 E00A b 8067CDCh ;branch to 08067CDC 08067CC6 69E8 ldr r0,[r5,1Ch] ;r0 = number_of_CONTINOUS_cards_in_player_deck 08067CC8 3001 add r0,1h ; 08067CCA 61E8 str r0,[r5,1Ch] ;number_of_CONTINOUS_cards_in_player_deck++ 08067CCC E006 b 8067CDCh ;branch to 08067CDC 08067CCE 6A68 ldr r0,[r5,24h] ;r0 = number_of_FIELD_cards_in_player_deck 08067CD0 3001 add r0,1h ; 08067CD2 6268 str r0,[r5,24h] ;number_of_FIELD_cards_in_player_deck++ 08067CD4 E002 b 8067CDCh ;branch to 08067CDC 08067CD6 6AA8 ldr r0,[r5,28h] ;r0 = number_of_QUICK_PLAY_in_player_deck 08067CD8 3001 add r0,1h ; 08067CDA 62A8 str r0,[r5,28h] ;number_of_QUICK_PLAY_in_player_deck++ 08067CDC 403E and r6,r7 ;current_card_id &= 0x7FF 08067CDE 0070 lsl r0,r6,1h ;r0 = current_card_id << 1 08067CE0 4A0F ldr r2,=8833C80h ;r2 = pointer_to_internal_cards_ids_array 08067CE2 1880 add r0,r0,r2 ;r0 = pointer_to_internal_cards_ids_array + (current_card_id << 1) 08067CE4 8801 ldrh r1,[r0] ;r1 = internal_card_id 08067CE6 480F ldr r0,=40Eh ;r0 = 0x40E [0d1038] 08067CE8 4281 cmp r1,r0 ; 08067CEA D101 bne 8067CF0h ;if (internal_card_id ≠ 0d1038 [Magic Thorns]), branch to 08067CF0 08067CEC F000FCB2 bl 8068654h ;else call 0x8068654 08067CF0 4281 cmp r1,r0 ; 08067CF2 DC5F bgt 8067DB4h ;if (internal_card_id > 0d1038), branch to 08067DB4 08067CF4 3845 sub r0,45h ;r0 = 0x3C9 [0d969] 08067CF6 4281 cmp r1,r0 ; 08067CF8 D100 bne 8067CFCh ;if (internal_card_id ≠ 0d969 [Chain Destruction]), branch to 08067CFC 08067CFA E1B9 b 8068070h ;else branch to 08068070 08067CFC 4281 cmp r1,r0 ; 08067CFE DC2D bgt 8067D5Ch ;if (internal_card_id > 0d969), branch to 08067D5C 08067D00 4809 ldr r0,=2ADh ;r0 = 0x2AD [0d685] 08067D02 4281 cmp r1,r0 ; 08067D04 D100 bne 8067D08h ;if (internal_card_id ≠ 0d685 [Widespread Ruin]), branch to 08067D08 08067D06 E1B3 b 8068070h ;else branch to 08068070 08067D08 4281 cmp r1,r0 ; 08067D0A DC13 bgt 8067D34h ;if (internal_card_id > 0d685), branch to 08067D34 08067D0C 381C sub r0,1Ch ; 08067D0E 4281 cmp r1,r0 ; 08067D10 D101 bne 8067D16h ;if (internal_card_id ≠ 0d657 [Metalmorph]), branch to 08067D16 08067D12 F000FC94 bl 806863Eh ;else branch to 0806863E 08067D16 4281 cmp r1,r0 ; 08067D18 DC08 bgt 8067D2Ch ;if (internal_card_id > 0d657), branch to 08067D2C 08067D1A 20AE mov r0,0AEh ;else r0 = 0xAE 08067D1C 0040 lsl r0,r0,1h ;r0 << 1 [0x15C ; 0d348 ; Spellbinding Circle] 08067D1E E083 b 8067E28h ;branch to 08067E28 08067D20 3C80 sub r4,80h ;- 08067D22 0883 lsr r3,r0,2h ;- 08067D24 040E lsl r6,r1,10h ;- 08067D26 0000 lsl r0,r0,0h ;- 08067D28 02AD lsl r5,r5,0Ah ;- 08067D2A 0000 lsl r0,r0,0h ;- 08067D2C 4800 ldr r0,=2A9h ;... if (internal_card_id > 0d657), r0 = 0x2A9 [0d681 ; Eatgaboon] 08067D2E E031 b 8067D94h ;branch to 08067D94 08067D30 02A9 lsl r1,r5,0Ah ;- 08067D32 0000 lsl r0,r0,0h ;- 08067D34 4804 ldr r0,=3ABh ;... if (internal_card_id > 0d685), r0 = 0x3AB [0d939 ; Bell of Destruction] 08067D36 4281 cmp r1,r0 ; 08067D38 D101 bne 8067D3Eh ;if (internal_card_id ≠ 0d939 [Bell of Destruction]), branch to 08067D3E 08067D3A F000FC8B bl 8068654h ;else call 08068654 08067D3E 4281 cmp r1,r0 ; 08067D40 DC04 bgt 8067D4Ch ;if (internal_card_id > 0d939), branch to 08067D4C 08067D42 38FA sub r0,0FAh ;r0 = 0d689 [Fake Trap in DM6, unused] 08067D44 E070 b 8067E28h ;branch to 08067E28 08067D46 0000 lsl r0,r0,0h ;- 08067D48 03AB lsl r3,r5,0Eh ;- 08067D4A 0000 lsl r0,r0,0h ;- 08067D4C 4802 ldr r0,=3B1h ;... if (internal_card_id > 0d939), r0 = 0x3B1 [0d945, Magical Hats] 08067D4E 4281 cmp r1,r0 ; 08067D50 D100 bne 8067D54h ;if (internal_card_id ≠ 0d945 [Magical Hats]), branch to 08067D54 08067D52 E18D b 8068070h ;else branch to 08068070 08067D54 300F add r0,0Fh ;r0 = 0x3C0 [0d960, Negate Attack] 08067D56 E067 b 8067E28h ;branch to 08067E28 08067D58 03B1 lsl r1,r6,0Eh ; 08067D5A 0000 lsl r0,r0,0h ; 08067D5C 4806 ldr r0,=3FBh ;... if (internal_card_id > 0d969), r0 = 0x3FB [0d1019, White Hole] 08067D5E 4281 cmp r1,r0 ; 08067D60 D100 bne 8067D64h ; 08067D62 E185 b 8068070h ; 08067D64 4281 cmp r1,r0 ; 08067D66 DC0D bgt 8067D84h ; 08067D68 3811 sub r0,11h ;1002, [Trap Hole] 08067D6A 4281 cmp r1,r0 ; 08067D6C D100 bne 8067D70h ; 08067D6E E17F b 8068070h ; 08067D70 4281 cmp r1,r0 ; 08067D72 DC03 bgt 8067D7Ch ; 08067D74 380C sub r0,0Ch ;990, [Magic-Arm Shield] 08067D76 E057 b 8067E28h ; 08067D78 03FB lsl r3,r7,0Fh ; 08067D7A 0000 lsl r0,r0,0h ; 08067D7C 20FE mov r0,0FEh ; 08067D7E 0080 lsl r0,r0,2h ; 08067D80 F000FBCF bl 8068522h ;call 08068522 08067D84 4808 ldr r0,=407h ;[0d1031, Horn of Heaven] 08067D86 4281 cmp r1,r0 ; 08067D88 DC10 bgt 8067DACh ; 08067D8A 3803 sub r0,3h ;1028, [Solemn Judgment] 08067D8C 4281 cmp r1,r0 ; 08067D8E DB00 blt 8067D92h ; 08067D90 E16E b 8068070h ;branch to 08068070 08067D92 3806 sub r0,6h ; 08067D94 4281 cmp r1,r0 ; 08067D96 DD01 ble 8067D9Ch ; 08067D98 F000FC77 bl 806868Ah ;call 0806868A 08067D9C 3801 sub r0,1h ; 08067D9E 4281 cmp r1,r0 ; 08067DA0 DA01 bge 8067DA6h ; 08067DA2 F000FC72 bl 806868Ah ;call 0806868A 08067DA6 E163 b 8068070h ; 08067DA8 0407 lsl r7,r0,10h ; 08067DAA 0000 lsl r0,r0,0h ; 08067DAC 4800 ldr r0,=409h ;[0d1033, Royal Decree] 08067DAE E03B b 8067E28h ;branch to 08067E28 08067DB0 0409 lsl r1,r1,10h ; 08067DB2 0000 lsl r0,r0,0h ; 08067DB4 480A ldr r0,=49Ah ;[0d1178, Aqua Chorus] 08067DB6 4281 cmp r1,r0 ; 08067DB8 D101 bne 8067DBEh ; 08067DBA F000FC40 bl 806863Eh ; 08067DBE 4281 cmp r1,r0 ; 08067DC0 DC3A bgt 8067E38h ; 08067DC2 3853 sub r0,53h ;1095, [Call Of The Haunted] 08067DC4 4281 cmp r1,r0 ; 08067DC6 D101 bne 8067DCCh ; 08067DC8 F000FC50 bl 806866Ch ; 08067DCC 4281 cmp r1,r0 ; 08067DCE DC13 bgt 8067DF8h ; 08067DD0 3821 sub r0,21h ;1062, [Gryphon Wing] 08067DD2 4281 cmp r1,r0 ; 08067DD4 D100 bne 8067DD8h ; 08067DD6 E14B b 8068070h ; 08067DD8 4281 cmp r1,r0 ; 08067DDA DC03 bgt 8067DE4h ; 08067DDC 3806 sub r0,6h ;1056, [Mirror Force] 08067DDE E023 b 8067E28h ; 08067DE0 049A lsl r2,r3,12h ; 08067DE2 0000 lsl r0,r0,0h ; 08067DE4 4803 ldr r0,=43Ah ;[0d1082, Snake Fang] 08067DE6 4281 cmp r1,r0 ; 08067DE8 D101 bne 8067DEEh ; 08067DEA F000FC28 bl 806863Eh ; 08067DEE 300A add r0,0Ah ; 08067DF0 F000FC06 bl 8068600h ; 08067DF4 043A lsl r2,r7,10h ; 08067DF6 0000 lsl r0,r0,0h ; 08067DF8 4807 ldr r0,=475h ;[0d1141, Appropriate] 08067DFA 4281 cmp r1,r0 ; 08067DFC D101 bne 8067E02h ; 08067DFE F000FC39 bl 8068674h ; 08067E02 4281 cmp r1,r0 ; 08067E04 DC0A bgt 8067E1Ch ; 08067E06 382B sub r0,2Bh ; 08067E08 4281 cmp r1,r0 ;1098, [Enchanted Javelin] 08067E0A D101 bne 8067E10h ; 08067E0C F000FC1E bl 806864Ch ; 08067E10 302A add r0,2Ah ;1140, [Numinous Healer] 08067E12 F000FBF5 bl 8068600h ; 08067E16 0000 lsl r0,r0,0h ; 08067E18 0475 lsl r5,r6,11h ; 08067E1A 0000 lsl r0,r0,0h ; 08067E1C 4805 ldr r0,=47Bh ;[0d1147, Backup Soldier] 08067E1E 4281 cmp r1,r0 ; 08067E20 D101 bne 8067E26h ; 08067E22 F000FC23 bl 806866Ch ; 08067E26 3007 add r0,7h ; 08067E28 4281 cmp r1,r0 ; 08067E2A D100 bne 8067E2Eh ; 08067E2C E120 b 8068070h ; 08067E2E F000FC2C bl 806868Ah ;call 0806868A 08067E32 0000 lsl r0,r0,0h ; 08067E34 047B lsl r3,r7,11h ; 08067E36 0000 lsl r0,r0,0h ; 08067E38 4807 ldr r0,=519h ;[0d1305, Solemn Wishes] 08067E3A 4281 cmp r1,r0 ; 08067E3C D101 bne 8067E42h ; 08067E3E F000FC05 bl 806864Ch ; 08067E42 4281 cmp r1,r0 ; 08067E44 DC14 bgt 8067E70h ; 08067E46 3804 sub r0,4h ;1301, [Michizure] 08067E48 4281 cmp r1,r0 ; 08067E4A D100 bne 8067E4Eh ; 08067E4C E110 b 8068070h ; 08067E4E 4281 cmp r1,r0 ; 08067E50 DC04 bgt 8067E5Ch ; 08067E52 3857 sub r0,57h ;1214, [Magic Cylinder] 08067E54 F000FBCB bl 80685EEh ; 08067E58 0519 lsl r1,r3,14h ; 08067E5A 0000 lsl r0,r0,0h ; 08067E5C 4803 ldr r0,=516h ;[0d1302, Minor Goblin Official] 08067E5E 4281 cmp r1,r0 ; 08067E60 D101 bne 8067E66h ; 08067E62 F000FBF7 bl 8068654h ; 08067E66 3002 add r0,2h ;1304, Attack and Receive 08067E68 E3C1 b 80685EEh ; 08067E6A 0000 lsl r0,r0,0h ; 08067E6C 0516 lsl r6,r2,14h ; 08067E6E 0000 lsl r0,r0,0h ; 08067E70 4806 ldr r0,=5A7h ;[0d1447, Jar of Greed] 08067E72 4281 cmp r1,r0 ; 08067E74 D101 bne 8067E7Ah ; 08067E76 F000FBFD bl 8068674h ; 08067E7A 4281 cmp r1,r0 ; 08067E7C DC08 bgt 8067E90h ; 08067E7E 388D sub r0,8Dh ;1306, [Skull Invitation] 08067E80 4281 cmp r1,r0 ; 08067E82 D101 bne 8067E88h ; 08067E84 F000FBE6 bl 8068654h ; 08067E88 3012 add r0,12h ;1324, [Type Zero Magic Crusher] 08067E8A E3B0 b 80685EEh ; 08067E8C 05A7 lsl r7,r4,16h ; 08067E8E 0000 lsl r0,r0,0h ; 08067E90 20BF mov r0,0BFh ;1528, [Destiny Board] 08067E92 00C0 lsl r0,r0,3h ; 08067E94 4281 cmp r1,r0 ; 08067E96 D100 bne 8067E9Ah ; 08067E98 E0EE b 8068078h ; 08067E9A 3003 add r0,3h ;1531, [Riryoku Field] 08067E9C 4281 cmp r1,r0 ; 08067E9E D001 beq 8067EA4h ; 08067EA0 F000FBF3 bl 806868Ah ;call 0806868A 08067EA4 E0E4 b 8068070h ;branch to 08068070 08067EA6 6928 ldr r0,[r5,10h] ;...if (card_type == MAGIC) 08067EA8 3001 add r0,1h ; 08067EAA 6128 str r0,[r5,10h] ;increment number of Magic cards in the deck stored in IWRAM 08067EAC 6811 ldr r1,[r2] ; 08067EAE 1C08 mov r0,r1 ; 08067EB0 4018 and r0,r3 ; 08067EB2 0D00 lsr r0,r0,14h ; 08067EB4 2816 cmp r0,16h ; 08067EB6 DC06 bgt 8067EC6h ; 08067EB8 2815 cmp r0,15h ; 08067EBA DB04 blt 8067EC6h ; 08067EBC 20E0 mov r0,0E0h ; 08067EBE 0300 lsl r0,r0,0Ch ; 08067EC0 4001 and r1,r0 ; 08067EC2 0C48 lsr r0,r1,11h ; 08067EC4 E000 b 8067EC8h ; 08067EC6 2000 mov r0,0h ; 08067EC8 2803 cmp r0,3h ; 08067ECA D009 beq 8067EE0h ; 08067ECC 2803 cmp r0,3h ; 08067ECE DC02 bgt 8067ED6h ; 08067ED0 2802 cmp r0,2h ; 08067ED2 D00D beq 8067EF0h ; 08067ED4 E013 b 8067EFEh ; 08067ED6 2804 cmp r0,4h ; 08067ED8 D006 beq 8067EE8h ; 08067EDA 2805 cmp r0,5h ; 08067EDC D00C beq 8067EF8h ; 08067EDE E00E b 8067EFEh ; 08067EE0 6A28 ldr r0,[r5,20h] ;r0 = number_of_EQUIP_cards_in_player_deck 08067EE2 3001 add r0,1h ; 08067EE4 6228 str r0,[r5,20h] ;number_of_EQUIP_cards_in_player_deck++ 08067EE6 E00A b 8067EFEh ; 08067EE8 69E8 ldr r0,[r5,1Ch] ;r0 = number_of_CONTINOUS_cards_in_player_deck 08067EEA 3001 add r0,1h ; 08067EEC 61E8 str r0,[r5,1Ch] ;number_of_CONTINOUS_cards_in_player_deck++ 08067EEE E006 b 8067EFEh ; 08067EF0 6A68 ldr r0,[r5,24h] ; 08067EF2 3001 add r0,1h ; 08067EF4 6268 str r0,[r5,24h] ; 08067EF6 E002 b 8067EFEh ; 08067EF8 6AA8 ldr r0,[r5,28h] ; 08067EFA 3001 add r0,1h ; 08067EFC 62A8 str r0,[r5,28h] ; 08067EFE 403E and r6,r7 ; 08067F00 0070 lsl r0,r6,1h ; 08067F02 4C11 ldr r4,=8833C80h ;r4 = pointer_to_internal_cards_ids_array 08067F04 1900 add r0,r0,r4 ; 08067F06 8801 ldrh r1,[r0] ; 08067F08 4810 ldr r0,=40Dh ;[0d1037, Exile of the Wicked] 08067F0A 4281 cmp r1,r0 ; 08067F0C DC5F bgt 8067FCEh ; 08067F0E 3801 sub r0,1h ; 08067F10 4281 cmp r1,r0 ; 08067F12 DB00 blt 8067F16h ; 08067F14 E3A2 b 806865Ch ; 08067F16 480E ldr r0,=297h ;[0d663, Eternal Draught] 08067F18 4281 cmp r1,r0 ; 08067F1A DC29 bgt 8067F70h ; 08067F1C 3802 sub r0,2h ; 08067F1E 4281 cmp r1,r0 ; 08067F20 DB00 blt 8067F24h ; 08067F22 E39B b 806865Ch ; 08067F24 20AD mov r0,0ADh ; 08067F26 0040 lsl r0,r0,1h ; 08067F28 4281 cmp r1,r0 ; 08067F2A DC13 bgt 8067F54h ; 08067F2C 3804 sub r0,4h ; 08067F2E 4281 cmp r1,r0 ; 08067F30 DB00 blt 8067F34h ; 08067F32 E38F b 8068654h ; 08067F34 3807 sub r0,7h ; 08067F36 4281 cmp r1,r0 ; 08067F38 DA00 bge 8067F3Ch ; 08067F3A E3A6 b 806868Ah ;branch to 0806868A 08067F3C 3001 add r0,1h ; 08067F3E 4281 cmp r1,r0 ; 08067F40 DC00 bgt 8067F44h ; 08067F42 E38B b 806865Ch ; 08067F44 E382 b 806864Ch ; 08067F46 0000 lsl r0,r0,0h ; 08067F48 3C80 sub r4,80h ; 08067F4A 0883 lsr r3,r0,2h ; 08067F4C 040D lsl r5,r1,10h ; 08067F4E 0000 lsl r0,r0,0h ; 08067F50 0297 lsl r7,r2,0Ah ; 08067F52 0000 lsl r0,r0,0h ; 08067F54 4803 ldr r0,=28Fh ;[0d655, Eternal Rest] 08067F56 4281 cmp r1,r0 ; 08067F58 D100 bne 8067F5Ch ; 08067F5A E37F b 806865Ch ; 08067F5C 4281 cmp r1,r0 ; 08067F5E DC03 bgt 8067F68h ; 08067F60 3803 sub r0,3h ;[0d652, Warrior Elimination] 08067F62 E32A b 80685BAh ; 08067F64 028F lsl r7,r1,0Ah ; 08067F66 0000 lsl r0,r0,0h ; 08067F68 4800 ldr r0,=293h ;[0d659, Stain Storm] 08067F6A E326 b 80685BAh ; 08067F6C 0293 lsl r3,r2,0Ah ; 08067F6E 0000 lsl r0,r0,0h ; 08067F70 4806 ldr r0,=3EEh ;[0d1006, Blue Medicine] 08067F72 4281 cmp r1,r0 ; 08067F74 D100 bne 8067F78h ; 08067F76 E369 b 806864Ch ; 08067F78 4281 cmp r1,r0 ; 08067F7A DC17 bgt 8067FACh ; 08067F7C 3826 sub r0,26h ;[0d968, Graceful Charity] 08067F7E 4281 cmp r1,r0 ; 08067F80 D100 bne 8067F84h ; 08067F82 E377 b 8068674h ; 08067F84 4281 cmp r1,r0 ; 08067F86 DC05 bgt 8067F94h ; 08067F88 4801 ldr r0,=29Fh ;[0d671, Harpie's Feather Duster] 08067F8A E008 b 8067F9Eh ; 08067F8C 03EE lsl r6,r5,0Fh ; 08067F8E 0000 lsl r0,r0,0h ; 08067F90 029F lsl r7,r3,0Ah ; 08067F92 0000 lsl r0,r0,0h ; 08067F94 4804 ldr r0,=3E9h ;[0d1001, Fissure] 08067F96 4281 cmp r1,r0 ; 08067F98 D100 bne 8067F9Ch ; 08067F9A E35F b 806865Ch ; 08067F9C 3003 add r0,3h ;[0d1004, Remove Trap] 08067F9E 4281 cmp r1,r0 ; 08067FA0 D100 bne 8067FA4h ; 08067FA2 E35F b 8068664h ; 08067FA4 E371 b 806868Ah ;branch to 0806868A 08067FA6 0000 lsl r0,r0,0h ; 08067FA8 03E9 lsl r1,r5,0Fh ; 08067FAA 0000 lsl r0,r0,0h ; 08067FAC 20FC mov r0,0FCh ; 08067FAE 0080 lsl r0,r0,2h ;Monster Reborn 08067FB0 4281 cmp r1,r0 ; 08067FB2 D100 bne 8067FB6h ; 08067FB4 E35A b 806866Ch ; 08067FB6 4281 cmp r1,r0 ; 08067FB8 DA00 bge 8067FBCh ; 08067FBA E34B b 8068654h ; 08067FBC 3001 add r0,1h ;De-Spell 08067FBE 4281 cmp r1,r0 ; 08067FC0 D100 bne 8067FC4h ; 08067FC2 E34F b 8068664h ; 08067FC4 3001 add r0,1h ;Pot of Greed 08067FC6 4281 cmp r1,r0 ; 08067FC8 D100 bne 8067FCCh ; 08067FCA E353 b 8068674h ; 08067FCC E35D b 806868Ah ;branch to 0806868A 08067FCE 2091 mov r0,91h ; 08067FD0 00C0 lsl r0,r0,3h ;Premature Burial 08067FD2 4281 cmp r1,r0 ; 08067FD4 DC28 bgt 8068028h ; 08067FD6 3801 sub r0,1h ;The Shallow Grave 08067FD8 4281 cmp r1,r0 ; 08067FDA DB00 blt 8067FDEh ; 08067FDC E346 b 806866Ch ; 08067FDE 3855 sub r0,55h ;Tailor of the Fickle 08067FE0 4281 cmp r1,r0 ; 08067FE2 D045 beq 8068070h ; 08067FE4 4281 cmp r1,r0 ; 08067FE6 DC0F bgt 8068008h ; 08067FE8 380D sub r0,0Dh ; 08067FEA 4281 cmp r1,r0 ; 08067FEC D100 bne 8067FF0h ; 08067FEE E339 b 8068664h ; 08067FF0 4281 cmp r1,r0 ; 08067FF2 DC01 bgt 8067FF8h ; 08067FF4 3816 sub r0,16h ; 08067FF6 E2FA b 80685EEh ; 08067FF8 4802 ldr r0,=42Bh ;[0d1067, Final Destiny] 08067FFA 4281 cmp r1,r0 ; 08067FFC D100 bne 8068000h ; 08067FFE E32D b 806865Ch ; 08068000 3002 add r0,2h ; 08068002 E2E0 b 80685C6h ; 08068004 042B lsl r3,r5,10h ; 08068006 0000 lsl r0,r0,0h ; 08068008 4806 ldr r0,=434h ;[0d1076, The Reliable Guardian] 0806800A 4281 cmp r1,r0 ; 0806800C DC00 bgt 8068010h ; 0806800E E316 b 806863Eh ; 08068010 3004 add r0,4h ; 08068012 4281 cmp r1,r0 ; 08068014 DD00 ble 8068018h ; 08068016 E338 b 806868Ah ;branch to 0806868A 08068018 3801 sub r0,1h ; 0806801A 4281 cmp r1,r0 ; 0806801C DA00 bge 8068020h ; 0806801E E334 b 806868Ah ;branch to 0806868A 08068020 E320 b 8068664h ; 08068022 0000 lsl r0,r0,0h ; 08068024 0434 lsl r4,r6,10h ; 08068026 0000 lsl r0,r0,0h ; 08068028 4806 ldr r0,=522h ;[0d1314, Limiter Removal] 0806802A 4281 cmp r1,r0 ; 0806802C D100 bne 8068030h ; 0806802E E306 b 806863Eh ; 08068030 4281 cmp r1,r0 ; 08068032 DC0D bgt 8068050h ; 08068034 386F sub r0,6Fh ; 08068036 4281 cmp r1,r0 ; 08068038 D100 bne 806803Ch ; 0806803A E300 b 806863Eh ; 0806803C 4281 cmp r1,r0 ; 0806803E DC03 bgt 8068048h ; 08068040 3818 sub r0,18h ; 08068042 E2DD b 8068600h ; 08068044 0522 lsl r2,r4,14h ; 08068046 0000 lsl r0,r0,0h ; 08068048 4800 ldr r0,=4BBh ;[0d1211, Thousand Knives] 0806804A E2B6 b 80685BAh ;branch to 080685BA 0806804C 04BB lsl r3,r7,12h ; 0806804E 0000 lsl r0,r0,0h ; 08068050 20C1 mov r0,0C1h ; 08068052 00C0 lsl r0,r0,3h ;[0d1544, Spirit Message "L"], this block checks all 4 Spirit Messages 08068054 4281 cmp r1,r0 ; 08068056 DC04 bgt 8068062h ; 08068058 3803 sub r0,3h ;[0d1541, Spirit Message "I"] 0806805A 4281 cmp r1,r0 ; 0806805C DA0C bge 8068078h ; 0806805E 385A sub r0,5Ah ;[0d1451, Offerings to the Doomed] 08068060 E2AB b 80685BAh ; 08068062 4802 ldr r0,=60Ah ;[0d1546, De-Fusion] 08068064 4281 cmp r1,r0 ; 08068066 D100 bne 806806Ah ;if (internal_card_id ≠ DE_FUSION), branch to 0806806A (branch to 0806868A) 08068068 E300 b 806866Ch ;else, branch to 0806866C 0806806A E30E b 806868Ah ;branch to 0806868A 0806806C 060A lsl r2,r1,18h ; 0806806E 0000 lsl r0,r0,0h ; 08068070 6AE8 ldr r0,[r5,2Ch] ; 08068072 3001 add r0,1h ; 08068074 62E8 str r0,[r5,2Ch] ;increment [r5 + 0x2C] 08068076 E308 b 806868Ah ;branch to 0806868A 08068078 6E28 ldr r0,[r5,60h] ; 0806807A 3001 add r0,1h ; 0806807C 6628 str r0,[r5,60h] ;increment [r5 + 0x60] 0806807E E304 b 806868Ah ;branch to 0806868A 08068080 4281 cmp r1,r0 ; 08068082 DB05 blt 8068090h ; 08068084 20EF mov r0,0EFh ; 08068086 00C0 lsl r0,r0,3h ;r0 = [0d1912, The Winged Dragon of Ra in DM6, unused] 08068088 4281 cmp r1,r0 ; 0806808A DC01 bgt 8068090h ;if (r1 > 0d1912 [The Winged Dragon of Ra in DM6, unused]), branch to 08068090 0806808C 2001 mov r0,1h ;r0 = 1 0806808E E024 b 80680DAh ;branch to 080680DA 08068090 1C30 mov r0,r6 ;... That's Token monsters, they shouldn't be in the deck 08068092 4038 and r0,r7 ; 08068094 0080 lsl r0,r0,2h ; 08068096 4906 ldr r1,=8832B84h ;r1 = pointer_to_card_stats_array 08068098 1840 add r0,r0,r1 ; 0806809A 6800 ldr r0,[r0] ;r0 = current_card_stats 0806809C 4018 and r0,r3 ; 0806809E 0D00 lsr r0,r0,14h ; 080680A0 2816 cmp r0,16h ; 080680A2 D00A beq 80680BAh ;if (card_type == MAGIC), branch to 080680BA 080680A4 2816 cmp r0,16h ; 080680A6 DC05 bgt 80680B4h ;if (card_type == TICKET || card_type == DIVINE_BEAST), branch to 080680B4 080680A8 2815 cmp r0,15h ; 080680AA D008 beq 80680BEh ;if (card_type == TRAP), branch to 080680BE 080680AC E00B b 80680C6h ;else branch to 080680C6 080680AE 0000 lsl r0,r0,0h ; 080680B0 2B84 cmp r3,84h ; 080680B2 0883 lsr r3,r0,2h ; 080680B4 2817 cmp r0,17h ; 080680B6 D004 beq 80680C2h ;if (card_type == TICKET), branch to 080680C2 080680B8 E005 b 80680C6h ;else branch to 080680C6 080680BA 2007 mov r0,7h ;...if (card_type == MAGIC), r0 = 7 080680BC E00D b 80680DAh ;branch to 080680DA 080680BE 2008 mov r0,8h ;...if (card_type == TRAP), r0 = 8 080680C0 E00B b 80680DAh ;branch to 080680DA 080680C2 2009 mov r0,9h ;...if (card_type == TICKET), r0 = 9 080680C4 E009 b 80680DAh ;branch to 080680DA 080680C6 1C30 mov r0,r6 ;...if it is a Monster card 080680C8 4038 and r0,r7 ; 080680CA 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 080680CC 4A06 ldr r2,=8832B84h ; 080680CE 1880 add r0,r0,r2 ;r0 = pointer_to_card_stats_array + ((r6 & r7) << 2) 080680D0 6800 ldr r0,[r0] ;r0 = current_card_stats 080680D2 21C0 mov r1,0C0h ; 080680D4 0309 lsl r1,r1,0Ch ; 080680D6 4008 and r0,r1 ;r0 & 0xC0000 080680D8 0C80 lsr r0,r0,12h ;r0 >> 18 080680DA 2801 cmp r0,1h ; 080680DC D011 beq 8068102h ;if (monster_category == EFFECT_MONSTER), branch to 08068102 080680DE 2801 cmp r0,1h ; 080680E0 DC04 bgt 80680ECh ;if (monster_category > 1), branch to 080680EC 080680E2 2800 cmp r0,0h ; 080680E4 D005 beq 80680F2h ;if (monster_category == NORMAL_MONSTER), branch to 080680F2 080680E6 E00F b 8068108h ;else branch to 8068108 080680E8 2B84 cmp r3,84h ;- 080680EA 0883 lsr r3,r0,2h ;- 080680EC 2803 cmp r0,3h ; 080680EE D004 beq 80680FAh ;if (monster_category == RITUAL_MONSTER), branch to 080680FA 080680F0 E00A b 8068108h ;else if (monster_category == FUSION_MONSTER), branch to 8068108 080680F2 6828 ldr r0,[r5] ;...if (monster_category == NORMAL_MONSTER) 080680F4 3001 add r0,1h ; 080680F6 6028 str r0,[r5] ;increment number of Normal Monster cards in the deck stored in IWRAM 080680F8 E006 b 8068108h ;branch to 08068108 080680FA 68A8 ldr r0,[r5,8h] ;if (monster_category == RITUAL_MONSTER) 080680FC 3001 add r0,1h ; 080680FE 60A8 str r0,[r5,8h] ;increments number of Ritual Monster cards in the deck stored in IWRAM 08068100 E002 b 8068108h ;branch to 08068108 08068102 6868 ldr r0,[r5,4h] ;...if (monster_category == EFFECT_MONSTER) 08068104 3001 add r0,1h ; 08068106 6068 str r0,[r5,4h] ;increments number of Effect Monster cards in the deck stored in IWRAM 08068108 1C30 mov r0,r6 ; 0806810A 4038 and r0,r7 ; 0806810C 0040 lsl r0,r0,1h ;r0 = (current_card_id & 0x7FF) << 1 0806810E 4C04 ldr r4,=8833C80h ;r4 = pointer_to_internal_cards_ids_array 08068110 1900 add r0,r0,r4 ;r0 = pointer_to_internal_cards_ids_array + ((current_card_id & 0x7FF) << 1) 08068112 8801 ldrh r1,[r0] ;r1 = internal_card_id 08068114 4803 ldr r0,=776h ; 08068116 4281 cmp r1,r0 ; 08068118 D106 bne 8068128h ;if (internal_card_id ≠ OBELISK_THE_TOURMENTOR), branch to 08068128 0806811A 2003 mov r0,3h ;r0 = 3 0806811C E031 b 8068182h ;branch to 08068182 0806811E 0000 lsl r0,r0,0h ;- 08068120 3C80 sub r4,80h ;- 08068122 0883 lsr r3,r0,2h ;- 08068124 0776 lsl r6,r6,1Dh ;- 08068126 0000 lsl r0,r0,0h ;- 08068128 4281 cmp r1,r0 ;...if (internal_card_id ≠ OBELISK_THE_TOURMENTOR) 0806812A DB05 blt 8068138h ;if (internal_card_id < 1910) [not a God card, not a Token, not an alternate illustration card], branch to 08068138 0806812C 20EF mov r0,0EFh ; 0806812E 00C0 lsl r0,r0,3h ; 08068130 4281 cmp r1,r0 ; 08068132 DC01 bgt 8068138h ;if (internal_card_id > 1912) [not a God card], branch to 08068138 08068134 2001 mov r0,1h ;r0 = 1 08068136 E024 b 8068182h ;branch to 08068182 08068138 1C30 mov r0,r6 ;...if (internal_card_id < 1910 || internal_card_id > 1912) [not a God card] 0806813A 4038 and r0,r7 ; 0806813C 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 0806813E 4906 ldr r1,=8832B84h ;r1 = pointer_to_card_stats_array 08068140 1840 add r0,r0,r1 ; 08068142 6800 ldr r0,[r0] ;r0 = card_stats 08068144 4018 and r0,r3 ; 08068146 0D00 lsr r0,r0,14h ; 08068148 2816 cmp r0,16h ; 0806814A D00A beq 8068162h ;if (card_type == MAGIC), branch to 08068162 0806814C 2816 cmp r0,16h ; 0806814E DC05 bgt 806815Ch ;if (card_type == TICKET || card_type == DIVINE_BEAST), branch to 0806815C 08068150 2815 cmp r0,15h ; 08068152 D008 beq 8068166h ;if (card_type == TRAP), branch to 08068166 08068154 E00B b 806816Eh ;else branch to 0806816E 08068156 0000 lsl r0,r0,0h ; 08068158 2B84 cmp r3,84h ; 0806815A 0883 lsr r3,r0,2h ; 0806815C 2817 cmp r0,17h ; 0806815E D004 beq 806816Ah ;if (card_type == TICKET), branch to 0806816A 08068160 E005 b 806816Eh ;if (card_type == DIVINE_BEAST), branch to 0806816E 08068162 2007 mov r0,7h ;...if (card_type == MAGIC), r0 = 7 08068164 E00D b 8068182h ;branch to 08068182 08068166 2008 mov r0,8h ;...if (card_type == TRAP), r0 = 8 08068168 E00B b 8068182h ;branch to 08068182 0806816A 2009 mov r0,9h ;...if (card_type == TICKET), r0 = 9 0806816C E009 b 8068182h ;branch to 08068182 0806816E 1C30 mov r0,r6 ;...if (card_type == DIVINE_BEAST) 08068170 4038 and r0,r7 ; 08068172 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 08068174 4A0C ldr r2,=8832B84h ;r1 = pointer_to_card_stats_array 08068176 1880 add r0,r0,r2 ; 08068178 6800 ldr r0,[r0] ;r0 = card_stats 0806817A 21C0 mov r1,0C0h ; 0806817C 0309 lsl r1,r1,0Ch ; 0806817E 4008 and r0,r1 ; 08068180 0C80 lsr r0,r0,12h ;r0 = monster_category 08068182 2803 cmp r0,3h ; 08068184 D100 bne 8068188h ;if (monster_category ≠ RITUAL_MONSTER) [not Obelisk the Tourmentor], branch to 08068188 08068186 E0C8 b 806831Ah ;else branch to 0806831A 08068188 1C30 mov r0,r6 ;...if (monster_category ≠ RITUAL_MONSTER) [not Obelisk the Tourmentor] 0806818A 4038 and r0,r7 ; 0806818C 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 0806818E 4C06 ldr r4,=8832B84h ;r1 = pointer_to_card_stats_array 08068190 1900 add r0,r0,r4 ; 08068192 6800 ldr r0,[r0] ;r0 = card_stats 08068194 4018 and r0,r3 ; 08068196 0D00 lsr r0,r0,14h ;r0 = card_type 08068198 2815 cmp r0,15h ; 0806819A DB0B blt 80681B4h ;if (card_type < 0x15) [is a non-Divine-Beast Monster card], branch to 080681B4 0806819C 2817 cmp r0,17h ; 0806819E DD05 ble 80681ACh ;if (card_type ≤ 0x17) [is a Trap, Magic, or Ticket card], branch to 080681AC 080681A0 2818 cmp r0,18h ; 080681A2 D005 beq 80681B0h ;if (card_type == DIVINE_BEAST), branch to 080681B0 080681A4 E006 b 80681B4h ;else branch to 080681B4 080681A6 0000 lsl r0,r0,0h ; 080681A8 2B84 cmp r3,84h ; 080681AA 0883 lsr r3,r0,2h ; 080681AC 2000 mov r0,0h ;...if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), r0 = 0 080681AE E00B b 80681C8h ;branch to 080681C8 080681B0 200A mov r0,0Ah ;...if (card_type == DIVINE_BEAST), r0 = 0xA 080681B2 E009 b 80681C8h ;branch to 080681C8 080681B4 1C30 mov r0,r6 ;...if (card_type < 0x15 || card_type > 0x18) [is a non-Divine-Beast Monster card, or is a glitch card] 080681B6 4038 and r0,r7 ; 080681B8 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 080681BA 4909 ldr r1,=8832B84h ;r1 = pointer_to_card_stats_array 080681BC 1840 add r0,r0,r1 ; 080681BE 6800 ldr r0,[r0] ;r0 = card_stats 080681C0 21F0 mov r1,0F0h ; 080681C2 0549 lsl r1,r1,15h ; 080681C4 4008 and r0,r1 ; 080681C6 0E40 lsr r0,r0,19h ;r0 = monster_level 080681C8 2800 cmp r0,0h ; 080681CA DA00 bge 80681CEh ;if (monster_level > 0), branch to 080681CE 080681CC E0A2 b 8068314h ;else branch to 08068314 080681CE 2804 cmp r0,4h ;...if (monster_level > 0) 080681D0 DD08 ble 80681E4h ;if (monster_level ≤ 4), branch to 080681E4 080681D2 2806 cmp r0,6h ; 080681D4 DD00 ble 80681D8h ;else if (monster_level ≤ 6), branch to 080681D8 080681D6 E09D b 8068314h ;else branch to 08068314 080681D8 6D68 ldr r0,[r5,54h] ;...if (monster_level == 5 || monster_level == 6) 080681DA 3001 add r0,1h ; 080681DC 6568 str r0,[r5,54h] ;increment number of Level 5 and 6 Monster cards in the deck stored in IWRAM 080681DE E09C b 806831Ah ;branch to 0806831A 080681E0 2B84 cmp r3,84h ;- 080681E2 0883 lsr r3,r0,2h ;- 080681E4 1C30 mov r0,r6 ;...if (monster_level ≤ 4) 080681E6 4038 and r0,r7 ; 080681E8 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 080681EA 4A06 ldr r2,=8832B84h ;r1 = pointer_to_card_stats_array 080681EC 1880 add r0,r0,r2 ; 080681EE 6800 ldr r0,[r0] ;r0 = card_stats 080681F0 4018 and r0,r3 ; 080681F2 0D00 lsr r0,r0,14h ; 080681F4 2815 cmp r0,15h ; 080681F6 DB0C blt 8068212h ;if (card_type < 0x15) [is a non-Divine-Beast Monster card], branch to 08068212 080681F8 2817 cmp r0,17h ; 080681FA DD05 ble 8068208h ;if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), branch to 08068208 080681FC 2818 cmp r0,18h ; 080681FE D005 beq 806820Ch ;if (card_type == DIVINE_BEAST), branch to 0806820C 08068200 E007 b 8068212h ;else branch to 08068212 08068202 0000 lsl r0,r0,0h ;- 08068204 2B84 cmp r3,84h ;- 08068206 0883 lsr r3,r0,2h ;- 08068208 2100 mov r1,0h ;...if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), r1 = 0 0806820A E00D b 8068228h ;branch to 08068228 0806820C 21FA mov r1,0FAh ;...if (card_type == DIVINE_BEAST) 0806820E 0109 lsl r1,r1,4h ;card_ATK = 4000 08068210 E00A b 8068228h ;branch to 08068228 08068212 1C30 mov r0,r6 ;...if (card_type < 0x15) [is a non-Divine-Beast Monster card] 08068214 4038 and r0,r7 ; 08068216 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 08068218 4C0C ldr r4,=8832B84h ;r1 = pointer_to_card_stats_array 0806821A 1900 add r0,r0,r4 ; 0806821C 6801 ldr r1,[r0] ;r0 = card_stats 0806821E 0389 lsl r1,r1,0Eh ; 08068220 0DC9 lsr r1,r1,17h ; 08068222 0088 lsl r0,r1,2h ; 08068224 1840 add r0,r0,r1 ; 08068226 0041 lsl r1,r0,1h ;r1 = DWORD(((r1 << 14 >> 23 << 2) + (r1 << 14 >> 23)) << 1) [card_ATK] 08068228 6E68 ldr r0,[r5,64h] ;r0 = [r5 + 0x64] 0806822A 4288 cmp r0,r1 ; 0806822C DA21 bge 8068272h ;if ([r5 + 0x64] ≥ card_ATK), branch to 08068272 0806822E 1C30 mov r0,r6 ; 08068230 4038 and r0,r7 ; 08068232 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 08068234 4905 ldr r1,=8832B84h ;r1 = pointer_to_card_stats_array 08068236 1840 add r0,r0,r1 ; 08068238 6800 ldr r0,[r0] ;r0 = card_stats 0806823A 4018 and r0,r3 ; 0806823C 0D00 lsr r0,r0,14h ;r0 = card_type 0806823E 2815 cmp r0,15h ; 08068240 DB0B blt 806825Ah ;if (card_type < 0x15) [is a non-Divine-Beast Monster card], branch to 0806825A 08068242 2817 cmp r0,17h ; 08068244 DD04 ble 8068250h ;if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), branch to 08068250 08068246 2818 cmp r0,18h ; 08068248 D004 beq 8068254h ;if (card_type == DIVINE_BEAST), branch to 08068254 0806824A E006 b 806825Ah ;else branch to 0806825A 0806824C 2B84 cmp r3,84h ; 0806824E 0883 lsr r3,r0,2h ; 08068250 2000 mov r0,0h ;...if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), r0 = 0 08068252 E00D b 8068270h ;branch to 08068270 08068254 20FA mov r0,0FAh ; 08068256 0100 lsl r0,r0,4h ;card_ATK = 4000 08068258 E00A b 8068270h ;branch to 08068270 0806825A 1C30 mov r0,r6 ; 0806825C 4038 and r0,r7 ; 0806825E 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 08068260 4A0B ldr r2,=8832B84h ;r1 = pointer_to_card_stats_array 08068262 1880 add r0,r0,r2 ; 08068264 6801 ldr r1,[r0] ;r0 = card_stats 08068266 0389 lsl r1,r1,0Eh ; 08068268 0DC9 lsr r1,r1,17h ; 0806826A 0088 lsl r0,r1,2h ; 0806826C 1840 add r0,r0,r1 ; 0806826E 0040 lsl r0,r0,1h ;r0 = DWORD(((r1 << 14 >> 23 << 2) + (r1 << 14 >> 23)) << 1) [card_ATK] 08068270 6668 str r0,[r5,64h] ;store card_ATK into [r5 + 0x64] 08068272 1C30 mov r0,r6 ; 08068274 4038 and r0,r7 ; 08068276 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 08068278 4C05 ldr r4,=8832B84h ;r4 = pointer_to_card_stats_array 0806827A 1900 add r0,r0,r4 ; 0806827C 6800 ldr r0,[r0] ;r0 = card_stats 0806827E 4018 and r0,r3 ; 08068280 0D00 lsr r0,r0,14h ; 08068282 2815 cmp r0,15h ; 08068284 DB0B blt 806829Eh ;if (card_type < 0x15) [is a non-Divine-Beast Monster card], branch to 0806829E 08068286 2817 cmp r0,17h ; 08068288 DD04 ble 8068294h ;if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), branch to 08068294 0806828A 2818 cmp r0,18h ; 0806828C D004 beq 8068298h ;if (card_type == DIVINE_BEAST), branch to 08068298 0806828E E006 b 806829Eh ;else branch to 0806829E 08068290 2B84 cmp r3,84h ; 08068292 0883 lsr r3,r0,2h ; 08068294 2100 mov r1,0h ;...if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), card_DEF = 0 08068296 E00E b 80682B6h ;branch to 080682B6 08068298 21FA mov r1,0FAh ;...if (card_type == DIVINE_BEAST) 0806829A 0109 lsl r1,r1,4h ;card_DEF = 4000 0806829C E00B b 80682B6h ;branch to 080682B6 0806829E 1C30 mov r0,r6 ;...if (card_type < 0x15) [is a non-Divine-Beast Monster card] 080682A0 4038 and r0,r7 ; 080682A2 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 080682A4 490D ldr r1,=8832B84h ;r1 = pointer_to_card_stats_array 080682A6 1840 add r0,r0,r1 ; 080682A8 6801 ldr r1,[r0] ;r1 = card_stats 080682AA 4A0D ldr r2,=1FFh ; 080682AC 1C10 mov r0,r2 ; 080682AE 4001 and r1,r0 ; 080682B0 0088 lsl r0,r1,2h ; 080682B2 1840 add r0,r0,r1 ; 080682B4 0041 lsl r1,r0,1h ;r1 = (card_stats & 511 × 10) [card_DEF] 080682B6 6EA8 ldr r0,[r5,68h] ; 080682B8 4288 cmp r0,r1 ; 080682BA DA2E bge 806831Ah ;if ([r5 + 0x68] > card_DEF), branch to 0806831A 080682BC 1C30 mov r0,r6 ; 080682BE 4038 and r0,r7 ; 080682C0 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 080682C2 4C06 ldr r4,=8832B84h ;r4 = pointer_to_card_stats_array 080682C4 1900 add r0,r0,r4 ; 080682C6 6800 ldr r0,[r0] ;r0 = card_stats 080682C8 4018 and r0,r3 ; 080682CA 0D00 lsr r0,r0,14h ; 080682CC 2815 cmp r0,15h ; 080682CE DB0E blt 80682EEh ;if (card_type < 0x15) [is a non-Divine-Beast Monster card], branch to 080682EE 080682D0 2817 cmp r0,17h ; 080682D2 DD07 ble 80682E4h ;if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), branch to 080682E4 080682D4 2818 cmp r0,18h ; 080682D6 D007 beq 80682E8h ;if (card_type == DIVINE_BEAST), branch to 080682E8 080682D8 E009 b 80682EEh ;else branch to 080682EE 080682DA 0000 lsl r0,r0,0h ;- 080682DC 2B84 cmp r3,84h ;- 080682DE 0883 lsr r3,r0,2h ;- 080682E0 01FF lsl r7,r7,7h ;- 080682E2 0000 lsl r0,r0,0h ;- 080682E4 2000 mov r0,0h ;...if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), card_DEF = 0 080682E6 E00E b 8068306h ;branch to 08068306 080682E8 20FA mov r0,0FAh ;...if (card_type == DIVINE_BEAST) 080682EA 0100 lsl r0,r0,4h ;card_DEF = 4000 080682EC E00B b 8068306h ;branch to 08068306 080682EE 1C30 mov r0,r6 ;...if (card_type < 0x15) [is a non-Divine-Beast Monster card] 080682F0 4038 and r0,r7 ; 080682F2 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 080682F4 4905 ldr r1,=8832B84h ;r1 = pointer_to_card_stats_array 080682F6 1840 add r0,r0,r1 ; 080682F8 6801 ldr r1,[r0] ;r1 = card_stats 080682FA 4A05 ldr r2,=1FFh ; 080682FC 1C10 mov r0,r2 ; 080682FE 4001 and r1,r0 ; 08068300 0088 lsl r0,r1,2h ; 08068302 1840 add r0,r0,r1 ; 08068304 0040 lsl r0,r0,1h ;r1 = (card_stats & 511 × 10) [card_DEF] 08068306 66A8 str r0,[r5,68h] ;store card_DEF into [r5 + 0x68] 08068308 E007 b 806831Ah ;branch to 0806831A 0806830A 0000 lsl r0,r0,0h ;- 0806830C 2B84 cmp r3,84h ;- 0806830E 0883 lsr r3,r0,2h ;- 08068310 01FF lsl r7,r7,7h ;- 08068312 0000 lsl r0,r0,0h ;- 08068314 6DA8 ldr r0,[r5,58h] ; 08068316 3001 add r0,1h ; 08068318 65A8 str r0,[r5,58h] ;increment [r5 + 0x58] 0806831A 1C30 mov r0,r6 ; 0806831C 4038 and r0,r7 ; 0806831E 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 08068320 4C05 ldr r4,=8832B84h ;r4 = pointer_to_card_stats_array 08068322 1900 add r0,r0,r4 ; 08068324 6800 ldr r0,[r0] ;r0 = card_stats 08068326 4018 and r0,r3 ; 08068328 0D00 lsr r0,r0,14h ; 0806832A 2815 cmp r0,15h ; 0806832C DB0B blt 8068346h ;if (card_type < 0x15) [is a non-Divine-Beast Monster card], branch to 08068346 0806832E 2817 cmp r0,17h ; 08068330 DD04 ble 806833Ch ;if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), branch to 0806833C 08068332 2818 cmp r0,18h ; 08068334 D004 beq 8068340h ;if (card_type == DIVINE_BEAST), branch to 08068340 08068336 E006 b 8068346h ;else branch to 08068346 08068338 2B84 cmp r3,84h ; 0806833A 0883 lsr r3,r0,2h ; 0806833C 2100 mov r1,0h ;...if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), card_DEF = 0 0806833E E00D b 806835Ch ;branch to 0806835C 08068340 21FA mov r1,0FAh ;...if (card_type == DIVINE_BEAST) 08068342 0109 lsl r1,r1,4h ;card_DEF = 4000 08068344 E00A b 806835Ch ;branch to 0806835C 08068346 1C30 mov r0,r6 ;...if (card_type < 0x15) [is a non-Divine-Beast Monster card] 08068348 4038 and r0,r7 ; 0806834A 0080 lsl r0,r0,2h ;r0 = (card_id & 0x7FF) << 2 0806834C 490C ldr r1,=8832B84h ;r1 = pointer_to_card_stats_array 0806834E 1840 add r0,r0,r1 ; 08068350 6801 ldr r1,[r0] ;r1 = card_stats 08068352 0389 lsl r1,r1,0Eh ; 08068354 0DC9 lsr r1,r1,17h ; 08068356 0088 lsl r0,r1,2h ; 08068358 1840 add r0,r0,r1 ; 0806835A 0041 lsl r1,r0,1h ; 0806835C 6EE8 ldr r0,[r5,6Ch] ; 0806835E 4288 cmp r0,r1 ; 08068360 DA21 bge 80683A6h ; 08068362 1C30 mov r0,r6 ; 08068364 4038 and r0,r7 ; 08068366 0080 lsl r0,r0,2h ; 08068368 4A05 ldr r2,=8832B84h ;r2 = pointer_to_card_stats_array 0806836A 1880 add r0,r0,r2 ; 0806836C 6800 ldr r0,[r0] ; 0806836E 4018 and r0,r3 ; 08068370 0D00 lsr r0,r0,14h ; 08068372 2815 cmp r0,15h ; 08068374 DB0B blt 806838Eh ;if (card_type < 0x15) [is a non-Divine-Beast Monster card], branch to 0806838E 08068376 2817 cmp r0,17h ; 08068378 DD04 ble 8068384h ;if (card_type == TRAP || card_type == MAGIC || card_type == TICKET), branch to 08068384 0806837A 2818 cmp r0,18h ; 0806837C D004 beq 8068388h ;if (card_type == DIVINE_BEAST), branch to 08068388 0806837E E006 b 806838Eh ;else branch to 0806838E 08068380 2B84 cmp r3,84h ; 08068382 0883 lsr r3,r0,2h ; 08068384 2000 mov r0,0h ; 08068386 E00D b 80683A4h ; 08068388 20FA mov r0,0FAh ; 0806838A 0100 lsl r0,r0,4h ; 0806838C E00A b 80683A4h ; 0806838E 1C30 mov r0,r6 ; 08068390 4038 and r0,r7 ; 08068392 0080 lsl r0,r0,2h ; 08068394 4C0B ldr r4,=8832B84h ;r4 = pointer_to_card_stats_array 08068396 1900 add r0,r0,r4 ; 08068398 6801 ldr r1,[r0] ; 0806839A 0389 lsl r1,r1,0Eh ; 0806839C 0DC9 lsr r1,r1,17h ; 0806839E 0088 lsl r0,r1,2h ; 080683A0 1840 add r0,r0,r1 ; 080683A2 0040 lsl r0,r0,1h ; 080683A4 66E8 str r0,[r5,6Ch] ; 080683A6 1C30 mov r0,r6 ; 080683A8 4038 and r0,r7 ; 080683AA 0080 lsl r0,r0,2h ; 080683AC 4905 ldr r1,=8832B84h ;r1 = pointer_to_card_stats_array 080683AE 1840 add r0,r0,r1 ; 080683B0 6800 ldr r0,[r0] ; 080683B2 4018 and r0,r3 ; 080683B4 0D00 lsr r0,r0,14h ; 080683B6 2815 cmp r0,15h ; 080683B8 DB0B blt 80683D2h ; 080683BA 2817 cmp r0,17h ; 080683BC DD04 ble 80683C8h ; 080683BE 2818 cmp r0,18h ; 080683C0 D004 beq 80683CCh ; 080683C2 E006 b 80683D2h ; 080683C4 2B84 cmp r3,84h ; 080683C6 0883 lsr r3,r0,2h ; 080683C8 2100 mov r1,0h ; 080683CA E00E b 80683EAh ; 080683CC 21FA mov r1,0FAh ; 080683CE 0109 lsl r1,r1,4h ; 080683D0 E00B b 80683EAh ; 080683D2 1C30 mov r0,r6 ; 080683D4 4038 and r0,r7 ; 080683D6 0080 lsl r0,r0,2h ; 080683D8 4A0D ldr r2,=8832B84h ;r2 = pointer_to_card_stats_array 080683DA 1880 add r0,r0,r2 ; 080683DC 6801 ldr r1,[r0] ; 080683DE 4C0D ldr r4,=1FFh ; 080683E0 1C20 mov r0,r4 ; 080683E2 4001 and r1,r0 ; 080683E4 0088 lsl r0,r1,2h ; 080683E6 1840 add r0,r0,r1 ; 080683E8 0041 lsl r1,r0,1h ;r1 = card_DEF 080683EA 6F28 ldr r0,[r5,70h] ; 080683EC 4288 cmp r0,r1 ; 080683EE DA25 bge 806843Ch ;if ([r5,70h] > card_DEF), branch to 006843C 080683F0 1C30 mov r0,r6 ; 080683F2 4038 and r0,r7 ; 080683F4 0080 lsl r0,r0,2h ; 080683F6 4906 ldr r1,=8832B84h ;r1 = pointer_to_card_stats_array 080683F8 1840 add r0,r0,r1 ; 080683FA 6800 ldr r0,[r0] ; 080683FC 4018 and r0,r3 ; 080683FE 0D00 lsr r0,r0,14h ; 08068400 2815 cmp r0,15h ; 08068402 DB0E blt 8068422h ; 08068404 2817 cmp r0,17h ; 08068406 DD07 ble 8068418h ; 08068408 2818 cmp r0,18h ; 0806840A D007 beq 806841Ch ; 0806840C E009 b 8068422h ; 0806840E 0000 lsl r0,r0,0h ;- 08068410 2B84 cmp r3,84h ;- 08068412 0883 lsr r3,r0,2h ;- 08068414 01FF lsl r7,r7,7h ;- 08068416 0000 lsl r0,r0,0h ;- 08068418 2000 mov r0,0h ; 0806841A E00E b 806843Ah ; 0806841C 20FA mov r0,0FAh ; 0806841E 0100 lsl r0,r0,4h ; 08068420 E00B b 806843Ah ; 08068422 1C30 mov r0,r6 ; 08068424 4038 and r0,r7 ; 08068426 0080 lsl r0,r0,2h ; 08068428 4A21 ldr r2,=8832B84h ;r2 = pointer_to_card_stats_array 0806842A 1880 add r0,r0,r2 ; 0806842C 6801 ldr r1,[r0] ; 0806842E 4C21 ldr r4,=1FFh ; 08068430 1C20 mov r0,r4 ; 08068432 4001 and r1,r0 ; 08068434 0088 lsl r0,r1,2h ; 08068436 1840 add r0,r0,r1 ; 08068438 0040 lsl r0,r0,1h ;r0 = card_DEF 0806843A 6728 str r0,[r5,70h] ;store card_DEF into [r5 + 0x70] 0806843C 1C30 mov r0,r6 ; 0806843E 4038 and r0,r7 ; 08068440 0040 lsl r0,r0,1h ; 08068442 491D ldr r1,=8833C80h ;r1 = pointer_to_internal_cards_ids_array 08068444 1844 add r4,r0,r1 ; 08068446 8820 ldrh r0,[r4] ;r0 = internal_card_id 08068448 2101 mov r1,1h ;r1 = 1 0806844A 9300 str r3,[sp] ; 0806844C F7A8FB38 bl 8010AC0h ;call 08010AC0 08068450 9B00 ldr r3,[sp] ; 08068452 2800 cmp r0,0h ; 08068454 D106 bne 8068464h ; 08068456 8820 ldrh r0,[r4] ; 08068458 2100 mov r1,0h ; 0806845A F7A8FB31 bl 8010AC0h ;call 08010AC0 0806845E 9B00 ldr r3,[sp] ; 08068460 2800 cmp r0,0h ; 08068462 D002 beq 806846Ah ; 08068464 6D28 ldr r0,[r5,50h] ; 08068466 3001 add r0,1h ; 08068468 6528 str r0,[r5,50h] ;increment [r5 + 0x50] 0806846A 403E and r6,r7 ; 0806846C 0070 lsl r0,r6,1h ; 0806846E 4A12 ldr r2,=8833C80h ;r2 = pointer_to_internal_cards_ids_array 08068470 1880 add r0,r0,r2 ; 08068472 8801 ldrh r1,[r0] ;r1 = internal_card_id 08068474 4811 ldr r0,=229h ;r0 = 553 [Lava Battleguard] 08068476 4281 cmp r1,r0 ; 08068478 D100 bne 806847Ch ;if (internal_card_id ≠ Lava Battleguard), branch to 0806847C 0806847A E0E0 b 806863Eh ;else branch to 0806863E 0806847C 4281 cmp r1,r0 ; 0806847E DC6F bgt 8068560h ;if (internal_card_id > 553), branch to 08068560 08068480 389C sub r0,9Ch ;r0 = 397 [Ooguchi] 08068482 4281 cmp r1,r0 ; 08068484 DC38 bgt 80684F8h ; 08068486 3801 sub r0,1h ;r0 = 396 [Leghul] 08068488 4281 cmp r1,r0 ; 0806848A DB00 blt 806848Eh ; 0806848C E0E2 b 8068654h ; 0806848E 2953 cmp r1,53h ;83 [Reaper of the Cards] 08068490 D100 bne 8068494h ; 08068492 E0E7 b 8068664h ; 08068494 2953 cmp r1,53h ; 08068496 DC17 bgt 80684C8h ; 08068498 2914 cmp r1,14h ;20 [Exodia the Forbidden One] 0806849A DC11 bgt 80684C0h ; 0806849C 2910 cmp r1,10h ;16 [Right Leg of the Forbidden One] 0806849E DB00 blt 80684A2h ; 080684A0 E0F0 b 8068684h ; 080684A2 290B cmp r1,0Bh ;11 [Swamp Battleguard] 080684A4 D100 bne 80684A8h ; 080684A6 E0CA b 806863Eh ; 080684A8 290F cmp r1,0Fh ;15 [Time Wizard] 080684AA D100 bne 80684AEh ; 080684AC E0D6 b 806865Ch ; 080684AE E0EC b 806868Ah ;branch to 0806868A 080684B0 2B84 cmp r3,84h ;- 080684B2 0883 lsr r3,r0,2h ;- 080684B4 01FF lsl r7,r7,7h ;- 080684B6 0000 lsl r0,r0,0h ;- 080684B8 3C80 sub r4,80h ; 080684BA 0883 lsr r3,r0,2h ; 080684BC 0229 lsl r1,r5,8h ; 080684BE 0000 lsl r0,r0,0h ; 080684C0 292F cmp r1,2Fh ;47 [Sangan] 080684C2 D100 bne 80684C6h ; 080684C4 E0DA b 806867Ch ; 080684C6 E0E0 b 806868Ah ;branch to 0806868A 080684C8 4806 ldr r0,=16Fh ;r0 = 367 [Shadow Ghoul] 080684CA 4281 cmp r1,r0 ; 080684CC D100 bne 80684D0h ; 080684CE E0B6 b 806863Eh ; 080684D0 4281 cmp r1,r0 ; 080684D2 DC09 bgt 80684E8h ; 080684D4 29DF cmp r1,0DFh ;223 [Trap Master] 080684D6 D100 bne 80684DAh ; 080684D8 E0C4 b 8068664h ; 080684DA 29EA cmp r1,0EAh ;234 [Wodan the Resident of the Forest] 080684DC D100 bne 80684E0h ; 080684DE E0AE b 806863Eh ; 080684E0 E0D3 b 806868Ah ;branch to 0806868A 080684E2 0000 lsl r0,r0,0h ; 080684E4 016F lsl r7,r5,5h ; 080684E6 0000 lsl r0,r0,0h ; 080684E8 4802 ldr r0,=181h ;r0 = 385 [Harpie's Pet Dragon] 080684EA 4281 cmp r1,r0 ; 080684EC D100 bne 80684F0h ; 080684EE E0A6 b 806863Eh ; 080684F0 3001 add r0,1h ;r0 = 386 [Mystic Lamp] 080684F2 E07C b 80685EEh ; 080684F4 0181 lsl r1,r0,6h ; 080684F6 0000 lsl r0,r0,0h ; 080684F8 20FA mov r0,0FAh ; 080684FA 0040 lsl r0,r0,1h ;r0 = 500 [Man-Eater Bug] 080684FC 4281 cmp r1,r0 ; 080684FE D100 bne 8068502h ; 08068500 E0AC b 806865Ch ; 08068502 4281 cmp r1,r0 ; 08068504 DC15 bgt 8068532h ; 08068506 380D sub r0,0Dh ;r0 = 487 [Rainbow Flower] 08068508 4281 cmp r1,r0 ; 0806850A D100 bne 806850Eh ; 0806850C E0A2 b 8068654h ; 0806850E 4281 cmp r1,r0 ; 08068510 DC05 bgt 806851Eh ; 08068512 3851 sub r0,51h ;r0 = 406 [Machine King] 08068514 4281 cmp r1,r0 ; 08068516 D100 bne 806851Ah ; 08068518 E091 b 806863Eh ; 0806851A 300F add r0,0Fh ;r0 = 421 [Jinzo #7] 0806851C E067 b 80685EEh ; 0806851E 20F6 mov r0,0F6h ; 08068520 0040 lsl r0,r0,1h ;r0 = 492 [Maha Vailo] 08068522 4281 cmp r1,r0 ; 08068524 DD00 ble 8068528h ; 08068526 E0B0 b 806868Ah ;branch to 0806868A 08068528 3801 sub r0,1h ; 0806852A 4281 cmp r1,r0 ; 0806852C DA00 bge 8068530h ; 0806852E E0AC b 806868Ah ;branch to 0806868A 08068530 E085 b 806863Eh ; 08068532 4806 ldr r0,=20Eh ;r0 = 526 [Milus Radiant] 08068534 4281 cmp r1,r0 ; 08068536 D100 bne 806853Ah ; 08068538 E081 b 806863Eh ; 0806853A 4281 cmp r1,r0 ; 0806853C DC08 bgt 8068550h ; 0806853E 380B sub r0,0Bh ;r0 = 515 [Muka Muka] 08068540 4281 cmp r1,r0 ; 08068542 D100 bne 8068546h ; 08068544 E07B b 806863Eh ; 08068546 3008 add r0,8h ;r0 = 523 [Star Boy] 08068548 E03D b 80685C6h ; 0806854A 0000 lsl r0,r0,0h ;- 0806854C 020E lsl r6,r1,8h ;- 0806854E 0000 lsl r0,r0,0h ;- 08068550 4802 ldr r0,=21Bh ;r0 = 539 [Skelengel] 08068552 4281 cmp r1,r0 ; 08068554 D100 bne 8068558h ; 08068556 E08D b 8068674h ; 08068558 3001 add r0,1h ;r0 = 540 [Hane-Hane] 0806855A E02E b 80685BAh ; 0806855C 021B lsl r3,r3,8h ; 0806855E 0000 lsl r0,r0,0h ; 08068560 480A ldr r0,=2FEh ;r0 = 766 [Blue-Eyes Toon Dragon] 08068562 4281 cmp r1,r0 ; 08068564 D100 bne 8068568h ; 08068566 E075 b 8068654h ; 08068568 4281 cmp r1,r0 ; 0806856A DC31 bgt 80685D0h ; 0806856C 388B sub r0,8Bh ; 0806856E 4281 cmp r1,r0 ; 08068570 D065 beq 806863Eh ; 08068572 4281 cmp r1,r0 ; 08068574 DC12 bgt 806859Ch ; 08068576 381A sub r0,1Ah ; 08068578 4281 cmp r1,r0 ; 0806857A D06F beq 806865Ch ; 0806857C 4281 cmp r1,r0 ; 0806857E DC07 bgt 8068590h ; 08068580 381C sub r0,1Ch ; 08068582 4281 cmp r1,r0 ; 08068584 D100 bne 8068588h ; 08068586 E079 b 806867Ch ; 08068588 3018 add r0,18h ; 0806858A E01C b 80685C6h ; 0806858C 02FE lsl r6,r7,0Bh ; 0806858E 0000 lsl r0,r0,0h ; 08068590 2098 mov r0,98h ; 08068592 0080 lsl r0,r0,2h ; 08068594 4281 cmp r1,r0 ; 08068596 D052 beq 806863Eh ; 08068598 3007 add r0,7h ; 0806859A E014 b 80685C6h ; 0806859C 20B6 mov r0,0B6h ; 0806859E 0080 lsl r0,r0,2h ; 080685A0 4281 cmp r1,r0 ; 080685A2 DC04 bgt 80685AEh ; 080685A4 3802 sub r0,2h ; 080685A6 4281 cmp r1,r0 ; 080685A8 DA54 bge 8068654h ; 080685AA 385C sub r0,5Ch ; 080685AC E01F b 80685EEh ; 080685AE 4804 ldr r0,=2F7h ;r0 = 759 [Dark Magician Girl] 080685B0 4281 cmp r1,r0 ; 080685B2 D044 beq 806863Eh ; 080685B4 4281 cmp r1,r0 ; 080685B6 DC05 bgt 80685C4h ; 080685B8 3811 sub r0,11h ; 080685BA 4281 cmp r1,r0 ; 080685BC D04E beq 806865Ch ; 080685BE E064 b 806868Ah ;branch to 0806868A 080685C0 02F7 lsl r7,r6,0Bh ; 080685C2 0000 lsl r0,r0,0h ; 080685C4 4801 ldr r0,=2F9h ;r0 = 761 [Insect Queen] 080685C6 4281 cmp r1,r0 ; 080685C8 D039 beq 806863Eh ; 080685CA E05E b 806868Ah ;branch to 0806868A 080685CC 02F9 lsl r1,r7,0Bh ; 080685CE 0000 lsl r0,r0,0h ; 080685D0 4808 ldr r0,=45Ch ;r0 = 1116 [Spear Cretin] 080685D2 4281 cmp r1,r0 ; 080685D4 D04A beq 806866Ch ; 080685D6 4281 cmp r1,r0 ; 080685D8 DC18 bgt 806860Ch ; 080685DA 3808 sub r0,8h ; 080685DC 4281 cmp r1,r0 ; 080685DE D04D beq 806867Ch ; 080685E0 4281 cmp r1,r0 ; 080685E2 DC09 bgt 80685F8h ; 080685E4 20CA mov r0,0CAh ; 080685E6 0080 lsl r0,r0,2h ; 080685E8 4281 cmp r1,r0 ; 080685EA D028 beq 806863Eh ; 080685EC 3004 add r0,4h ; 080685EE 4281 cmp r1,r0 ; 080685F0 D030 beq 8068654h ; 080685F2 E04A b 806868Ah ;branch to 0806868A 080685F4 045C lsl r4,r3,11h ; 080685F6 0000 lsl r0,r0,0h ; 080685F8 4803 ldr r0,=456h ;r0 = 1110 [UFO Turtle] 080685FA 4281 cmp r1,r0 ; 080685FC D03E beq 806867Ch ; 080685FE 3005 add r0,5h ; 08068600 4281 cmp r1,r0 ; 08068602 D023 beq 806864Ch ; 08068604 E041 b 806868Ah ;branch to 0806868A 08068606 0000 lsl r0,r0,0h ; 08068608 0456 lsl r6,r2,11h ; 0806860A 0000 lsl r0,r0,0h ; 0806860C 208C mov r0,8Ch ; 0806860E 00C0 lsl r0,r0,3h ; 08068610 4281 cmp r1,r0 ; 08068612 DC04 bgt 806861Eh ; 08068614 3801 sub r0,1h ; 08068616 4281 cmp r1,r0 ; 08068618 DA30 bge 806867Ch ; 0806861A 3802 sub r0,2h ; 0806861C E005 b 806862Ah ; 0806861E 4804 ldr r0,=5ECh ;r0 = 1516 [Spirit of Flames] 08068620 4281 cmp r1,r0 ; 08068622 D00C beq 806863Eh ; 08068624 4281 cmp r1,r0 ; 08068626 DC07 bgt 8068638h ; 08068628 4802 ldr r0,=463h ;r0 = 1123 [Mystic Tomato] 0806862A 4281 cmp r1,r0 ; 0806862C D026 beq 806867Ch ; 0806862E E02C b 806868Ah ;branch to 0806868A 08068630 05EC lsl r4,r5,17h ; 08068632 0000 lsl r0,r0,0h ; 08068634 0463 lsl r3,r4,11h ; 08068636 0000 lsl r0,r0,0h ; 08068638 4803 ldr r0,=5EEh ;r0 = 1518 [The Rock Spirit] 0806863A 4281 cmp r1,r0 ; 0806863C D125 bne 806868Ah ;if (internal_card_id ≠ The Rock Spirit), branch to 0806868A 0806863E 6B28 ldr r0,[r5,30h] ; 08068640 3001 add r0,1h ; 08068642 6328 str r0,[r5,30h] ;increment [r5 + 0x30] 08068644 E021 b 806868Ah ;branch to 0806868A 08068646 0000 lsl r0,r0,0h ;- 08068648 05EE lsl r6,r5,17h ;- 0806864A 0000 lsl r0,r0,0h ;- 0806864C 6B68 ldr r0,[r5,34h] ; 0806864E 3001 add r0,1h ; 08068650 6368 str r0,[r5,34h] ;increment [r5 + 0x34] 08068652 E01A b 806868Ah ;branch to 0806868A 08068654 6BA8 ldr r0,[r5,38h] ; 08068656 3001 add r0,1h ; 08068658 63A8 str r0,[r5,38h] ;increment [r5 + 0x38] 0806865A E016 b 806868Ah ;branch to 0806868A 0806865C 6BE8 ldr r0,[r5,3Ch] ; 0806865E 3001 add r0,1h ; 08068660 63E8 str r0,[r5,3Ch] ;increment [r5 + 0x3C] 08068662 E012 b 806868Ah ;branch to 0806868A 08068664 6C28 ldr r0,[r5,40h] ; 08068666 3001 add r0,1h ; 08068668 6428 str r0,[r5,40h] ;increment [r5 + 0x40] 0806866A E00E b 806868Ah ;branch to 0806868A 0806866C 6C68 ldr r0,[r5,44h] ;r0 = number_of_cards_reviving_from_GY_in_player_deck 0806866E 3001 add r0,1h ; 08068670 6468 str r0,[r5,44h] ;number_of_cards_reviving_from_GY_in_player_deck++ 08068672 E00A b 806868Ah ;branch to 0806868A 08068674 6CA8 ldr r0,[r5,48h] ;r0 = number_of_draw_cards_in_player_deck 08068676 3001 add r0,1h ; 08068678 64A8 str r0,[r5,48h] ;number_of_draw_cards_in_player_deck++ 0806867A E006 b 806868Ah ;branch to 0806868A 0806867C 6CE8 ldr r0,[r5,4Ch] ; 0806867E 3001 add r0,1h ; 08068680 64E8 str r0,[r5,4Ch] ;increment [r5 + 0x4C] 08068682 E002 b 806868Ah ;branch to 0806868A 08068684 6DE8 ldr r0,[r5,5Ch] ; 08068686 3001 add r0,1h ; 08068688 65E8 str r0,[r5,5Ch] ;increment [r5 + 0x5C] 0806868A 2401 mov r4,1h ; 0806868C 44A0 add r8,r4 ;r8++ /*(the most inefficient increment in the world)*/ 0806868E 4913 ldr r1,=2018FE4h ; 08068690 2001 mov r0,1h ; 08068692 464A mov r2,r9 ; 08068694 4010 and r0,r2 ; 08068696 4A12 ldr r2,=0D64h ; 08068698 4350 mul r0,r2 ; 0806869A 1840 add r0,r0,r1 ; 0806869C 78C0 ldrb r0,[r0,3h] ; 0806869E 4580 cmp r8,r0 ; 080686A0 DA01 bge 80686A6h ; 080686A2 F7FFFABE bl 8067C22h ; 080686A6 4A0D ldr r2,=2018FE4h ; 080686A8 2001 mov r0,1h ; 080686AA 464C mov r4,r9 ; 080686AC 4020 and r0,r4 ; 080686AE 490C ldr r1,=0D64h ; 080686B0 4348 mul r0,r1 ; 080686B2 1880 add r0,r0,r2 ; 080686B4 7940 ldrb r0,[r0,5h] ; 080686B6 60E8 str r0,[r5,0Ch] ; 080686B8 6828 ldr r0,[r5] ; 080686BA 6869 ldr r1,[r5,4h] ; 080686BC 1840 add r0,r0,r1 ; 080686BE 68A9 ldr r1,[r5,8h] ; 080686C0 1840 add r0,r0,r1 ; 080686C2 6929 ldr r1,[r5,10h] ; 080686C4 1840 add r0,r0,r1 ; 080686C6 6969 ldr r1,[r5,14h] ; 080686C8 1840 add r0,r0,r1 ; 080686CA 61A8 str r0,[r5,18h] ; 080686CC B001 add sp,4h ; 080686CE BC18 pop r3,r4 ; 080686D0 4698 mov r8,r3 ; 080686D2 46A1 mov r9,r4 ; 080686D4 BCF0 pop r4-r7 ; 080686D6 BC01 pop r0 ; 080686D8 4700 bx r0 ;
Add Random Normal Monsters subroutines
0x686E4
080686E4 B530 push r4,r5,r14 ; 080686E6 1C0D mov r5,r1 ;r5 = r1 080686E8 0400 lsl r0,r0,10h ; 080686EA 0C04 lsr r4,r0,10h ;r4 = random_card_id 080686EC 4B0B ldr r3,=7FFh ;r3 = 2047 080686EE 4023 and r3,r4 ;r3 &= random_card_id 080686F0 0098 lsl r0,r3,2h ;r0 = r3 << 2 080686F2 490B ldr r1,=8832B84h ;r1 = pointer_to_cards_stats_array 080686F4 1840 add r0,r0,r1 ; 080686F6 6800 ldr r0,[r0] ;r0 = card_stats 080686F8 21F8 mov r1,0F8h ; 080686FA 0449 lsl r1,r1,11h ;r1 = card_type_flags 080686FC 4008 and r0,r1 ; 080686FE 0D00 lsr r0,r0,14h ; 08068700 2814 cmp r0,14h ; 08068702 D901 bls 8068708h ;if (MONSTER_CARD), skip next instruction 08068704 F000FC50 bl 8068FA8h ;else, call r0 = 0 / pop r1 / bx r1 08068708 0058 lsl r0,r3,1h ;r0 = r3 << 1 0806870A 4B06 ldr r3,=8833C80h ;r3 = pointer_to_internal_cards_ids_array 0806870C 18C0 add r0,r0,r3 ; 0806870E 8801 ldrh r1,[r0] ;r1 = internal_card_id 08068710 4805 ldr r0,=776h ;r0 = OBELISK_THE_TOURMENTOR 08068712 4281 cmp r1,r0 ; 08068714 D10A bne 806872Ch ;if (internal_card_id ≠ OBELISK_THE_TOURMENTOR), branch to 0x806872C 08068716 2003 mov r0,3h ;else r0 = 3 08068718 E039 b 806878Eh ;branch to 0x806878E
0x6872C
0806872C 4281 cmp r1,r0 ; 0806872E DB05 blt 806873Ch ;if (internal_card_id < OBELISK_THE_TOURMENTOR), branch to 0x806873C 08068730 20EF mov r0,0EFh ; 08068732 00C0 lsl r0,r0,3h ;else r0 = THE_WINGED_DRAGON_OF_RA 08068734 4281 cmp r1,r0 ; 08068736 DC01 bgt 806873Ch ;if (internal_card_id > THE_WINGED_DRAGON_OF_RA), branch to 0x806873C 08068738 2001 mov r0,1h ;else r0 = 1 0806873A E028 b 806878Eh ;
0x6873C
0806873C 4808 ldr r0,=7FFh ;r0 = 2047 0806873E 4020 and r0,r4 ; 08068740 0080 lsl r0,r0,2h ; 08068742 4908 ldr r1,=8832B84h ;r1 = pointer_to_card_stats_array 08068744 1840 add r0,r0,r1 ; 08068746 6800 ldr r0,[r0] ;r0 = card_stats 08068748 21F8 mov r1,0F8h ; 0806874A 0449 lsl r1,r1,11h ;r1 = 0x1F00000 0806874C 4008 and r0,r1 ; 0806874E 0D00 lsr r0,r0,14h ;(card_stats & 0x1F00000) >> 0x14 08068750 2816 cmp r0,16h ; 08068752 D00C beq 806876Eh ;if (card_type == non_divine_beast_monster), branch to 0x806876E 08068754 2816 cmp r0,16h ; 08068756 DC07 bgt 8068768h ;if (card_type == ticket_or_divine_beast), branch to 0x8068768 08068758 2815 cmp r0,15h ; 0806875A D00A beq 8068772h ;if (card_type == trap), branch to 0x8068772 0806875C E00D b 806877Ah ;else branch to 0x806877A (card_type == magic)
0x68768 - card_type == ticket_or_divine_beast
08068768 2817 cmp r0,17h ; 0806876A D004 beq 8068776h ;if (card_type == ticket), branch to 0x8068776 0806876C E005 b 806877Ah ;else branch to 0x6877A (card_type == divine_beast)
0x6876E - card_type == non_divine_beast_monster
0806876E 2007 mov r0,7h ;r0 = 7 08068770 E00D b 806878Eh ;
0x68772 - card_type == trap
08068772 2008 mov r0,8h ;r0 = 8 08068774 E00B b 806878Eh ;
0x68776 - card_type == ticket
08068776 2009 mov r0,9h ;r0 = 9 08068778 E009 b 806878Eh ;
0x6877A
0806877A 4817 ldr r0,=7FFh ;r0 = 2047 0806877C 4020 and r0,r4 ; 0806877E 0080 lsl r0,r0,2h ; 08068780 4B16 ldr r3,=8832B84h ; 08068782 18C0 add r0,r0,r3 ; 08068784 6800 ldr r0,[r0] ; 08068786 21C0 mov r1,0C0h ; 08068788 0309 lsl r1,r1,0Ch ; 0806878A 4008 and r0,r1 ; 0806878C 0C80 lsr r0,r0,12h ;r0 >> 18 (and continue to next part)
0x6878E - Handles different types of cards, and starts checking for Normal Monsters IDs ?
- Arguments:
- r0 : 1 if THE_WINGED_DRAGON_OF_RA or SLIFER_THE_SKY_DRAGON, 3 if OBESLISK_THE_TOURMENTOR
0806878E 2800 cmp r0,0h ; 08068790 D001 beq 8068796h ;if (r0 == 0, skip next instruction) 08068792 F000FC09 bl 8068FA8h ;else, call r0 = 0 / pop r1 / bx r1 08068796 4910 ldr r1,=7FFh ;r1 = 2047 08068798 4021 and r1,r4 ;r1 &= r4 0806879A 0048 lsl r0,r1,1h ;r0 = r1 << 1 0806879C 4B10 ldr r3,=8833C80h ;r3 = pointer_to_internal_card_ids 0806879E 18C0 add r0,r0,r3 ; 080687A0 8800 ldrh r0,[r0] ;r0 = internal_card_id 080687A2 4B10 ldr r3,=0FFFFF880h ; 080687A4 18C0 add r0,r0,r3 ;r0 -= 1920 (excludes Tokens and Alternate arts) 080687A6 0400 lsl r0,r0,10h ; 080687A8 0C00 lsr r0,r0,10h ;r0 &= 0xFFFF 080687AA 284F cmp r0,4Fh ; 080687AC D801 bhi 80687B2h ;if (random_card_id > URABY), skip next instruction 080687AE F000FBFB bl 8068FA8h ;else, call r0 = 0 / pop r1 / bx r1 080687B2 2A01 cmp r2,1h ; 080687B4 D000 beq 80687B8h ; 080687B6 E085 b 80688C4h ;
Random monsters ATK and DEF rating for CPU deck generation
0x687B8
080687B8 0088 lsl r0,r1,2h ;r0 = random_card_id << 2 080687BA 4908 ldr r1,=8832B84h ;r1 = pointer_to_card_stats_array 080687BC 1840 add r0,r0,r1 ;r0 = pointer_to_card_stats_array + (random_card_id << 2) 080687BE 6800 ldr r0,[r0] ;r0 = card_stats 080687C0 21F8 mov r1,0F8h ; 080687C2 0449 lsl r1,r1,11h ; 080687C4 4008 and r0,r1 ;r0 &= 0x1F00000 080687C6 0D00 lsr r0,r0,14h ;r0 >> 20 080687C8 2815 cmp r0,15h ; 080687CA DB12 blt 80687F2h ;if (card_type < 0x15 [is a monster card]), branch to 0x80687F2 080687CC 2817 cmp r0,17h ; 080687CE DD0B ble 80687E8h ;if (card_type ≤ 0x17 [is not a monster card]), branch to 0x80687E8 080687D0 2818 cmp r0,18h ; 080687D2 D00B beq 80687ECh ;if (card_type == DIVINE_BEAST), branch to 0x80687EC 080687D4 E00D b 80687F2h ;else branch to 0x80687F2 (Monster cards)
0x687E8 - if (card_type ≤ 0x17 [is not a monster card]), card_ATK = 0
080687E8 2200 mov r2,0h ;card_ATK = 0 080687EA E00D b 8068808h ;branch to 0x8068808
0x687EC - if (card_type == DIVINE_BEAST), card_ATK = 4000
080687EC 22FA mov r2,0FAh ; 080687EE 0112 lsl r2,r2,4h ;r2 = 4000 080687F0 E00A b 8068808h ;branch to 0x8068808
0x687F2 - if (card_type < 0x15 [is a monster card])
080687F2 480E ldr r0,=7FFh ; 080687F4 4020 and r0,r4 ;r0 = random_card_id & 2047 080687F6 0080 lsl r0,r0,2h ;r0 = random_card_id << 2 080687F8 4A0D ldr r2,=8832B84h ;r2 = pointer_to_card_stats_array 080687FA 1880 add r0,r0,r2 ; 080687FC 6801 ldr r1,[r0] ;r1 = card_stats 080687FE 0389 lsl r1,r1,0Eh ; 08068800 0DC9 lsr r1,r1,17h ; 08068802 0088 lsl r0,r1,2h ; 08068804 1840 add r0,r0,r1 ; 08068806 0042 lsl r2,r0,1h ;r2 = card_ATK 08068808 4808 ldr r0,=7FFh ; 0806880A 4020 and r0,r4 ;r0 = random_card_id & 2047 0806880C 0080 lsl r0,r0,2h ; 0806880E 4B08 ldr r3,=8832B84h ;r3 = pointer_to_card_stats_array 08068810 18C0 add r0,r0,r3 ; 08068812 6800 ldr r0,[r0] ;r0 = card_stats 08068814 21F8 mov r1,0F8h ; 08068816 0449 lsl r1,r1,11h ; 08068818 4008 and r0,r1 ; 0806881A 0D00 lsr r0,r0,14h ; 0806881C 2815 cmp r0,15h ; 0806881E DB0E blt 806883Eh ; 08068820 2817 cmp r0,17h ; 08068822 DD07 ble 8068834h ; 08068824 2818 cmp r0,18h ; 08068826 D007 beq 8068838h ; 08068828 E009 b 806883Eh ;
0x68834 - if (card_type ≤ 0x17 [is not a monster card]), card_DEF = 0
08068834 2000 mov r0,0h ;card_DEF = 0 08068836 E00D b 8068854h ;
0x68838 - if (card_type == DIVINE_BEAST), card_DEF = 4000
08068838 20FA mov r0,0FAh ; 0806883A 0100 lsl r0,r0,4h ;card_DEF = 4000 0806883C E00A b 8068854h ;
0x6883E
0806883E 4811 ldr r0,=7FFh ; 08068840 4020 and r0,r4 ; 08068842 0080 lsl r0,r0,2h ; 08068844 4910 ldr r1,=8832B84h ; 08068846 1840 add r0,r0,r1 ; 08068848 6801 ldr r1,[r0] ;r1 = card_stats 0806884A 4810 ldr r0,=1FFh ;511 ; 5110 is the max card_ATK and max card_DEF 0806884C 4001 and r1,r0 ; 0806884E 0088 lsl r0,r1,2h ; 08068850 1840 add r0,r0,r1 ; 08068852 0040 lsl r0,r0,1h ; 08068854 1881 add r1,r0,r2 ; 08068856 20FA mov r0,0FAh ; 08068858 00C0 lsl r0,r0,3h ;r0 = 2000 0806885A 4281 cmp r1,r0 ; 0806885C DD00 ble 8068860h ; 0806885E E3A3 b 8068FA8h ;
0x68FA8 - call r0 = 0 / pop r1 / bx r1
08068FA8 2000 mov r0,0h ;r0 = 0 08068FAA BC30 pop r4,r5 ; 08068FAC BC02 pop r1 ; 08068FAE 4708 bx r1 ;
0x68FB0
- Arguments:
- r0 : cpu_opponent_internal_id
- r1 : max_cpu_deck_size
08068FB0 B5F0 push r4-r7,r14 ; 08068FB2 4647 mov r7,r8 ; 08068FB4 B480 push r7 ; 08068FB6 B083 add sp,-0Ch ; 08068FB8 4680 mov r8,r0 ;r8 = cpu_opponent_internal_id 08068FBA 2927 cmp r1,27h ; 08068FBC DC00 bgt 8068FC0h ;if (max_cpu_deck_size > 39), skip next instruction 08068FBE 2128 mov r1,28h ;max_cpu_deck_size = 40 08068FC0 480D ldr r0,=2018FE4h ; 08068FC2 4A0E ldr r2,=0D67h ; 08068FC4 1880 add r0,r0,r2 ; 08068FC6 7800 ldrb r0,[r0] ;r0 = number_of_cards_in_cpu_deck 08068FC8 1A0E sub r6,r1,r0 ;r6 = max_cpu_deck_size - number_of_cards_in_cpu_deck 08068FCA 2E00 cmp r6,0h ; 08068FCC DD5A ble 8069084h ;if (number_of_free_slots_in_cpu_deck ≤ 0), branch to 0x8069084 08068FCE 480C ldr r0,=2015BE8h ; 08068FD0 6840 ldr r0,[r0,4h] ;r0 = CPU opponent group flags 08068FD2 2101 mov r1,1h ; 08068FD4 4008 and r0,r1 ; 08068FD6 2800 cmp r0,0h ; 08068FD8 D014 beq 8069004h ;if (bit_1_not_set), branch to 0x8069004 (pop r3 in r8, pop r4-r7, pop r0) 08068FDA 00B4 lsl r4,r6,2h ; 08068FDC 19A4 add r4,r4,r6 ; 08068FDE 0060 lsl r0,r4,1h ;r0 = (max_cpu_deck_size - number_of_cards_in_cpu_deck) × 10 08068FE0 9000 str r0,[sp] ;store (number_of_free_slots_in_cpu_deck × 10) in [sp] 08068FE2 213C mov r1,3Ch ;r1 = 60 08068FE4 F02BFC98 bl 8094918h ;call "ratio cards / number_of_cards_in_deck" 08068FE8 1C05 mov r5,r0 ; 08068FEA 9500 str r5,[sp] ; 08068FEC 00A4 lsl r4,r4,2h ; 08068FEE 9401 str r4,[sp,4h] ; 08068FF0 1C20 mov r0,r4 ; 08068FF2 213C mov r1,3Ch ;r1 = 60 08068FF4 E013 b 806901Eh ;
0x6901E - Main Random Normal Monsters generation subroutine
0806901E F02BFC7B bl 8094918h ;ratio TYPE_cards / number_of_cards_in_deck 08069022 9001 str r0,[sp,4h] ; 08069024 1B75 sub r5,r6,r5 ;r5 = r6 - r5 08069026 1A2D sub r5,r5,r0 ;r5 = r5 - r0 08069028 9502 str r5,[sp,8h] ; 0806902A 2600 mov r6,0h ;r6 = 0 0806902C 00B0 lsl r0,r6,2h ;:loop_start, r0 = r6 << 2 0806902E 466A mov r2,r13 ; 08069030 1811 add r1,r2,r0 ;r1 = r2 + r0 08069032 6808 ldr r0,[r1] ; 08069034 1C77 add r7,r6,1 ;r7 = r6 + 1 08069036 2800 cmp r0,0h ; 08069038 D021 beq 806907Eh ;if (r0 == 0), branch to 0x806907E 0806903A 1C0D mov r5,r1 ; 0806903C F021FCBA bl 808A9B4h ;PRNG - LCG rand() 08069040 4913 ldr r1,=43Eh ;r1 = 1086; last valid real_card_id 08069042 F02BFCB5 bl 80949B0h ;to do: document this called subroutine 08069046 3001 add r0,1h ;r0++ 08069048 0400 lsl r0,r0,10h ; 0806904A 0C04 lsr r4,r0,10h ;r4 = PRN 0806904C 1C20 mov r0,r4 ;r0 = PRN 0806904E 1C31 mov r1,r6 ; 08069050 4642 mov r2,r8 ; 08069052 F7FFFB47 bl 80686E4h ; 08069056 0400 lsl r0,r0,10h ; 08069058 2800 cmp r0,0h ; 0806905A D00D beq 8069078h ; 0806905C 480D ldr r0,=7FFh ; 0806905E 1C01 mov r1,r0 ; 08069060 1C20 mov r0,r4 ; 08069062 4008 and r0,r1 ; 08069064 0040 lsl r0,r0,1h ; 08069066 490C ldr r1,=8833C80h ;r1 = pointer_to_internal_cards_ids_array 08069068 1840 add r0,r0,r1 ; 0806906A 8801 ldrh r1,[r0] ; 0806906C 2001 mov r0,1h ; 0806906E F7FEFBF9 bl 8067864h ;Add card to Player or CPU's deck, main routine 08069072 6828 ldr r0,[r5] ; 08069074 3801 sub r0,1h ; 08069076 6028 str r0,[r5] ; 08069078 6828 ldr r0,[r5] ; 0806907A 2800 cmp r0,0h ; 0806907C D1DE bne 806903Ch ; 0806907E 1C3E mov r6,r7 ; 08069080 2E02 cmp r6,2h ; 08069082 DDD3 ble 806902Ch ;if (r6 ≤ 2), loop to 0x806902C (loop_start) 08069084 B003 add sp,0Ch ; 08069086 BC08 pop r3 ; 08069088 4698 mov r8,r3 ; 0806908A BCF0 pop r4-r7 ; 0806908C BC01 pop r0 ; 0806908E 4700 bx r0 ;
CPU Deck management
Branch to CPU opponent's deck subroutines
Define some CPU opponent group flags, and branch to CPU opponent's subroutine
- Arguments:
- r0 : DWORD(IW_30048B0 << 26) >> 27; this is the Opponent's internal ID
0806909C B530 push r4,r5,r14 ; 0806909E 1C01 mov r1,r0 ;r1 = cpu_opponent_internal_id 080690A0 4A08 ldr r2,=2015BE8h ; 080690A2 2000 mov r0,0h ; 080690A4 6050 str r0,[r2,4h] ;CPU opponent group flags = 0 080690A6 290D cmp r1,0Dh ; 080690A8 DD01 ble 80690AEh ;if (cpu_opponent_internal_id ≤ 13), branch to 0x80690AE 080690AA 200F mov r0,0Fh ; 080690AC 6050 str r0,[r2,4h] ;CPU opponent group flags = 0b00001111 080690AE 1E4D sub r5,r1,1 ;r5 = cpu_opponent_internal_id - 1 080690B0 2D19 cmp r5,19h ; 080690B2 D901 bls 80690B8h ;if ((cpu_opponent_internal_id - 1) ≤ 25), skip next instruction 080690B4 F002F80E bl 806B0D4h ;call 0x806B0D4 080690B8 00A8 lsl r0,r5,2h ; 080690BA 4903 ldr r1,=80690CCh ; 080690BC 1840 add r0,r0,r1 ; 080690BE 6800 ldr r0,[r0] ;r0 = pointer_to_cpu_opponent_subroutine 080690C0 4687 mov r15,r0 ;... continue to pointer_to_cpu_opponent_subroutine
Pointers array to each CPU opponent's subroutines
- CPU opponents with IDs 01 to 13 have some cards added to their deck depending on the player's deck at subroutine 0x6B25E
- Odion has specific anti-cards removed from his deck depending on whether or not the cards they counter are in the Player's deck, at the end of that same subroutine at 0x6B25E
- todo : check if other CPU opponents do this
01 - 34 91 06 08 - Mokuba 02 - E4 91 06 08 - Tea Gardner 03 - 58 93 06 08 - Rex Raptor 04 - F0 93 06 08 - Espa Roba 05 - 90 94 06 08 - Trusdale 06 - 28 95 06 08 - Duke Devlin 07 - 20 96 06 08 - Mako Tsunami 08 - F0 96 06 08 - Weevil Underwood 09 - 10 98 06 08 - Mai Valentine 10 - 6C 99 06 08 - Bandit Keith 11 - BC 9A 06 08 - Joey Wheeler 12 - 4C 9C 06 08 - Mind-controlled Tea 13 - E8 9D 06 08 - Rare Hunter 14 - 58 9F 06 08 - Arkana 15 - 14 A0 06 08 - Strings 16 - 00 A1 06 08 - Lumis & Umbra 17 - 10 A2 06 08 - Odion 18 - B8 A3 06 08 - Mind-controlled Joey 19 - 58 A5 06 08 - Maximillion Pegasus 20 - FC A6 06 08 - Marik Ishtar 21 - B4 A8 06 08 - Yami Bakura 22 - 3C AA 06 08 - Ishizu Ishtar 23 - E0 AB 06 08 - Seto Kaiba 24 - 8C AD 06 08 - Yami Marik 25 - D4 B0 06 08 - Shadi - Skips to the next part where it'll pick a deck at random 26 - 60 AF 06 08 - Yami Yugi
CPU decks subroutines
Each of these arrays is preceded by a subroutine reading this array, and having a few more hard-coded cards in it.
Mokuba
Mokuba's deck subroutine
08069134 2001 mov r0,1h ; 08069136 2101 mov r1,1h ;Mystical Elf 08069138 F7FEFB94 bl 8067864h ; 0806913C 2001 mov r0,1h ; 0806913E 2110 mov r1,10h ;Right Leg of the Forbidden One 08069140 F7FEFB90 bl 8067864h ; 08069144 2001 mov r0,1h ; 08069146 2111 mov r1,11h ;Left Leg of the Forbidden One 08069148 F7FEFB8C bl 8067864h ; 0806914C 2001 mov r0,1h ; 0806914E 2112 mov r1,12h ;Right Arm of the Forbidden One 08069150 F7FEFB88 bl 8067864h ; 08069154 2001 mov r0,1h ; 08069156 2113 mov r1,13h ;Left Arm of the Forbidden One 08069158 F7FEFB84 bl 8067864h ; 0806915C 2001 mov r0,1h ; 0806915E 211C mov r1,1Ch ;Mountain Warrior 08069160 F7FEFB80 bl 8067864h ; 08069164 2001 mov r0,1h ; 08069166 216B mov r1,6Bh ;Graveyard and the Hand of Invitation 08069168 F7FEFB7C bl 8067864h ; 0806916C 2001 mov r0,1h ; 0806916E 2176 mov r1,76h ;Trial of Nightmare 08069170 F7FEFB78 bl 8067864h ; 08069174 2001 mov r0,1h ; 08069176 2183 mov r1,83h ;The 13th Grave 08069178 F7FEFB74 bl 8067864h ; 0806917C 2001 mov r0,1h ; 0806917E 21A8 mov r1,0A8h ;Dark King of the Abyss 08069180 F7FEFB70 bl 8067864h ; 08069184 2001 mov r0,1h ; 08069186 21C0 mov r1,0C0h ;Turtle Tiger 08069188 F7FEFB6C bl 8067864h ; 0806918C 4C12 ldr r4,=15Fh ;Kanan the Swordmistress, from array 0806918E 2001 mov r0,1h ; 08069190 1C21 mov r1,r4 ; 08069192 F7FEFB67 bl 8067864h ; 08069196 2001 mov r0,1h ; 08069198 1C21 mov r1,r4 ; 0806919A F7FEFB63 bl 8067864h ; 0806919E 2001 mov r0,1h ; 080691A0 1C21 mov r1,r4 ; 080691A2 F7FEFB5F bl 8067864h ; 080691A6 21C5 mov r1,0C5h ; 080691A8 0049 lsl r1,r1,1h ;Dancing Elf 080691AA 2001 mov r0,1h ; 080691AC F7FEFB5A bl 8067864h ; 080691B0 490A ldr r1,=24Bh ;Living Vase, from array 080691B2 2001 mov r0,1h ; 080691B4 F7FEFB56 bl 8067864h ; 080691B8 4909 ldr r1,=25Bh ;Obese Marmot of Nefariousness, from array 080691BA 2001 mov r0,1h ; 080691BC F7FEFB52 bl 8067864h ; 080691C0 2001 mov r0,1h ; 080691C2 210F mov r1,0Fh ;Time Wizard 080691C4 F7FEFB4E bl 8067864h ; 080691C8 2001 mov r0,1h ; 080691CA 2139 mov r1,39h ;Kuriboh 080691CC F7FEFB4A bl 8067864h ; 080691D0 21ED mov r1,0EDh ; 080691D2 0049 lsl r1,r1,1h ;Sinister Serpent 080691D4 F001FDBA bl 806AD4Ch ;
Mokuba card_id array
5F 01 00 00 4B 02 00 00 5B 02 00 00 Kanan the Swordmistress Living Vase Obese Marmot of Nefariousness
Tea Gardner
Tea Gardner's deck subroutine
080691E4 2001 mov r0,1h ; 080691E6 2149 mov r1,49h ;Giant Soldier of Stone 080691E8 F7FEFB3C bl 8067864h ; 080691EC 2001 mov r0,1h ; 080691EE 2149 mov r1,49h ;Giant Soldier of Stone 080691F0 F7FEFB38 bl 8067864h ; 080691F4 2001 mov r0,1h ; 080691F6 21E9 mov r1,0E9h ;Beautiful Headhuntress 080691F8 F7FEFB34 bl 8067864h ; 080691FC 2001 mov r0,1h ; 080691FE 21E9 mov r1,0E9h ;Beautiful Headhuntress 08069200 F7FEFB30 bl 8067864h ; 08069204 2495 mov r4,95h ; 08069206 0064 lsl r4,r4,1h ;Sonic Maid 08069208 2001 mov r0,1h ; 0806920A 1C21 mov r1,r4 ; 0806920C F7FEFB2A bl 8067864h ; 08069210 2001 mov r0,1h ; 08069212 1C21 mov r1,r4 ; 08069214 F7FEFB26 bl 8067864h ; 08069218 4948 ldr r1,=14Fh ;Dark Hole, from array 0806921A 2001 mov r0,1h ; 0806921C F7FEFB22 bl 8067864h ; 08069220 21A8 mov r1,0A8h ; 08069222 0049 lsl r1,r1,1h ;Raigeki 08069224 2001 mov r0,1h ; 08069226 F7FEFB1D bl 8067864h ; 0806922A 4945 ldr r1,=15Bh ;Swords of Revealing Light, from array 0806922C 2001 mov r0,1h ; 0806922E F7FEFB19 bl 8067864h ; 08069232 3486 add r4,86h ;Ancient Elf 08069234 2001 mov r0,1h ; 08069236 1C21 mov r1,r4 ; 08069238 F7FEFB14 bl 8067864h ; 0806923C 2001 mov r0,1h ; 0806923E 1C21 mov r1,r4 ; 08069240 F7FEFB10 bl 8067864h ; 08069244 493F ldr r1,=23Dh ;Witch of the Black Forest, from array 08069246 2001 mov r0,1h ; 08069248 F7FEFB0C bl 8067864h ; 0806924C 34C6 add r4,0C6h ;Maiden of the Moonlight 0806924E 2001 mov r0,1h ; 08069250 1C21 mov r1,r4 ; 08069252 F7FEFB07 bl 8067864h ; 08069256 2001 mov r0,1h ; 08069258 1C21 mov r1,r4 ; 0806925A F7FEFB03 bl 8067864h ; 0806925E 4C3A ldr r4,=59Ah ;Fire Princess, from array 08069260 2001 mov r0,1h ; 08069262 1C21 mov r1,r4 ; 08069264 F7FEFAFE bl 8067864h ; 08069268 2001 mov r0,1h ; 0806926A 1C21 mov r1,r4 ; 0806926C F7FEFAFA bl 8067864h ; 08069270 3401 add r4,1h ;Lady Assailant of Flames 08069272 2001 mov r0,1h ; 08069274 1C21 mov r1,r4 ; 08069276 F7FEFAF5 bl 8067864h ; 0806927A 2001 mov r0,1h ; 0806927C 1C21 mov r1,r4 ; 0806927E F7FEFAF1 bl 8067864h ; 08069282 2001 mov r0,1h ; 08069284 1C21 mov r1,r4 ; 08069286 F7FEFAED bl 8067864h ; 0806928A 3402 add r4,2h ;Spirit of the Breeze 0806928C 2001 mov r0,1h ; 0806928E 1C21 mov r1,r4 ; 08069290 F7FEFAE8 bl 8067864h ; 08069294 2001 mov r0,1h ; 08069296 1C21 mov r1,r4 ; 08069298 F7FEFAE4 bl 8067864h ; 0806929C 3401 add r4,1h ;Dancing Fairy 0806929E 2001 mov r0,1h ; 080692A0 1C21 mov r1,r4 ; 080692A2 F7FEFADF bl 8067864h ; 080692A6 2001 mov r0,1h ; 080692A8 1C21 mov r1,r4 ; 080692AA F7FEFADB bl 8067864h ; 080692AE 3406 add r4,6h ;The Forgiving Maiden 080692B0 2001 mov r0,1h ; 080692B2 1C21 mov r1,r4 ; 080692B4 F7FEFAD6 bl 8067864h ; 080692B8 2001 mov r0,1h ; 080692BA 1C21 mov r1,r4 ; 080692BC F7FEFAD2 bl 8067864h ; 080692C0 3402 add r4,2h ;Marie the Fallen One 080692C2 2001 mov r0,1h ; 080692C4 1C21 mov r1,r4 ; 080692C6 F7FEFACD bl 8067864h ; 080692CA 2001 mov r0,1h ; 080692CC 1C21 mov r1,r4 ; 080692CE F7FEFAC9 bl 8067864h ; 080692D2 2001 mov r0,1h ; 080692D4 1C21 mov r1,r4 ; 080692D6 F7FEFAC5 bl 8067864h ; 080692DA 491C ldr r1,=212h ;Mystical Sand, from array 080692DC 2001 mov r0,1h ; 080692DE F7FEFAC1 bl 8067864h ; 080692E2 491B ldr r1,=269h ;Warrior of Tradition, from array 080692E4 2001 mov r0,1h ; 080692E6 F7FEFABD bl 8067864h ; 080692EA 3C01 sub r4,1h ;St. Joan 080692EC 2001 mov r0,1h ; 080692EE 1C21 mov r1,r4 ; 080692F0 F7FEFAB8 bl 8067864h ; 080692F4 2001 mov r0,1h ; 080692F6 1C21 mov r1,r4 ; 080692F8 F7FEFAB4 bl 8067864h ; 080692FC 21FC mov r1,0FCh ; 080692FE 0089 lsl r1,r1,2h ;Monster Reborn 08069300 2001 mov r0,1h ; 08069302 F7FEFAAF bl 8067864h ; 08069306 4C13 ldr r4,=40Ah ;Polymerization, from array 08069308 2001 mov r0,1h ; 0806930A 1C21 mov r1,r4 ; 0806930C F7FEFAAA bl 8067864h ; 08069310 2001 mov r0,1h ; 08069312 1C21 mov r1,r4 ; 08069314 F7FEFAA6 bl 8067864h ; 08069318 2001 mov r0,1h ; 0806931A 1C21 mov r1,r4 ; 0806931C F7FEFAA2 bl 8067864h ; 08069320 3406 add r4,6h ;Fusion Sage 08069322 2001 mov r0,1h ; 08069324 1C21 mov r1,r4 ; 08069326 F7FEFA9D bl 8067864h ; 0806932A 2001 mov r0,1h ; 0806932C 1C21 mov r1,r4 ; 0806932E F7FEFA99 bl 8067864h ; 08069332 2191 mov r1,91h ; 08069334 00C9 lsl r1,r1,3h ;Premature Burial 08069336 F001FD09 bl 806AD4Ch ;
Tea Gardner card_id array
4F 01 00 00 5B 01 00 00 3D 02 00 00 9A 05 00 00 12 02 00 00 69 02 00 00 0A 04 00 00 Dark Hole Swords of Revealing Light Witch of the Black Forest Fire Princess Mystical Sand Warrior of Tradition Polymerization
Rex Raptor
Rex Raptor's deck subroutine
08069358 2001 mov r0,1h ; 0806935A 210A mov r1,0Ah ;Sword Arm of Dragon 0806935C F7FEFA82 bl 8067864h ; 08069360 2001 mov r0,1h ; 08069362 211F mov r1,1Fh ;Two-Headed King Rex 08069364 F7FEFA7E bl 8067864h ; 08069368 2001 mov r0,1h ; 0806936A 211F mov r1,1Fh ;Two-Headed King Rex 0806936C F7FEFA7A bl 8067864h ; 08069370 2001 mov r0,1h ; 08069372 211F mov r1,1Fh ;Two-Headed King Rex 08069374 F7FEFA76 bl 8067864h ; 08069378 2001 mov r0,1h ; 0806937A 214E mov r1,4Eh ;Megazowler 0806937C F7FEFA72 bl 8067864h ; 08069380 2001 mov r0,1h ; 08069382 2150 mov r1,50h ;Crawling Dragon #2 08069384 F7FEFA6E bl 8067864h ; 08069388 2001 mov r0,1h ; 0806938A 2150 mov r1,50h ;Crawling Dragon #2 0806938C F7FEFA6A bl 8067864h ; 08069390 2001 mov r0,1h ; 08069392 2150 mov r1,50h ;Crawling Dragon #2 08069394 F7FEFA66 bl 8067864h ; 08069398 4C10 ldr r4,=53Dh ;Mad Sword Beast, from array 0806939A 2001 mov r0,1h ; 0806939C 1C21 mov r1,r4 ; 0806939E F7FEFA61 bl 8067864h ; 080693A2 2001 mov r0,1h ; 080693A4 1C21 mov r1,r4 ; 080693A6 F7FEFA5D bl 8067864h ; 080693AA 21FE mov r1,0FEh ; 080693AC 0049 lsl r1,r1,1h ;Bracchio-raidus 080693AE 2001 mov r0,1h ; 080693B0 F7FEFA58 bl 8067864h ; 080693B4 21A8 mov r1,0A8h ; 080693B6 0049 lsl r1,r1,1h ;Raigeki 080693B8 2001 mov r0,1h ; 080693BA F7FEFA53 bl 8067864h ; 080693BE 4908 ldr r1,=15Bh ;Swords of Revealing Light, from array 080693C0 2001 mov r0,1h ; 080693C2 F7FEFA4F bl 8067864h ; 080693C6 4907 ldr r1,=3EBh ;Polymerization, from array 080693C8 2001 mov r0,1h ; 080693CA F7FEFA4B bl 8067864h ; 080693CE 4906 ldr r1,=403h ;Change of Heart, from array 080693D0 2001 mov r0,1h ; 080693D2 F7FEFA47 bl 8067864h ; 080693D6 4905 ldr r1,=42Ch ;Snatch Steal, from array 080693D8 F001FCB8 bl 806AD4Ch ;
Rex Raptor card_id array
3D 05 00 00 5B 01 00 00 EB 03 00 00 03 04 00 00 2C 04 00 00 Mad Sword Beast Swords of Revealing Light Polymerization Change of Heart Snatch Steal
Espa Roba
Espa Roba's deck subroutine
080693F0 2001 mov r0,1h ; 080693F2 212F mov r1,2Fh ;Sangan 080693F4 F7FEFA36 bl 8067864h ; 080693F8 2001 mov r0,1h ; 080693FA 212F mov r1,2Fh ;Sangan 080693FC F7FEFA32 bl 8067864h ; 08069400 2001 mov r0,1h ; 08069402 21AA mov r1,0AAh ;Big Eye 08069404 F7FEFA2E bl 8067864h ; 08069408 2001 mov r0,1h ; 0806940A 21AA mov r1,0AAh ;Big Eye 0806940C F7FEFA2A bl 8067864h ; 08069410 4918 ldr r1,=14Fh ;Dark Hole, from array 08069412 2001 mov r0,1h ; 08069414 F7FEFA26 bl 8067864h ; 08069418 21A8 mov r1,0A8h ; 0806941A 0049 lsl r1,r1,1h ;Raigeki 0806941C 2001 mov r0,1h ; 0806941E F7FEFA21 bl 8067864h ; 08069422 4915 ldr r1,=15Bh ;Swords of Revealing Light, from array 08069424 2001 mov r0,1h ; 08069426 F7FEFA1D bl 8067864h ; 0806942A 4914 ldr r1,=23Dh ;Witch of the Black Forest, from array 0806942C 2001 mov r0,1h ; 0806942E F7FEFA19 bl 8067864h ; 08069432 4913 ldr r1,=2EFh ;Jinzo, from array 08069434 2001 mov r0,1h ; 08069436 F7FEFA15 bl 8067864h ; 0806943A 21FC mov r1,0FCh ; 0806943C 0089 lsl r1,r1,2h ;Monster Reborn 0806943E 2001 mov r0,1h ; 08069440 F7FEFA10 bl 8067864h ; 08069444 490F ldr r1,=403h ;Change of Heart, from array 08069446 2001 mov r0,1h ; 08069448 F7FEFA0C bl 8067864h ; 0806944C 490E ldr r1,=42Ch ;Snatch Steal, from array 0806944E 2001 mov r0,1h ; 08069450 F7FEFA08 bl 8067864h ; 08069454 4C0D ldr r4,=47Fh ;Light of Intervention, from array 08069456 2001 mov r0,1h ; 08069458 1C21 mov r1,r4 ; 0806945A F7FEFA03 bl 8067864h ; 0806945E 2001 mov r0,1h ; 08069460 1C21 mov r1,r4 ; 08069462 F7FEF9FF bl 8067864h ; 08069466 2001 mov r0,1h ; 08069468 1C21 mov r1,r4 ; 0806946A F7FEF9FB bl 8067864h ; 0806946E 34AE add r4,0AEh ;Shadow of Eyes 08069470 F001FD51 bl 806AF16h ;
Espa Roba card_id array
4F 01 00 00 5B 01 00 00 3D 02 00 00 EF 02 00 00 03 04 00 00 2C 04 00 00 7F 04 00 00 Dark Hole Swords of Revealing Light Witch of the Black Forest Jinzo Change of Heart Snatch Steal Light of Intervention
Trusdale
Trusdale's deck subroutine
08069490 2001 mov r0,1h ; 08069492 2100 mov r1,0h ;Blue-Eyes White Dragon 08069494 F7FEF9E6 bl 8067864h ; 08069498 2001 mov r0,1h ; 0806949A 2110 mov r1,10h ;Right Leg of the Forbidden One 0806949C F7FEF9E2 bl 8067864h ; 080694A0 2001 mov r0,1h ; 080694A2 2111 mov r1,11h ;Left Leg of the Forbidden One 080694A4 F7FEF9DE bl 8067864h ; 080694A8 2001 mov r0,1h ; 080694AA 2112 mov r1,12h ;Right Arm of the Forbidden One 080694AC F7FEF9DA bl 8067864h ; 080694B0 2001 mov r0,1h ; 080694B2 2113 mov r1,13h ;Left Arm of the Forbidden One 080694B4 F7FEF9D6 bl 8067864h ; 080694B8 2001 mov r0,1h ; 080694BA 2114 mov r1,14h ;Exodia the Forbidden One 080694BC F7FEF9D2 bl 8067864h ; 080694C0 21ED mov r1,0EDh ; 080694C2 0049 lsl r1,r1,1h ;Sinister Serpent 080694C4 2001 mov r0,1h ; 080694C6 F7FEF9CD bl 8067864h ; 080694CA 4913 ldr r1,=14Fh ;Dark Hole 080694CC 2001 mov r0,1h ; 080694CE F7FEF9C9 bl 8067864h ; 080694D2 21A8 mov r1,0A8h ; 080694D4 0049 lsl r1,r1,1h ;Raigeki 080694D6 2001 mov r0,1h ; 080694D8 F7FEF9C4 bl 8067864h ; 080694DC 490F ldr r1,=15Bh ;Swords of the Revealing Light 080694DE 2001 mov r0,1h ; 080694E0 F7FEF9C0 bl 8067864h ; 080694E4 21FC mov r1,0FCh ; 080694E6 0089 lsl r1,r1,2h ;Monster Reborn 080694E8 2001 mov r0,1h ; 080694EA F7FEF9BB bl 8067864h ; 080694EE 490C ldr r1,=403h ;Change of Heart 080694F0 2001 mov r0,1h ; 080694F2 F7FEF9B7 bl 8067864h ; 080694F6 490B ldr r1,=42Ch ;Snatch Steal 080694F8 2001 mov r0,1h ; 080694FA F7FEF9B3 bl 8067864h ; 080694FE 2491 mov r4,91h ; 08069500 00E4 lsl r4,r4,3h ;Premature Burial 08069502 2001 mov r0,1h ; 08069504 1C21 mov r1,r4 ; 08069506 F7FEF9AD bl 8067864h ; 0806950A 2001 mov r0,1h ; 0806950C 1C21 mov r1,r4 ; 0806950E F7FEF9A9 bl 8067864h ; 08069512 3C9E sub r4,9Eh ;Trap Hole 08069514 F001FCFF bl 806AF16h ;
Trusdale card_id array
- 0x69518
4F 01 00 00 5B 01 00 00 03 04 00 00 2C 04 00 00 Dark Hole Swords of the Revealing Light Change of Heart Snatch Steal
Duke Devlin
Duke Devlin's deck subroutine
08069528 24FA mov r4,0FAh ; 0806952A 0064 lsl r4,r4,1h ;Man-Eater Bug 0806952C 2001 mov r0,1h ; 0806952E 1C21 mov r1,r4 ; 08069530 F7FEF998 bl 8067864h ; 08069534 2001 mov r0,1h ; 08069536 1C21 mov r1,r4 ; 08069538 F7FEF994 bl 8067864h ; 0806953C 2001 mov r0,1h ; 0806953E 1C21 mov r1,r4 ; 08069540 F7FEF990 bl 8067864h ; 08069544 3465 add r4,65h ;Penguin Soldier 08069546 2001 mov r0,1h ; 08069548 1C21 mov r1,r4 ; 0806954A F7FEF98B bl 8067864h ; 0806954E 2001 mov r0,1h ; 08069550 1C21 mov r1,r4 ; 08069552 F7FEF987 bl 8067864h ; 08069556 2001 mov r0,1h ; 08069558 1C21 mov r1,r4 ; 0806955A F7FEF983 bl 8067864h ; 0806955E 4C2D ldr r4,=45Ah ;Giant Germ 08069560 2001 mov r0,1h ; 08069562 1C21 mov r1,r4 ; 08069564 F7FEF97E bl 8067864h ; 08069568 2001 mov r0,1h ; 0806956A 1C21 mov r1,r4 ; 0806956C F7FEF97A bl 8067864h ; 08069570 2001 mov r0,1h ; 08069572 1C21 mov r1,r4 ; 08069574 F7FEF976 bl 8067864h ; 08069578 3401 add r4,1h ;Nimble Momonga 0806957A 2001 mov r0,1h ; 0806957C 1C21 mov r1,r4 ; 0806957E F7FEF971 bl 8067864h ; 08069582 2001 mov r0,1h ; 08069584 1C21 mov r1,r4 ; 08069586 F7FEF96D bl 8067864h ; 0806958A 2001 mov r0,1h ; 0806958C 1C21 mov r1,r4 ; 0806958E F7FEF969 bl 8067864h ; 08069592 34C0 add r4,0C0h ;Bubonic Vermin 08069594 2001 mov r0,1h ; 08069596 1C21 mov r1,r4 ; 08069598 F7FEF964 bl 8067864h ; 0806959C 2001 mov r0,1h ; 0806959E 1C21 mov r1,r4 ; 080695A0 F7FEF960 bl 8067864h ; 080695A4 2001 mov r0,1h ; 080695A6 1C21 mov r1,r4 ; 080695A8 F7FEF95C bl 8067864h ; 080695AC 21FC mov r1,0FCh ; 080695AE 0089 lsl r1,r1,2h ;Monster Reborn 080695B0 2001 mov r0,1h ; 080695B2 F7FEF957 bl 8067864h ; 080695B6 4918 ldr r1,=403h ;Change of Heart 080695B8 2001 mov r0,1h ; 080695BA F7FEF953 bl 8067864h ; 080695BE 4917 ldr r1,=42Ch ;Snatch Steal 080695C0 2001 mov r0,1h ; 080695C2 F7FEF94F bl 8067864h ; 080695C6 3C93 sub r4,93h ;Premature Burial 080695C8 2001 mov r0,1h ; 080695CA 1C21 mov r1,r4 ; 080695CC F7FEF94A bl 8067864h ; 080695D0 2001 mov r0,1h ; 080695D2 1C21 mov r1,r4 ; 080695D4 F7FEF946 bl 8067864h ; 080695D8 342B add r4,2Bh ;Graceful Dice 080695DA 2001 mov r0,1h ; 080695DC 1C21 mov r1,r4 ; 080695DE F7FEF941 bl 8067864h ; 080695E2 2001 mov r0,1h ; 080695E4 1C21 mov r1,r4 ; 080695E6 F7FEF93D bl 8067864h ; 080695EA 2001 mov r0,1h ; 080695EC 1C21 mov r1,r4 ; 080695EE F7FEF939 bl 8067864h ; 080695F2 3401 add r4,1h ;Skull Dice 080695F4 2001 mov r0,1h ; 080695F6 1C21 mov r1,r4 ; 080695F8 F7FEF934 bl 8067864h ; 080695FC 2001 mov r0,1h ; 080695FE 1C21 mov r1,r4 ; 08069600 F7FEF930 bl 8067864h ; 08069604 2001 mov r0,1h ; 08069606 1C21 mov r1,r4 ; 08069608 F7FEF92C bl 8067864h ; 0806960C 24C0 mov r4,0C0h ; 0806960E 00E4 lsl r4,r4,3h ;Blind Destruction 08069610 F001FC81 bl 806AF16h ;
Duke Devlin card_id array
- 0x69614
5A 04 00 00 03 04 00 00 2C 04 00 00 Giant Germ Change of Heart Snatch Steal
Mako Tsunami
Mako Tsunami's deck subroutine
08069620 4C2D ldr r4,=1B7h ;7 Colored Fish 08069622 2001 mov r0,1h ; 08069624 1C21 mov r1,r4 ; 08069626 F7FEF91D bl 8067864h ; 0806962A 2001 mov r0,1h ; 0806962C 1C21 mov r1,r4 ; 0806962E F7FEF919 bl 8067864h ; 08069632 2001 mov r0,1h ; 08069634 1C21 mov r1,r4 ; 08069636 F7FEF915 bl 8067864h ; 0806963A 3407 add r4,7h ;Giant Red Seasnake 0806963C 2001 mov r0,1h ; 0806963E 1C21 mov r1,r4 ; 08069640 F7FEF910 bl 8067864h ; 08069644 2001 mov r0,1h ; 08069646 1C21 mov r1,r4 ; 08069648 F7FEF90C bl 8067864h ; 0806964C 2001 mov r0,1h ; 0806964E 1C21 mov r1,r4 ; 08069650 F7FEF908 bl 8067864h ; 08069654 4C21 ldr r4,=57Eh ;Flying Fish 08069656 2001 mov r0,1h ; 08069658 1C21 mov r1,r4 ; 0806965A F7FEF903 bl 8067864h ; 0806965E 2001 mov r0,1h ; 08069660 1C21 mov r1,r4 ; 08069662 F7FEF8FF bl 8067864h ; 08069666 2001 mov r0,1h ; 08069668 1C21 mov r1,r4 ; 0806966A F7FEF8FB bl 8067864h ; 0806966E 3401 add r4,1h ;Amphibian Beast 08069670 2001 mov r0,1h ; 08069672 1C21 mov r1,r4 ; 08069674 F7FEF8F6 bl 8067864h ; 08069678 2001 mov r0,1h ; 0806967A 1C21 mov r1,r4 ; 0806967C F7FEF8F2 bl 8067864h ; 08069680 4C17 ldr r4,=259h ;Penguin Soldier 08069682 2001 mov r0,1h ; 08069684 1C21 mov r1,r4 ; 08069686 F7FEF8ED bl 8067864h ; 0806968A 2001 mov r0,1h ; 0806968C 1C21 mov r1,r4 ; 0806968E F7FEF8E9 bl 8067864h ; 08069692 4C14 ldr r4,=52Eh ;The Legendary Fisherman 08069694 2001 mov r0,1h ; 08069696 1C21 mov r1,r4 ; 08069698 F7FEF8E4 bl 8067864h ; 0806969C 2001 mov r0,1h ; 0806969E 1C21 mov r1,r4 ; 080696A0 F7FEF8E0 bl 8067864h ; 080696A4 2001 mov r0,1h ; 080696A6 1C21 mov r1,r4 ; 080696A8 F7FEF8DC bl 8067864h ; 080696AC 4C0E ldr r4,=14Dh ;Umi 080696AE 2001 mov r0,1h ; 080696B0 1C21 mov r1,r4 ; 080696B2 F7FEF8D7 bl 8067864h ; 080696B6 2001 mov r0,1h ; 080696B8 1C21 mov r1,r4 ; 080696BA F7FEF8D3 bl 8067864h ; 080696BE 2001 mov r0,1h ; 080696C0 1C21 mov r1,r4 ; 080696C2 F7FEF8CF bl 8067864h ; 080696C6 21A8 mov r1,0A8h ; 080696C8 0049 lsl r1,r1,1h ;Raigeki 080696CA 2001 mov r0,1h ; 080696CC F7FEF8CA bl 8067864h ; 080696D0 4C06 ldr r4,=58Fh ;Tornado Wall 080696D2 F001FC17 bl 806AF04h ;
Mako Tsunami card_id array
- 0x696D6
B7 01 00 00 7E 05 00 00 59 02 00 00 2E 05 00 00 4D 01 00 00 8F 05 00 00 7 Colored Fish Flying Fish Penguin Soldier The Legendary Fisherman Umi Tornado Wall
Weevil Underwood
Weevil Underwood's deck subroutine
080696F0 4C3E ldr r4,=495h ;Flying Kamakiri #2, from array 080696F2 2001 mov r0,1h ; 080696F4 1C21 mov r1,r4 ; 080696F6 F7FEF8B5 bl 8067864h ; 080696FA 2001 mov r0,1h ; 080696FC 1C21 mov r1,r4 ; 080696FE F7FEF8B1 bl 8067864h ; 08069702 2001 mov r0,1h ; 08069704 1C21 mov r1,r4 ; 08069706 F7FEF8AD bl 8067864h ; 0806970A 4939 ldr r1,=14Fh ;Dark Hole, from array 0806970C 2001 mov r0,1h ; 0806970E F7FEF8A9 bl 8067864h ; 08069712 21A8 mov r1,0A8h ; 08069714 0049 lsl r1,r1,1h ;Raigeki 08069716 2001 mov r0,1h ; 08069718 F7FEF8A4 bl 8067864h ; 0806971C 4935 ldr r1,=15Bh ;Swords of Revealing Light, from array 0806971E 2001 mov r0,1h ; 08069720 F7FEF8A0 bl 8067864h ; 08069724 4C34 ldr r4,=189h ;Steel Scorpion, from array 08069726 2001 mov r0,1h ; 08069728 1C21 mov r1,r4 ; 0806972A F7FEF89B bl 8067864h ; 0806972E 2001 mov r0,1h ; 08069730 1C21 mov r1,r4 ; 08069732 F7FEF897 bl 8067864h ; 08069736 2001 mov r0,1h ; 08069738 1C21 mov r1,r4 ; 0806973A F7FEF893 bl 8067864h ; 0806973E 492F ldr r1,=199h ;Mechanical Spider, from array 08069740 2001 mov r0,1h ; 08069742 F7FEF88F bl 8067864h ; 08069746 21ED mov r1,0EDh ;Sinister Serpent 08069748 0049 lsl r1,r1,1h ; 0806974A 2001 mov r0,1h ; 0806974C F7FEF88A bl 8067864h ; 08069750 346B add r4,6Bh ;Man-Eater Bug 08069752 2001 mov r0,1h ; 08069754 1C21 mov r1,r4 ; 08069756 F7FEF885 bl 8067864h ; 0806975A 2001 mov r0,1h ; 0806975C 1C21 mov r1,r4 ; 0806975E F7FEF881 bl 8067864h ; 08069762 2001 mov r0,1h ; 08069764 1C21 mov r1,r4 ; 08069766 F7FEF87D bl 8067864h ; 0806976A 343D add r4,3Dh ;Needle Worm 0806976C 2001 mov r0,1h ; 0806976E 1C21 mov r1,r4 ; 08069770 F7FEF878 bl 8067864h ; 08069774 2001 mov r0,1h ; 08069776 1C21 mov r1,r4 ; 08069778 F7FEF874 bl 8067864h ; 0806977C 2001 mov r0,1h ; 0806977E 1C21 mov r1,r4 ; 08069780 F7FEF870 bl 8067864h ; 08069784 34C8 add r4,0C8h ;Insect Queen 08069786 2001 mov r0,1h ; 08069788 1C21 mov r1,r4 ; 0806978A F7FEF86B bl 8067864h ; 0806978E 2001 mov r0,1h ; 08069790 1C21 mov r1,r4 ; 08069792 F7FEF867 bl 8067864h ; 08069796 3401 add r4,1h ;Parasite Paracide 08069798 2001 mov r0,1h ; 0806979A 1C21 mov r1,r4 ; 0806979C F7FEF862 bl 8067864h ; 080697A0 2001 mov r0,1h ; 080697A2 1C21 mov r1,r4 ; 080697A4 F7FEF85E bl 8067864h ; 080697A8 2001 mov r0,1h ; 080697AA 1C21 mov r1,r4 ; 080697AC F7FEF85A bl 8067864h ; 080697B0 21FC mov r1,0FCh ; 080697B2 0089 lsl r1,r1,2h ;Monster Reborn 080697B4 2001 mov r0,1h ; 080697B6 F7FEF855 bl 8067864h ; 080697BA 4911 ldr r1,=3F2h ;Pot of Greed, from array 080697BC 2001 mov r0,1h ; 080697BE F7FEF851 bl 8067864h ; 080697C2 4910 ldr r1,=403h ;Change of Heart, from array 080697C4 2001 mov r0,1h ; 080697C6 F7FEF84D bl 8067864h ; 080697CA 490F ldr r1,=591h ;Torrential Tribute 080697CC 2001 mov r0,1h ; 080697CE F7FEF849 bl 8067864h ; 080697D2 490E ldr r1,=42Ch ;Snatch Steal, from array 080697D4 2001 mov r0,1h ; 080697D6 F7FEF845 bl 8067864h ; 080697DA 2191 mov r1,91h ; 080697DC 00C9 lsl r1,r1,3h ;Premature Burial 080697DE 2001 mov r0,1h ; 080697E0 F7FEF840 bl 8067864h ; 080697E4 2184 mov r1,84h ; 080697E6 00C9 lsl r1,r1,3h ;Mirror Force 080697E8 F001FAB0 bl 806AD4Ch ;
Weevil Underwood card_id array
95 04 00 00 4F 01 00 00 5B 01 00 00 89 01 00 00 99 01 00 00 F2 03 00 00 03 04 00 00 91 05 00 00 2C 04 00 00 Flying Kamakiri #2 Dark Hole Swords of Revealing Light Steel Scorpion Mechanical Spider Pot of Greed Change of Heart Torrential Tribute Snatch Steal
Mai Valentine
Mai Valentine's deck subroutine
08069810 2001 mov r0,1h ; 08069812 217C mov r1,7Ch ;Faith Bird 08069814 F7FEF826 bl 8067864h ; 08069818 2001 mov r0,1h ; 0806981A 217C mov r1,7Ch ;Faith Bird 0806981C F7FEF822 bl 8067864h ; 08069820 4C4B ldr r4,=1D1h ;Skull Red Bird, from array 08069822 2001 mov r0,1h ; 08069824 1C21 mov r1,r4 ; 08069826 F7FEF81D bl 8067864h ; 0806982A 2001 mov r0,1h ; 0806982C 1C21 mov r1,r4 ; 0806982E F7FEF819 bl 8067864h ; 08069832 34AA add r4,0AAh ;Blue-Winged Crown 08069834 2001 mov r0,1h ; 08069836 1C21 mov r1,r4 ; 08069838 F7FEF814 bl 8067864h ; 0806983C 2001 mov r0,1h ; 0806983E 1C21 mov r1,r4 ; 08069840 F7FEF810 bl 8067864h ; 08069844 4C43 ldr r4,=496h ;Harpie's Brother, from array 08069846 2001 mov r0,1h ; 08069848 1C21 mov r1,r4 ; 0806984A F7FEF80B bl 8067864h ; 0806984E 2001 mov r0,1h ; 08069850 1C21 mov r1,r4 ; 08069852 F7FEF807 bl 8067864h ; 08069856 2001 mov r0,1h ; 08069858 213E mov r1,3Eh ;Harpie Lady Sisters 0806985A F7FEF803 bl 8067864h ; 0806985E 2001 mov r0,1h ; 08069860 213E mov r1,3Eh ;Harpie Lady Sisters 08069862 F7FDFFFF bl 8067864h ; 08069866 2001 mov r0,1h ; 08069868 213E mov r1,3Eh ;Harpie Lady Sisters 0806986A F7FDFFFB bl 8067864h ; 0806986E 4C3A ldr r4,=181h ;Harpie's Pet Dragon, from array 08069870 2001 mov r0,1h ; 08069872 1C21 mov r1,r4 ; 08069874 F7FDFFF6 bl 8067864h ; 08069878 2001 mov r0,1h ; 0806987A 1C21 mov r1,r4 ; 0806987C F7FDFFF2 bl 8067864h ; 08069880 4C36 ldr r4,=4E1h ;Cyber Harpie, from array 08069882 2001 mov r0,1h ; 08069884 1C21 mov r1,r4 ; 08069886 F7FDFFED bl 8067864h ; 0806988A 2001 mov r0,1h ; 0806988C 1C21 mov r1,r4 ; 0806988E F7FDFFE9 bl 8067864h ; 08069892 2001 mov r0,1h ; 08069894 1C21 mov r1,r4 ; 08069896 F7FDFFE5 bl 8067864h ; 0806989A 249E mov r4,9Eh ; 0806989C 0064 lsl r4,r4,1h ;Cyber Shield 0806989E 2001 mov r0,1h ; 080698A0 1C21 mov r1,r4 ; 080698A2 F7FDFFDF bl 8067864h ; 080698A6 2001 mov r0,1h ; 080698A8 1C21 mov r1,r4 ; 080698AA F7FDFFDB bl 8067864h ; 080698AE 2001 mov r0,1h ; 080698B0 1C21 mov r1,r4 ; 080698B2 F7FDFFD7 bl 8067864h ; 080698B6 3401 add r4,1h ;Elegant Egotist 080698B8 2001 mov r0,1h ; 080698BA 1C21 mov r1,r4 ; 080698BC F7FDFFD2 bl 8067864h ; 080698C0 2001 mov r0,1h ; 080698C2 1C21 mov r1,r4 ; 080698C4 F7FDFFCE bl 8067864h ; 080698C8 2001 mov r0,1h ; 080698CA 1C21 mov r1,r4 ; 080698CC F7FDFFCA bl 8067864h ; 080698D0 4923 ldr r1,=14Fh ;Dark Hole, from array 080698D2 2001 mov r0,1h ; 080698D4 F7FDFFC6 bl 8067864h ; 080698D8 21A8 mov r1,0A8h ; 080698DA 0049 lsl r1,r1,1h ;Raigeki 080698DC 2001 mov r0,1h ; 080698DE F7FDFFC1 bl 8067864h ; 080698E2 4920 ldr r1,=15Bh ;Swords of Revealing Light, from array 080698E4 2001 mov r0,1h ; 080698E6 F7FDFFBD bl 8067864h ; 080698EA 491F ldr r1,=29Fh ;Harpie's Feather Duster, from array 080698EC 2001 mov r0,1h ; 080698EE F7FDFFB9 bl 8067864h ; 080698F2 21FC mov r1,0FCh ; 080698F4 0089 lsl r1,r1,2h ;Monster Reborn 080698F6 2001 mov r0,1h ; 080698F8 F7FDFFB4 bl 8067864h ; 080698FC 248D mov r4,8Dh ; 080698FE 00E4 lsl r4,r4,3h ;Rising Air Current 08069900 2001 mov r0,1h ; 08069902 1C21 mov r1,r4 ; 08069904 F7FDFFAE bl 8067864h ; 08069908 2001 mov r0,1h ; 0806990A 1C21 mov r1,r4 ; 0806990C F7FDFFAA bl 8067864h ; 08069910 3420 add r4,20h ;Premature Burial 08069912 2001 mov r0,1h ; 08069914 1C21 mov r1,r4 ; 08069916 F7FDFFA5 bl 8067864h ; 0806991A 2001 mov r0,1h ; 0806991C 1C21 mov r1,r4 ; 0806991E F7FDFFA1 bl 8067864h ; 08069922 3CDD sub r4,0DDh ;Bell of Destruction 08069924 2001 mov r0,1h ; 08069926 1C21 mov r1,r4 ; 08069928 F7FDFF9C bl 8067864h ; 0806992C 2001 mov r0,1h ; 0806992E 1C21 mov r1,r4 ; 08069930 F7FDFF98 bl 8067864h ; 08069934 21F0 mov r1,0F0h ; 08069936 0089 lsl r1,r1,2h ;Negate Attack 08069938 2001 mov r0,1h ; 0806993A F7FDFF93 bl 8067864h ; 0806993E 2184 mov r1,84h ; 08069940 00C9 lsl r1,r1,3h ;Mirror Force 08069942 2001 mov r0,1h ; 08069944 F7FDFF8E bl 8067864h ; 08069948 34EF add r4,0EFh ; 0806994A F001FAE8 bl 806AF1Eh ;Aqua Chorus
Mai Valentine card_id array
D1 01 00 00 96 04 00 00 81 01 00 00 E1 04 00 00 4F 01 00 00 5B 01 00 00 9F 02 00 00 Skull Red Bird Harpie's Brother Harpie's Pet Dragon Cyber Harpie Dark Hole Swords of Revealing Light Harpie's Feather Duster
Bandit Keith
Bandit Keith's deck subroutine
0806996C 4C47 ldr r4,=183h ;Pendulum Machine, from array 0806996E 2001 mov r0,1h ; 08069970 1C21 mov r1,r4 ; 08069972 F7FDFF77 bl 8067864h ; 08069976 2001 mov r0,1h ; 08069978 1C21 mov r1,r4 ; 0806997A F7FDFF73 bl 8067864h ; 0806997E 4944 ldr r1,=185h ;Launcher Spider 08069980 2001 mov r0,1h ; 08069982 F7FDFF6F bl 8067864h ; 08069986 21C3 mov r1,0C3h ; 08069988 0049 lsl r1,r1,1h ;Zoa 0806998A 2001 mov r0,1h ; 0806998C F7FDFF6A bl 8067864h ; 08069990 341B add r4,1Bh ;Mechanicalchaser 08069992 2001 mov r0,1h ; 08069994 1C21 mov r1,r4 ; 08069996 F7FDFF65 bl 8067864h ; 0806999A 2001 mov r0,1h ; 0806999C 1C21 mov r1,r4 ; 0806999E F7FDFF61 bl 8067864h ; 080699A2 3462 add r4,62h ;Guardian of the Throne Room 080699A4 2001 mov r0,1h ; 080699A6 1C21 mov r1,r4 ; 080699A8 F7FDFF5C bl 8067864h ; 080699AC 2001 mov r0,1h ; 080699AE 1C21 mov r1,r4 ; 080699B0 F7FDFF58 bl 8067864h ; 080699B4 4937 ldr r1,=2D2h ;Slot Machine 080699B6 2001 mov r0,1h ; 080699B8 F7FDFF54 bl 8067864h ; 080699BC 4C36 ldr r4,=31Eh ;Cyber-Tech Alligator 080699BE 2001 mov r0,1h ; 080699C0 1C21 mov r1,r4 ; 080699C2 F7FDFF4F bl 8067864h ; 080699C6 2001 mov r0,1h ; 080699C8 1C21 mov r1,r4 ; 080699CA F7FDFF4B bl 8067864h ; 080699CE 4C33 ldr r4,=51Dh ;Oni Tank T-34 080699D0 2001 mov r0,1h ; 080699D2 1C21 mov r1,r4 ; 080699D4 F7FDFF46 bl 8067864h ; 080699D8 2001 mov r0,1h ; 080699DA 1C21 mov r1,r4 ; 080699DC F7FDFF42 bl 8067864h ; 080699E0 3401 add r4,1h ;Overdrive 080699E2 2001 mov r0,1h ; 080699E4 1C21 mov r1,r4 ; 080699E6 F7FDFF3D bl 8067864h ; 080699EA 2001 mov r0,1h ; 080699EC 1C21 mov r1,r4 ; 080699EE F7FDFF39 bl 8067864h ; 080699F2 4C2B ldr r4,=2E6h ;Barrel Dragon 080699F4 2001 mov r0,1h ; 080699F6 1C21 mov r1,r4 ; 080699F8 F7FDFF34 bl 8067864h ; 080699FC 2001 mov r0,1h ; 080699FE 1C21 mov r1,r4 ; 08069A00 F7FDFF30 bl 8067864h ; 08069A04 2001 mov r0,1h ; 08069A06 1C21 mov r1,r4 ; 08069A08 F7FDFF2C bl 8067864h ; 08069A0C 4C25 ldr r4,=4E5h ;Kinetic Soldier - BUG: this card is only in the Japanese Duel Monster 6 08069A0E 2001 mov r0,1h ; 08069A10 1C21 mov r1,r4 ; 08069A12 F7FDFF27 bl 8067864h ; 08069A16 2001 mov r0,1h ; 08069A18 1C21 mov r1,r4 ; 08069A1A F7FDFF23 bl 8067864h ; 08069A1E 4C22 ldr r4,=3C2h ;7 Completed 08069A20 2001 mov r0,1h ; 08069A22 1C21 mov r1,r4 ; 08069A24 F7FDFF1E bl 8067864h ; 08069A28 2001 mov r0,1h ; 08069A2A 1C21 mov r1,r4 ; 08069A2C F7FDFF1A bl 8067864h ; 08069A30 2001 mov r0,1h ; 08069A32 1C21 mov r1,r4 ; 08069A34 F7FDFF16 bl 8067864h ; 08069A38 21FC mov r1,0FCh ;Monster Reborn 08069A3A 0089 lsl r1,r1,2h ; 08069A3C 2001 mov r0,1h ; 08069A3E F7FDFF11 bl 8067864h ; 08069A42 491A ldr r1,=403h ;Change of Heart 08069A44 2001 mov r0,1h ; 08069A46 F7FDFF0D bl 8067864h ; 08069A4A 4919 ldr r1,=42Ch ;Snatch Steal 08069A4C 2001 mov r0,1h ; 08069A4E F7FDFF09 bl 8067864h ; 08069A52 34C6 add r4,0C6h ;Premature Burial 08069A54 2001 mov r0,1h ; 08069A56 1C21 mov r1,r4 ; 08069A58 F7FDFF04 bl 8067864h ; 08069A5C 2001 mov r0,1h ; 08069A5E 1C21 mov r1,r4 ; 08069A60 F7FDFF00 bl 8067864h ; 08069A64 4913 ldr r1,=522h ;Limiter Removal 08069A66 2001 mov r0,1h ; 08069A68 F7FDFEFC bl 8067864h ; 08069A6C 3C9E sub r4,9Eh ;Trap Hole 08069A6E 2001 mov r0,1h ; 08069A70 1C21 mov r1,r4 ; 08069A72 F7FDFEF7 bl 8067864h ; 08069A76 2001 mov r0,1h ; 08069A78 1C21 mov r1,r4 ; 08069A7A F7FDFEF3 bl 8067864h ; 08069A7E 2001 mov r0,1h ; 08069A80 1C21 mov r1,r4 ; 08069A82 F7FDFEEF bl 8067864h ; 08069A86 4C0C ldr r4,=517h ;Gamble 08069A88 F001FA45 bl 806AF16h ;
Bandit Keith card_id array
83 01 00 00 85 01 00 00 D2 02 00 00 1E 03 00 00 1D 05 00 00 E6 02 00 00 E5 04 00 00 C2 03 00 00 03 04 00 00 2C 04 00 00 22 05 00 00 17 05 00 00 Pendulum Machine Launcher Spider Slot Machine Cyber-Tech Alligator Oni Tank T-34 Barrel Dragon Kinetic Soldier - BUG: this card is only in the Japanese Duel Monster 6 7 Completed Change of Heart Snatch Steal Limiter Removal Gamble
Joey Wheeler
Joey Wheeler's deck subroutine
08069ABC 2001 mov r0,1h ; 08069ABE 2103 mov r1,3h ;Baby Dragon 08069AC0 F7FDFED0 bl 8067864h ; 08069AC4 2001 mov r0,1h ; 08069AC6 2115 mov r1,15h ;Summoned Skull 08069AC8 F7FDFECC bl 8067864h ; 08069ACC 2001 mov r0,1h ; 08069ACE 2115 mov r1,15h ;Summoned Skull 08069AD0 F7FDFEC8 bl 8067864h ; 08069AD4 2001 mov r0,1h ; 08069AD6 2115 mov r1,15h ;Summoned Skull 08069AD8 F7FDFEC4 bl 8067864h ; 08069ADC 2001 mov r0,1h ; 08069ADE 214D mov r1,4Dh ;Axe Raider 08069AE0 F7FDFEC0 bl 8067864h ; 08069AE4 2001 mov r0,1h ; 08069AE6 214D mov r1,4Dh ;Axe Raider 08069AE8 F7FDFEBC bl 8067864h ; 08069AEC 2001 mov r0,1h ; 08069AEE 214D mov r1,4Dh ;Axe Raider 08069AF0 F7FDFEB8 bl 8067864h ; 08069AF4 2001 mov r0,1h ; 08069AF6 2151 mov r1,51h ;Red-Eyes B. Dragon 08069AF8 F7FDFEB4 bl 8067864h ; 08069AFC 494E ldr r1,=14Fh ;Dark Hole, from array 08069AFE 2001 mov r0,1h ; 08069B00 F7FDFEB0 bl 8067864h ; 08069B04 21A8 mov r1,0A8h ; 08069B06 0049 lsl r1,r1,1h ;Raigeki 08069B08 2001 mov r0,1h ; 08069B0A F7FDFEAB bl 8067864h ; 08069B0E 494B ldr r1,=15Bh ;Swords of Revealing Light 08069B10 2001 mov r0,1h ; 08069B12 F7FDFEA7 bl 8067864h ; 08069B16 24BE mov r4,0BEh ; 08069B18 00A4 lsl r4,r4,2h ;Alligator's Sword 08069B1A 2001 mov r0,1h ; 08069B1C 1C21 mov r1,r4 ; 08069B1E F7FDFEA1 bl 8067864h ; 08069B22 2001 mov r0,1h ; 08069B24 1C21 mov r1,r4 ; 08069B26 F7FDFE9D bl 8067864h ; 08069B2A 2001 mov r0,1h ; 08069B2C 1C21 mov r1,r4 ; 08069B2E F7FDFE99 bl 8067864h ; 08069B32 2001 mov r0,1h ; 08069B34 210F mov r1,0Fh ;Time Wizard 08069B36 F7FDFE95 bl 8067864h ; 08069B3A 21BA mov r1,0BAh ; 08069B3C 0089 lsl r1,r1,2h ;Panther Warrior 08069B3E 2001 mov r0,1h ; 08069B40 F7FDFE90 bl 8067864h ; 08069B44 493E ldr r1,=2EFh ;Jinzo 08069B46 2001 mov r0,1h ; 08069B48 F7FDFE8C bl 8067864h ; 08069B4C 24A8 mov r4,0A8h ; 08069B4E 00E4 lsl r4,r4,3h ;Goblin Attack Force 08069B50 2001 mov r0,1h ; 08069B52 1C21 mov r1,r4 ; 08069B54 F7FDFE86 bl 8067864h ; 08069B58 2001 mov r0,1h ; 08069B5A 1C21 mov r1,r4 ; 08069B5C F7FDFE82 bl 8067864h ; 08069B60 2001 mov r0,1h ; 08069B62 1C21 mov r1,r4 ; 08069B64 F7FDFE7E bl 8067864h ; 08069B68 3407 add r4,7h ;Gearfried the Iron Knight 08069B6A 2001 mov r0,1h ; 08069B6C 1C21 mov r1,r4 ; 08069B6E F7FDFE79 bl 8067864h ; 08069B72 2001 mov r0,1h ; 08069B74 1C21 mov r1,r4 ; 08069B76 F7FDFE75 bl 8067864h ; 08069B7A 2001 mov r0,1h ; 08069B7C 1C21 mov r1,r4 ; 08069B7E F7FDFE71 bl 8067864h ; 08069B82 34AC add r4,0ACh ; 08069B84 2001 mov r0,1h ;Zombyra the Dark 08069B86 1C21 mov r1,r4 ; 08069B88 F7FDFE6C bl 8067864h ; 08069B8C 2001 mov r0,1h ; 08069B8E 1C21 mov r1,r4 ; 08069B90 F7FDFE68 bl 8067864h ; 08069B94 2001 mov r0,1h ; 08069B96 1C21 mov r1,r4 ; 08069B98 F7FDFE64 bl 8067864h ; 08069B9C 2001 mov r0,1h ; 08069B9E 21D8 mov r1,0D8h ;B. Skull Dragon 08069BA0 F7FDFE60 bl 8067864h ; 08069BA4 21CB mov r1,0CBh ; 08069BA6 0089 lsl r1,r1,2h ;Alligator's Sword Dragon 08069BA8 2001 mov r0,1h ; 08069BAA F7FDFE5B bl 8067864h ; 08069BAE 24F2 mov r4,0F2h ; 08069BB0 00A4 lsl r4,r4,2h ;Graceful Charity 08069BB2 2001 mov r0,1h ; 08069BB4 1C21 mov r1,r4 ; 08069BB6 F7FDFE55 bl 8067864h ; 08069BBA 2001 mov r0,1h ; 08069BBC 1C21 mov r1,r4 ; 08069BBE F7FDFE51 bl 8067864h ; 08069BC2 3423 add r4,23h ;Polymerization 08069BC4 2001 mov r0,1h ; 08069BC6 1C21 mov r1,r4 ; 08069BC8 F7FDFE4C bl 8067864h ; 08069BCC 2001 mov r0,1h ; 08069BCE 1C21 mov r1,r4 ; 08069BD0 F7FDFE48 bl 8067864h ; 08069BD4 21FC mov r1,0FCh ; 08069BD6 0089 lsl r1,r1,2h ;Monster Reborn 08069BD8 2001 mov r0,1h ; 08069BDA F7FDFE43 bl 8067864h ; 08069BDE 4919 ldr r1,=403h ;Change of Heart 08069BE0 2001 mov r0,1h ; 08069BE2 F7FDFE3F bl 8067864h ; 08069BE6 2182 mov r1,82h ; 08069BE8 00C9 lsl r1,r1,3h ;Fusion Sage 08069BEA 2001 mov r0,1h ; 08069BEC F7FDFE3A bl 8067864h ; 08069BF0 4915 ldr r1,=42Ch ;Snatch Steal 08069BF2 2001 mov r0,1h ; 08069BF4 F7FDFE36 bl 8067864h ; 08069BF8 349D add r4,9Dh ;Premature Burial 08069BFA 2001 mov r0,1h ; 08069BFC 1C21 mov r1,r4 ; 08069BFE F7FDFE31 bl 8067864h ; 08069C02 2001 mov r0,1h ; 08069C04 1C21 mov r1,r4 ; 08069C06 F7FDFE2D bl 8067864h ; 08069C0A 3CDD sub r4,0DDh ;Bell of Destruction 08069C0C 2001 mov r0,1h ; 08069C0E 1C21 mov r1,r4 ; 08069C10 F7FDFE28 bl 8067864h ; 08069C14 2001 mov r0,1h ; 08069C16 1C21 mov r1,r4 ; 08069C18 F7FDFE24 bl 8067864h ; 08069C1C 3433 add r4,33h ;Magic-Arm Shield 08069C1E 2001 mov r0,1h ; 08069C20 1C21 mov r1,r4 ; 08069C22 F7FDFE1F bl 8067864h ; 08069C26 2001 mov r0,1h ; 08069C28 1C21 mov r1,r4 ; 08069C2A F7FDFE1B bl 8067864h ; 08069C2E 2184 mov r1,84h ; 08069C30 00C9 lsl r1,r1,3h ;Mirror Force 08069C32 F001F88B bl 806AD4Ch ;
Joey Wheeler card_id array
4F 01 00 00 5B 01 00 00 EF 02 00 00 03 04 00 00 2C 04 00 00 Dark Hole Swords of Revealing Light Jinzo Change of Heart Snatch Steal
Mind-controlled Tea
Mind-controlled Tea's deck subroutine
08069C4C 2001 mov r0,1h ;is_cpu_deck_flag = 1 08069C4E 21A5 mov r1,0A5h ;Mysterious Puppeteer 08069C50 F7FDFE08 bl 8067864h ; 08069C54 2001 mov r0,1h ; 08069C56 21A5 mov r1,0A5h ;Mysterious Puppeteer 08069C58 F7FDFE04 bl 8067864h ; 08069C5C 4C58 ldr r4,=45Bh ;Nimble Momonga, from array 08069C5E 2001 mov r0,1h ; 08069C60 1C21 mov r1,r4 ; 08069C62 F7FDFDFF bl 8067864h ; 08069C66 2001 mov r0,1h ; 08069C68 1C21 mov r1,r4 ; 08069C6A F7FDFDFB bl 8067864h ; 08069C6E 2001 mov r0,1h ; 08069C70 1C21 mov r1,r4 ; 08069C72 F7FDFDF7 bl 8067864h ; 08069C76 4C53 ldr r4,=59Ah ;Fire Princess, from array 08069C78 2001 mov r0,1h ; 08069C7A 1C21 mov r1,r4 ; 08069C7C F7FDFDF2 bl 8067864h ; 08069C80 2001 mov r0,1h ; 08069C82 1C21 mov r1,r4 ; 08069C84 F7FDFDEE bl 8067864h ; 08069C88 2001 mov r0,1h ; 08069C8A 1C21 mov r1,r4 ; 08069C8C F7FDFDEA bl 8067864h ; 08069C90 340A add r4,0Ah ;The Forgiving Maiden 08069C92 2001 mov r0,1h ; 08069C94 1C21 mov r1,r4 ; 08069C96 F7FDFDE5 bl 8067864h ; 08069C9A 2001 mov r0,1h ; 08069C9C 1C21 mov r1,r4 ; 08069C9E F7FDFDE1 bl 8067864h ; 08069CA2 2001 mov r0,1h ; 08069CA4 1C21 mov r1,r4 ; 08069CA6 F7FDFDDD bl 8067864h ; 08069CAA 3402 add r4,2h ;Marie the Fallen One 08069CAC 2001 mov r0,1h ; 08069CAE 1C21 mov r1,r4 ; 08069CB0 F7FDFDD8 bl 8067864h ; 08069CB4 2001 mov r0,1h ; 08069CB6 1C21 mov r1,r4 ; 08069CB8 F7FDFDD4 bl 8067864h ; 08069CBC 2001 mov r0,1h ; 08069CBE 1C21 mov r1,r4 ; 08069CC0 F7FDFDD0 bl 8067864h ; 08069CC4 4940 ldr r1,=5A5h ;St. Joan, from array 08069CC6 2001 mov r0,1h ; 08069CC8 F7FDFDCC bl 8067864h ; 08069CCC 493F ldr r1,=14Fh ;Dark Hole, from array 08069CCE 2001 mov r0,1h ; 08069CD0 F7FDFDC8 bl 8067864h ; 08069CD4 21A8 mov r1,0A8h ; 08069CD6 0049 lsl r1,r1,1h ;Raigeki 08069CD8 2001 mov r0,1h ; 08069CDA F7FDFDC3 bl 8067864h ; 08069CDE 4C3C ldr r4,=155h ;Dian Keto the Cure Master, from array 08069CE0 2001 mov r0,1h ; 08069CE2 1C21 mov r1,r4 ; 08069CE4 F7FDFDBE bl 8067864h ; 08069CE8 2001 mov r0,1h ; 08069CEA 1C21 mov r1,r4 ; 08069CEC F7FDFDBA bl 8067864h ; 08069CF0 2001 mov r0,1h ; 08069CF2 1C21 mov r1,r4 ; 08069CF4 F7FDFDB6 bl 8067864h ; 08069CF8 4936 ldr r1,=15Bh ;Swords of Revealing Light, from array 08069CFA 2001 mov r0,1h ; 08069CFC F7FDFDB2 bl 8067864h ; 08069D00 21FC mov r1,0FCh ;Monster Reborn 08069D02 0089 lsl r1,r1,2h ; 08069D04 2001 mov r0,1h ; 08069D06 F7FDFDAD bl 8067864h ; 08069D0A 4933 ldr r1,=403h ;Change of Heart, from array 08069D0C 2001 mov r0,1h ; 08069D0E F7FDFDA9 bl 8067864h ; 08069D12 4932 ldr r1,=40Ah ;Polymerization, from array 08069D14 2001 mov r0,1h ; 08069D16 F7FDFDA5 bl 8067864h ; 08069D1A 2182 mov r1,82h ; 08069D1C 00C9 lsl r1,r1,3h ;Fusion Sage 08069D1E 2001 mov r0,1h ; 08069D20 F7FDFDA0 bl 8067864h ; 08069D24 4C2E ldr r4,=427h ;Gravekeeper's Servant 08069D26 2001 mov r0,1h ; 08069D28 1C21 mov r1,r4 ; 08069D2A F7FDFD9B bl 8067864h ; 08069D2E 2001 mov r0,1h ; 08069D30 1C21 mov r1,r4 ; 08069D32 F7FDFD97 bl 8067864h ; 08069D36 492B ldr r1,=42Ch ;Snatch Steal, from array 08069D38 2001 mov r0,1h ; 08069D3A F7FDFD93 bl 8067864h ; 08069D3E 3C7C sub r4,7Ch ;Bell of Destruction 08069D40 2001 mov r0,1h ; 08069D42 1C21 mov r1,r4 ; 08069D44 F7FDFD8E bl 8067864h ; 08069D48 2001 mov r0,1h ; 08069D4A 1C21 mov r1,r4 ; 08069D4C F7FDFD8A bl 8067864h ; 08069D50 343F add r4,3Fh ;Trap Hole 08069D52 2001 mov r0,1h ; 08069D54 1C21 mov r1,r4 ; 08069D56 F7FDFD85 bl 8067864h ; 08069D5A 2001 mov r0,1h ; 08069D5C 1C21 mov r1,r4 ; 08069D5E F7FDFD81 bl 8067864h ; 08069D62 2001 mov r0,1h ; 08069D64 1C21 mov r1,r4 ; 08069D66 F7FDFD7D bl 8067864h ; 08069D6A 2184 mov r1,84h ;Mirror Force 08069D6C 00C9 lsl r1,r1,3h ; 08069D6E 2001 mov r0,1h ; 08069D70 F7FDFD78 bl 8067864h ; 08069D74 345A add r4,5Ah ;Gift of The Mystical Elf 08069D76 2001 mov r0,1h ; 08069D78 1C21 mov r1,r4 ; 08069D7A F7FDFD73 bl 8067864h ; 08069D7E 2001 mov r0,1h ; 08069D80 1C21 mov r1,r4 ; 08069D82 F7FDFD6F bl 8067864h ; 08069D86 2001 mov r0,1h ; 08069D88 1C21 mov r1,r4 ; 08069D8A F7FDFD6B bl 8067864h ; 08069D8E 3406 add r4,6h ;Enchanted Javelin 08069D90 2001 mov r0,1h ; 08069D92 1C21 mov r1,r4 ; 08069D94 F7FDFD66 bl 8067864h ; 08069D98 2001 mov r0,1h ; 08069D9A 1C21 mov r1,r4 ; 08069D9C F7FDFD62 bl 8067864h ; 08069DA0 342A add r4,2Ah ;Numinous Healer 08069DA2 2001 mov r0,1h ; 08069DA4 1C21 mov r1,r4 ; 08069DA6 F7FDFD5D bl 8067864h ; 08069DAA 2001 mov r0,1h ; 08069DAC 1C21 mov r1,r4 ; 08069DAE F7FDFD59 bl 8067864h ; 08069DB2 2001 mov r0,1h ; 08069DB4 1C21 mov r1,r4 ; 08069DB6 F7FDFD55 bl 8067864h ; 08069DBA 34B9 add r4,0B9h ;Shadow of Eyes 08069DBC F001F8AF bl 806AF1Eh ;
Mind-controlled Tea card_id array
- 0x69DC0
5B 04 00 00 9A 05 00 00 A5 05 00 00 4F 01 00 00 55 01 00 00 5B 01 00 00 03 04 00 00 0A 04 00 00 27 04 00 00 2C 04 00 00 Nimble Momonga Fire Princess St. Joan Dark Hole Dian Keto the Cure Master Swords of Revealing Light Change of Heart Polymerization Gravekeeper's Servant Snatch Steal
Rare Hunter
Rare Hunter's deck subroutine
08069DE8 2001 mov r0,1h ;is_cpu_deck_flag = 1 08069DEA 2110 mov r1,10h ;Right Leg of the Forbidden One 08069DEC F7FDFD3A bl 8067864h ; 08069DF0 2001 mov r0,1h ; 08069DF2 2111 mov r1,11h ;Left Leg of the Forbidden One 08069DF4 F7FDFD36 bl 8067864h ; 08069DF8 2001 mov r0,1h ; 08069DFA 2112 mov r1,12h ;Right Arm of the Forbidden One 08069DFC F7FDFD32 bl 8067864h ; 08069E00 2001 mov r0,1h ; 08069E02 2113 mov r1,13h ;Left Arm of the Forbidden One 08069E04 F7FDFD2E bl 8067864h ; 08069E08 2001 mov r0,1h ; 08069E0A 2114 mov r1,14h ;Exodia the Forbidden One 08069E0C F7FDFD2A bl 8067864h ; 08069E10 2001 mov r0,1h ; 08069E12 212F mov r1,2Fh ;Sangan 08069E14 F7FDFD26 bl 8067864h ; 08069E18 2001 mov r0,1h ; 08069E1A 212F mov r1,2Fh ;Sangan 08069E1C F7FDFD22 bl 8067864h ; 08069E20 2001 mov r0,1h ; 08069E22 21AA mov r1,0AAh ;Big Eye 08069E24 F7FDFD1E bl 8067864h ; 08069E28 2001 mov r0,1h ; 08069E2A 21AA mov r1,0AAh ;Big Eye 08069E2C F7FDFD1A bl 8067864h ; 08069E30 4C3E ldr r4,=1ABh ;Magician of Faith, from array 08069E32 2001 mov r0,1h ; 08069E34 1C21 mov r1,r4 ; 08069E36 F7FDFD15 bl 8067864h ; 08069E3A 2001 mov r0,1h ; 08069E3C 1C21 mov r1,r4 ; 08069E3E F7FDFD11 bl 8067864h ; 08069E42 3454 add r4,54h ;Cannon Soldier 08069E44 2001 mov r0,1h ; 08069E46 1C21 mov r1,r4 ; 08069E48 F7FDFD0C bl 8067864h ; 08069E4C 2001 mov r0,1h ; 08069E4E 1C21 mov r1,r4 ; 08069E50 F7FDFD08 bl 8067864h ; 08069E54 341C add r4,1Ch ;Skelengel 08069E56 2001 mov r0,1h ; 08069E58 1C21 mov r1,r4 ; 08069E5A F7FDFD03 bl 8067864h ; 08069E5E 2001 mov r0,1h ; 08069E60 1C21 mov r1,r4 ; 08069E62 F7FDFCFF bl 8067864h ; 08069E66 2001 mov r0,1h ; 08069E68 1C21 mov r1,r4 ; 08069E6A F7FDFCFB bl 8067864h ; 08069E6E 3422 add r4,22h ;Witch of the Black Forest 08069E70 2001 mov r0,1h ; 08069E72 1C21 mov r1,r4 ; 08069E74 F7FDFCF6 bl 8067864h ; 08069E78 2001 mov r0,1h ; 08069E7A 1C21 mov r1,r4 ; 08069E7C F7FDFCF2 bl 8067864h ; 08069E80 341C add r4,1Ch ;Penguin Soldier 08069E82 2001 mov r0,1h ; 08069E84 1C21 mov r1,r4 ; 08069E86 F7FDFCED bl 8067864h ; 08069E8A 2001 mov r0,1h ; 08069E8C 1C21 mov r1,r4 ; 08069E8E F7FDFCE9 bl 8067864h ; 08069E92 4C27 ldr r4,=463h ;Mystic Tomato, from array 08069E94 2001 mov r0,1h ; 08069E96 1C21 mov r1,r4 ; 08069E98 F7FDFCE4 bl 8067864h ; 08069E9C 2001 mov r0,1h ; 08069E9E 1C21 mov r1,r4 ; 08069EA0 F7FDFCE0 bl 8067864h ; 08069EA4 4923 ldr r1,=14Fh ;Dark Hole, from array 08069EA6 2001 mov r0,1h ; 08069EA8 F7FDFCDC bl 8067864h ; 08069EAC 21A8 mov r1,0A8h ; 08069EAE 0049 lsl r1,r1,1h ;Raigeki 08069EB0 2001 mov r0,1h ; 08069EB2 F7FDFCD7 bl 8067864h ; 08069EB6 4920 ldr r1,=15Bh ;Swords of Revealing Light, from array 08069EB8 2001 mov r0,1h ; 08069EBA F7FDFCD3 bl 8067864h ; 08069EBE 3C9B sub r4,9Bh ;Graceful Charity 08069EC0 2001 mov r0,1h ; 08069EC2 1C21 mov r1,r4 ; 08069EC4 F7FDFCCE bl 8067864h ; 08069EC8 2001 mov r0,1h ; 08069ECA 1C21 mov r1,r4 ; 08069ECC F7FDFCCA bl 8067864h ; 08069ED0 21FC mov r1,0FCh ;Monster Reborn 08069ED2 0089 lsl r1,r1,2h ; 08069ED4 2001 mov r0,1h ; 08069ED6 F7FDFCC5 bl 8067864h ; 08069EDA 4918 ldr r1,=3F2h ;Pot of Greed, from array 08069EDC 2001 mov r0,1h ; 08069EDE F7FDFCC1 bl 8067864h ; 08069EE2 4917 ldr r1,=403h ;Change of Heart, from array 08069EE4 2001 mov r0,1h ; 08069EE6 F7FDFCBD bl 8067864h ; 08069EEA 3C08 sub r4,8h ;Negate Attack 08069EEC 2001 mov r0,1h ; 08069EEE 1C21 mov r1,r4 ; 08069EF0 F7FDFCB8 bl 8067864h ; 08069EF4 2001 mov r0,1h ; 08069EF6 1C21 mov r1,r4 ; 08069EF8 F7FDFCB4 bl 8067864h ; 08069EFC 2184 mov r1,84h ;Mirror Force 08069EFE 00C9 lsl r1,r1,3h ; 08069F00 2001 mov r0,1h ; 08069F02 F7FDFCAF bl 8067864h ; 08069F06 490F ldr r1,=447h ;Call Of The Haunted, from array 08069F08 2001 mov r0,1h ; 08069F0A F7FDFCAB bl 8067864h ; 08069F0E 490E ldr r1,=475h ;Appropriate, from array 08069F10 2001 mov r0,1h ; 08069F12 F7FDFCA7 bl 8067864h ; 08069F16 490D ldr r1,=47Bh ;Backup Soldier, from array 08069F18 2001 mov r0,1h ; 08069F1A F7FDFCA3 bl 8067864h ; 08069F1E 490C ldr r1,=4BEh ;Magic Cylinder, from array 08069F20 2001 mov r0,1h ; 08069F22 F7FDFC9F bl 8067864h ; 08069F26 4C0B ldr r4,=5A7h ;Jar of Greed, from array 08069F28 F000FFF5 bl 806AF16h ;
Rare Hunter card_id array
- 0x69F2C
AB 01 00 00 63 04 00 00 4F 01 00 00 5B 01 00 00 F2 03 00 00 03 04 00 00 47 04 00 00 75 04 00 00 7B 04 00 00 BE 04 00 00 A7 05 00 00 Magician of Faith Mystic Tomato Dark Hole Swords of Revealing Light Pot of Greed Change of Heart Call Of The Haunted Appropriate Backup Soldier Magic Cylinder Jar of Greed
Arkana
Arkana's deck subroutine
08069F58 4C27 ldr r4,=4BAh ;Dark Magician, from array 08069F5A 2001 mov r0,1h ;is_cpu_deck_flag = 1 08069F5C 1C21 mov r1,r4 ; 08069F5E F7FDFC81 bl 8067864h ; 08069F62 2001 mov r0,1h ; 08069F64 1C21 mov r1,r4 ; 08069F66 F7FDFC7D bl 8067864h ; 08069F6A 2001 mov r0,1h ; 08069F6C 1C21 mov r1,r4 ; 08069F6E F7FDFC79 bl 8067864h ; 08069F72 4C22 ldr r4,=1FFh ;Cannon Soldier, from array 08069F74 2001 mov r0,1h ; 08069F76 1C21 mov r1,r4 ; 08069F78 F7FDFC74 bl 8067864h ; 08069F7C 2001 mov r0,1h ; 08069F7E 1C21 mov r1,r4 ; 08069F80 F7FDFC70 bl 8067864h ; 08069F84 491E ldr r1,=14Fh ;Dark Hole, from array 08069F86 2001 mov r0,1h ; 08069F88 F7FDFC6C bl 8067864h ; 08069F8C 21A8 mov r1,0A8h ; 08069F8E 0049 lsl r1,r1,1h ; 08069F90 2001 mov r0,1h ; 08069F92 F7FDFC67 bl 8067864h ; 08069F96 491B ldr r1,=15Bh ;Swords of Revealing Light, from array 08069F98 2001 mov r0,1h ; 08069F9A F7FDFC63 bl 8067864h ; 08069F9E 21FC mov r1,0FCh ; 08069FA0 0089 lsl r1,r1,2h ;Monster Reborn 08069FA2 2001 mov r0,1h ; 08069FA4 F7FDFC5E bl 8067864h ; 08069FA8 4917 ldr r1,=403h ;Change of Heart, from array 08069FAA 2001 mov r0,1h ; 08069FAC F7FDFC5A bl 8067864h ; 08069FB0 4916 ldr r1,=42Ch ;Snatch Steal, from array 08069FB2 2001 mov r0,1h ; 08069FB4 F7FDFC56 bl 8067864h ; 08069FB8 2491 mov r4,91h ; 08069FBA 00E4 lsl r4,r4,3h ;Premature Burial 08069FBC 2001 mov r0,1h ; 08069FBE 1C21 mov r1,r4 ; 08069FC0 F7FDFC50 bl 8067864h ; 08069FC4 2001 mov r0,1h ; 08069FC6 1C21 mov r1,r4 ; 08069FC8 F7FDFC4C bl 8067864h ; 08069FCC 3CDD sub r4,0DDh ;Bell of Destruction 08069FCE 2001 mov r0,1h ; 08069FD0 1C21 mov r1,r4 ; 08069FD2 F7FDFC47 bl 8067864h ; 08069FD6 2001 mov r0,1h ; 08069FD8 1C21 mov r1,r4 ; 08069FDA F7FDFC43 bl 8067864h ; 08069FDE 21F0 mov r1,0F0h ; 08069FE0 0089 lsl r1,r1,2h ;Negate Attack 08069FE2 2001 mov r0,1h ; 08069FE4 F7FDFC3E bl 8067864h ; 08069FE8 2184 mov r1,84h ; 08069FEA 00C9 lsl r1,r1,3h ;Mirror Force 08069FEC 2001 mov r0,1h ; 08069FEE F7FDFC39 bl 8067864h ; 08069FF2 4907 ldr r1,=447h ;Call Of The Haunted, from array 08069FF4 F000FEAA bl 806AD4Ch ;
Arkana card_id array
- 0x69FF8
BA 04 00 00 FF 01 00 00 4F 01 00 00 5B 01 00 00 03 04 00 00 2C 04 00 00 47 04 00 00 Dark Magician Cannon Soldier Dark Hole Swords of Revealing Light Change of Heart Snatch Steal Call Of The Haunted
Strings
Strings' deck subroutine
0806A014 2001 mov r0,1h ;is_cpu_deck_flag = 1 0806A016 2115 mov r1,15h ;Summoned Skull 0806A018 F7FDFC24 bl 8067864h ; 0806A01C 2001 mov r0,1h ; 0806A01E 2115 mov r1,15h ;Summoned Skull 0806A020 F7FDFC20 bl 8067864h ; 0806A024 4C2D ldr r4,=57Ah ;Humanoid Slime, from array 0806A026 2001 mov r0,1h ; 0806A028 1C21 mov r1,r4 ; 0806A02A F7FDFC1B bl 8067864h ; 0806A02E 2001 mov r0,1h ; 0806A030 1C21 mov r1,r4 ; 0806A032 F7FDFC17 bl 8067864h ; 0806A036 2001 mov r0,1h ; 0806A038 1C21 mov r1,r4 ; 0806A03A F7FDFC13 bl 8067864h ; 0806A03E 4C28 ldr r4,=1ABh ;Magician of Faith, from array 0806A040 2001 mov r0,1h ; 0806A042 1C21 mov r1,r4 ; 0806A044 F7FDFC0E bl 8067864h ; 0806A048 2001 mov r0,1h ; 0806A04A 1C21 mov r1,r4 ; 0806A04C F7FDFC0A bl 8067864h ; 0806A050 4924 ldr r1,=4E6h ;Slate Warrior, from array 0806A052 2001 mov r0,1h ; 0806A054 F7FDFC06 bl 8067864h ; 0806A058 4C23 ldr r4,=345h ;Vorse Raider, from array 0806A05A 2001 mov r0,1h ; 0806A05C 1C21 mov r1,r4 ; 0806A05E F7FDFC01 bl 8067864h ; 0806A062 2001 mov r0,1h ; 0806A064 1C21 mov r1,r4 ; 0806A066 F7FDFBFD bl 8067864h ; 0806A06A 2001 mov r0,1h ; 0806A06C 1C21 mov r1,r4 ; 0806A06E F7FDFBF9 bl 8067864h ; 0806A072 491E ldr r1,=14Fh ;Dark Hole, from array 0806A074 2001 mov r0,1h ; 0806A076 F7FDFBF5 bl 8067864h ; 0806A07A 21A8 mov r1,0A8h ; 0806A07C 0049 lsl r1,r1,1h ;Raigeki 0806A07E 2001 mov r0,1h ; 0806A080 F7FDFBF0 bl 8067864h ; 0806A084 21FC mov r1,0FCh ; 0806A086 0089 lsl r1,r1,2h ;Monster Reborn 0806A088 2001 mov r0,1h ; 0806A08A F7FDFBEB bl 8067864h ; 0806A08E 2491 mov r4,91h ; 0806A090 00E4 lsl r4,r4,3h ;Premature Burial 0806A092 2001 mov r0,1h ; 0806A094 1C21 mov r1,r4 ; 0806A096 F7FDFBE5 bl 8067864h ; 0806A09A 2001 mov r0,1h ; 0806A09C 1C21 mov r1,r4 ; 0806A09E F7FDFBE1 bl 8067864h ; 0806A0A2 4913 ldr r1,=4CEh ;Nightmare's Steelcage, from array 0806A0A4 2001 mov r0,1h ; 0806A0A6 F7FDFBDD bl 8067864h ; 0806A0AA 4C12 ldr r4,=592h ;Jam Breeding Machine, from array 0806A0AC 2001 mov r0,1h ; 0806A0AE 1C21 mov r1,r4 ; 0806A0B0 F7FDFBD8 bl 8067864h ; 0806A0B4 2001 mov r0,1h ; 0806A0B6 1C21 mov r1,r4 ; 0806A0B8 F7FDFBD4 bl 8067864h ; 0806A0BC 2001 mov r0,1h ; 0806A0BE 1C21 mov r1,r4 ; 0806A0C0 F7FDFBD0 bl 8067864h ; 0806A0C4 490C ldr r1,=3ABh ;Bell of Destruction, from array 0806A0C6 2001 mov r0,1h ; 0806A0C8 F7FDFBCC bl 8067864h ; 0806A0CC 2184 mov r1,84h ;Mirror Force 0806A0CE 00C9 lsl r1,r1,3h ; 0806A0D0 2001 mov r0,1h ; 0806A0D2 F7FDFBC7 bl 8067864h ; 0806A0D6 4909 ldr r1,=4BEh ;Magic Cylinder, from array 0806A0D8 F000FE38 bl 806AD4Ch ;
Strings card_id array
- 0x6A0DC
7A 05 00 00 AB 01 00 00 E6 04 00 00 45 03 00 00 4F 01 00 00 CE 04 00 00 92 05 00 00 AB 03 00 00 BE 04 00 00 Humanoid Slime Magician of Faith Slate Warrior Vorse Raider Dark Hole Nightmare's Steelcage Jam Breeding Machine Bell of Destruction Magic Cylinder
Umbra & Lumis
Umbra & Lumis' deck subroutine
0806A100 2001 mov r0,1h ;is_cpu_deck_flag = 1 0806A102 2115 mov r1,15h ;Summoned Skull 0806A104 F7FDFBAE bl 8067864h ; 0806A108 2001 mov r0,1h ; 0806A10A 2115 mov r1,15h ;Summoned Skull 0806A10C F7FDFBAA bl 8067864h ; 0806A110 4C36 ldr r4,=582h ;Grand Tiki Elder, from array 0806A112 2001 mov r0,1h ; 0806A114 1C21 mov r1,r4 ; 0806A116 F7FDFBA5 bl 8067864h ; 0806A11A 2001 mov r0,1h ; 0806A11C 1C21 mov r1,r4 ; 0806A11E F7FDFBA1 bl 8067864h ; 0806A122 2001 mov r0,1h ; 0806A124 2165 mov r1,65h ;Mask of Darkness 0806A126 F7FDFB9D bl 8067864h ; 0806A12A 2001 mov r0,1h ; 0806A12C 2165 mov r1,65h ;Mask of Darkness 0806A12E F7FDFB99 bl 8067864h ; 0806A132 2001 mov r0,1h ; 0806A134 21DB mov r1,0DBh ;Masked Sorcerer 0806A136 F7FDFB95 bl 8067864h ; 0806A13A 2001 mov r0,1h ; 0806A13C 21DB mov r1,0DBh ;Masked Sorcerer 0806A13E F7FDFB91 bl 8067864h ; 0806A142 4C2B ldr r4,=1ABh ;Magician of Faith, from array 0806A144 2001 mov r0,1h ; 0806A146 1C21 mov r1,r4 ; 0806A148 F7FDFB8C bl 8067864h ; 0806A14C 2001 mov r0,1h ; 0806A14E 1C21 mov r1,r4 ; 0806A150 F7FDFB88 bl 8067864h ; 0806A154 4927 ldr r1,=4E6h ;Slate Warrior, from array 0806A156 2001 mov r0,1h ; 0806A158 F7FDFB84 bl 8067864h ; 0806A15C 4C26 ldr r4,=345h ;Vorse Raider, from array 0806A15E 2001 mov r0,1h ; 0806A160 1C21 mov r1,r4 ; 0806A162 F7FDFB7F bl 8067864h ; 0806A166 2001 mov r0,1h ; 0806A168 1C21 mov r1,r4 ; 0806A16A F7FDFB7B bl 8067864h ; 0806A16E 2001 mov r0,1h ; 0806A170 1C21 mov r1,r4 ; 0806A172 F7FDFB77 bl 8067864h ; 0806A176 4921 ldr r1,=583h ;The Masked Beast, from array 0806A178 2001 mov r0,1h ; 0806A17A F7FDFB73 bl 8067864h ; 0806A17E 4920 ldr r1,=14Fh ;Dark Hole, from array 0806A180 2001 mov r0,1h ; 0806A182 F7FDFB6F bl 8067864h ; 0806A186 21A8 mov r1,0A8h ; 0806A188 0049 lsl r1,r1,1h ;Raigeki 0806A18A 2001 mov r0,1h ; 0806A18C F7FDFB6A bl 8067864h ; 0806A190 21FC mov r1,0FCh ; 0806A192 0089 lsl r1,r1,2h ;Monster Reborn 0806A194 2001 mov r0,1h ; 0806A196 F7FDFB65 bl 8067864h ; 0806A19A 2491 mov r4,91h ; 0806A19C 00E4 lsl r4,r4,3h ;Premature Burial 0806A19E 2001 mov r0,1h ; 0806A1A0 1C21 mov r1,r4 ; 0806A1A2 F7FDFB5F bl 8067864h ; 0806A1A6 2001 mov r0,1h ; 0806A1A8 1C21 mov r1,r4 ; 0806A1AA F7FDFB5B bl 8067864h ; 0806A1AE 21B1 mov r1,0B1h ; 0806A1B0 00C9 lsl r1,r1,3h ;Curse of the Masked Beast 0806A1B2 2001 mov r0,1h ; 0806A1B4 F7FDFB56 bl 8067864h ; 0806A1B8 4912 ldr r1,=58Ch ;Mask of Brutality, from array 0806A1BA 2001 mov r0,1h ; 0806A1BC F7FDFB52 bl 8067864h ; 0806A1C0 3CDD sub r4,0DDh ; 0806A1C2 2001 mov r0,1h ;Bell of Destruction 0806A1C4 1C21 mov r1,r4 ; 0806A1C6 F7FDFB4D bl 8067864h ; 0806A1CA 2001 mov r0,1h ; 0806A1CC 1C21 mov r1,r4 ; 0806A1CE F7FDFB49 bl 8067864h ; 0806A1D2 2184 mov r1,84h ; 0806A1D4 00C9 lsl r1,r1,3h ;Mirror Force 0806A1D6 2001 mov r0,1h ; 0806A1D8 F7FDFB44 bl 8067864h ; 0806A1DC 490A ldr r1,=4BEh ;Magic Cylinder, from array 0806A1DE 2001 mov r0,1h ; 0806A1E0 F7FDFB40 bl 8067864h ; 0806A1E4 4C09 ldr r4,=587h ;Mask of Weakness, from array 0806A1E6 F000FE9A bl 806AF1Eh ;
Umbra & Lumis card_id array
- 0x6A1EC
82 05 00 00 AB 01 00 00 E6 04 00 00 45 03 00 00 83 05 00 00 4F 01 00 00 8C 05 00 00 BE 04 00 00 87 05 00 00 Grand Tiki Elder Magician of Faith Slate Warrior Vorse Raider The Masked Beast Dark Hole Mask of Brutality Magic Cylinder Mask of Weakness
Odion
Odion's deck subroutine
0806A210 2001 mov r0,1h ;is_cpu_deck_flag = 1 0806A212 2165 mov r1,65h ;Mask of Darkness 0806A214 F7FDFB26 bl 8067864h ; 0806A218 4959 ldr r1,=1ABh ;Magician of Faith, from array 0806A21A 2001 mov r0,1h ; 0806A21C F7FDFB22 bl 8067864h ; 0806A220 4958 ldr r1,=24Eh ;Morphing Jar, from array 0806A222 2001 mov r0,1h ; 0806A224 F7FDFB1E bl 8067864h ; 0806A228 2001 mov r0,1h ; 0806A22A 2115 mov r1,15h ;Summoned Skull 0806A22C F7FDFB1A bl 8067864h ; 0806A230 2001 mov r0,1h ; 0806A232 2115 mov r1,15h ;Summoned Skull 0806A234 F7FDFB16 bl 8067864h ; 0806A238 4953 ldr r1,=452h ;Cyber Jar, from array 0806A23A 2001 mov r0,1h ; 0806A23C F7FDFB12 bl 8067864h ; 0806A240 4952 ldr r1,=4E6h ;Slate Warrior, from array 0806A242 2001 mov r0,1h ; 0806A244 F7FDFB0E bl 8067864h ; 0806A248 4C51 ldr r4,=345h ;Vorse Raider, from array 0806A24A 2001 mov r0,1h ; 0806A24C 1C21 mov r1,r4 ; 0806A24E F7FDFB09 bl 8067864h ; 0806A252 2001 mov r0,1h ; 0806A254 1C21 mov r1,r4 ; 0806A256 F7FDFB05 bl 8067864h ; 0806A25A 2001 mov r0,1h ; 0806A25C 1C21 mov r1,r4 ; 0806A25E F7FDFB01 bl 8067864h ; 0806A262 494C ldr r1,=14Fh ;Dark Hole, from array 0806A264 2001 mov r0,1h ; 0806A266 F7FDFAFD bl 8067864h ; 0806A26A 21A8 mov r1,0A8h ; 0806A26C 0049 lsl r1,r1,1h ;Raigeki 0806A26E 2001 mov r0,1h ; 0806A270 F7FDFAF8 bl 8067864h ; 0806A274 21FC mov r1,0FCh ; 0806A276 0089 lsl r1,r1,2h ;Monster Reborn 0806A278 2001 mov r0,1h ; 0806A27A F7FDFAF3 bl 8067864h ; 0806A27E 2491 mov r4,91h ; 0806A280 00E4 lsl r4,r4,3h ;Premature Burial 0806A282 2001 mov r0,1h ; 0806A284 1C21 mov r1,r4 ; 0806A286 F7FDFAED bl 8067864h ; 0806A28A 2001 mov r0,1h ; 0806A28C 1C21 mov r1,r4 ; 0806A28E F7FDFAE9 bl 8067864h ; 0806A292 4C41 ldr r4,=2ADh ;Widespread Ruin, from array 0806A294 2001 mov r0,1h ; 0806A296 1C21 mov r1,r4 ; 0806A298 F7FDFAE4 bl 8067864h ; 0806A29C 2001 mov r0,1h ; 0806A29E 1C21 mov r1,r4 ; 0806A2A0 F7FDFAE0 bl 8067864h ; 0806A2A4 2001 mov r0,1h ; 0806A2A6 1C21 mov r1,r4 ; 0806A2A8 F7FDFADC bl 8067864h ; 0806A2AC 34FE add r4,0FEh ;Bell of Destruction 0806A2AE 2001 mov r0,1h ; 0806A2B0 1C21 mov r1,r4 ; 0806A2B2 F7FDFAD7 bl 8067864h ; 0806A2B6 2001 mov r0,1h ; 0806A2B8 1C21 mov r1,r4 ; 0806A2BA F7FDFAD3 bl 8067864h ; 0806A2BE 3415 add r4,15h ;Negate Attack 0806A2C0 2001 mov r0,1h ; 0806A2C2 1C21 mov r1,r4 ; 0806A2C4 F7FDFACE bl 8067864h ; 0806A2C8 2001 mov r0,1h ; 0806A2CA 1C21 mov r1,r4 ; 0806A2CC F7FDFACA bl 8067864h ; 0806A2D0 342A add r4,2Ah ;Trap Hole 0806A2D2 2001 mov r0,1h ; 0806A2D4 1C21 mov r1,r4 ; 0806A2D6 F7FDFAC5 bl 8067864h ; 0806A2DA 2001 mov r0,1h ; 0806A2DC 1C21 mov r1,r4 ; 0806A2DE F7FDFAC1 bl 8067864h ; 0806A2E2 2001 mov r0,1h ; 0806A2E4 1C21 mov r1,r4 ; 0806A2E6 F7FDFABD bl 8067864h ; 0806A2EA 492C ldr r1,=3FBh ;White Hole, from array 0806A2EC 2001 mov r0,1h ; 0806A2EE F7FDFAB9 bl 8067864h ; 0806A2F2 492B ldr r1,=3FDh ;Call of the Grave, from array 0806A2F4 2001 mov r0,1h ; 0806A2F6 F7FDFAB5 bl 8067864h ; 0806A2FA 492A ldr r1,=3FEh ;Anti Raigeki, from array 0806A2FC 2001 mov r0,1h ; 0806A2FE F7FDFAB1 bl 8067864h ; 0806A302 4929 ldr r1,=402h ;Call of the Dark, from array 0806A304 2001 mov r0,1h ; 0806A306 F7FDFAAD bl 8067864h ; 0806A30A 4928 ldr r1,=404h ;Solemn Judgment, from array 0806A30C 2001 mov r0,1h ; 0806A30E F7FDFAA9 bl 8067864h ; 0806A312 341B add r4,1Bh ;Magic Jammer 0806A314 2001 mov r0,1h ; 0806A316 1C21 mov r1,r4 ; 0806A318 F7FDFAA4 bl 8067864h ; 0806A31C 2001 mov r0,1h ; 0806A31E 1C21 mov r1,r4 ; 0806A320 F7FDFAA0 bl 8067864h ; 0806A324 3401 add r4,1h ;Seven Tools of the Bandit 0806A326 2001 mov r0,1h ; 0806A328 1C21 mov r1,r4 ; 0806A32A F7FDFA9B bl 8067864h ; 0806A32E 2001 mov r0,1h ; 0806A330 1C21 mov r1,r4 ; 0806A332 F7FDFA97 bl 8067864h ; 0806A336 3408 add r4,8h ;Magic Thorn 0806A338 2001 mov r0,1h ; 0806A33A 1C21 mov r1,r4 ; 0806A33C F7FDFA92 bl 8067864h ; 0806A340 2001 mov r0,1h ; 0806A342 1C21 mov r1,r4 ; 0806A344 F7FDFA8E bl 8067864h ; 0806A348 2184 mov r1,84h ; 0806A34A 00C9 lsl r1,r1,3h ;Mirror Force 0806A34C 2001 mov r0,1h ; 0806A34E F7FDFA89 bl 8067864h ; 0806A352 4917 ldr r1,=426h ;Gryphon Wing, from array 0806A354 2001 mov r0,1h ; 0806A356 F7FDFA85 bl 8067864h ; 0806A35A 343C add r4,3Ch ;Enchanted Javelin 0806A35C 2001 mov r0,1h ; 0806A35E 1C21 mov r1,r4 ; 0806A360 F7FDFA80 bl 8067864h ; 0806A364 2001 mov r0,1h ; 0806A366 1C21 mov r1,r4 ; 0806A368 F7FDFA7C bl 8067864h ; 0806A36C 4911 ldr r1,=4BEh ;Magic Cylinder, from array 0806A36E 2001 mov r0,1h ; 0806A370 F7FDFA78 bl 8067864h ; 0806A374 21B2 mov r1,0B2h ; 0806A376 00C9 lsl r1,r1,3h ;Fairy Box 0806A378 2001 mov r0,1h ; 0806A37A F000FDC9 bl 806AF10h ;... continue to Torrential Tribute × 3
Odion card_id array
- 0x6A380
AB 01 00 00 4E 02 00 00 52 04 00 00 E6 04 00 00 45 03 00 00 4F 01 00 00 AD 02 00 00 FB 03 00 00 FD 03 00 00 FE 03 00 00 02 04 00 00 04 04 00 00 26 04 00 00 BE 04 00 00 Magician of Faith Morphing Jar Cyber Jar Slate Warrior Vorse Raider Dark Hole Widespread Ruin White Hole Call of the Grave Anti Raigeki Call of the Dark Solemn Judgment Gryphon Wing Magic Cylinder
Mind-Controlled Joey
Mind-Controlled Joey's deck subroutine
0806A3B8 4C57 ldr r4,=1FFh ;Cannon Soldier, from array 0806A3BA 2001 mov r0,1h ; 0806A3BC 1C21 mov r1,r4 ; 0806A3BE F7FDFA51 bl 8067864h ; 0806A3C2 2001 mov r0,1h ; 0806A3C4 1C21 mov r1,r4 ; 0806A3C6 F7FDFA4D bl 8067864h ; 0806A3CA 3432 add r4,32h ;Needle Worm 0806A3CC 2001 mov r0,1h ; 0806A3CE 1C21 mov r1,r4 ; 0806A3D0 F7FDFA48 bl 8067864h ; 0806A3D4 2001 mov r0,1h ; 0806A3D6 1C21 mov r1,r4 ; 0806A3D8 F7FDFA44 bl 8067864h ; 0806A3DC 2001 mov r0,1h ; 0806A3DE 1C21 mov r1,r4 ; 0806A3E0 F7FDFA40 bl 8067864h ; 0806A3E4 494D ldr r1,=4E6h ;Slate Warrior, from array 0806A3E6 2001 mov r0,1h ; 0806A3E8 F7FDFA3C bl 8067864h ; 0806A3EC 4C4C ldr r4,=345h ;Vorse Raider, from array 0806A3EE 2001 mov r0,1h ; 0806A3F0 1C21 mov r1,r4 ; 0806A3F2 F7FDFA37 bl 8067864h ; 0806A3F6 2001 mov r0,1h ; 0806A3F8 1C21 mov r1,r4 ; 0806A3FA F7FDFA33 bl 8067864h ; 0806A3FE 2001 mov r0,1h ; 0806A400 1C21 mov r1,r4 ; 0806A402 F7FDFA2F bl 8067864h ; 0806A406 24A8 mov r4,0A8h ; 0806A408 00E4 lsl r4,r4,3h ;Goblin Attack Force 0806A40A 2001 mov r0,1h ; 0806A40C 1C21 mov r1,r4 ; 0806A40E F7FDFA29 bl 8067864h ; 0806A412 2001 mov r0,1h ; 0806A414 1C21 mov r1,r4 ; 0806A416 F7FDFA25 bl 8067864h ; 0806A41A 2001 mov r0,1h ; 0806A41C 1C21 mov r1,r4 ; 0806A41E F7FDFA21 bl 8067864h ; 0806A422 219B mov r1,9Bh ; 0806A424 0049 lsl r1,r1,1h ;Black Pendant 0806A426 2001 mov r0,1h ; 0806A428 F7FDFA1C bl 8067864h ; 0806A42C 493D ldr r1,=14Fh ;Dark Hole, from array 0806A42E 2001 mov r0,1h ; 0806A430 F7FDFA18 bl 8067864h ; 0806A434 21A8 mov r1,0A8h ; 0806A436 0049 lsl r1,r1,1h ;Raigeki 0806A438 2001 mov r0,1h ; 0806A43A F7FDFA13 bl 8067864h ; 0806A43E 493A ldr r1,=157h ;Hinotama, from array 0806A440 2001 mov r0,1h ; 0806A442 F7FDFA0F bl 8067864h ; 0806A446 21AC mov r1,0ACh ;Final Flame 0806A448 0049 lsl r1,r1,1h ; 0806A44A 2001 mov r0,1h ; 0806A44C F7FDFA0A bl 8067864h ; 0806A450 4936 ldr r1,=159h ;Ookazi, from array 0806A452 2001 mov r0,1h ; 0806A454 F7FDFA06 bl 8067864h ; 0806A458 21AD mov r1,0ADh ;Tremendous Fire 0806A45A 0049 lsl r1,r1,1h ; 0806A45C 2001 mov r0,1h ; 0806A45E F7FDFA01 bl 8067864h ; 0806A462 4933 ldr r1,=15Bh ;Swords of Revealing Light, from array 0806A464 2001 mov r0,1h ; 0806A466 F7FDF9FD bl 8067864h ; 0806A46A 21FC mov r1,0FCh ; 0806A46C 0089 lsl r1,r1,2h ;Monster Reborn 0806A46E 2001 mov r0,1h ; 0806A470 F7FDF9F8 bl 8067864h ; 0806A474 492F ldr r1,=403h ;Change of Heart, from array 0806A476 2001 mov r0,1h ; 0806A478 F7FDF9F4 bl 8067864h ; 0806A47C 492E ldr r1,=40Fh ;Restructer Revolution, from array 0806A47E 2001 mov r0,1h ; 0806A480 F7FDF9F0 bl 8067864h ; 0806A484 492D ldr r1,=42Ch ;Snatch Steal, from array 0806A486 2001 mov r0,1h ; 0806A488 F7FDF9EC bl 8067864h ; 0806A48C 492C ldr r1,=436h ;Chain Energy, from array 0806A48E 2001 mov r0,1h ; 0806A490 F7FDF9E8 bl 8067864h ; 0806A494 492B ldr r1,=4C5h ;Card Destruction 0806A496 2001 mov r0,1h ; 0806A498 F7FDF9E4 bl 8067864h ; 0806A49C 4C2A ldr r4,=3ABh ;Bell of Destruction 0806A49E 2001 mov r0,1h ; 0806A4A0 1C21 mov r1,r4 ; 0806A4A2 F7FDF9DF bl 8067864h ; 0806A4A6 2001 mov r0,1h ; 0806A4A8 1C21 mov r1,r4 ; 0806A4AA F7FDF9DB bl 8067864h ; 0806A4AE 21F0 mov r1,0F0h ; 0806A4B0 0089 lsl r1,r1,2h ;Negate Attack 0806A4B2 2001 mov r0,1h ; 0806A4B4 F7FDF9D6 bl 8067864h ; 0806A4B8 343F add r4,3Fh ;Trap Hole 0806A4BA 2001 mov r0,1h ; 0806A4BC 1C21 mov r1,r4 ; 0806A4BE F7FDF9D1 bl 8067864h ; 0806A4C2 2001 mov r0,1h ; 0806A4C4 1C21 mov r1,r4 ; 0806A4C6 F7FDF9CD bl 8067864h ; 0806A4CA 2001 mov r0,1h ; 0806A4CC 1C21 mov r1,r4 ; 0806A4CE F7FDF9C9 bl 8067864h ; 0806A4D2 491E ldr r1,=40Eh ;Magic Thorn, from array 0806A4D4 2001 mov r0,1h ; 0806A4D6 F7FDF9C5 bl 8067864h ; 0806A4DA 2184 mov r1,84h ; 0806A4DC 00C9 lsl r1,r1,3h ;Mirror Force 0806A4DE 2001 mov r0,1h ; 0806A4E0 F7FDF9C0 bl 8067864h ; 0806A4E4 491A ldr r1,=47Eh ;Ceasefire, from array 0806A4E6 2001 mov r0,1h ; 0806A4E8 F7FDF9BC bl 8067864h ; 0806A4EC 4919 ldr r1,=4BEh ;Magic Cylinder, from array 0806A4EE 2001 mov r0,1h ; 0806A4F0 F7FDF9B8 bl 8067864h ; 0806A4F4 24A3 mov r4,0A3h ; 0806A4F6 00E4 lsl r4,r4,3h ;Attack and Receive 0806A4F8 2001 mov r0,1h ; 0806A4FA 1C21 mov r1,r4 ; 0806A4FC F7FDF9B2 bl 8067864h ; 0806A500 2001 mov r0,1h ; 0806A502 1C21 mov r1,r4 ; 0806A504 F7FDF9AE bl 8067864h ; 0806A508 2001 mov r0,1h ; 0806A50A 1C21 mov r1,r4 ; 0806A50C F7FDF9AA bl 8067864h ; 0806A510 21B2 mov r1,0B2h ; 0806A512 00C9 lsl r1,r1,3h ;Fairy Box 0806A514 F000FC1A bl 806AD4Ch ;
Mind-Controlled Joey card_id array
FF 01 00 00 E6 04 00 00 45 03 00 00 4F 01 00 00 57 01 00 00 59 01 00 00 5B 01 00 00 03 04 00 00 0F 04 00 00 2C 04 00 00 36 04 00 00 C5 04 00 00 AB 03 00 00 0E 04 00 00 7E 04 00 00 BE 04 00 00 Cannon Soldier Slate Warrior Vorse Raider Dark Hole Hinotama Ookazi Swords of Revealing Light Change of Heart Restructer Revolution Snatch Steal Chain Energy Card Destruction Bell of Destruction Magic Thorn Ceasefire Magic Cylinder
Maximillion Pegasus
Maximillion Pegasus's deck subroutine
0806A558 21ED mov r1,0EDh ; 0806A55A 0049 lsl r1,r1,1h ;Sinister Serpent 0806A55C 2001 mov r0,1h ; 0806A55E F7FDF981 bl 8067864h ; 0806A562 4C55 ldr r4,=2D7h ;Toon Mermaid, from array 0806A564 2001 mov r0,1h ; 0806A566 1C21 mov r1,r4 ; 0806A568 F7FDF97C bl 8067864h ; 0806A56C 2001 mov r0,1h ; 0806A56E 1C21 mov r1,r4 ; 0806A570 F7FDF978 bl 8067864h ; 0806A574 2001 mov r0,1h ; 0806A576 1C21 mov r1,r4 ; 0806A578 F7FDF974 bl 8067864h ; 0806A57C 3401 add r4,1h ;Toon Summoned Skull 0806A57E 2001 mov r0,1h ; 0806A580 1C21 mov r1,r4 ; 0806A582 F7FDF96F bl 8067864h ; 0806A586 2001 mov r0,1h ; 0806A588 1C21 mov r1,r4 ; 0806A58A F7FDF96B bl 8067864h ; 0806A58E 494B ldr r1,=2FEh ;Blue-Eyes Toon Dragon, from array 0806A590 2001 mov r0,1h ; 0806A592 F7FDF967 bl 8067864h ; 0806A596 4C4A ldr r4,=45Bh ;Nimble Momonga, from array 0806A598 2001 mov r0,1h ; 0806A59A 1C21 mov r1,r4 ; 0806A59C F7FDF962 bl 8067864h ; 0806A5A0 2001 mov r0,1h ; 0806A5A2 1C21 mov r1,r4 ; 0806A5A4 F7FDF95E bl 8067864h ; 0806A5A8 2001 mov r0,1h ; 0806A5AA 1C21 mov r1,r4 ; 0806A5AC F7FDF95A bl 8067864h ; 0806A5B0 4C44 ldr r4,=345h ;Vorse Raider, from array 0806A5B2 2001 mov r0,1h ; 0806A5B4 1C21 mov r1,r4 ; 0806A5B6 F7FDF955 bl 8067864h ; 0806A5BA 2001 mov r0,1h ; 0806A5BC 1C21 mov r1,r4 ; 0806A5BE F7FDF951 bl 8067864h ; 0806A5C2 2001 mov r0,1h ; 0806A5C4 1C21 mov r1,r4 ; 0806A5C6 F7FDF94D bl 8067864h ; 0806A5CA 493F ldr r1,=4E6h ;Slate Warrior, from array 0806A5CC 2001 mov r0,1h ; 0806A5CE F7FDF949 bl 8067864h ; 0806A5D2 493E ldr r1,=14Fh ;Dark Hole, from array 0806A5D4 2001 mov r0,1h ; 0806A5D6 F7FDF945 bl 8067864h ; 0806A5DA 21A8 mov r1,0A8h ; 0806A5DC 0049 lsl r1,r1,1h ;Raigeki 0806A5DE 2001 mov r0,1h ; 0806A5E0 F7FDF940 bl 8067864h ; 0806A5E4 493A ldr r1,=15Bh ;Swords of Revealing Light, from array 0806A5E6 2001 mov r0,1h ; 0806A5E8 F7FDF93C bl 8067864h ; 0806A5EC 3475 add r4,75h ;Toon World 0806A5EE 2001 mov r0,1h ; 0806A5F0 1C21 mov r1,r4 ; 0806A5F2 F7FDF937 bl 8067864h ; 0806A5F6 2001 mov r0,1h ; 0806A5F8 1C21 mov r1,r4 ; 0806A5FA F7FDF933 bl 8067864h ; 0806A5FE 21FC mov r1,0FCh ; 0806A600 0089 lsl r1,r1,2h ;Monster Reborn 0806A602 2001 mov r0,1h ; 0806A604 F7FDF92E bl 8067864h ; 0806A608 4932 ldr r1,=403h ;Change of Heart, from array 0806A60A 2001 mov r0,1h ; 0806A60C F7FDF92A bl 8067864h ; 0806A610 4931 ldr r1,=42Ch ;Snatch Steal, from array 0806A612 2001 mov r0,1h ; 0806A614 F7FDF926 bl 8067864h ; 0806A618 2191 mov r1,91h ; 0806A61A 00C9 lsl r1,r1,3h ;Premature Burial 0806A61C 2001 mov r0,1h ; 0806A61E F7FDF921 bl 8067864h ; 0806A622 492E ldr r1,=24Eh ;Morphing Jar, from array 0806A624 2001 mov r0,1h ; 0806A626 F7FDF91D bl 8067864h ; 0806A62A 2001 mov r0,1h ; 0806A62C 2115 mov r1,15h ; 0806A62E F7FDF919 bl 8067864h ; 0806A632 2001 mov r0,1h ; 0806A634 2115 mov r1,15h ; 0806A636 F7FDF915 bl 8067864h ; 0806A63A 4929 ldr r1,=452h ;Cyber Jar, from array 0806A63C 2001 mov r0,1h ; 0806A63E F7FDF911 bl 8067864h ; 0806A642 4928 ldr r1,=3ABh ;Bell of Destruction, from array 0806A644 2001 mov r0,1h ; 0806A646 F7FDF90D bl 8067864h ; 0806A64A 2184 mov r1,84h ; 0806A64C 00C9 lsl r1,r1,3h ;Mirror Force 0806A64E 2001 mov r0,1h ; 0806A650 F7FDF908 bl 8067864h ; 0806A654 3490 add r4,90h ;Enchanted Javelin 0806A656 2001 mov r0,1h ; 0806A658 1C21 mov r1,r4 ; 0806A65A F7FDF903 bl 8067864h ; 0806A65E 2001 mov r0,1h ; 0806A660 1C21 mov r1,r4 ; 0806A662 F7FDF8FF bl 8067864h ; 0806A666 4920 ldr r1,=44Bh ;Mirror Wall, from array 0806A668 2001 mov r0,1h ; 0806A66A F7FDF8FB bl 8067864h ; 0806A66E 342A add r4,2Ah ;Numinous Healer 0806A670 2001 mov r0,1h ; 0806A672 1C21 mov r1,r4 ; 0806A674 F7FDF8F6 bl 8067864h ; 0806A678 2001 mov r0,1h ; 0806A67A 1C21 mov r1,r4 ; 0806A67C F7FDF8F2 bl 8067864h ; 0806A680 491A ldr r1,=4BEh ;Magic Cylinder, from array 0806A682 2001 mov r0,1h ; 0806A684 F7FDF8EE bl 8067864h ; 0806A688 4C19 ldr r4,=2DAh ;Relinquished, from array 0806A68A 2001 mov r0,1h ; 0806A68C 1C21 mov r1,r4 ; 0806A68E F7FDF8E9 bl 8067864h ; 0806A692 2001 mov r0,1h ; 0806A694 1C21 mov r1,r4 ; 0806A696 F7FDF8E5 bl 8067864h ; 0806A69A 34E4 add r4,0E4h ;Black Illusion Ritual 0806A69C 2001 mov r0,1h ; 0806A69E 1C21 mov r1,r4 ; 0806A6A0 F7FDF8E0 bl 8067864h ; 0806A6A4 2001 mov r0,1h ; 0806A6A6 1C21 mov r1,r4 ; 0806A6A8 F7FDF8DC bl 8067864h ; 0806A6AC 4911 ldr r1,=535h ;Thousand-Eyes Idol, from array 0806A6AE 2001 mov r0,1h ; 0806A6B0 F7FDF8D8 bl 8067864h ; 0806A6B4 4910 ldr r1,=536h ;Thousand-Eyes Restrict, from array 0806A6B6 E349 b 806AD4Ch ;
Maximillion Pegasus card_id array
D7 02 00 00 FE 02 00 00 5B 04 00 00 45 03 00 00 E6 04 00 00 4F 01 00 00 5B 01 00 00 03 04 00 00 2C 04 00 00 4E 02 00 00 52 04 00 00 AB 03 00 00 4B 04 00 00 BE 04 00 00 DA 02 00 00 35 05 00 00 36 05 00 00 Toon Mermaid Blue-Eyes Toon Dragon Nimble Momonga Vorse Raider Slate Warrior Dark Hole Swords of Revealing Light Change of Heart Snatch Steal Morphing Jar Cyber Jar Bell of Destruction Mirror Wall Magic Cylinder Relinquished Thousand-Eyes Idol Thousand-Eyes Restrict
Marik Ishtar
Marik Ishtar's deck subroutine
0806A6FC 2001 mov r0,1h ; 0806A6FE 2115 mov r1,15h ;Summoned Skull 0806A700 F7FDF8B0 bl 8067864h ; 0806A704 2001 mov r0,1h ; 0806A706 2115 mov r1,15h ;Summoned Skull 0806A708 F7FDF8AC bl 8067864h ; 0806A70C 4C5C ldr r4,=345h ;Vorse Raider, from array 0806A70E 2001 mov r0,1h ; 0806A710 1C21 mov r1,r4 ; 0806A712 F7FDF8A7 bl 8067864h ; 0806A716 2001 mov r0,1h ; 0806A718 1C21 mov r1,r4 ; 0806A71A F7FDF8A3 bl 8067864h ; 0806A71E 2001 mov r0,1h ; 0806A720 1C21 mov r1,r4 ; 0806A722 F7FDF89F bl 8067864h ; 0806A726 2001 mov r0,1h ; 0806A728 2171 mov r1,71h ;White Magical Hat 0806A72A F7FDF89B bl 8067864h ; 0806A72E 2001 mov r0,1h ; 0806A730 2171 mov r1,71h ;White Magical Hat 0806A732 F7FDF897 bl 8067864h ; 0806A736 4C53 ldr r4,=1ABh ;Magician of Faith, from array 0806A738 2001 mov r0,1h ; 0806A73A 1C21 mov r1,r4 ; 0806A73C F7FDF892 bl 8067864h ; 0806A740 2001 mov r0,1h ; 0806A742 1C21 mov r1,r4 ; 0806A744 F7FDF88E bl 8067864h ; 0806A748 2001 mov r0,1h ; 0806A74A 1C21 mov r1,r4 ; 0806A74C F7FDF88A bl 8067864h ; 0806A750 3449 add r4,49h ; 0806A752 2001 mov r0,1h ;Man-Eater Bug 0806A754 1C21 mov r1,r4 ; 0806A756 F7FDF885 bl 8067864h ; 0806A75A 2001 mov r0,1h ; 0806A75C 1C21 mov r1,r4 ; 0806A75E F7FDF881 bl 8067864h ; 0806A762 2001 mov r0,1h ; 0806A764 1C21 mov r1,r4 ; 0806A766 F7FDF87D bl 8067864h ; 0806A76A 3416 add r4,16h ;The Bistro Butcher 0806A76C 2001 mov r0,1h ; 0806A76E 1C21 mov r1,r4 ; 0806A770 F7FDF878 bl 8067864h ; 0806A774 2001 mov r0,1h ; 0806A776 1C21 mov r1,r4 ; 0806A778 F7FDF874 bl 8067864h ; 0806A77C 2001 mov r0,1h ; 0806A77E 1C21 mov r1,r4 ; 0806A780 F7FDF870 bl 8067864h ; 0806A784 3444 add r4,44h ;Morphing Jar 0806A786 2001 mov r0,1h ; 0806A788 1C21 mov r1,r4 ; 0806A78A F7FDF86B bl 8067864h ; 0806A78E 2001 mov r0,1h ; 0806A790 1C21 mov r1,r4 ; 0806A792 F7FDF867 bl 8067864h ; 0806A796 493C ldr r1,=452h ;Cyber Jar, from array 0806A798 2001 mov r0,1h ; 0806A79A F7FDF863 bl 8067864h ; 0806A79E 493B ldr r1,=48Bh ;Morphing Jar #2, from array 0806A7A0 2001 mov r0,1h ; 0806A7A2 F7FDF85F bl 8067864h ; 0806A7A6 4C3A ldr r4,=3FFh ;Tribute to The Doomed, from array 0806A7A8 2001 mov r0,1h ; 0806A7AA 1C21 mov r1,r4 ; 0806A7AC F7FDF85A bl 8067864h ; 0806A7B0 2001 mov r0,1h ; 0806A7B2 1C21 mov r1,r4 ; 0806A7B4 F7FDF856 bl 8067864h ; 0806A7B8 4936 ldr r1,=4E6h ;Slate Warrior, from array 0806A7BA 2001 mov r0,1h ; 0806A7BC F7FDF852 bl 8067864h ; 0806A7C0 4935 ldr r1,=14Fh ;Dark Hole, from array 0806A7C2 2001 mov r0,1h ; 0806A7C4 F7FDF84E bl 8067864h ; 0806A7C8 21A8 mov r1,0A8h ; 0806A7CA 0049 lsl r1,r1,1h ;Raigeki 0806A7CC 2001 mov r0,1h ; 0806A7CE F7FDF849 bl 8067864h ; 0806A7D2 21FC mov r1,0FCh ; 0806A7D4 0089 lsl r1,r1,2h ;Monster Reborn 0806A7D6 2001 mov r0,1h ; 0806A7D8 F7FDF844 bl 8067864h ; 0806A7DC 492F ldr r1,=403h ;Change of Heart, from array 0806A7DE 2001 mov r0,1h ; 0806A7E0 F7FDF840 bl 8067864h ; 0806A7E4 492E ldr r1,=40Fh ;Restructer Revolution, from array 0806A7E6 2001 mov r0,1h ; 0806A7E8 F7FDF83C bl 8067864h ; 0806A7EC 492D ldr r1,=42Ch ;Snatch Steal, from array 0806A7EE 2001 mov r0,1h ; 0806A7F0 F7FDF838 bl 8067864h ; 0806A7F4 3430 add r4,30h ;Delinquent Duo 0806A7F6 2001 mov r0,1h ; 0806A7F8 1C21 mov r1,r4 ; 0806A7FA F7FDF833 bl 8067864h ; 0806A7FE 2001 mov r0,1h ; 0806A800 1C21 mov r1,r4 ; 0806A802 F7FDF82F bl 8067864h ; 0806A806 3408 add r4,8h ;Mystical Space Typhoon 0806A808 2001 mov r0,1h ; 0806A80A 1C21 mov r1,r4 ; 0806A80C F7FDF82A bl 8067864h ; 0806A810 2001 mov r0,1h ; 0806A812 1C21 mov r1,r4 ; 0806A814 F7FDF826 bl 8067864h ; 0806A818 3451 add r4,51h ;Premature Burial 0806A81A 2001 mov r0,1h ; 0806A81C 1C21 mov r1,r4 ; 0806A81E F7FDF821 bl 8067864h ; 0806A822 2001 mov r0,1h ; 0806A824 1C21 mov r1,r4 ; 0806A826 F7FDF81D bl 8067864h ; 0806A82A 491F ldr r1,=4C5h ;Card Destruction, from array 0806A82C 2001 mov r0,1h ; 0806A82E F7FDF819 bl 8067864h ; 0806A832 491E ldr r1,=3ABh ;Bell of Destruction, from array 0806A834 2001 mov r0,1h ; 0806A836 F7FDF815 bl 8067864h ; 0806A83A 3C83 sub r4,83h ;Magic Jammer 0806A83C 2001 mov r0,1h ; 0806A83E 1C21 mov r1,r4 ; 0806A840 F7FDF810 bl 8067864h ; 0806A844 2001 mov r0,1h ; 0806A846 1C21 mov r1,r4 ; 0806A848 F7FDF80C bl 8067864h ; 0806A84C 3403 add r4,3h ;Just Desserts 0806A84E 2001 mov r0,1h ; 0806A850 1C21 mov r1,r4 ; 0806A852 F7FDF807 bl 8067864h ; 0806A856 2001 mov r0,1h ; 0806A858 1C21 mov r1,r4 ; 0806A85A F7FDF803 bl 8067864h ; 0806A85E 3406 add r4,6h ;Magic Thorn 0806A860 2001 mov r0,1h ; 0806A862 1C21 mov r1,r4 ; 0806A864 F7FCFFFE bl 8067864h ; 0806A868 2001 mov r0,1h ; 0806A86A 1C21 mov r1,r4 ; 0806A86C F7FCFFFA bl 8067864h ; 0806A870 2184 mov r1,84h ; 0806A872 00C9 lsl r1,r1,3h ;Mirror Force 0806A874 2001 mov r0,1h ; 0806A876 F7FCFFF5 bl 8067864h ; 0806A87A 490D ldr r1,=4BEh ;Magic Cylinder, from array 0806A87C E266 b 806AD4Ch ;
Marik Ishtar card_id array
45 03 00 00 AB 01 00 00 52 04 00 00 8B 04 00 00 FF 03 00 00 E6 04 00 00 4F 01 00 00 03 04 00 00 0F 04 00 00 2C 04 00 00 C5 04 00 00 AB 03 00 00 BE 04 00 00 Vorse Raider Magician of Faith Cyber Jar Morphing Jar #2 Tribute to The Doomed Slate Warrior Dark Hole Change of Heart Restructer Revolution Snatch Steal Card Destruction Bell of Destruction Magic Cylinder
Yami Bakura
Yami Bakura's deck subroutine
0806A8B4 2001 mov r0,1h ; 0806A8B6 2115 mov r1,15h ;Summoned Skull 0806A8B8 F7FCFFD4 bl 8067864h ; 0806A8BC 2001 mov r0,1h ; 0806A8BE 2115 mov r1,15h ;Summoned Skull 0806A8C0 F7FCFFD0 bl 8067864h ; 0806A8C4 24BD mov r4,0BDh ; 0806A8C6 0064 lsl r4,r4,1h ;La Jinn the Mystical Genie of the Lamp 0806A8C8 2001 mov r0,1h ; 0806A8CA 1C21 mov r1,r4 ; 0806A8CC F7FCFFCA bl 8067864h ; 0806A8D0 2001 mov r0,1h ; 0806A8D2 1C21 mov r1,r4 ; 0806A8D4 F7FCFFC6 bl 8067864h ; 0806A8D8 2001 mov r0,1h ; 0806A8DA 1C21 mov r1,r4 ; 0806A8DC F7FCFFC2 bl 8067864h ; 0806A8E0 3431 add r4,31h ;Magician of Faith 0806A8E2 2001 mov r0,1h ; 0806A8E4 1C21 mov r1,r4 ; 0806A8E6 F7FCFFBD bl 8067864h ; 0806A8EA 2001 mov r0,1h ; 0806A8EC 1C21 mov r1,r4 ; 0806A8EE F7FCFFB9 bl 8067864h ; 0806A8F2 345F add r4,5Fh ;The Bistro Butcher 0806A8F4 2001 mov r0,1h ; 0806A8F6 1C21 mov r1,r4 ; 0806A8F8 F7FCFFB4 bl 8067864h ; 0806A8FC 2001 mov r0,1h ; 0806A8FE 1C21 mov r1,r4 ; 0806A900 F7FCFFB0 bl 8067864h ; 0806A904 3433 add r4,33h ;Witch of the Black Forest 0806A906 2001 mov r0,1h ; 0806A908 1C21 mov r1,r4 ; 0806A90A F7FCFFAB bl 8067864h ; 0806A90E 2001 mov r0,1h ; 0806A910 1C21 mov r1,r4 ; 0806A912 F7FCFFA7 bl 8067864h ; 0806A916 4C40 ldr r4,=419h ;Wall of Illusion, from array 0806A918 2001 mov r0,1h ; 0806A91A 1C21 mov r1,r4 ; 0806A91C F7FCFFA2 bl 8067864h ; 0806A920 2001 mov r0,1h ; 0806A922 1C21 mov r1,r4 ; 0806A924 F7FCFF9E bl 8067864h ; 0806A928 2001 mov r0,1h ; 0806A92A 1C21 mov r1,r4 ; 0806A92C F7FCFF9A bl 8067864h ; 0806A930 493A ldr r1,=4E6h ;Slate Warrior, from array 0806A932 2001 mov r0,1h ; 0806A934 F7FCFF96 bl 8067864h ; 0806A938 4C39 ldr r4,=12Fh ;Axe of Despair, from array 0806A93A 2001 mov r0,1h ; 0806A93C 1C21 mov r1,r4 ; 0806A93E F7FCFF91 bl 8067864h ; 0806A942 2001 mov r0,1h ; 0806A944 1C21 mov r1,r4 ; 0806A946 F7FCFF8D bl 8067864h ; 0806A94A 3407 add r4,7h ;Black Pendant 0806A94C 2001 mov r0,1h ; 0806A94E 1C21 mov r1,r4 ; 0806A950 F7FCFF88 bl 8067864h ; 0806A954 2001 mov r0,1h ; 0806A956 1C21 mov r1,r4 ; 0806A958 F7FCFF84 bl 8067864h ; 0806A95C 4931 ldr r1,=14Fh ;Dark Hole, from array 0806A95E 2001 mov r0,1h ; 0806A960 F7FCFF80 bl 8067864h ; 0806A964 21A8 mov r1,0A8h ; 0806A966 0049 lsl r1,r1,1h ;Raigeki 0806A968 2001 mov r0,1h ; 0806A96A F7FCFF7B bl 8067864h ; 0806A96E 21FC mov r1,0FCh ; 0806A970 0089 lsl r1,r1,2h ;Monster Reborn 0806A972 2001 mov r0,1h ; 0806A974 F7FCFF76 bl 8067864h ; 0806A978 4C2B ldr r4,=3FFh ;Tribute to The Doomed, from array 0806A97A 2001 mov r0,1h ; 0806A97C 1C21 mov r1,r4 ; 0806A97E F7FCFF71 bl 8067864h ; 0806A982 2001 mov r0,1h ; 0806A984 1C21 mov r1,r4 ; 0806A986 F7FCFF6D bl 8067864h ; 0806A98A 3428 add r4,28h ;Gravekeeper's Servant 0806A98C 2001 mov r0,1h ; 0806A98E 1C21 mov r1,r4 ; 0806A990 F7FCFF68 bl 8067864h ; 0806A994 2001 mov r0,1h ; 0806A996 1C21 mov r1,r4 ; 0806A998 F7FCFF64 bl 8067864h ; 0806A99C 3410 add r4,10h ;Mystical Space Typhoon 0806A99E 2001 mov r0,1h ; 0806A9A0 1C21 mov r1,r4 ; 0806A9A2 F7FCFF5F bl 8067864h ; 0806A9A6 2001 mov r0,1h ; 0806A9A8 1C21 mov r1,r4 ; 0806A9AA F7FCFF5B bl 8067864h ; 0806A9AE 3451 add r4,51h ;Premature Burial 0806A9B0 2001 mov r0,1h ; 0806A9B2 1C21 mov r1,r4 ; 0806A9B4 F7FCFF56 bl 8067864h ; 0806A9B8 2001 mov r0,1h ; 0806A9BA 1C21 mov r1,r4 ; 0806A9BC F7FCFF52 bl 8067864h ; 0806A9C0 491A ldr r1,=605h ;Spirit Message "I", from array 0806A9C2 2001 mov r0,1h ; 0806A9C4 F7FCFF4E bl 8067864h ; 0806A9C8 4919 ldr r1,=606h ;Spirit Message "N", from array 0806A9CA 2001 mov r0,1h ; 0806A9CC F7FCFF4A bl 8067864h ; 0806A9D0 4918 ldr r1,=607h ;Spirit Message "A", from array 0806A9D2 2001 mov r0,1h ; 0806A9D4 F7FCFF46 bl 8067864h ; 0806A9D8 21C1 mov r1,0C1h ; 0806A9DA 00C9 lsl r1,r1,3h ;Spirit Message "L" 0806A9DC 2001 mov r0,1h ; 0806A9DE F7FCFF41 bl 8067864h ; 0806A9E2 3CDD sub r4,0DDh ;Bell of Destruction 0806A9E4 2001 mov r0,1h ; 0806A9E6 1C21 mov r1,r4 ; 0806A9E8 F7FCFF3C bl 8067864h ; 0806A9EC 2001 mov r0,1h ; 0806A9EE 1C21 mov r1,r4 ; 0806A9F0 F7FCFF38 bl 8067864h ; 0806A9F4 2184 mov r1,84h ; 0806A9F6 00C9 lsl r1,r1,3h ;Mirror Force 0806A9F8 2001 mov r0,1h ; 0806A9FA F7FCFF33 bl 8067864h ; 0806A9FE 4C0E ldr r4,=4BEh ;Magic Cylinder, from array 0806AA00 2001 mov r0,1h ; 0806AA02 1C21 mov r1,r4 ; 0806AA04 F7FCFF2E bl 8067864h ; 0806AA08 2001 mov r0,1h ; 0806AA0A 1C21 mov r1,r4 ; 0806AA0C F7FCFF2A bl 8067864h ; 0806AA10 21BF mov r1,0BFh ;Destiny Board 0806AA12 00C9 lsl r1,r1,3h ; 0806AA14 E19A b 806AD4Ch ;
Yami Bakura card_id array
19 04 00 00 E6 04 00 00 2F 01 00 00 4F 01 00 00 FF 03 00 00 05 06 00 00 06 06 00 00 07 06 00 00 BE 04 00 00 Wall of Illusion Slate Warrior Axe of Despair Dark Hole Tribute to The Doomed Spirit Message "I" Spirit Message "N" Spirit Message "A" Magic Cylinder
Ishizu Ishtar
Ishizu Ishtar's deck subroutine
0806AA3C 495B ldr r1,=2C3h ;Cosmo Queen, from array 0806AA3E 2001 mov r0,1h ; 0806AA40 F7FCFF10 bl 8067864h ; 0806AA44 4C5A ldr r4,=31Ah ;Dunames Dark Witch, from array 0806AA46 2001 mov r0,1h ; 0806AA48 1C21 mov r1,r4 ; 0806AA4A F7FCFF0B bl 8067864h ; 0806AA4E 2001 mov r0,1h ; 0806AA50 1C21 mov r1,r4 ; 0806AA52 F7FCFF07 bl 8067864h ; 0806AA56 2001 mov r0,1h ; 0806AA58 1C21 mov r1,r4 ; 0806AA5A F7FCFF03 bl 8067864h ; 0806AA5E 4955 ldr r1,=542h ;Wingweaver, from array 0806AA60 2001 mov r0,1h ; 0806AA62 F7FCFEFF bl 8067864h ; 0806AA66 4C54 ldr r4,=1ABh ;Magician of Faith, from array 0806AA68 2001 mov r0,1h ; 0806AA6A 1C21 mov r1,r4 ; 0806AA6C F7FCFEFA bl 8067864h ; 0806AA70 2001 mov r0,1h ; 0806AA72 1C21 mov r1,r4 ; 0806AA74 F7FCFEF6 bl 8067864h ; 0806AA78 4C50 ldr r4,=453h ;Banisher of the Light, from array 0806AA7A 2001 mov r0,1h ; 0806AA7C 1C21 mov r1,r4 ; 0806AA7E F7FCFEF1 bl 8067864h ; 0806AA82 2001 mov r0,1h ; 0806AA84 1C21 mov r1,r4 ; 0806AA86 F7FCFEED bl 8067864h ; 0806AA8A 340A add r4,0Ah ; 0806AA8C 2001 mov r0,1h ; 0806AA8E 1C21 mov r1,r4 ; 0806AA90 F7FCFEE8 bl 8067864h ; 0806AA94 2001 mov r0,1h ; 0806AA96 1C21 mov r1,r4 ; 0806AA98 F7FCFEE4 bl 8067864h ; 0806AA9C 4C48 ldr r4,=5A2h ;Hysteric Fairy, from array 0806AA9E 2001 mov r0,1h ; 0806AAA0 1C21 mov r1,r4 ; 0806AAA2 F7FCFEDF bl 8067864h ; 0806AAA6 2001 mov r0,1h ; 0806AAA8 1C21 mov r1,r4 ; 0806AAAA F7FCFEDB bl 8067864h ; 0806AAAE 2001 mov r0,1h ; 0806AAB0 1C21 mov r1,r4 ; 0806AAB2 F7FCFED7 bl 8067864h ; 0806AAB6 3402 add r4,2h ;The Forgiving Maiden 0806AAB8 2001 mov r0,1h ; 0806AABA 1C21 mov r1,r4 ; 0806AABC F7FCFED2 bl 8067864h ; 0806AAC0 2001 mov r0,1h ; 0806AAC2 1C21 mov r1,r4 ; 0806AAC4 F7FCFECE bl 8067864h ; 0806AAC8 2001 mov r0,1h ; 0806AACA 1C21 mov r1,r4 ; 0806AACC F7FCFECA bl 8067864h ; 0806AAD0 3402 add r4,2h ;Marie the Fallen One 0806AAD2 2001 mov r0,1h ; 0806AAD4 1C21 mov r1,r4 ; 0806AAD6 F7FCFEC5 bl 8067864h ; 0806AADA 2001 mov r0,1h ; 0806AADC 1C21 mov r1,r4 ; 0806AADE F7FCFEC1 bl 8067864h ; 0806AAE2 2001 mov r0,1h ; 0806AAE4 1C21 mov r1,r4 ; 0806AAE6 F7FCFEBD bl 8067864h ; 0806AAEA 3445 add r4,45h ;Soul of Purity and Light 0806AAEC 2001 mov r0,1h ; 0806AAEE 1C21 mov r1,r4 ; 0806AAF0 F7FCFEB8 bl 8067864h ; 0806AAF4 2001 mov r0,1h ; 0806AAF6 1C21 mov r1,r4 ; 0806AAF8 F7FCFEB4 bl 8067864h ; 0806AAFC 3C46 sub r4,46h ;St. Joan 0806AAFE 2001 mov r0,1h ; 0806AB00 1C21 mov r1,r4 ; 0806AB02 F7FCFEAF bl 8067864h ; 0806AB06 2001 mov r0,1h ; 0806AB08 1C21 mov r1,r4 ; 0806AB0A F7FCFEAB bl 8067864h ; 0806AB0E 492D ldr r1,=14Fh ;Dark Hole, from array 0806AB10 2001 mov r0,1h ; 0806AB12 F7FCFEA7 bl 8067864h ; 0806AB16 21A8 mov r1,0A8h ; 0806AB18 0049 lsl r1,r1,1h ; 0806AB1A 2001 mov r0,1h ; 0806AB1C F7FCFEA2 bl 8067864h ; 0806AB20 4929 ldr r1,=15Bh ;Swords of Revealing Light, from array 0806AB22 2001 mov r0,1h ; 0806AB24 F7FCFE9E bl 8067864h ; 0806AB28 4C28 ldr r4,=3EBh ;Polymerization, from array 0806AB2A 2001 mov r0,1h ; 0806AB2C 1C21 mov r1,r4 ; 0806AB2E F7FCFE99 bl 8067864h ; 0806AB32 2001 mov r0,1h ; 0806AB34 1C21 mov r1,r4 ; 0806AB36 F7FCFE95 bl 8067864h ; 0806AB3A 21FC mov r1,0FCh ; 0806AB3C 0089 lsl r1,r1,2h ;Monster Reborn 0806AB3E 2001 mov r0,1h ; 0806AB40 F7FCFE90 bl 8067864h ; 0806AB44 347E add r4,7Eh ;Luminous Spark 0806AB46 2001 mov r0,1h ; 0806AB48 1C21 mov r1,r4 ; 0806AB4A F7FCFE8B bl 8067864h ; 0806AB4E 2001 mov r0,1h ; 0806AB50 1C21 mov r1,r4 ; 0806AB52 F7FCFE87 bl 8067864h ; 0806AB56 341F add r4,1Fh ;Premature Burial 0806AB58 2001 mov r0,1h ; 0806AB5A 1C21 mov r1,r4 ; 0806AB5C F7FCFE82 bl 8067864h ; 0806AB60 2001 mov r0,1h ; 0806AB62 1C21 mov r1,r4 ; 0806AB64 F7FCFE7E bl 8067864h ; 0806AB68 3CDD sub r4,0DDh ; 0806AB6A 2001 mov r0,1h ;Bell of Destruction 0806AB6C 1C21 mov r1,r4 ; 0806AB6E F7FCFE79 bl 8067864h ; 0806AB72 2001 mov r0,1h ; 0806AB74 1C21 mov r1,r4 ; 0806AB76 F7FCFE75 bl 8067864h ; 0806AB7A 2184 mov r1,84h ; 0806AB7C 00C9 lsl r1,r1,3h ;Mirror Force 0806AB7E 2001 mov r0,1h ; 0806AB80 F7FCFE70 bl 8067864h ; 0806AB84 4912 ldr r1,=47Eh ;Ceasefire, from array 0806AB86 2001 mov r0,1h ; 0806AB88 F7FCFE6C bl 8067864h ; 0806AB8C 4911 ldr r1,=47Fh ;Light of Intervention, from array 0806AB8E 2001 mov r0,1h ; 0806AB90 F7FCFE68 bl 8067864h ; 0806AB94 4C10 ldr r4,=4BEh ;Magic Cylinder, from array 0806AB96 2001 mov r0,1h ; 0806AB98 1C21 mov r1,r4 ; 0806AB9A F7FCFE63 bl 8067864h ; 0806AB9E 2001 mov r0,1h ; 0806ABA0 1C21 mov r1,r4 ; 0806ABA2 F7FCFE5F bl 8067864h ; 0806ABA6 490D ldr r1,=52Dh ;Shadow of Eyes, from array 0806ABA8 E0CC b 806AD44h ;
Ishizu Ishtar card_id array
C3 02 00 00 1A 03 00 00 42 05 00 00 AB 01 00 00 53 04 00 00 A2 05 00 00 4F 01 00 00 5B 01 00 00 EB 03 00 00 7E 04 00 00 7F 04 00 00 BE 04 00 00 2D 05 00 00 Cosmo Queen Dunames Dark Witch Wingweaver Magician of Faith Banisher of the Light Hysteric Fairy Dark Hole Swords of Revealing Light Polymerization Ceasefire Light of Intervention Magic Cylinder Shadow of Eyes
Seto Kaiba
Seto Kaiba's deck subroutine
0806ABE0 2001 mov r0,1h ; 0806ABE2 2100 mov r1,0h ;Blue-Eyes White Dragon 0806ABE4 F7FCFE3E bl 8067864h ; 0806ABE8 2001 mov r0,1h ; 0806ABEA 2100 mov r1,0h ;Blue-Eyes White Dragon 0806ABEC F7FCFE3A bl 8067864h ; 0806ABF0 2001 mov r0,1h ; 0806ABF2 2100 mov r1,0h ;Blue-Eyes White Dragon 0806ABF4 F7FCFE36 bl 8067864h ; 0806ABF8 4C56 ldr r4,=213h ;Gemini Elf, from array 0806ABFA 2001 mov r0,1h ; 0806ABFC 1C21 mov r1,r4 ; 0806ABFE F7FCFE31 bl 8067864h ; 0806AC02 2001 mov r0,1h ; 0806AC04 1C21 mov r1,r4 ; 0806AC06 F7FCFE2D bl 8067864h ; 0806AC0A 2001 mov r0,1h ; 0806AC0C 1C21 mov r1,r4 ; 0806AC0E F7FCFE29 bl 8067864h ; 0806AC12 4C51 ldr r4,=31Eh ;Cyber-Tech Alligator, from array 0806AC14 2001 mov r0,1h ; 0806AC16 1C21 mov r1,r4 ; 0806AC18 F7FCFE24 bl 8067864h ; 0806AC1C 2001 mov r0,1h ; 0806AC1E 1C21 mov r1,r4 ; 0806AC20 F7FCFE20 bl 8067864h ; 0806AC24 3427 add r4,27h ;Vorse Raider 0806AC26 2001 mov r0,1h ; 0806AC28 1C21 mov r1,r4 ; 0806AC2A F7FCFE1B bl 8067864h ; 0806AC2E 2001 mov r0,1h ; 0806AC30 1C21 mov r1,r4 ; 0806AC32 F7FCFE17 bl 8067864h ; 0806AC36 2001 mov r0,1h ; 0806AC38 1C21 mov r1,r4 ; 0806AC3A F7FCFE13 bl 8067864h ; 0806AC3E 4C47 ldr r4,=581h ;Gadget Soldier, from array 0806AC40 2001 mov r0,1h ; 0806AC42 1C21 mov r1,r4 ; 0806AC44 F7FCFE0E bl 8067864h ; 0806AC48 2001 mov r0,1h ; 0806AC4A 1C21 mov r1,r4 ; 0806AC4C F7FCFE0A bl 8067864h ; 0806AC50 4943 ldr r1,=1A3h ;Cyber-Stein, from array 0806AC52 2001 mov r0,1h ; 0806AC54 F7FCFE06 bl 8067864h ; 0806AC58 4C42 ldr r4,=1ABh ;Magician of Faith, from array 0806AC5A 2001 mov r0,1h ; 0806AC5C 1C21 mov r1,r4 ; 0806AC5E F7FCFE01 bl 8067864h ; 0806AC62 2001 mov r0,1h ; 0806AC64 1C21 mov r1,r4 ; 0806AC66 F7FCFDFD bl 8067864h ; 0806AC6A 493F ldr r1,=4E6h ;Slate Warrior, from array 0806AC6C 2001 mov r0,1h ; 0806AC6E F7FCFDF9 bl 8067864h ; 0806AC72 24A8 mov r4,0A8h ; 0806AC74 00E4 lsl r4,r4,3h ;Goblin Attack Force 0806AC76 2001 mov r0,1h ; 0806AC78 1C21 mov r1,r4 ; 0806AC7A F7FCFDF3 bl 8067864h ; 0806AC7E 2001 mov r0,1h ; 0806AC80 1C21 mov r1,r4 ; 0806AC82 F7FCFDEF bl 8067864h ; 0806AC86 2001 mov r0,1h ; 0806AC88 1C21 mov r1,r4 ; 0806AC8A F7FCFDEB bl 8067864h ; 0806AC8E 4C37 ldr r4,=17Bh ;Blue-Eyes Ultimate Dragon, from array 0806AC90 2001 mov r0,1h ; 0806AC92 1C21 mov r1,r4 ; 0806AC94 F7FCFDE6 bl 8067864h ; 0806AC98 2001 mov r0,1h ; 0806AC9A 1C21 mov r1,r4 ; 0806AC9C F7FCFDE2 bl 8067864h ; 0806ACA0 4933 ldr r1,=14Fh ;Dark Hole, from array 0806ACA2 2001 mov r0,1h ; 0806ACA4 F7FCFDDE bl 8067864h ; 0806ACA8 21A8 mov r1,0A8h ; 0806ACAA 0049 lsl r1,r1,1h ;Raigeki 0806ACAC 2001 mov r0,1h ; 0806ACAE F7FCFDD9 bl 8067864h ; 0806ACB2 21A4 mov r1,0A4h ; 0806ACB4 0089 lsl r1,r1,2h ;Megamorph 0806ACB6 2001 mov r0,1h ; 0806ACB8 F7FCFDD4 bl 8067864h ; 0806ACBC 492D ldr r1,=29Fh ;Harpie's Feather Duster, from array 0806ACBE 2001 mov r0,1h ; 0806ACC0 F7FCFDD0 bl 8067864h ; 0806ACC4 492C ldr r1,=3EBh ;Polymerization, from array 0806ACC6 2001 mov r0,1h ; 0806ACC8 F7FCFDCC bl 8067864h ; 0806ACCC 21FC mov r1,0FCh ; 0806ACCE 0089 lsl r1,r1,2h ;Monster Reborn 0806ACD0 2001 mov r0,1h ; 0806ACD2 F7FCFDC7 bl 8067864h ; 0806ACD6 4C29 ldr r4,=425h ;Heavy Storm, from array 0806ACD8 2001 mov r0,1h ; 0806ACDA 1C21 mov r1,r4 ; 0806ACDC F7FCFDC2 bl 8067864h ; 0806ACE0 2001 mov r0,1h ; 0806ACE2 1C21 mov r1,r4 ; 0806ACE4 F7FCFDBE bl 8067864h ; 0806ACE8 3463 add r4,63h ;Premature Burial 0806ACEA 2001 mov r0,1h ; 0806ACEC 1C21 mov r1,r4 ; 0806ACEE F7FCFDB9 bl 8067864h ; 0806ACF2 2001 mov r0,1h ; 0806ACF4 1C21 mov r1,r4 ; 0806ACF6 F7FCFDB5 bl 8067864h ; 0806ACFA 3CDD sub r4,0DDh ;Bell of Destruction 0806ACFC 2001 mov r0,1h ; 0806ACFE 1C21 mov r1,r4 ; 0806AD00 F7FCFDB0 bl 8067864h ; 0806AD04 2001 mov r0,1h ; 0806AD06 1C21 mov r1,r4 ; 0806AD08 F7FCFDAC bl 8067864h ; 0806AD0C 3415 add r4,15h ;Negate Attack 0806AD0E 2001 mov r0,1h ; 0806AD10 1C21 mov r1,r4 ; 0806AD12 F7FCFDA7 bl 8067864h ; 0806AD16 2001 mov r0,1h ; 0806AD18 1C21 mov r1,r4 ; 0806AD1A F7FCFDA3 bl 8067864h ; 0806AD1E 3445 add r4,45h ;Magic Jammer 0806AD20 2001 mov r0,1h ; 0806AD22 1C21 mov r1,r4 ; 0806AD24 F7FCFD9E bl 8067864h ; 0806AD28 2001 mov r0,1h ; 0806AD2A 1C21 mov r1,r4 ; 0806AD2C F7FCFD9A bl 8067864h ; 0806AD30 2184 mov r1,84h ; 0806AD32 00C9 lsl r1,r1,3h ;Mirror Force 0806AD34 2001 mov r0,1h ; 0806AD36 F7FCFD95 bl 8067864h ; 0806AD3A 4911 ldr r1,=447h ;Call Of The Haunted, from array 0806AD3C 2001 mov r0,1h ; 0806AD3E F7FCFD91 bl 8067864h ; 0806AD42 4910 ldr r1,=4BEh ;Magic Cylinder, from array 0806AD44 2001 mov r0,1h ; 0806AD46 F7FCFD8D bl 8067864h ; 0806AD4A 490F ldr r1,=591h ;Torrential Tribute, from array 0806AD4C 2001 mov r0,1h ; 0806AD4E F7FCFD89 bl 8067864h ; 0806AD52 E1BF b 806B0D4h ;
Seto Kaiba card_id array
- 0x6AD54
13 02 00 00 1E 03 00 00 81 05 00 00 A3 01 00 00 AB 01 00 00 E6 04 00 00 7B 01 00 00 4F 01 00 00 9F 02 00 00 EB 03 00 00 25 04 00 00 47 04 00 00 BE 04 00 00 91 05 00 00 Gemini Elf Cyber-Tech Alligator Gadget Soldier Cyber-Stein Magician of Faith Slate Warrior Blue-Eyes Ultimate Dragon Dark Hole Harpie's Feather Duster Polymerization Heavy Storm Call Of The Haunted Magic Cylinder Torrential Tribute
Yami Marik
Yami Marik's deck subroutine
0806AD8C 2001 mov r0,1h ; 0806AD8E 2165 mov r1,65h ;Mask of Darkness 0806AD90 F7FCFD68 bl 8067864h ; 0806AD94 2001 mov r0,1h ; 0806AD96 2165 mov r1,65h ;Mask of Darkness 0806AD98 F7FCFD64 bl 8067864h ; 0806AD9C 2001 mov r0,1h ; 0806AD9E 2171 mov r1,71h ;White Magical Hat 0806ADA0 F7FCFD60 bl 8067864h ; 0806ADA4 2001 mov r0,1h ; 0806ADA6 2171 mov r1,71h ;White Magical Hat 0806ADA8 F7FCFD5C bl 8067864h ; 0806ADAC 2001 mov r0,1h ; 0806ADAE 2171 mov r1,71h ;White Magical Hat 0806ADB0 F7FCFD58 bl 8067864h ; 0806ADB4 4C5E ldr r4,=1ABh ;Magician of Faith, from array 0806ADB6 2001 mov r0,1h ; 0806ADB8 1C21 mov r1,r4 ; 0806ADBA F7FCFD53 bl 8067864h ; 0806ADBE 2001 mov r0,1h ; 0806ADC0 1C21 mov r1,r4 ; 0806ADC2 F7FCFD4F bl 8067864h ; 0806ADC6 3449 add r4,49h ;Man-Eater Bug 0806ADC8 2001 mov r0,1h ; 0806ADCA 1C21 mov r1,r4 ; 0806ADCC F7FCFD4A bl 8067864h ; 0806ADD0 2001 mov r0,1h ; 0806ADD2 1C21 mov r1,r4 ; 0806ADD4 F7FCFD46 bl 8067864h ; 0806ADD8 340F add r4,0Fh ;Muka Muka 0806ADDA 2001 mov r0,1h ; 0806ADDC 1C21 mov r1,r4 ; 0806ADDE F7FCFD41 bl 8067864h ; 0806ADE2 2001 mov r0,1h ; 0806ADE4 1C21 mov r1,r4 ; 0806ADE6 F7FCFD3D bl 8067864h ; 0806ADEA 2001 mov r0,1h ; 0806ADEC 1C21 mov r1,r4 ; 0806ADEE F7FCFD39 bl 8067864h ; 0806ADF2 344B add r4,4Bh ;Morphing Jar 0806ADF4 2001 mov r0,1h ; 0806ADF6 1C21 mov r1,r4 ; 0806ADF8 F7FCFD34 bl 8067864h ; 0806ADFC 2001 mov r0,1h ; 0806ADFE 1C21 mov r1,r4 ; 0806AE00 F7FCFD30 bl 8067864h ; 0806AE04 2001 mov r0,1h ; 0806AE06 1C21 mov r1,r4 ; 0806AE08 F7FCFD2C bl 8067864h ; 0806AE0C 4949 ldr r1,=452h ;Cyber Jar, from array 0806AE0E 2001 mov r0,1h ; 0806AE10 F7FCFD28 bl 8067864h ; 0806AE14 4C48 ldr r4,=48Bh ;Morphing Jar #2, from array 0806AE16 2001 mov r0,1h ; 0806AE18 1C21 mov r1,r4 ; 0806AE1A F7FCFD23 bl 8067864h ; 0806AE1E 2001 mov r0,1h ; 0806AE20 1C21 mov r1,r4 ; 0806AE22 F7FCFD1F bl 8067864h ; 0806AE26 4945 ldr r1,=14Fh ;Dark Hole, from array 0806AE28 2001 mov r0,1h ; 0806AE2A F7FCFD1B bl 8067864h ; 0806AE2E 21A8 mov r1,0A8h ; 0806AE30 0049 lsl r1,r1,1h ;Raigeki 0806AE32 2001 mov r0,1h ; 0806AE34 F7FCFD16 bl 8067864h ; 0806AE38 4941 ldr r1,=29Fh ;Harpie's Feather Duster, from array 0806AE3A 2001 mov r0,1h ; 0806AE3C F7FCFD12 bl 8067864h ; 0806AE40 21FC mov r1,0FCh ; 0806AE42 0089 lsl r1,r1,2h ;Monster Reborn 0806AE44 2001 mov r0,1h ; 0806AE46 F7FCFD0D bl 8067864h ; 0806AE4A 493E ldr r1,=403h ;Change of Heart, from array 0806AE4C 2001 mov r0,1h ; 0806AE4E F7FCFD09 bl 8067864h ; 0806AE52 3C64 sub r4,64h ;Gravekeeper's Servant 0806AE54 2001 mov r0,1h ; 0806AE56 1C21 mov r1,r4 ; 0806AE58 F7FCFD04 bl 8067864h ; 0806AE5C 2001 mov r0,1h ; 0806AE5E 1C21 mov r1,r4 ; 0806AE60 F7FCFD00 bl 8067864h ; 0806AE64 2001 mov r0,1h ; 0806AE66 1C21 mov r1,r4 ; 0806AE68 F7FCFCFC bl 8067864h ; 0806AE6C 4936 ldr r1,=42Ch ;Snatch Steal, from array 0806AE6E 2001 mov r0,1h ; 0806AE70 F7FCFCF8 bl 8067864h ; 0806AE74 3408 add r4,8h ;Delinquent Duo 0806AE76 2001 mov r0,1h ; 0806AE78 1C21 mov r1,r4 ; 0806AE7A F7FCFCF3 bl 8067864h ; 0806AE7E 2001 mov r0,1h ; 0806AE80 1C21 mov r1,r4 ; 0806AE82 F7FCFCEF bl 8067864h ; 0806AE86 3408 add r4,8h ;Mystical Space Typhoon 0806AE88 2001 mov r0,1h ; 0806AE8A 1C21 mov r1,r4 ; 0806AE8C F7FCFCEA bl 8067864h ; 0806AE90 2001 mov r0,1h ; 0806AE92 1C21 mov r1,r4 ; 0806AE94 F7FCFCE6 bl 8067864h ; 0806AE98 348E add r4,8Eh ;Card Destruction 0806AE9A 2001 mov r0,1h ; 0806AE9C 1C21 mov r1,r4 ; 0806AE9E F7FCFCE1 bl 8067864h ; 0806AEA2 2001 mov r0,1h ; 0806AEA4 1C21 mov r1,r4 ; 0806AEA6 F7FCFCDD bl 8067864h ; 0806AEAA 2001 mov r0,1h ; 0806AEAC 1C21 mov r1,r4 ; 0806AEAE F7FCFCD9 bl 8067864h ; 0806AEB2 34CE add r4,0CEh ;Infinite Cards 0806AEB4 2001 mov r0,1h ; 0806AEB6 1C21 mov r1,r4 ; 0806AEB8 F7FCFCD4 bl 8067864h ; 0806AEBC 2001 mov r0,1h ; 0806AEBE 1C21 mov r1,r4 ; 0806AEC0 F7FCFCD0 bl 8067864h ; 0806AEC4 4C21 ldr r4,=3ABh ;Bell of Destruction, from array 0806AEC6 2001 mov r0,1h ; 0806AEC8 1C21 mov r1,r4 ; 0806AECA F7FCFCCB bl 8067864h ; 0806AECE 2001 mov r0,1h ; 0806AED0 1C21 mov r1,r4 ; 0806AED2 F7FCFCC7 bl 8067864h ; 0806AED6 2184 mov r1,84h ;Mirror Force 0806AED8 00C9 lsl r1,r1,3h ; 0806AEDA 2001 mov r0,1h ; 0806AEDC F7FCFCC2 bl 8067864h ; 0806AEE0 491B ldr r1,=447h ;Call Of The Haunted, from array 0806AEE2 2001 mov r0,1h ; 0806AEE4 F7FCFCBE bl 8067864h ; 0806AEE8 491A ldr r1,=4BEh ;Magic Cylinder, from array 0806AEEA 2001 mov r0,1h ; 0806AEEC F7FCFCBA bl 8067864h ; 0806AEF0 4C19 ldr r4,=52Bh ;Gravity Bind, from array 0806AEF2 2001 mov r0,1h ; 0806AEF4 1C21 mov r1,r4 ; 0806AEF6 F7FCFCB5 bl 8067864h ; 0806AEFA 2001 mov r0,1h ; 0806AEFC 1C21 mov r1,r4 ; 0806AEFE F7FCFCB1 bl 8067864h ; 0806AF02 3465 add r4,65h ;Fairy Box 0806AF04 2001 mov r0,1h ; 0806AF06 1C21 mov r1,r4 ; 0806AF08 F7FCFCAC bl 8067864h ; 0806AF0C 2001 mov r0,1h ; 0806AF0E 1C21 mov r1,r4 ; 0806AF10 F7FCFCA8 bl 8067864h ; 0806AF14 4C11 ldr r4,=591h ;Torrential Tribute, from array 0806AF16 2001 mov r0,1h ; 0806AF18 1C21 mov r1,r4 ; 0806AF1A F7FCFCA3 bl 8067864h ; 0806AF1E 2001 mov r0,1h ; 0806AF20 1C21 mov r1,r4 ; 0806AF22 F7FCFC9F bl 8067864h ; 0806AF26 2001 mov r0,1h ; 0806AF28 1C21 mov r1,r4 ; 0806AF2A F7FCFC9B bl 8067864h ; 0806AF2E E0D1 b 806B0D4h ;
Yami Marik card_id array
- 0x6AF32
AB 01 00 00 52 04 00 00 8B 04 00 00 4F 01 00 00 9F 02 00 00 03 04 00 00 2C 04 00 00 AB 03 00 00 47 04 00 00 BE 04 00 00 2B 05 00 00 91 05 00 00 Magician of Faith Cyber Jar Morphing Jar #2 Dark Hole Harpie's Feather Duster Change of Heart Snatch Steal Bell of Destruction Call Of The Haunted Magic Cylinder Gravity Bind Torrential Tribute
Yami Yugi + branch depending on cpu_opponent_internal_id
Yami Yugi's deck subroutine
0806AF60 2001 mov r0,1h ; 0806AF62 2115 mov r1,15h ;Summoned Skull 0806AF64 F7FCFC7E bl 8067864h ; 0806AF68 2001 mov r0,1h ; 0806AF6A 2115 mov r1,15h ;Summoned Skull 0806AF6C F7FCFC7A bl 8067864h ; 0806AF70 2001 mov r0,1h ; 0806AF72 2122 mov r1,22h ;Dark Magician 0806AF74 F7FCFC76 bl 8067864h ; 0806AF78 2001 mov r0,1h ; 0806AF7A 2122 mov r1,22h ;Dark Magician 0806AF7C F7FCFC72 bl 8067864h ; 0806AF80 4C58 ldr r4,=213h ;Gemini Elf, from array 0806AF82 2001 mov r0,1h ; 0806AF84 1C21 mov r1,r4 ; 0806AF86 F7FCFC6D bl 8067864h ; 0806AF8A 2001 mov r0,1h ; 0806AF8C 1C21 mov r1,r4 ; 0806AF8E F7FCFC69 bl 8067864h ; 0806AF92 2001 mov r0,1h ; 0806AF94 1C21 mov r1,r4 ; 0806AF96 F7FCFC65 bl 8067864h ; 0806AF9A 34CE add r4,0CEh ;Alpha The Magnet Warrior 0806AF9C 2001 mov r0,1h ; 0806AF9E 1C21 mov r1,r4 ; 0806AFA0 F7FCFC60 bl 8067864h ; 0806AFA4 2001 mov r0,1h ; 0806AFA6 1C21 mov r1,r4 ; 0806AFA8 F7FCFC5C bl 8067864h ; 0806AFAC 2001 mov r0,1h ; 0806AFAE 1C21 mov r1,r4 ; 0806AFB0 F7FCFC58 bl 8067864h ; 0806AFB4 3413 add r4,13h ;Beta The Magnet Warrior 0806AFB6 2001 mov r0,1h ; 0806AFB8 1C21 mov r1,r4 ; 0806AFBA F7FCFC53 bl 8067864h ; 0806AFBE 2001 mov r0,1h ; 0806AFC0 1C21 mov r1,r4 ; 0806AFC2 F7FCFC4F bl 8067864h ; 0806AFC6 2001 mov r0,1h ; 0806AFC8 1C21 mov r1,r4 ; 0806AFCA F7FCFC4B bl 8067864h ; 0806AFCE 342C add r4,2Ch ;Gamma The Magnet Warrior 0806AFD0 2001 mov r0,1h ; 0806AFD2 1C21 mov r1,r4 ; 0806AFD4 F7FCFC46 bl 8067864h ; 0806AFD8 2001 mov r0,1h ; 0806AFDA 1C21 mov r1,r4 ; 0806AFDC F7FCFC42 bl 8067864h ; 0806AFE0 2001 mov r0,1h ; 0806AFE2 1C21 mov r1,r4 ; 0806AFE4 F7FCFC3E bl 8067864h ; 0806AFE8 4C3F ldr r4,=1ABh ;Magician of Faith, from array 0806AFEA 2001 mov r0,1h ; 0806AFEC 1C21 mov r1,r4 ; 0806AFEE F7FCFC39 bl 8067864h ; 0806AFF2 2001 mov r0,1h ; 0806AFF4 1C21 mov r1,r4 ; 0806AFF6 F7FCFC35 bl 8067864h ; 0806AFFA 4C3C ldr r4,=2F7h ;Dark Magician Girl 0806AFFC 2001 mov r0,1h ; 0806AFFE 1C21 mov r1,r4 ; 0806B000 F7FCFC30 bl 8067864h ; 0806B004 2001 mov r0,1h ; 0806B006 1C21 mov r1,r4 ; 0806B008 F7FCFC2C bl 8067864h ; 0806B00C 2001 mov r0,1h ; 0806B00E 1C21 mov r1,r4 ; 0806B010 F7FCFC28 bl 8067864h ; 0806B014 3456 add r4,56h ;Valkyrion the Magna Warrior 0806B016 2001 mov r0,1h ; 0806B018 1C21 mov r1,r4 ; 0806B01A F7FCFC23 bl 8067864h ; 0806B01E 2001 mov r0,1h ; 0806B020 1C21 mov r1,r4 ; 0806B022 F7FCFC1F bl 8067864h ; 0806B026 4932 ldr r1,=452h ;Cyber Jar, from array 0806B028 2001 mov r0,1h ; 0806B02A F7FCFC1B bl 8067864h ; 0806B02E 3C7C sub r4,7Ch ;Magician of Black Chaos 0806B030 2001 mov r0,1h ; 0806B032 1C21 mov r1,r4 ; 0806B034 F7FCFC16 bl 8067864h ; 0806B038 2001 mov r0,1h ; 0806B03A 1C21 mov r1,r4 ; 0806B03C F7FCFC12 bl 8067864h ; 0806B040 2001 mov r0,1h ; 0806B042 1C21 mov r1,r4 ; 0806B044 F7FCFC0E bl 8067864h ; 0806B048 492A ldr r1,=14Fh ;Dark Hole, from array 0806B04A 2001 mov r0,1h ; 0806B04C F7FCFC0A bl 8067864h ; 0806B050 21A8 mov r1,0A8h ; 0806B052 0049 lsl r1,r1,1h ;Raigeki 0806B054 2001 mov r0,1h ; 0806B056 F7FCFC05 bl 8067864h ; 0806B05A 4927 ldr r1,=15Bh ;Swords of Revealing Light, from array 0806B05C 2001 mov r0,1h ; 0806B05E F7FCFC01 bl 8067864h ; 0806B062 4926 ldr r1,=29Fh ;Harpie's Feather Duster, from array 0806B064 2001 mov r0,1h ; 0806B066 F7FCFBFD bl 8067864h ; 0806B06A 3C01 sub r4,1h ;Dark Magic Ritual 0806B06C 2001 mov r0,1h ; 0806B06E 1C21 mov r1,r4 ; 0806B070 F7FCFBF8 bl 8067864h ; 0806B074 2001 mov r0,1h ; 0806B076 1C21 mov r1,r4 ; 0806B078 F7FCFBF4 bl 8067864h ; 0806B07C 21FC mov r1,0FCh ;Monster Reborn 0806B07E 0089 lsl r1,r1,2h ; 0806B080 2001 mov r0,1h ; 0806B082 F7FCFBEF bl 8067864h ; 0806B086 491E ldr r1,=403h ;Change of Heart, from array 0806B088 2001 mov r0,1h ; 0806B08A F7FCFBEB bl 8067864h ; 0806B08E 4C1D ldr r4,=425h ;Heavy Storm, from array 0806B090 2001 mov r0,1h ; 0806B092 1C21 mov r1,r4 ; 0806B094 F7FCFBE6 bl 8067864h ; 0806B098 2001 mov r0,1h ; 0806B09A 1C21 mov r1,r4 ; 0806B09C F7FCFBE2 bl 8067864h ; 0806B0A0 4919 ldr r1,=42Ch ;Snatch Steal, from array 0806B0A2 2001 mov r0,1h ; 0806B0A4 F7FCFBDE bl 8067864h ; 0806B0A8 3463 add r4,63h ;Premature Burial 0806B0AA 2001 mov r0,1h ; 0806B0AC 1C21 mov r1,r4 ; 0806B0AE F7FCFBD9 bl 8067864h ; 0806B0B2 2001 mov r0,1h ; 0806B0B4 1C21 mov r1,r4 ; 0806B0B6 F7FCFBD5 bl 8067864h ; 0806B0BA 2184 mov r1,84h ;Mirror Force 0806B0BC 00C9 lsl r1,r1,3h ; 0806B0BE 2001 mov r0,1h ; 0806B0C0 F7FCFBD0 bl 8067864h ; 0806B0C4 4911 ldr r1,=447h ;Call Of The Haunted, from array 0806B0C6 2001 mov r0,1h ; 0806B0C8 F7FCFBCC bl 8067864h ; 0806B0CC 4910 ldr r1,=4BEh ;Magic Cylinder, from array 0806B0CE 2001 mov r0,1h ; 0806B0D0 F7FCFBC8 bl 8067864h ; 0806B0D4 2D19 cmp r5,19h ;Other decks subroutines branch here to branch depending on cpu_opponent_internal_id 0806B0D6 D900 bls 806B0DAh ;if ((cpu_opponent_internal_id - 1) ≤ 25), skip next instruction 0806B0D8 E0BE b 806B258h ;else branch to 0x806B258 0806B0DA 00A8 lsl r0,r5,2h ; 0806B0DC 490D ldr r1,=806B118h ; 0806B0DE 1840 add r0,r0,r1 ;0x806B118 + ((cpu_opponent_internal_id - 1) << 2) 0806B0E0 6800 ldr r0,[r0] ;r0 = pointer to next subroutine 0806B0E2 4687 mov r15,r0 ;jump to r0
Yami Yugi card_id array
13 02 00 00 AB 01 00 00 F7 02 00 00 52 04 00 00 4F 01 00 00 5B 01 00 00 9F 02 00 00 03 04 00 00 25 04 00 00 2C 04 00 00 47 04 00 00 BE 04 00 00 Gemini Elf Magician of Faith Dark Magician Girl Cyber Jar Dark Hole Swords of Revealing Light Harpie's Feather Duster Change of Heart Heavy Storm Snatch Steal Call Of The Haunted Magic Cylinder
CPU decks extra cards
Pointers to subroutines adding specific cards to deck
- 0x6B118 - 0x6B17F
01 - 80 B1 06 08 - Mokuba 02 - 58 B2 06 08 - Tea Gardner 03 - 58 B2 06 08 - Rex Raptor 04 - 58 B2 06 08 - Espa Roba 05 - 58 B2 06 08 - Trusdale (Solomon Muto) 06 - 58 B2 06 08 - Duke Devlin 07 - 58 B2 06 08 - Mako Tsunami 08 - 58 B2 06 08 - Weevil Underwood 09 - 58 B2 06 08 - Mai Valentine 10 - 58 B2 06 08 - Bandit Keith 11 - 58 B2 06 08 - Joey Wheeler 12 - C8 B1 06 08 - Mind-controlled Tea 13 - D8 B1 06 08 - Rare Hunter 14 - E8 B1 06 08 - Arkana 15 - 58 B2 06 08 - Strings 16 - 58 B2 06 08 - Lumis & Umbra 17 - F4 B1 06 08 - Odion 18 - 58 B2 06 08 - Mind-controlled Joey 19 - 58 B2 06 08 - Maximillion Pegasus 20 - 58 B2 06 08 - Marik Ishtar 21 - 00 B2 06 08 - Yami Bakura 22 - 58 B2 06 08 - Ishizu Ishtar 23 - 58 B2 06 08 - Seto Kaiba 24 - 58 B2 06 08 - Yami Marik 25 - 10 B2 06 08 - Shadi 26 - 58 B2 06 08 - Yami Yugi
cpu_opponent_internal_id 1 - Mokuba
cpu_opponent_internal_id 1 - Mokuba - subroutine
0806B180 F01FFC18 bl 808A9B4h ;PRNG - LCG rand() 0806B184 2107 mov r1,7h ; 0806B186 4001 and r1,r0 ;PRN & 7 0806B188 2900 cmp r1,0h ; 0806B18A D165 bne 806B258h ;if (PRN & 7 != 0), get out of this function 0806B18C 21A8 mov r1,0A8h ; 0806B18E 0049 lsl r1,r1,1h ;Raigeki 0806B190 2001 mov r0,1h ; 0806B192 F7FCFB67 bl 8067864h ; 0806B196 4909 ldr r1,=17Bh ;Blue-Eyes Ultimate Dragon 0806B198 2001 mov r0,1h ; 0806B19A F7FCFB63 bl 8067864h ; 0806B19E 4908 ldr r1,=1A3h ;Cyber-Stein 0806B1A0 2001 mov r0,1h ; 0806B1A2 F7FCFB5F bl 8067864h ; 0806B1A6 21A4 mov r1,0A4h ; 0806B1A8 0089 lsl r1,r1,2h ;Megamorph 0806B1AA 2001 mov r0,1h ; 0806B1AC F7FCFB5A bl 8067864h ; 0806B1B0 4904 ldr r1,=425h ;Heavy Storm 0806B1B2 2001 mov r0,1h ; 0806B1B4 F7FCFB56 bl 8067864h ; 0806B1B8 E04E b 806B258h ;
Mokuba 2nd card_internal_id array
7B 01 00 00 A3 01 00 00 25 04 00 00 Blue-Eyes Ultimate Dragon Cyber-Stein Heavy Storm
cpu_opponent_internal_id 12 - Mind-controlled Tea
0806B1C8 4802 ldr r0,=2015BE8h ; 0806B1CA 6841 ldr r1,[r0,4h] ;r1 = CPU opponent group flags 0806B1CC 22C0 mov r2,0C0h ; 0806B1CE 0052 lsl r2,r2,1h ;bit_8_set, bit_9_set 0806B1D0 E019 b 806B206h ;Add flags stored in r2 to CPU opponent group flags
cpu_opponent_internal_id 13 - Rare Hunter
0806B1D8 4802 ldr r0,=2015BE8h ; 0806B1DA 6841 ldr r1,[r0,4h] ;r1 = CPU opponent group flags 0806B1DC 2280 mov r2,80h ; 0806B1DE 0092 lsl r2,r2,2h ;bit_9_set 0806B1E0 E011 b 806B206h ;Add flags stored in r2 to CPU opponent group flags
cpu_opponent_internal_id 14 - Arkana
0806B1E8 4801 ldr r0,=2015BE8h ; 0806B1EA 6841 ldr r1,[r0,4h] ;r1 = CPU opponent group flags 0806B1EC 2220 mov r2,20h ;bit_6_set 0806B1EE E00A b 806B206h ;Add flags stored in r2 to CPU opponent group flags
cpu_opponent_internal_id 17 - Odion
0806B1F4 4801 ldr r0,=2015BE8h ; 0806B1F6 6841 ldr r1,[r0,4h] ;r1 = CPU opponent group flags 0806B1F8 2208 mov r2,8h ;bit_4_set 0806B1FA E004 b 806B206h ;Add flags stored in r2 to CPU opponent group flags
cpu_opponent_internal_id 21 - Yami Bakura; and add flags stored in r2 to CPU opponent group flags
- Arguments if calling 0x806B206:
- r0 : pointer to CPU opponent group flags - 4
- r1 : current CPU opponent group flags
- r2 : Flags to add
- If calling 0x806B200 (like in Yami Bakura's case), no argument is required. It will set bit 4 and bit 6 of the CPU opponent group flags.
0806B200 4802 ldr r0,=2015BE8h ; 0806B202 6841 ldr r1,[r0,4h] ;r1 = CPU opponent group flags 0806B204 2228 mov r2,28h ;but_4_set, bit_6_set 0806B206 4311 orr r1,r2 ;cpu_flags |= cpu_new_flags 0806B208 6041 str r1,[r0,4h] ;store cpu_flags 0806B20A E025 b 806B258h ;branch to 0x806B258
cpu_opponent_internal_id 25 - Shadi, pick one of four CPU Decks at random
- 0x6B20C - Selects one of these four CPU opponents' decks as Shadi's deck:
- 0 - Ishizu Ishtar
- 1 - Seto Kaiba
- 2 - Marik Ishtar
- 3 - Yami Yugi
0806B210 F01FFBD0 bl 808A9B4h ;PRNG - LCG rand() 0806B214 1C01 mov r1,r0 ; 0806B216 2900 cmp r1,0h ; 0806B218 DA00 bge 806B21Ch ;if (PRN[0;0xFFFF] ≥ 0), skip next instruction 0806B21A 1CC8 add r0,r1,3 ;else PRN += 3 0806B21C 1080 asr r0,r0,2h ; 0806B21E 0080 lsl r0,r0,2h ;r0 = (PRN >> 2) << 2 0806B220 1A08 sub r0,r1,r0 ;PRN - (PRN >> 2) << 2; so effectively we're checking the last two bits of PRN 0806B222 2801 cmp r0,1h ; 0806B224 D00D beq 806B242h ;if (PRN[0;3] == 1), branch to 0x806B242; cpu_opponent_internal_id 23 - Seto Kaiba 0806B226 2801 cmp r0,1h ; 0806B228 DC02 bgt 806B230h ;if (PRN[0;3] > 1), branch to 0x806B230; cpu_opponent_internal_id 20 or 26 0806B22A 2800 cmp r0,0h ; 0806B22C D005 beq 806B23Ah ;if (PRN[0;3] == 0), branch to 0x806B23A; cpu_opponent_internal_id 22 - Ishizu Ishtar 0806B22E E013 b 806B258h ;Fail-safe, this should never happen 0806B230 2802 cmp r0,2h ; 0806B232 D00A beq 806B24Ah ;if (PRN[0;3] == 2), branch to 0x806B24A; cpu_opponent_internal_id 20 - Marik Ishtar 0806B234 2803 cmp r0,3h ; 0806B236 D00C beq 806B252h ;if (PRN[0;3] == 3), branch to 0x806B252; cpu_opponent_internal_id 26 - Yami Yugi 0806B238 E00E b 806B258h ;Fail-safe, this should never happen 0806B23A 2016 mov r0,16h ; 0806B23C F7FDFF2E bl 806909Ch ;Define some CPU opponent group flags, and branch to CPU opponent's subroutine 0806B240 E00A b 806B258h ; 0806B242 2017 mov r0,17h ; 0806B244 F7FDFF2A bl 806909Ch ;Define some CPU opponent group flags, and branch to CPU opponent's subroutine 0806B248 E006 b 806B258h ; 0806B24A 2014 mov r0,14h ; 0806B24C F7FDFF26 bl 806909Ch ;Define some CPU opponent group flags, and branch to CPU opponent's subroutine 0806B250 E002 b 806B258h ; 0806B252 201A mov r0,1Ah ; 0806B254 F7FDFF22 bl 806909Ch ;Define some CPU opponent group flags, and branch to CPU opponent's subroutine 0806B258 BC30 pop r4,r5 ;cpu_opponent_internal_id 2 to 11 branch here 0806B25A BC01 pop r0 ; 0806B25C 4700 bx r0 ;
cpu_opponent_internal_id 2 to 11, 15, 16, 18, 19, 22, 23, 24, 26
- Duplicate of the three last instructions of previous subroutine for clarity in the page navigation
- Tea Gardner, Rex Raptor, Espa Roba, Trusdale (Solomon Muto), Duke Devlin, Mako Tsunami, Weevil Underwood, Mai Valentine, Bandit Keith, Joey Wheeler, Strings, Lumis & Umbra, Mind-controlled Joey, Maximillion Pegasus, Marik Ishtar, Ishizu Ishtar, Seto Kaiba, Yami Marik, Yami Yugi
0806B258 BC30 pop r4,r5 ; 0806B25A BC01 pop r0 ; 0806B25C 4700 bx r0 ;
Add specific cards to some opponents based on their flags and on Player's Deck content
0806B25E 0000 lsl r0,r0,0h ; 0806B260 B530 push r4,r5,r14 ; 0806B262 B09D add sp,-74h ; 0806B264 2000 mov r0,0h ; 0806B266 4669 mov r1,r13 ; 0806B268 F7FCFCBA bl 8067BE0h ;Check cards in Player's Deck 0806B26C 4CBF ldr r4,=201A50Ch ;r4 = pointer_to_cpu_deck 0806B26E 25A0 mov r5,0A0h ; 0806B270 006D lsl r5,r5,1h ;r5 = 320 0806B272 1C20 mov r0,r4 ;r0 = pointer_to_cpu_deck 0806B274 1C29 mov r1,r5 ;r1 = 320 0806B276 F01DFCEF bl 8088C58h ;Blanks specified RAM area 0806B27A 21A0 mov r1,0A0h ; 0806B27C 0089 lsl r1,r1,2h ; 0806B27E 1860 add r0,r4,r1 ;r0 = pointer_to_cpu_deck + 640 0806B280 1C29 mov r1,r5 ; 0806B282 F01DFCE9 bl 8088C58h ;Blanks specified RAM area 0806B286 48BA ldr r0,=0FFFFF83Fh ; 0806B288 1825 add r5,r4,r0 ;r5 = pointer_to_cpu_deck - 1985 0806B28A 2000 mov r0,0h ; 0806B28C 7028 strb r0,[r5] ;store 0 in [pointer_to_cpu_deck - 1985] 0806B28E 49B9 ldr r1,=0FFFFF841h ; 0806B290 1864 add r4,r4,r1 ;r4 = pointer_to_cpu_deck - 1983 0806B292 7020 strb r0,[r4] ;store 0 in [pointer_to_cpu_deck - 1983] 0806B294 48B8 ldr r0,=3000040h ; 0806B296 49B9 ldr r1,=4870h ; 0806B298 1840 add r0,r0,r1 ;r0 = 0x30048B0 0806B29A 7800 ldrb r0,[r0] ; 0806B29C 0680 lsl r0,r0,1Ah ; 0806B29E 0EC0 lsr r0,r0,1Bh ;r0 = cpu_opponent_internal_id 0806B2A0 F7FDFEFC bl 806909Ch ;Retrieve primary CPU deck cards 0806B2A4 782D ldrb r5,[r5] ;r5 = number_of_cards_in_cpu_deck 0806B2A6 2D27 cmp r5,27h ; 0806B2A8 D900 bls 806B2ACh ;if (number_of_cards_in_cpu_deck ≤ 39), skip next instruction 0806B2AA E0C2 b 806B432h ;else branch to 0x806B432 0806B2AC 9804 ldr r0,[sp,10h] ;r0 = # of Magic cards in Player's deck 0806B2AE 2564 mov r5,64h ; 0806B2B0 4368 mul r0,r5 ;r0 = number_of_magic_cards_in_player_deck × 100 0806B2B2 9906 ldr r1,[sp,18h] ;r1 = # of valid cards in Player's deck 0806B2B4 F029FB30 bl 8094918h ;call "ratio TYPE_cards / number_of_cards_in_deck" 0806B2B8 281D cmp r0,1Dh ; 0806B2BA DD07 ble 806B2CCh ;if (magic_cards_ratio ≤ 29%), branch to 0x806B2CC 0806B2BC 49B0 ldr r1,=405h ;Magic Jammer 0806B2BE 2001 mov r0,1h ; 0806B2C0 F7FCFAD0 bl 8067864h ; 0806B2C4 49AF ldr r1,=48Bh ;Morphing Jar #2 0806B2C6 2001 mov r0,1h ; 0806B2C8 F7FCFACC bl 8067864h ; 0806B2CC 9805 ldr r0,[sp,14h] ;r0 = # of Trap cards in Player's deck 0806B2CE 4368 mul r0,r5 ;r0 = number_of_trap_cards_in_player_deck × 100 0806B2D0 9906 ldr r1,[sp,18h] ;r1 = # of valid cards in Player's deck 0806B2D2 F029FB21 bl 8094918h ;call "ratio TYPE_cards / number_of_cards_in_deck" 0806B2D6 281D cmp r0,1Dh ; 0806B2D8 DD0B ble 806B2F2h ;if (trap_cards_ratio ≤ 29%), branch to 0x806B2F2 0806B2DA 49AB ldr r1,=29Fh ;Harpie's Feather Duster 0806B2DC 2001 mov r0,1h ; 0806B2DE F7FCFAC1 bl 8067864h ; 0806B2E2 49AA ldr r1,=406h ;Seven Tools of the Bandit 0806B2E4 2001 mov r0,1h ; 0806B2E6 F7FCFABD bl 8067864h ; 0806B2EA 49A9 ldr r1,=486h ;Nobleman of Extermination 0806B2EC 2001 mov r0,1h ; 0806B2EE F7FCFAB9 bl 8067864h ; 0806B2F2 9815 ldr r0,[sp,54h] ;r0 = # of Tribute Monster cards in Player's deck 0806B2F4 9916 ldr r1,[sp,58h] ;r1 = # of Lv.7+ Monster cards in Player's deck 0806B2F6 1840 add r0,r0,r1 ;r0 = number_of_tribute_monsters_in_player_deck + number_of_over_lv7_monsters_in_player_deck 0806B2F8 4368 mul r0,r5 ;r0 ×= 100 0806B2FA 9906 ldr r1,[sp,18h] ;r1 = # of valid cards in Player's deck 0806B2FC F029FB0C bl 8094918h ;call "ratio TYPE_cards / number_of_cards_in_deck" 0806B300 2813 cmp r0,13h ; 0806B302 DD11 ble 806B328h ;if (tribute_monsters_weighted_ratio ≤ 19%), branch to 0x806B328 0806B304 24FA mov r4,0FAh ; 0806B306 0064 lsl r4,r4,1h ;Man-Eater Bug 0806B308 2001 mov r0,1h ; 0806B30A 1C21 mov r1,r4 ; 0806B30C F7FCFAAA bl 8067864h ; 0806B310 2001 mov r0,1h ; 0806B312 1C21 mov r1,r4 ; 0806B314 F7FCFAA6 bl 8067864h ; 0806B318 499E ldr r1,=259h ;Penguin Soldier 0806B31A 2001 mov r0,1h ; 0806B31C F7FCFAA2 bl 8067864h ; 0806B320 499D ldr r1,=452h ;Cyber Jar 0806B322 2001 mov r0,1h ; 0806B324 F7FCFA9E bl 8067864h ; 0806B328 9807 ldr r0,[sp,1Ch] ;r0 = number_of_CONTINOUS_cards_in_player_deck 0806B32A 4368 mul r0,r5 ; 0806B32C 9C06 ldr r4,[sp,18h] ;r1 = # of valid cards in Player's deck 0806B32E 1C21 mov r1,r4 ; 0806B330 F029FAF2 bl 8094918h ;call "ratio TYPE_cards / number_of_cards_in_deck" 0806B334 2809 cmp r0,9h ; 0806B336 DC06 bgt 806B346h ;if (continous_card_ratio > 9%), branch to 0x806B346 0806B338 9808 ldr r0,[sp,20h] ;r1 = # of Equip cards in Player's deck 0806B33A 4368 mul r0,r5 ;r0 = number_of_equip_cards_in_player_deck × 100 0806B33C 1C21 mov r1,r4 ; 0806B33E F029FAEB bl 8094918h ;call "ratio TYPE_cards / number_of_cards_in_deck" 0806B342 2809 cmp r0,9h ; 0806B344 DD11 ble 806B36Ah ;if (equip_cards_ratio ≤ 9%), branch to 0x806B36A 0806B346 4895 ldr r0,=2015BE8h ; 0806B348 6840 ldr r0,[r0,4h] ;r0 = CPU opponent group flags 0806B34A 2104 mov r1,4h ; 0806B34C 4008 and r0,r1 ; 0806B34E 2800 cmp r0,0h ; 0806B350 D00B beq 806B36Ah ;if (bit_3_not_set), branch to 0x806B36A 0806B352 498D ldr r1,=29Fh ;Harpie's Feather Duster 0806B354 2001 mov r0,1h ; 0806B356 F7FCFA85 bl 8067864h ; 0806B35A 4991 ldr r1,=3EAh ;Trap Hole 0806B35C 2001 mov r0,1h ; 0806B35E F7FCFA81 bl 8067864h ; 0806B362 4990 ldr r1,=425h ;Heavy Storm 0806B364 2001 mov r0,1h ; 0806B366 F7FCFA7D bl 8067864h ; 0806B36A 9911 ldr r1,[sp,44h] ;r1 = number_of_cards_reviving_from_GY_in_player_deck 0806B36C 2064 mov r0,64h ; 0806B36E 4348 mul r0,r1 ; 0806B370 9906 ldr r1,[sp,18h] ;r1 = # of valid cards in Player's deck 0806B372 F029FAD1 bl 8094918h ;call "ratio TYPE_cards / number_of_cards_in_deck" 0806B376 2806 cmp r0,6h ; 0806B378 DD2D ble 806B3D6h ;if (cards_reviving_from_GY_ratio ≤ 6%), branch to 0x806B3D6 0806B37A 21FC mov r1,0FCh ; 0806B37C 0089 lsl r1,r1,2h ;Monster Reborn 0806B37E 2000 mov r0,0h ; 0806B380 F7FCFBB4 bl 8067AECh ;Counts number of a specific card in deck 0806B384 2800 cmp r0,0h ;(player's deck) 0806B386 DD0F ble 806B3A8h ; 0806B388 4987 ldr r1,=1ABh ;Magician of Faith 0806B38A 2000 mov r0,0h ;(player's deck) 0806B38C F7FCFBAE bl 8067AECh ;Counts number of a specific card in deck 0806B390 2801 cmp r0,1h ; 0806B392 DD09 ble 806B3A8h ; 0806B394 4881 ldr r0,=2015BE8h ; 0806B396 6840 ldr r0,[r0,4h] ;r0 = CPU opponent group flags 0806B398 2108 mov r1,8h ; 0806B39A 4008 and r0,r1 ; 0806B39C 2800 cmp r0,0h ; 0806B39E D003 beq 806B3A8h ;if (bit_4_not_set), branch to 0x806B3A8 0806B3A0 4982 ldr r1,=402h ;Call of the Dark 0806B3A2 2001 mov r0,1h ; 0806B3A4 F7FCFA5E bl 8067864h ; 0806B3A8 4981 ldr r1,=447h ;Call Of The Haunted 0806B3AA 2000 mov r0,0h ;(player's deck) 0806B3AC F7FCFB9E bl 8067AECh ;Counts number of a specific card in deck 0806B3B0 1C04 mov r4,r0 ; 0806B3B2 2191 mov r1,91h ; 0806B3B4 00C9 lsl r1,r1,3h ;Premature Burial 0806B3B6 2000 mov r0,0h ;(player's deck) 0806B3B8 F7FCFB98 bl 8067AECh ;Counts number of a specific card in deck 0806B3BC 1824 add r4,r4,r0 ; 0806B3BE 2C01 cmp r4,1h ; 0806B3C0 DD09 ble 806B3D6h ; 0806B3C2 4876 ldr r0,=2015BE8h ; 0806B3C4 6840 ldr r0,[r0,4h] ;r0 = CPU opponent group flags 0806B3C6 2104 mov r1,4h ; 0806B3C8 4008 and r0,r1 ; 0806B3CA 2800 cmp r0,0h ; 0806B3CC D003 beq 806B3D6h ;if (bit_3_not_set), branch to 0x806B3D6 0806B3CE 4974 ldr r1,=3EAh ;Trap Hole 0806B3D0 2001 mov r0,1h ; 0806B3D2 F7FCFA47 bl 8067864h ; 0806B3D6 9912 ldr r1,[sp,48h] ;r1 = number_of_draw_cards_in_player_deck 0806B3D8 2064 mov r0,64h ; 0806B3DA 4348 mul r0,r1 ; 0806B3DC 9906 ldr r1,[sp,18h] ; 0806B3DE F029FA9B bl 8094918h ;call "ratio TYPE_cards / number_of_cards_in_deck" 0806B3E2 2809 cmp r0,9h ; 0806B3E4 DD25 ble 806B432h ;if (draw_cards_ratio ≤ 9%), branch to 0x806B432 0806B3E6 4C6D ldr r4,=2015BE8h ; 0806B3E8 6861 ldr r1,[r4,4h] ;r1 = CPU opponent group flags 0806B3EA 2080 mov r0,80h ; 0806B3EC 0040 lsl r0,r0,1h ; 0806B3EE 4008 and r0,r1 ; 0806B3F0 2800 cmp r0,0h ; 0806B3F2 D01E beq 806B432h ;if (bit_9_not_set), branch to 0x806B432 0806B3F4 2004 mov r0,4h ; 0806B3F6 4001 and r1,r0 ; 0806B3F8 2900 cmp r1,0h ; 0806B3FA D003 beq 806B404h ;if (bit_3_not_set), branch to 0x806B404 0806B3FC 496D ldr r1,=4C5h ;Card Destruction 0806B3FE 2001 mov r0,1h ; 0806B400 F7FCFA30 bl 8067864h ; 0806B404 6860 ldr r0,[r4,4h] ;r0 = CPU opponent group flags 0806B406 2108 mov r1,8h ; 0806B408 4008 and r0,r1 ; 0806B40A 2800 cmp r0,0h ; 0806B40C D008 beq 806B420h ;if (bit_4_not_set), branch to 0x806B420 0806B40E 21A5 mov r1,0A5h ; 0806B410 0089 lsl r1,r1,2h ;Crush Card 0806B412 2001 mov r0,1h ; 0806B414 F7FCFA26 bl 8067864h ; 0806B418 4967 ldr r1,=475h ;Appropriate 0806B41A 2001 mov r0,1h ; 0806B41C F7FCFA22 bl 8067864h ; 0806B420 6860 ldr r0,[r4,4h] ;r0 = CPU opponent group flags 0806B422 2102 mov r1,2h ; 0806B424 4008 and r0,r1 ; 0806B426 2800 cmp r0,0h ; 0806B428 D003 beq 806B432h ;if (bit_2_not_set), branch to 0x806B432 0806B42A 4964 ldr r1,=24Eh ;Morphing Jar 0806B42C 2001 mov r0,1h ; 0806B42E F7FCFA19 bl 8067864h ; 0806B432 4D5A ldr r5,=2015BE8h ; 0806B434 6868 ldr r0,[r5,4h] ;r0 = CPU opponent group flags 0806B436 2140 mov r1,40h ; 0806B438 4008 and r0,r1 ; 0806B43A 2800 cmp r0,0h ; 0806B43C D00D beq 806B45Ah ;if (bit_7_not_set), branch to 0x806B45A 0806B43E 24F2 mov r4,0F2h ; 0806B440 00A4 lsl r4,r4,2h ;Graceful Charity 0806B442 2001 mov r0,1h ; 0806B444 1C21 mov r1,r4 ; 0806B446 F7FCFA0D bl 8067864h ; 0806B44A 2001 mov r0,1h ; 0806B44C 1C21 mov r1,r4 ; 0806B44E F7FCFA09 bl 8067864h ; 0806B452 495B ldr r1,=3F2h ;Pot of Greed 0806B454 2001 mov r0,1h ; 0806B456 F7FCFA05 bl 8067864h ; 0806B45A 6868 ldr r0,[r5,4h] ;r0 = CPU opponent group flags 0806B45C 2180 mov r1,80h ; 0806B45E 4008 and r0,r1 ; 0806B460 2800 cmp r0,0h ; 0806B462 D019 beq 806B498h ;if (bit_8_not_set), branch to 0x806B498 0806B464 4C57 ldr r4,=231h ;Needle Worm, added by Mind-controlled Tea 0806B466 2001 mov r0,1h ; 0806B468 1C21 mov r1,r4 ; 0806B46A F7FCF9FB bl 8067864h ; 0806B46E 2001 mov r0,1h ; 0806B470 1C21 mov r1,r4 ; 0806B472 F7FCF9F7 bl 8067864h ; 0806B476 2001 mov r0,1h ; 0806B478 1C21 mov r1,r4 ; 0806B47A F7FCF9F3 bl 8067864h ; 0806B47E 21A5 mov r1,0A5h ; 0806B480 0089 lsl r1,r1,2h ;Crush Card 0806B482 2001 mov r0,1h ; 0806B484 F7FCF9EE bl 8067864h ; 0806B488 494F ldr r1,=485h ;Nobleman of Crossout 0806B48A 2001 mov r0,1h ; 0806B48C F7FCF9EA bl 8067864h ; 0806B490 493F ldr r1,=486h ;Nobleman of Extermination 0806B492 2001 mov r0,1h ; 0806B494 F7FCF9E6 bl 8067864h ; 0806B498 6868 ldr r0,[r5,4h] ;r0 = CPU opponent group flags 0806B49A 2120 mov r1,20h ; 0806B49C 4008 and r0,r1 ; 0806B49E 2800 cmp r0,0h ; 0806B4A0 D020 beq 806B4E4h ;if (bit_6_not_set), branch to 0x806B4E4 0806B4A2 24F2 mov r4,0F2h ; 0806B4A4 00A4 lsl r4,r4,2h ;Graceful Charity 0806B4A6 2001 mov r0,1h ; 0806B4A8 1C21 mov r1,r4 ; 0806B4AA F7FCF9DB bl 8067864h ; 0806B4AE 2001 mov r0,1h ; 0806B4B0 1C21 mov r1,r4 ; 0806B4B2 F7FCF9D7 bl 8067864h ; 0806B4B6 21FC mov r1,0FCh ; 0806B4B8 0089 lsl r1,r1,2h ;Monster Reborn 0806B4BA 2001 mov r0,1h ; 0806B4BC F7FCF9D2 bl 8067864h ; 0806B4C0 34C0 add r4,0C0h ;Premature Burial 0806B4C2 2001 mov r0,1h ; 0806B4C4 1C21 mov r1,r4 ; 0806B4C6 F7FCF9CD bl 8067864h ; 0806B4CA 2001 mov r0,1h ; 0806B4CC 1C21 mov r1,r4 ; 0806B4CE F7FCF9C9 bl 8067864h ; 0806B4D2 3C89 sub r4,89h ;Tribute to The Doomed 0806B4D4 2001 mov r0,1h ; 0806B4D6 1C21 mov r1,r4 ; 0806B4D8 F7FCF9C4 bl 8067864h ; 0806B4DC 2001 mov r0,1h ; 0806B4DE 1C21 mov r1,r4 ; 0806B4E0 F7FCF9C0 bl 8067864h ; 0806B4E4 21A8 mov r1,0A8h ; 0806B4E6 0049 lsl r1,r1,1h ;Raigeki 0806B4E8 2000 mov r0,0h ;(player's deck) 0806B4EA F7FCFAFF bl 8067AECh ;Counts number of a specific card in deck 0806B4EE 2800 cmp r0,0h ; 0806B4F0 D103 bne 806B4FAh ;if (raigeki_in_player_deck), branch to 0x806B4FA 0806B4F2 4936 ldr r1,=3FEh ;Anti Raigeki 0806B4F4 2001 mov r0,1h ;(cpu) 0806B4F6 F7FCFAB9 bl 8067A6Ch ;Remove card from deck 0806B4FA 4935 ldr r1,=14Fh ;Dark Hole 0806B4FC 2000 mov r0,0h ;(player's deck) 0806B4FE F7FCFAF5 bl 8067AECh ;Counts number of a specific card in deck 0806B502 2800 cmp r0,0h ; 0806B504 D103 bne 806B50Eh ;if (dark_hole_in_player_deck), branch to 0x806B50E 0806B506 4933 ldr r1,=3FBh ;White Hole 0806B508 2001 mov r0,1h ;(cpu) 0806B50A F7FCFAAF bl 8067A6Ch ;Remove card from deck 0806B50E 21FC mov r1,0FCh ; 0806B510 0089 lsl r1,r1,2h ;Monster Reborn 0806B512 2000 mov r0,0h ;(player's deck) 0806B514 F7FCFAEA bl 8067AECh ;Counts number of a specific card in deck 0806B518 2800 cmp r0,0h ; 0806B51A D107 bne 806B52Ch ;if (monster_reborn_in_player_deck), branch to 0x806B52C 0806B51C 492E ldr r1,=3FDh ;Call of the Grave 0806B51E 2001 mov r0,1h ;(cpu) 0806B520 F7FCFAA4 bl 8067A6Ch ;Remove card from deck 0806B524 4921 ldr r1,=402h ;Call of the Dark 0806B526 2001 mov r0,1h ;(cpu) 0806B528 F7FCFAA0 bl 8067A6Ch ;Remove card from deck 0806B52C 4916 ldr r1,=29Fh ;Harpie's Feather Duster 0806B52E 2000 mov r0,0h ;(player's deck) 0806B530 F7FCFADC bl 8067AECh ;Counts number of a specific card in deck 0806B534 2800 cmp r0,0h ; 0806B536 D103 bne 806B540h ;if (harpie_feather_duster_in_player_deck), branch to 0x806B540 0806B538 4928 ldr r1,=426h ;Gryphon Wing 0806B53A 2001 mov r0,1h ;(cpu) 0806B53C F7FCFA96 bl 8067A6Ch ;Remove card from deck 0806B540 2001 mov r0,1h ; 0806B542 F7FCFAFF bl 8067B44h ;Remove cards exceeding Banned and Restricted allowed copies 0806B546 480C ldr r0,=3000040h ; 0806B548 490C ldr r1,=4870h ; 0806B54A 1840 add r0,r0,r1 ; 0806B54C 7800 ldrb r0,[r0] ; 0806B54E 0680 lsl r0,r0,1Ah ; 0806B550 0EC0 lsr r0,r0,1Bh ;r0 = cpu_opponent_internal_id 0806B552 2101 mov r1,1h ; 0806B554 4249 neg r1,r1 ; 0806B556 F7FDFD2B bl 8068FB0h ;Prolly the random Normal Monsters subroutine 0806B55A 2001 mov r0,1h ; 0806B55C 4669 mov r1,r13 ;r1 = pointer_to_types_of_cards_in_player_deck 0806B55E F7FCFB3F bl 8067BE0h ;Check cards in Player's Deck 0806B562 B01D add sp,74h ; 0806B564 BC30 pop r4,r5 ; 0806B566 BC01 pop r0 ; 0806B568 4700 bx r0 ;
Specific cards arrays
- 0x6B580
05 04 00 00 8B 04 00 00 9F 02 00 00 06 04 00 00 86 04 00 00 59 02 00 00 52 04 00 00 Magic Jammer Morphing Jar #2 Harpie's Feather Duster Seven Tools of the Bandit Nobleman of Extermination Penguin Soldier Cyber Jar
- 0x6B5A0
EA 03 00 00 25 04 00 00 AB 01 00 00 02 04 00 00 47 04 00 00 C5 04 00 00 75 04 00 00 4E 02 00 00 F2 03 00 00 31 02 00 00 85 04 00 00 FE 03 00 00 4F 01 00 00 FB 03 00 00 FD 03 00 00 26 04 00 00 Trap Hole Heavy Storm Magician of Faith Call of the Dark Call Of The Haunted Card Destruction Appropriate Morphing Jar Pot of Greed Needle Worm Nobleman of Crossout Anti Raigeki Dark Hole White Hole Call of the Grave Gryphon Wing
Blanks specified RAM area
- Arguments:
- r0 : Pointer to address in RAM
- r1 : amount of bytes to blank
08088C58 1C02 mov r2,r0 ; 08088C5A 1C48 add r0,r1,1 ;r0 = r1 + 1 08088C5C 0FC1 lsr r1,r0,1Fh ; 08088C5E 1840 add r0,r0,r1 ; 08088C60 1041 asr r1,r0,1h ; 08088C62 2900 cmp r1,0h ; 08088C64 D005 beq 8088C72h ;if (r1 == 0), branch to 08088C72 (exit the function) 08088C66 2000 mov r0,0h ;r0 = 0 08088C68 8010 strh r0,[r2] ;store r0 into [r2] 08088C6A 3202 add r2,2h ;r2 += 2 08088C6C 3901 sub r1,1h ;r1-- 08088C6E 2900 cmp r1,0h ; 08088C70 D1FA bne 8088C68h ;if (r1 ≠ 0), loop to 08088C68 08088C72 4770 bx r14 ;
PRNG - LCG rand()
- Microsoft LCG rand() : IW_3000040 × 0x343FD + 0x269EC3
- Return: r0 contains 2 MSBytes of the new PRN; 2 LSBytes are discarded
0808A9B4 4A06 ldr r2,=3000040h ; 0808A9B6 6811 ldr r1,[r2] ;r1 = 4-byte PRN 0808A9B8 4806 ldr r0,=343FDh ; 0808A9BA 4348 mul r0,r1 ;r0 ×= 0x343FD 0808A9BC 4906 ldr r1,=269EC3h ; 0808A9BE 1840 add r0,r0,r1 ;r0 += 0x269EC3 0808A9C0 0401 lsl r1,r0,10h ; 0808A9C2 0C00 lsr r0,r0,10h ; 0808A9C4 4308 orr r0,r1 ; 0808A9C6 6010 str r0,[r2] ;Store the new PRN in IW_3000040 0808A9C8 0040 lsl r0,r0,1h ; 0808A9CA 0C40 lsr r0,r0,11h ; 0808A9CC 4770 bx r14 ;
Trunk and Deck management
Count quantity of cards in Player's Trunk, Deck and Sideboard
0x8AA94 - Loops through Player's inventory to count cards in Player's Trunk, Deck, and Sideboard
0808AA94 21D4 mov r1,0D4h ; 0808AA96 0000 lsl r0,r0,0h ; 0808AA98 FBC1 bl lr+782h ; 0808AA9A 0000 lsl r0,r0,0h ; 0808AA9C 10ED asr r5,r5,3h ; 0808AA9E 0000 lsl r0,r0,0h ; 0808AAA0 21DE mov r1,0DEh ; 0808AAA2 0000 lsl r0,r0,0h ; 0808AAA4 2000 mov r0,0h ; 0808AAA6 BC70 pop r4-r6 ; 0808AAA8 BC02 pop r1 ; 0808AAAA 4708 bx r1 ; 0808AAAC B570 push r4-r6,r14 ; 0808AAAE 2300 mov r3,0h ; 0808AAB0 490C ldr r1,=2011C20h ;r1 = pointer to Player's Trunk 0808AAB2 2200 mov r2,0h ;r2 = 0 0808AAB4 1C0D mov r5,r1 ;r5 = pointer to Player's Trunk 0808AAB6 4C0C ldr r4,=10EDh ;r4 = 4333 0808AAB8 880E ldrh r6,[r1] ;start of the loop, load card_quantity for current card pointed by r1 in r6 0808AABA 18F0 add r0,r6,r3 ;r0 = card_quantity + r3 0808AABC 0400 lsl r0,r0,10h ; 0808AABE 0C03 lsr r3,r0,10h ;r3 = current_card_quantity & 0xFFFF 0808AAC0 3102 add r1,2h ;pointer_to_card_trunk += 2 0808AAC2 1C50 add r0,r2,1 ;r0 = current_card_id 0808AAC4 0400 lsl r0,r0,10h ;r0 << 16 0808AAC6 0C02 lsr r2,r0,10h ;r2 = r0 & 0xFFFF 0808AAC8 42A2 cmp r2,r4 ; 0808AACA D9F5 bls 808AAB8h ;if (r2 ≤ 4333 [it's the 1082 valid cards + card_id #0 multiplied by 4 + 1]), loop to 0x808AAB8 0808AACC 43D8 mvn r0,r3 ;r0 = !r3 0808AACE 3001 add r0,1h ;r0++ 0808AAD0 4A06 ldr r2,=21DEh ;r2 = 8670 [it's the 1082 valid cards + card_id #0 multiplied by 8 + an offset of 6 for idk which reason yet] 0808AAD2 18A9 add r1,r5,r2 ;r1 = pointer to Player's Trunk + 8670 0808AAD4 8008 strh r0,[r1] ;r0 = [r1] 0808AAD6 4E06 ldr r6,=21D4h ; 0808AAD8 19A9 add r1,r5,r6 ; 0808AADA 4806 ldr r0,=0FBC1h ; 0808AADC 8008 strh r0,[r1] ; 0808AADE BC70 pop r4-r6 ; 0808AAE0 BC01 pop r0 ; 0808AAE2 4700 bx r0 ;
Check Banned and Restricted cards
- 0x8ABD8 - Arguments:
- r0: current_card_id
0808ABD8 B570 push r4-r6,r14 ; 0808ABDA 0540 lsl r0,r0,15h ; 0808ABDC 0D00 lsr r0,r0,14h ; 0808ABDE 4908 ldr r1,=8833C80h ;r1 = pointer_to_internal_cards_ids_array 0808ABE0 1840 add r0,r0,r1 ;r0 = pointer_to_internal_cards_ids_array + (current_card_id << 1) 0808ABE2 8803 ldrh r3,[r0] ;r3 = internal_card_id 0808ABE4 2200 mov r2,0h ;r2 = 0 0808ABE6 4D07 ldr r5,=2013D88h ;r5 = pointer_to_card_limit_option_flags 0808ABE8 4907 ldr r1,=823F6F4h ;r1 = pointer_to_banned_and_restricted_list 0808ABEA 2401 mov r4,1h ;r4 = 1 0808ABEC 880E ldrh r6,[r1] ;r6 = current_banned_or_restricted_card 0808ABEE 42B3 cmp r3,r6 ; 0808ABF0 D111 bne 808AC16h ;if (internal_card_id ≠ current_banned_or_restricted_card), branch to 0x808AC16 0808ABF2 1C20 mov r0,r4 ; 0808ABF4 782E ldrb r6,[r5] ;r6 = card_limit_option_flags 0808ABF6 4030 and r0,r6 ; 0808ABF8 2800 cmp r0,0h ; 0808ABFA D107 bne 808AC0Ch ;if (bit_1_not_set_in_card_limit_option_flags), branch to 0x808AC0C 0808ABFC 8848 ldrh r0,[r1,2h] ;r0 = max_card_quantity_allowed 0808ABFE E00F b 808AC20h ;branch to 0x808AC20
Add card to Trunk
0808AF0C 3C80 sub r4,80h ; 0808AF0E 0883 lsr r3,r0,2h ; 0808AF10 F893 bl lr+126h ; 0808AF12 FFFF bl lr+0FFEh ; 0808AF14 6070 str r0,[r6,4h] ; 0808AF16 0817 lsr r7,r2,20h ; 0808AF18 B530 push r4,r5,r14 ; 0808AF1A 1C04 mov r4,r0 ; 0808AF1C 0424 lsl r4,r4,10h ; 0808AF1E 0C24 lsr r4,r4,10h ; 0808AF20 1C20 mov r0,r4 ; 0808AF22 F7FFFFDF bl 808AEE4h ; 0808AF26 4B0C ldr r3,=2011C20h ; 0808AF28 00A4 lsl r4,r4,2h ; 0808AF2A 18E4 add r4,r4,r3 ;r4 = 0x2011C20 + (card_id << 2) 0808AF2C 8922 ldrh r2,[r4,8h] ;r2 = old card quantity 0808AF2E 0591 lsl r1,r2,16h ; 0808AF30 480A ldr r0,=0FF800000h ; 0808AF32 4281 cmp r1,r0 ; 0808AF34 D80D bhi 808AF52h ; 0808AF36 0D89 lsr r1,r1,16h ; 0808AF38 3101 add r1,1h ; 0808AF3A 4D09 ldr r5,=3FFh ; 0808AF3C 1C28 mov r0,r5 ; 0808AF3E 4001 and r1,r0 ; 0808AF40 4808 ldr r0,=0FFFFFC00h ;1024 is the maximum quantity for a given card 0808AF42 4010 and r0,r2 ;r2 is old card quantity 0808AF44 4308 orr r0,r1 ;r1 is new card quantity 0808AF46 8120 strh r0,[r4,8h] ;Store new card quantity in [r4 + 8] 0808AF48 4807 ldr r0,=20C6h ; 0808AF4A 1819 add r1,r3,r0 ; 0808AF4C 8808 ldrh r0,[r1] ; 0808AF4E 3001 add r0,1h ; 0808AF50 8008 strh r0,[r1] ; 0808AF52 BC30 pop r4,r5 ; 0808AF54 BC01 pop r0 ; 0808AF56 4700 bx r0 ; 0808AF58 1C20 mov r0,r4 ;
Add card to Player's Deck
0808AF6C B570 push r4-r6,r14 ; 0808AF6E 0400 lsl r0,r0,10h ; 0808AF70 0C04 lsr r4,r0,10h ; 0808AF72 1C20 mov r0,r4 ; 0808AF74 F7FFFFB6 bl 808AEE4h ; 0808AF78 1C20 mov r0,r4 ; 0808AF7A F7FFFE55 bl 808AC28h ; 0808AF7E 0400 lsl r0,r0,10h ; 0808AF80 2800 cmp r0,0h ; 0808AF82 D01C beq 808AFBEh ; 0808AF84 4E0F ldr r6,=2011C20h ; 0808AF86 4810 ldr r0,=20C8h ; 0808AF88 1835 add r5,r6,r0 ;r5 = pointer_to_number_of_cards_in_player_deck 0808AF8A 882A ldrh r2,[r5] ;r2 = number_of_cards_in_player_deck 0808AF8C 2A3B cmp r2,3Bh ; 0808AF8E D816 bhi 808AFBEh ;if (number_of_cards_in_player_deck > 59), exit this function 0808AF90 00A2 lsl r2,r4,2h ; 0808AF92 1992 add r2,r2,r6 ; 0808AF94 7A53 ldrb r3,[r2,9h] ; 0808AF96 0719 lsl r1,r3,1Ch ; 0808AF98 0F89 lsr r1,r1,1Eh ; 0808AF9A 3101 add r1,1h ; 0808AF9C 2003 mov r0,3h ; 0808AF9E 4001 and r1,r0 ; 0808AFA0 0089 lsl r1,r1,2h ; 0808AFA2 200D mov r0,0Dh ; 0808AFA4 4240 neg r0,r0 ; 0808AFA6 4018 and r0,r3 ; 0808AFA8 4308 orr r0,r1 ; 0808AFAA 7250 strb r0,[r2,9h] ; 0808AFAC 8828 ldrh r0,[r5] ; 0808AFAE 1C41 add r1,r0,1 ; 0808AFB0 8029 strh r1,[r5] ; 0808AFB2 0400 lsl r0,r0,10h ; 0808AFB4 0BC0 lsr r0,r0,0Fh ; 0808AFB6 4A05 ldr r2,=2008h ; 0808AFB8 18B1 add r1,r6,r2 ; 0808AFBA 1840 add r0,r0,r1 ; 0808AFBC 8004 strh r4,[r0] ;Store card_id in [r0] 0808AFBE BC70 pop r4-r6 ; 0808AFC0 BC01 pop r0 ; 0808AFC2 4700 bx r0 ;
ratio TYPE_cards / number_of_cards_in_deck
0x94918 - ratio TYPE_cards / number_of_cards_in_deck - part 1
- Arguments:
- r0 : number_of_TYPE_cards_in_player_deck × 100, or × 10 depending on the usage
- r1 : # of valid cards in P1/P2/CPU's deck
08094918 2900 cmp r1,0h ; 0809491A D041 beq 80949A0h ;if (no valid cards in P1/P2/CPU's deck), branch to 0x80949A0 0809491C B410 push r4 ; 0809491E 1C04 mov r4,r0 ;r4 = number_of_TYPE_cards_in_player_deck × 100 08094920 404C eor r4,r1 ;r4 ⊕ r1 08094922 46A4 mov r12,r4 ;r12 = (number_of_TYPE_cards_in_player_deck × 100) ⊕ # of valid cards in P1/P2/CPU's deck ? 08094924 2301 mov r3,1h ;r3 = 1 08094926 2200 mov r2,0h ;r2 = 0 08094928 2900 cmp r1,0h ; 0809492A D500 bpl 809492Eh ;if (# of valid cards in P1/P2/CPU's deck is positive), skip next instruction 0809492C 4249 neg r1,r1 ;else negative r1 0809492E 2800 cmp r0,0h ; 08094930 D500 bpl 8094934h ;if ((number_of_TYPE_cards_in_player_deck × 100) is positive), skip next instruction 08094932 4240 neg r0,r0 ;else negative r0 08094934 4288 cmp r0,r1 ; 08094936 D32C bcc 8094992h ;This should never be true, I believe. But I'm probably missing something. 08094938 2401 mov r4,1h ; 0809493A 0724 lsl r4,r4,1Ch ;r4 = 0x10000000 0809493C 42A1 cmp r1,r4 ;:loop_start 0809493E D204 bcs 809494Ah ;if ((# of valid cards in P1/P2/CPU's deck) << (current_loop << 4) > 0x10000000), branch to 0x809494A 08094940 4281 cmp r1,r0 ; 08094942 D202 bcs 809494Ah ;if ((# of valid cards in P1/P2/CPU's deck) << (current_loop << 4) > (number_of_TYPE_cards_in_player_deck × 100)), branch to 0x809494A 08094944 0109 lsl r1,r1,4h ;(# of valid cards in P1/P2/CPU's deck) × 8 08094946 011B lsl r3,r3,4h ;r3 << 4 08094948 E7F8 b 809493Ch ;loop to 0x809493C
0x9494A - ratio TYPE_cards / number_of_cards_in_deck - part 2
0809494A 00E4 lsl r4,r4,3h ;r4 = 0x80000000 ? 0809494C 42A1 cmp r1,r4 ;;loop_start 0809494E D204 bcs 809495Ah ; 08094950 4281 cmp r1,r0 ; 08094952 D202 bcs 809495Ah ; 08094954 0049 lsl r1,r1,1h ;(# of valid cards in P1/P2/CPU's deck) × 2 08094956 005B lsl r3,r3,1h ;r3 << 1; pretty sure this is the return value used to determine the ratio of TYPE_cards / number_of_cards_in_deck 08094958 E7F8 b 809494Ch ;loop to 0x809494C
0x9495A - ratio TYPE_cards / number_of_cards_in_deck - part 3
0809495A 4288 cmp r0,r1 ;:loop_start 0809495C D301 bcc 8094962h ; 0809495E 1A40 sub r0,r0,r1 ; 08094960 431A orr r2,r3 ; 08094962 084C lsr r4,r1,1h ; 08094964 42A0 cmp r0,r4 ; 08094966 D302 bcc 809496Eh ; 08094968 1B00 sub r0,r0,r4 ; 0809496A 085C lsr r4,r3,1h ; 0809496C 4322 orr r2,r4 ; 0809496E 088C lsr r4,r1,2h ; 08094970 42A0 cmp r0,r4 ; 08094972 D302 bcc 809497Ah ; 08094974 1B00 sub r0,r0,r4 ; 08094976 089C lsr r4,r3,2h ; 08094978 4322 orr r2,r4 ; 0809497A 08CC lsr r4,r1,3h ; 0809497C 42A0 cmp r0,r4 ; 0809497E D302 bcc 8094986h ; 08094980 1B00 sub r0,r0,r4 ; 08094982 08DC lsr r4,r3,3h ; 08094984 4322 orr r2,r4 ; 08094986 2800 cmp r0,0h ; 08094988 D003 beq 8094992h ;if (r0 == 0), exit this loop 0809498A 091B lsr r3,r3,4h ; 0809498C D001 beq 8094992h ; 0809498E 0909 lsr r1,r1,4h ; 08094990 E7E3 b 809495Ah ;loop to the start of this subroutine
0x94992
08094992 1C10 mov r0,r2 ; 08094994 4664 mov r4,r12 ; 08094996 2C00 cmp r4,0h ; 08094998 D500 bpl 809499Ch ; 0809499A 4240 neg r0,r0 ; 0809499C BC10 pop r4 ; 0809499E 46F7 mov r15,r14 ;Add specific cards to some opponents based on their flags or on Player's Deck content
0x949A0
080949A0 B500 push r14 ; 080949A2 F000F803 bl 80949ACh ; 080949A6 2000 mov r0,0h ; 080949A8 BD00 pop r15 ;
0x949AC - Random Normal Monsters part 1
080949AC 46F7 mov r15,r14 ; 080949AE 0000 lsl r0,r0,0h ; 080949B0 2301 mov r3,1h ;r3 = 1 080949B2 2900 cmp r1,0h ; 080949B4 D05E beq 8094A74h ;if (max_value == 0), branch to 0x8094A74 080949B6 D500 bpl 80949BAh ;else if (max_value > 0), skip next instruction 080949B8 4249 neg r1,r1 ;else negate the negative number 080949BA B410 push r4 ; 080949BC B401 push r0 ; 080949BE 2800 cmp r0,0h ; 080949C0 D500 bpl 80949C4h ;if (PRN ≥ 0), skip next instruction 080949C2 4240 neg r0,r0 ;else negate the negative number 080949C4 4288 cmp r0,r1 ; 080949C6 D34F bcc 8094A68h ;if (PRN < 1086), branch to 0x8094A68 080949C8 2401 mov r4,1h ; 080949CA 0724 lsl r4,r4,1Ch ;r4 = 0x10000000 080949CC 42A1 cmp r1,r4 ;:loop_start 080949CE D204 bcs 80949DAh ;if ((1086 << (4 × iteration)) ≥ r4), branch to 0x80949DA 080949D0 4281 cmp r1,r0 ; 080949D2 D202 bcs 80949DAh ;if ((1086 << (4 × iteration)) ≥ PRN), branch to 0x80949DA 080949D4 0109 lsl r1,r1,4h ;r1 << 4 080949D6 011B lsl r3,r3,4h ;r3 << 4 080949D8 E7F8 b 80949CCh ;loop to 0x80949CC 080949DA 00E4 lsl r4,r4,3h ;r4 << 3 080949DC 42A1 cmp r1,r4 ;:loop_start 080949DE D204 bcs 80949EAh ;if (r1 ≥ r4), branch to 0x80949EA 080949E0 4281 cmp r1,r0 ; 080949E2 D202 bcs 80949EAh ;if (r1 ≥ r0), branch to 0x80949EA 080949E4 0049 lsl r1,r1,1h ;r1 << 1 080949E6 005B lsl r3,r3,1h ;r3 << 1 080949E8 E7F8 b 80949DCh ;loop
0x949EA - Random Normal Monsters part 2
- Arguments:
- r0 : PRN[0;0xFFFF]
- r1 : 1086 << iterations
- r3 = 1 << iterations
080949EA 2200 mov r2,0h ;r2 = 0 080949EC 4288 cmp r0,r1 ; 080949EE D300 bcc 80949F2h ;if (PRN[0;0xFFFF] < (1086 << iterations)), skip next instruction 080949F0 1A40 sub r0,r0,r1 ;else r0 = PRN[0;0xFFFF] - (1086 << iterations) 080949F2 084C lsr r4,r1,1h ;r4 = (1086 << iterations) >> 1 080949F4 42A0 cmp r0,r4 ; 080949F6 D305 bcc 8094A04h ;if (PRN[0;0xFFFF] < ((1086 << iterations) >> 1)), branch to 0x8094A04 080949F8 1B00 sub r0,r0,r4 ;else PRN[0;0xFFFF] -= r4 080949FA 469C mov r12,r3 ;r12 = 1 << iterations 080949FC 2401 mov r4,1h ;r4 = 1 080949FE 41E3 ror r3,r4 ;r3 rotate_right r4 08094A00 431A orr r2,r3 ;r2 |= r3 08094A02 4663 mov r3,r12 ;r3 = 1 << iterations 08094A04 088C lsr r4,r1,2h ;r4 = (1086 << iterations) >> 2 08094A06 42A0 cmp r0,r4 ; 08094A08 D305 bcc 8094A16h ;if (PRN < ((1086 << iterations) >> 2)), branch to 0x8094A16 08094A0A 1B00 sub r0,r0,r4 ;else PRN -= r4 08094A0C 469C mov r12,r3 ;r12 = (1 << iterations) rotated_right 0 or 1 times 08094A0E 2402 mov r4,2h ;r4 = 2 08094A10 41E3 ror r3,r4 ;r3 rotate_right r4 08094A12 431A orr r2,r3 ;r2 |= r3 08094A14 4663 mov r3,r12 ;r3 = 1 << iterations 08094A16 08CC lsr r4,r1,3h ;r4 = (1086 << iterations) >> 3 08094A18 42A0 cmp r0,r4 ; 08094A1A D305 bcc 8094A28h ;if (PRN < ((1086 << iterations) >> 3)), branch to 0x8094A28 08094A1C 1B00 sub r0,r0,r4 ;else PRN -= r4 08094A1E 469C mov r12,r3 ;r12 = (1 << iterations) rotated_right 0, 1, or 2 times 08094A20 2403 mov r4,3h ;r4 = 3 08094A22 41E3 ror r3,r4 ;r3 rotate_right r4 08094A24 431A orr r2,r3 ;r2 |= r3 08094A26 4663 mov r3,r12 ;r3 = (1 << iterations) rotated_right n times 08094A28 469C mov r12,r3 ;r12 = (1 << iterations) rotated_right n times 08094A2A 2800 cmp r0,0h ; 08094A2C D003 beq 8094A36h ;if (PRN == 0), branch to 0x8094A36 08094A2E 091B lsr r3,r3,4h ;r3 >> 4 08094A30 D001 beq 8094A36h ;if ((r3 >> 4) == 0), branch to 0x8094A36 08094A32 0909 lsr r1,r1,4h ;r1 = (1086 << iterations) >> 4 08094A34 E7D9 b 80949EAh ;loop to start of this subroutine
0x94A36 - Random Normal Monsters part 3
- Arguments:
- r0 = PRN modified from previous subroutine
- r1 : 1086 << iterations, and may have been >> 3'd depending on PRN
- r2 : or'd n time with ((1 << iterations) rotated_right n times depending on PRN)
- r3 : (1 << iterations) rotated_right n times depending on PRN, and may have been >> 3'd depending on PRN
- r12 : (1 << iterations) rotated_right n times depending on PRN
08094A36 240E mov r4,0Eh ; 08094A38 0724 lsl r4,r4,1Ch ;r4 = 0xE0000000 08094A3A 4022 and r2,r4 ;r2 =& 0xE0000000 08094A3C D014 beq 8094A68h ;if (r2 == 0), branch to 0x8094A68 08094A3E 4663 mov r3,r12 ;r3 = (1 << iterations) rotated_right n times depending on PRN 08094A40 2403 mov r4,3h ;r4 = 3 08094A42 41E3 ror r3,r4 ;r3 rotate_right r4 08094A44 421A tst r2,r3 ; 08094A46 D001 beq 8094A4Ch ;if (bit_r2_is_set_in_r3), branch to 0x8094A4C 08094A48 08CC lsr r4,r1,3h ;r4 = r1 >> 3 08094A4A 1900 add r0,r0,r4 ;r0 += r4 08094A4C 4663 mov r3,r12 ;r3 = r12 08094A4E 2402 mov r4,2h ; 08094A50 41E3 ror r3,r4 ; 08094A52 421A tst r2,r3 ; 08094A54 D001 beq 8094A5Ah ;if (bit_r2_is_set_in_r3), branch to 0x8094A5A 08094A56 088C lsr r4,r1,2h ; 08094A58 1900 add r0,r0,r4 ; 08094A5A 4663 mov r3,r12 ; 08094A5C 2401 mov r4,1h ; 08094A5E 41E3 ror r3,r4 ; 08094A60 421A tst r2,r3 ; 08094A62 D001 beq 8094A68h ;if (bit_r2_is_set_in_r3), branch to 0x8094A68 08094A64 084C lsr r4,r1,1h ; 08094A66 1900 add r0,r0,r4 ; 08094A68 BC10 pop r4 ; 08094A6A 2C00 cmp r4,0h ; 08094A6C D500 bpl 8094A70h ; 08094A6E 4240 neg r0,r0 ; 08094A70 BC10 pop r4 ; 08094A72 46F7 mov r15,r14 ;
0x94A74
08094A74 B500 push r14 ; 08094A76 F7FFFF99 bl 80949ACh ;call 0x80949AC, Random Normal Monsters part 1 08094A7A 2000 mov r0,0h ; 08094A7C BD00 pop r15 ;
0x94A80
08094A80 B5F0 push r4-r7,r14 ; 08094A82 B084 add sp,-10h ; 08094A84 9000 str r0,[sp] ; 08094A86 9101 str r1,[sp,4h] ; 08094A88 9202 str r2,[sp,8h] ; 08094A8A 9303 str r3,[sp,0Ch] ; 08094A8C 9B00 ldr r3,[sp] ; 08094A8E 4817 ldr r0,=0FFFFh ;r0 = 0xFFFF 08094A90 4684 mov r12,r0 ;r12 = 0xFFFF 08094A92 1C1A mov r2,r3 ; 08094A94 4002 and r2,r0 ;r2 &= 0xFFFF 08094A96 0C1B lsr r3,r3,10h ; 08094A98 9902 ldr r1,[sp,8h] ; 08094A9A 1C08 mov r0,r1 ; 08094A9C 4664 mov r4,r12 ; 08094A9E 4020 and r0,r4 ; 08094AA0 0C09 lsr r1,r1,10h ; 08094AA2 1C15 mov r5,r2 ; 08094AA4 4345 mul r5,r0 ; 08094AA6 1C14 mov r4,r2 ; 08094AA8 434C mul r4,r1 ; 08094AAA 1C1A mov r2,r3 ; 08094AAC 4342 mul r2,r0 ; 08094AAE 434B mul r3,r1 ; 08094AB0 0C28 lsr r0,r5,10h ; 08094AB2 1824 add r4,r4,r0 ; 08094AB4 18A4 add r4,r4,r2 ; 08094AB6 4294 cmp r4,r2 ; 08094AB8 D202 bcs 8094AC0h ; 08094ABA 2080 mov r0,80h ; 08094ABC 0240 lsl r0,r0,9h ; 08094ABE 181B add r3,r3,r0 ; 08094AC0 0C20 lsr r0,r4,10h ; 08094AC2 181F add r7,r3,r0 ; 08094AC4 4661 mov r1,r12 ; 08094AC6 400C and r4,r1 ; 08094AC8 0420 lsl r0,r4,10h ; 08094ACA 400D and r5,r1 ; 08094ACC 1C06 mov r6,r0 ; 08094ACE 432E orr r6,r5 ; 08094AD0 1C39 mov r1,r7 ; 08094AD2 1C30 mov r0,r6 ; 08094AD4 9B00 ldr r3,[sp] ; 08094AD6 9C03 ldr r4,[sp,0Ch] ; 08094AD8 1C1A mov r2,r3 ; 08094ADA 4362 mul r2,r4 ; 08094ADC 9D01 ldr r5,[sp,4h] ; 08094ADE 9C02 ldr r4,[sp,8h] ; 08094AE0 1C2B mov r3,r5 ; 08094AE2 4363 mul r3,r4 ; 08094AE4 18D2 add r2,r2,r3 ; 08094AE6 18B9 add r1,r7,r2 ; 08094AE8 B004 add sp,10h ; 08094AEA BDF0 pop r4-r7,r15 ; 08094AEC FFFF bl lr+0FFEh ; 08094AEE 0000 lsl r0,r0,0h ; 08094AF0 2900 cmp r1,0h ; 08094AF2 D034 beq 8094B5Eh ; 08094AF4 2301 mov r3,1h ; 08094AF6 2200 mov r2,0h ; 08094AF8 B410 push r4 ; 08094AFA 4288 cmp r0,r1 ; 08094AFC D32C bcc 8094B58h ; 08094AFE 2401 mov r4,1h ; 08094B00 0724 lsl r4,r4,1Ch ; 08094B02 42A1 cmp r1,r4 ; 08094B04 D204 bcs 8094B10h ; 08094B06 4281 cmp r1,r0 ; 08094B08 D202 bcs 8094B10h ; 08094B0A 0109 lsl r1,r1,4h ; 08094B0C 011B lsl r3,r3,4h ; 08094B0E E7F8 b 8094B02h ;
Cards data
Starter Deck cards
Starter Deck guaranteed cards
- 0x230854 - 35 cards + 1 Fusion Monster card, common to Black, Red and Green Decks
D1 02 F7 02 F2 07 F2 07 D8 04 15 00 39 00 F5 07 59 02 1A 00 01 00 28 03 40 00 EA 02 54 04 54 04 49 00 49 00 F8 07 D9 04 EB 03 4E 01 F1 03 4F 01 38 04 C8 03 D0 04 E9 03 F0 03 37 04 03 04 D0 02 05 04 06 04 C0 03 EA 03
Starter Deck extra cards
- 0x23089C - Each Starter Deck has a 50% chance to be Set A or B.
2F 00 3D 02 EF 02 E6 04 52 04 Black Deck A - Sangan, Witch of the Black Forest, Jinzo, Slate Warrior, Cyber Jar BE 04 AB 03 91 05 20 04 47 04 Red Deck A - Magic Cylinder, Bell of Destruction, Torrential Tribute, Mirror Force, Call Of The Haunted 88 04 2C 04 9F 02 F2 03 85 04 Green Deck A - Premature Burial, Snatch Steal, Harpie's Feather Duster, Pot of Greed, Nobleman of Crossout 10 00 11 00 12 00 13 00 14 00 Black Deck B - Right Leg of the Forbidden One, Left Leg of the Forbidden One, Right Arm of the Forbidden One, Left Arm of the Forbidden One, Exodia the Forbidden One 7E 04 82 04 7B 04 09 04 5C 01 Red Deck B - Ceasefire, Imperial Order, Backup Soldier, Royal Decree, Spellbinding Circle 50 01 5B 01 29 04 C5 04 A9 05 Green Deck B - Raigeki, Swords of Revealing Light, Upstart Goblin, Card Destruction, United We Stand
Banned and Restricted list
- 0x23F6F4 to 0x23F7BB - Banned and Restricted list, card IDs followed by max allowed copies, Card ID on two bytes, max allowed copies on one byte, and one unused byte (00)
6D 07 00 00 - Set Sail for the Kingdom 6E 07 00 00 - The Monarchy 6F 07 00 00 - Glory of the King's Hand 76 07 00 00 - Obelisk the Tormentor 77 07 00 00 - Slifer the Sky Dragon 78 07 00 00 - The Winged Dragon of Ra 80 07 00 00 - Insect Monster Token 81 07 00 00 - Kuriboh Token 82 07 00 00 - Sheep Token 83 07 00 00 - Slime Token 2F 04 01 00 - Delinquent Duo 2E 04 01 00 - Confiscation 25 04 01 00 - Heavy Storm 39 04 01 00 - Painful Choice 35 04 01 00 - The Forceful Sentry 2C 04 01 00 - Snatch Steal F2 03 01 00 - Pot of Greed 03 04 01 00 - Change of Heart F0 03 01 00 - Monster Reborn C5 04 01 00 - Card Destruction 29 04 01 00 - Upstart Goblin 9F 02 01 00 - Harpie's Feather Duster 88 04 01 00 - Premature Burial 5B 01 01 00 - Swords of Revealing Light 4F 01 01 00 - Dark Hole AA 05 01 00 - Mage Power 22 05 01 00 - Limiter Removal A9 05 01 00 - United We Stand 50 01 01 00 - Raigeki 3D 02 01 00 - Witch of the Black Forest 52 04 01 00 - Cyber Jar EF 02 01 00 - Jinzo E6 04 01 00 - Slate Warrior 10 00 01 00 - Right Leg of the Forbidden One 11 00 01 00 - Left Leg of the Forbidden One 12 00 01 00 - Right Arm of the Forbidden One 13 00 01 00 - Left Arm of the Forbidden One 14 00 01 00 - Exodia the Forbidden One 4E 02 01 00 - Morphing Jar 82 04 01 00 - Imperial Order 20 04 01 00 - Mirror Force 7E 04 01 00 - Ceasefire AB 03 01 00 - Bell of Destruction BE 04 01 00 - Magic Cylinder 47 04 01 00 - Call Of The Haunted C8 03 02 00 - Graceful Charity 85 04 02 00 - Nobleman of Crossout 2F 00 02 00 - Sangan 7B 04 02 00 - Backup Soldier 8B 04 02 00 - Morphing Jar #2
Cards stats array
- 0x832B84 to 0x833C7F - Cards stats array, containing Attribute, Type, ATK and DEF
bitmap: AAAB BBBC CCCC DD(D|E)E EEEE EEEF FFFF FFFF A - Attribute If card_type ≤ 0x14 0 - No Attribute 1 - LIGHT 2 - DARK 3 - WATER 4 - FIRE 5 - EARTH 6 - WIND 7 - --- If card_type ≥ 0x15 0 - MAGIC 1 - TRAP B - Level C - 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/DEF stats - there's a workaround to display the 4000/4000 stats from the Display ATK and DEF subroutines) D - Card category For card_type ≤ 0x14 0 - Normal Monster 1 - Effect Monster 2 - Fusion Monster 3 - Ritual Monster For card_type 0x15 and 0x16, a 3rd bit is used 0 - Normal 1 - Counter 2 - Field 3 - Equip 4 - Continuous 5 - Quick 6 - Ritual 7 - [Unknown] E - ATK ÷ 10 F - 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 internal IDs
- 0x833C80 to 0x8344FD - List of cards internal IDs.
Cards IDs
- 0x8355FC - Array to convert cards internal IDs to card IDs
Booster packs ?
Blue-Eyes White Dragon pack
- 0x835DCE
Buster Blader pack
- 0x835E80
Blue-Eyes Toon Dragon pack
- 0x83EA0
The Legendary Fisherman pack
- 0x836026
The Masked Beast pack
- 0x8630F0
Destiny Board pack
- 0x8361B6
Cards tokens
- 0x8364FC
3B 04 3C 04 3D 04 3E 04 Insect Monster Token Kuriboh Token Sheep Token Slime Token
Cards names
- 0x83663C - Card names in 6 languages : Japanese, English, German, French, Italian, Spanish
Cards Types / Attributes / Categories + In-game texts
- 0x372C36 - Card Types, Attributes, Categories, Text prompts, Tournament names, Limitation challenges names, Opponents names; some unused text is in there, in 6 languages
Cards texts
- 0x89C47E - Cards texts in 6 languages : Japanese, English, German, French, Italian, Spanish
Valid Card IDs
- 0x960AC2 to 0x96133D - Valid Card IDs, in number order
Internal Data for Yu-Gi-Oh! Worldwide Edition: Stairway to the Destined Duel
| |
---|---|