Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.
The wiki has recently moved; please report any issues in Discord. Pardon the dust.
Game Boy Wars 3/ROM map: Difference between revisions
Jump to navigation
Jump to search
Line 60: | Line 60: | ||
** 4B35-4B51 ~ Defender's Focus 10s digit exceeds Attacker's | ** 4B35-4B51 ~ Defender's Focus 10s digit exceeds Attacker's | ||
** 4B52-4B65 ~ Focus 10s digit is equal for both sides; old HP is used for both players | ** 4B52-4B65 ~ Focus 10s digit is equal for both sides; old HP is used for both players | ||
* 4B67-4BBF ~ hardcodes ammo reductions and participation EXP | |||
* 4BC0-4BD4 ~ hardcodes attacker's Ammo reduction and participation EXP | |||
* 4BD5-4BE9 ~ hardcodes defender's Ammo reduction and participation EXP | |||
* 4BEA-4BFB ~ hardcodes the Ammo reduction from battle | |||
* 4BFC-4C26 ~ hardcodes participation EXP. 2 EXP for (counter)attacking, 1 EXP for defending against an attack. | |||
* 4C27-4CF6 ~ hardcodes damage-related EXP for both sides. Formula is (Damage Done + Kill Coefficient) * Underdog Coefficient. Kill Coefficient is 1 if the opposing unit is defeated, 0 otherwise; Underdog Coefficient is 2 if the opposing unit is defeated AND the victorious unit has lower ATK, 1 otherwise. | |||
== Block 14 (034000-038000) == | == Block 14 (034000-038000) == |
Revision as of 01:56, 9 April 2015
The following article is a ROM map for Game Boy Wars 3.
Block 1 (000000-004000)
- 2995-29AC ~ HL = A * B
- 29BC-29C2 ~ HL += A
- 29C3-29C9 ~ HL -= DE
- 29D8-2A1C ~ HL *= DE (Signed)
- 2A1D-2A20 ~ HL = 0
- 2A21-2A6F ~ DE / BC: DE holds rounded down answer, BC holds remainder
- 2A70-2A78 ~ [HL] -= 1, BC *= -1
- 2A79-2A81 ~ [HL] -= 1, DE *= -1
- 3A93-3A9D ~ A = [HL + A]
- 3AC7-3AD0 ~ A = [HL + (A/8)] AND 2^(A%8)
- 3AD1-3ADB ~ [HL + (A/8)] = [HL + (A/8)] OR 2^(A%8)
- 3AE9-3B05 ~ HL + (A / 8): C holds 2^Remainder, HL holds rounded down answer
- 3B50-3B58 ~ ldi [HL],[DE]; inc DE, dec BC, repeat if BC != 0
- 3B79-3B83 ~ [HL], [HL+1]...[HL+BC] = A
Block 2 (004000-008000)
Block 3 (008000-00C000)
Block 4 (00C000-010000)
Block 5 (010000-014000)
Block 6 (014000-018000)
Block 7 (018000-01C000)
Block 8 (01C000-020000)
Block 9 (020000-024000)
Block 10 (024000-028000)
Block 11 (028000-02C000)
Block 12 (02C000-030000)
- 4707-4713 ~ A = [18AB + A]
- 5539-555E ~ A = min(Movement Power, Fuel), [CD43] stuff (Movement Costs) is set up
Block 13 (030000-034000)
- 49A2-49CB ~ HL = Attack mutiplier with L using the float portion (A, B, and C use Support, Level, and Flank values respectively)
- 49CC-49FB ~ HL = Defense multiplier with L using the float portion (A, B, and C use Cover, Level, and Flank values respectively and get halved and truncated in the process)
- 49FC-4A20 ~ HL = Stat * HP * Multiplier; Float error results in slight decrease if the intended multiplier doesn't divide by 0.25 into a whole number
- 4A21-4A25 ~ HL = 2 * Stat * HP * Multiplier; Float error results in slight decrease if the intended multiplier doesn't divide by 0.25 into a whole number
- 4A26-4A97 ~ calculates new HP for attacker's unit, rounds up, range from 0 to old HP
- 4A98-4B09 ~ calculates new HP for defender's unit, rounds up, range from 0 to old HP
- Total ATK is calculated with 49FC, multiplier uses 49A2 and Stat is ATK
- Total DEF is calculated with 4A21, multiplier uses 49CC and Stat is DEF
- New HP is (Total DEF - Total ATK) / (2 * DEF)
- Default to 0 and end procedure immediately if result is negative, round up, and then default to Old HP if result exceeds it
- Effective damage formula is as follows: ATK * Attacker's HP * (100 + ATK boosts) / (200 * DEF) - DEF boosts * Defender's HP / 200
- 4B0A-4B66 ~ calculates New HP values for both sides using attack order
- 4B18-4B34 ~ Attacker's Focus 10s digit exceeds Defender's
- 4B35-4B51 ~ Defender's Focus 10s digit exceeds Attacker's
- 4B52-4B65 ~ Focus 10s digit is equal for both sides; old HP is used for both players
- 4B67-4BBF ~ hardcodes ammo reductions and participation EXP
- 4BC0-4BD4 ~ hardcodes attacker's Ammo reduction and participation EXP
- 4BD5-4BE9 ~ hardcodes defender's Ammo reduction and participation EXP
- 4BEA-4BFB ~ hardcodes the Ammo reduction from battle
- 4BFC-4C26 ~ hardcodes participation EXP. 2 EXP for (counter)attacking, 1 EXP for defending against an attack.
- 4C27-4CF6 ~ hardcodes damage-related EXP for both sides. Formula is (Damage Done + Kill Coefficient) * Underdog Coefficient. Kill Coefficient is 1 if the opposing unit is defeated, 0 otherwise; Underdog Coefficient is 2 if the opposing unit is defeated AND the victorious unit has lower ATK, 1 otherwise.
Block 14 (034000-038000)
Block 15 (038000-03C000)
Block 16 (03C000-040000)
Block 17 (040000-044000)
Block 18 (044000-048000)
- 4D3F-4D59 ~ if [C62F] != 1 && [C633]%2 = 1, [C77D + A/16] = [C77D + A/16] OR 2^((A/2)%8)
Block 19 (048000-04C000)
- 4000-401F ~ RAM addresses $D000~$D63F set to 0
- 4020-4028 ~ HL = Unit Type's stats starting location (A is Unit Type)
- 4029-4036 ~ HL = Unit's stats starting location (A is Unit #)
- 4037-4042 ~ A = Unit Type's used stat (A is Unit Type, C is used stat)
- 4043-404E ~ DE = Unit Type's used stat (2 bytes) (A is Unit Type, C is used stat)
- 404F-4065 ~ RAM addresses $CD28~$CD31 set to hold Unit Type's name
- 4066-4082 ~ A = Unit's used stat (A is Unit #, C is used stat)
- 4083-40A0 ~ DE = Unit's used stat (2 bytes) (A is Unit #, C is used stat)
- 40A1-40BC ~ B -> Unit's used stat (A is Unit #, C is used stat)
- 40BD-40DA ~ DE -> Unit's used stat (2 bytes) (A is Unit #, C is used stat)
- 40DB-40F4 ~ Adding the unit's EXP in, checking for 400 EXP cap (A is Unit #, HL is gained EXP)
- 40F5-4105 ~ A = Unit's Level - 1 (A is Unit #)
- 4106-412A ~ RAM addresses $CCDD~$CCED set to hold selected Unit's stats
- 412B-414D ~ selected Unit's stats moved from $CCDD~$CCED to $D000 list
- 42F6-4328 ~ A = side's current unit count (A is the given side)
- 4329-4350 ~ A != 0 && Z Flag Set: Loading Valid (A is 1st Unit's #, B is 2nd Unit's #)
- 4351-43B8 ~ A = prevent Supply flag (A is receiving unit, B is giving unit)
- 43F4-4435 ~ process 48436 for given property type (A is terrain type byte)
- 4436-4457 ~ $CD0B holds available Unit Type count, $CD0C, etc. holds Unit Type choices (B is starting unit type)
- 4458-446F ~ Mercenary Unit equivalent of 12:4436
- 4470-447C ~ if unit is buyable, A = 0; else, A = 2 (A is Unit Type)
- 447D-448C ~ if unit is considered buyable A = 0; else, A = 2
- 448D-4497 ~ $4986 stuff
- 4498-44B7 ~ if Unit is at S-Rank, A = promoted Unit Type # * 2 + country bit; else, A = 0 (A is Unit #)
- 44B8-44BF ~ promoted Unit Type #
- 44C0-4509 ~ confirmed promotion procedure
- 4585-4596 ~ Unit's End Turn bit set
- 4741-4757 ~ Unit's 8th stat = Unit Type's Fuel
- 4758-477C ~ Unit's 9th and 10th stats = Unit Type's Ammo (each weapon)
- 477D-479E ~ recover HP
- 479F-47AC ~ A = used Movement Cost
- 47AD-47CD ~ [CD44-CD76] holds selected unit's Movement Costs (A is Movement Type)
- 497F-4985 ~ buyable units
- 4986-49A5 ~ pointers for 7 byte families that seem to involve unit buying
- 49A5-4A0E ~
- 4A0F-4A42 ~ promoted Unit Type #
- 4A43-4AAC ~ Unit Type stat pointers
- 4AAD-5255 ~ Unit Type stats
- 0-9 ~ name characters
- A ~ Max HP
- B ~ Max Fuel
- C ~ Movement Power
- D ~ Transport Capacity
- E ~ ?
- F ~ Fuel Upkeep
- 10, 11 ~ Gold Cost / 100G
- 12, 13 ~ Materials Cost
- 14 ~ Primary Weapon Type
- 15 ~ Primary Weapon Ammo
- 16 ~ Secondary Weapon Type
- 17 ~ Secondary Weapon Ammo
- 18 ~ Unit Family
- 19 ~ Movement Type
- 1A ~ Carrying Type
- 1B, 1C, 1D ~ Carried Type
- 1E-22 ~ DEF values
- 23 ~ Base Focus
- 24 ~ Focus Loss
- 5256-5297 ~ Weapon stat pointers (pointers)
- 5298-54A7 ~ Weapon stats
- 0~7 ~ name characters
- 8 ~ Minimum Range
- 9 ~ Maximum Range
- A-E ~ ATK (Armor, Lite Land, Air, Ship, Sub)
- F ~ Cost per shot
- 54A8-54C5 ~ Movement Cost pointers
- 54C6-561E ~ Movement Costs
Block 20 (04C000-050000)
Block 21 (050000-054000)
Block 22 (054000-058000)
Block 23 (058000-05C000)
Block 24 (05C000-060000)
Block 25 (060000-064000)
Block 26 (064000-068000)
Block 27 (068000-06C000)
Block 28 (06C000-070000)
Block 29 (070000-074000)
Block 30 (074000-078000)
Block 31 (078000-07C000)
Block 32 (07C000-080000)
Block 33 (080000-084000)
Block 34 (084000-088000)
Block 35 (088000-08C000)
Block 36 (08C000-090000)
Block 37 (090000-094000)
Block 38 (094000-098000)
Block 39 (098000-09C000)
Block 40 (09C000-0A0000)
Block 41 (0A0000-0A4000)
Block 42 (0A4000-0A8000)
Map data
Block 43 (0A8000-0AC000)
Map data
Block 44 (0AC000-0B0000)
Map data
Block 45 (0B0000-0B4000)
Map data (ends Standard, covers Beginner)
Block 46 (0B4000-0B8000)
Map data (campaign)
Block 47 (0B8000-0BC000)
Map data
Block 48 (0BC000-0C0000)
Map data
Block 49 (0C0000-0C4000)
Block 50 (0C4000-0C8000)
Block 51 (0C8000-0CC000)
Block 52 (0CC000-0D0000)
Dialogue stuff
Block 53 (0D0000-0D4000)
Empty (all FFs)
Block 54 (0D4000-0D8000)
Empty (all FFs)
Block 55 (0D8000-0DC000)
Empty (all FFs)
Block 56 (0DC000-0E0000)
Empty (all FFs)
Block 57 (0E0000-0E4000)
Empty (all FFs)
Block 58 (0E4000-0E8000)
Empty (all FFs)
Block 59 (0E8000-0EC000)
Empty (all FFs)
Block 60 (0EC000-0F0000)
Empty (all FFs)
Block 61 (0F0000-0F4000)
Empty (all FFs)
Block 62 (0F4000-0F8000)
Empty (all FFs)