{ "chunk": "data_setup_0200_default", "unit": "game/setup_0200_default", "routines": [], "variables": [], "dataBlocks": [ { "addr": "0200", "length": 150, "type": "byteTable", "name": "trainerPlay0", "description": "Solo-trainer opening play 0: 150 bytes = three 50-entry arrays indexed by AI unit ordinal 0-49 (absolute unit 50-99). +0 group id per unit ($FF = no group, entry 49 = 0 = the AI comcen's own group), +50 destination column, +100 destination row (all in rows $06-$13, the AI's half). sub_EC91/$ECD4 in the trainer setup overlay computes the base as $0200 + 150*plan with multiply8x8, then copies the three slices to aiUnitGroup ($8832), unitDestCol+50 ($F802) and unitDestRow+50 ($F866) with Y counting $31..0. This play: groups 1-10 handed to units 0-9 individually (mainGroup $FF, 10 groups); columns spread from $21 down to $07 across the front, all ten at row $12. Its companion scalars come from mainGroupByPlanTable ($EC00 = FF,FF,04,04,04), groupCountByPlanTable ($EC05 = 0A,0A,04,04,04) and aiPlanParamTable ($EC0A = FF,FF,08,0C,0C)." }, { "addr": "0296", "length": 150, "type": "byteTable", "name": "trainerPlay1", "description": "Solo-trainer opening play 1: 150 bytes = three 50-entry arrays indexed by AI unit ordinal 0-49 (absolute unit 50-99). +0 group id per unit ($FF = no group, entry 49 = 0 = the AI comcen's own group), +50 destination column, +100 destination row (all in rows $06-$13, the AI's half). sub_EC91/$ECD4 in the trainer setup overlay computes the base as $0200 + 150*plan with multiply8x8, then copies the three slices to aiUnitGroup ($8832), unitDestCol+50 ($F802) and unitDestRow+50 ($F866) with Y counting $31..0. This play: same ten single-unit groups but numbered the other way round (10..1); columns evenly spaced $24,$1C,$18,$14,$10,$0C,$04 with two units held back at row $12. Its companion scalars come from mainGroupByPlanTable ($EC00 = FF,FF,04,04,04), groupCountByPlanTable ($EC05 = 0A,0A,04,04,04) and aiPlanParamTable ($EC0A = FF,FF,08,0C,0C)." }, { "addr": "032C", "length": 150, "type": "byteTable", "name": "trainerPlay2", "description": "Solo-trainer opening play 2: 150 bytes = three 50-entry arrays indexed by AI unit ordinal 0-49 (absolute unit 50-99). +0 group id per unit ($FF = no group, entry 49 = 0 = the AI comcen's own group), +50 destination column, +100 destination row (all in rows $06-$13, the AI's half). sub_EC91/$ECD4 in the trainer setup overlay computes the base as $0200 + 150*plan with multiply8x8, then copies the three slices to aiUnitGroup ($8832), unitDestCol+50 ($F802) and unitDestRow+50 ($F866) with Y counting $31..0. This play: four real groups (1,2,3 and the assault group 4) covering units 0-27, a wedge of pairs at rows $0F-$11. Its companion scalars come from mainGroupByPlanTable ($EC00 = FF,FF,04,04,04), groupCountByPlanTable ($EC05 = 0A,0A,04,04,04) and aiPlanParamTable ($EC0A = FF,FF,08,0C,0C)." }, { "addr": "03C2", "length": 150, "type": "byteTable", "name": "trainerPlay3", "description": "Solo-trainer opening play 3: 150 bytes = three 50-entry arrays indexed by AI unit ordinal 0-49 (absolute unit 50-99). +0 group id per unit ($FF = no group, entry 49 = 0 = the AI comcen's own group), +50 destination column, +100 destination row (all in rows $06-$13, the AI's half). sub_EC91/$ECD4 in the trainer setup overlay computes the base as $0200 + 150*plan with multiply8x8, then copies the three slices to aiUnitGroup ($8832), unitDestCol+50 ($F802) and unitDestRow+50 ($F866) with Y counting $31..0. This play: same four groups with group 4 leading (units 0-11 and 24-27), rows $0C-$10. Its companion scalars come from mainGroupByPlanTable ($EC00 = FF,FF,04,04,04), groupCountByPlanTable ($EC05 = 0A,0A,04,04,04) and aiPlanParamTable ($EC0A = FF,FF,08,0C,0C)." }, { "addr": "0458", "length": 150, "type": "byteTable", "name": "trainerPlay4", "description": "Solo-trainer opening play 4: 150 bytes = three 50-entry arrays indexed by AI unit ordinal 0-49 (absolute unit 50-99). +0 group id per unit ($FF = no group, entry 49 = 0 = the AI comcen's own group), +50 destination column, +100 destination row (all in rows $06-$13, the AI's half). sub_EC91/$ECD4 in the trainer setup overlay computes the base as $0200 + 150*plan with multiply8x8, then copies the three slices to aiUnitGroup ($8832), unitDestCol+50 ($F802) and unitDestRow+50 ($F866) with Y counting $31..0. This play: the default plan: group 4 takes units 0-27 and 40-45, groups 1/2/3 the flanks; the widest spread of destinations (rows $07-$10). Its companion scalars come from mainGroupByPlanTable ($EC00 = FF,FF,04,04,04), groupCountByPlanTable ($EC05 = 0A,0A,04,04,04) and aiPlanParamTable ($EC0A = FF,FF,08,0C,0C)." }, { "addr": "04EE", "length": 18, "type": "unknown", "name": "playbookTail", "description": "18 bytes of filler after the fifth play (5 x 150 = 750 bytes end at $04ED). Content: $20,$20, then $06,$01,$13,$14,$0C,$0F,$01,$04, then eight more $20 - that is ' FASTLOAD' followed by spaces in C64 SCREEN codes, so it is a scrap of the mastering machine's screen memory, not game data. (confidence: medium)" } ], "misclassified": [], "insights": [ "The playbook is five 150-byte plays at $0200, $0296, $032C, $03C2 and $0458, each [groupId x50] [destCol x50] [destRow x50]; the trainer's default entry point sub_EC91 always starts with plan index 4 and picks a random 1-3 for $8964, while $EC52/$EC6F can re-enter at L_EC93 with another plan.", "Only the first 10-28 units of each play are really play-specific: from about ordinal 14 onwards every play shares the same tail of destination columns (21 13 04 24 14 23 22 21 20 15 05 14 05 14 22 21 14 13 14 22 21 05 05 06 06 13 13 23 21 15 04 06 22 14 05 14) and rows, so a 'play' is really an opening for the leading formations laid over a fixed default deployment.", "That shared tail also proves the relationship with track 18 sectors 8-14: the identical 36-byte run appears at $F360 inside unit start-position template 2, and a 50-byte run from play 3 appears at $F4E2 inside template 3.", "Plans 0 and 1 have mainGroupByPlanTable = $FF (no assault group) and 10 groups; plans 2-4 use assault group 4 and 4 groups. Entry 49 of every group array is 0, i.e. the AI comcen is always in group 0.", "The 18 spare bytes at the end of the block spell ' FASTLOAD' in C64 screen codes - a scrap of the mastering machine's screen RAM.", "trainerPlaybook0200.s inherits stale labels from the other tenants of this page: eaLoadGame ($02B8), eaFileName ($02EC), sub_0300, sub_031B, L_02D5, L_048B and the D_02A2/D_02A3/D_02AB trio are the boot-time `ea` loader, the track-18 start-up code and the BAM buffer used by checkDiskId - none of them has anything to do with the playbook bytes shown at those addresses.", "The file header says the setup code 'copies a 150-byte slice into the AI's group and destination tables'; more precisely it copies three 50-byte slices into three different tables, one of which ($8832) is in the $8800 block and two of which ($F802/$F866) are the +50 halves of the global unit destination arrays." ] }