Ace Combat 3: A Glimpse of Source Code

An Odd Video Sequence

DragonSpikeXIII from Project NEMO collects rare Ace Combat 3 footage: From TV ads and hidden game menus to obscure demo tapes.

One thing caught my eye: A 15-second video with green text scrolling by for a second. (The tweet is protected, you may not be able to see it.)

What’s written there?

A snapshot of the video with green text on a black background

This looks like source code – but it can’t be made-up! It says CdLoadPack albeit there are no CD-ROMs in 2040!

Finding the Text

I reached out to DragonSpikeXIII, and he pointed me to the true ending sequence of the game. He was so kind to include a high-resolution capture for me to use here.

Of course I don’t want to spoil the ending, so here’s a trimmed version with nothing but the green text:

Upon mentioning this, Rythus explained that this text can also be found in the game files. This makes sense, as AC3 does not store this video sequence as an MPEG-encoded video, but generates it on-the-fly.

From the game files, we get the final list of things being purged in the video:

draw_MisBarnner2
draw_MisBarnner
draw_RotorGV22
draw_RotorGH66
draw_RotorR701
draw_Specular
draw_Barnner
Effm_LaserCannon
EffmMazSet
WepValDraw05
WepValDraw04
WepValDraw03
WepValDraw02
WepValDraw01
WepValDraw00
GPadMgrVibPLScrape
GPadMgrVibPLCrash
GPadMgrVibPLFall
GPadMgrVibValShot
GPadMgrVibMisShot
Effm_NoiseFade
Effm_ScreenNoise2
Effm_GameFade
draw_Sprt_Noise
add_Fade_Tile
EffmSet_LaserCannon
EffmSet_SmkJet
EffmSet_Spark
EffmSet_Particle
EffmSet_PLDestroy
EffmSet_PLScrape
EffmSet_PLFall
EffmSet_PLCrash
EffmSet_Fall
EffmSet_Crash_gnd
EffmSet_Expl_air
EffmSet_ANBHit
EffmSet_MisHit_gnd
EffmSet_MisHit_air
EffmSet_ValHit_gnd
EffmSet_ValHit_air
EffmCtrl
EffmDraw
EffmInit
EffmClearFlag
AddFogClut2
AddBG_elect
AddBG_space
AddBG_dome
AddBG_sky
mt_SetMulRotMatrix
mt_RotScaleMatrixYXZ
draw_WMLine
calc_Dist
calc_Dist12
SquareRoot0_fast
CameraSetControlDDk
CameraChangeScrh
ObjPLSpecialNDMG
ObjPLSetControlEvent
ObjPLSetControlIntoAerosphere
ObjPLSetControlTakeOff
ObjPLSetControlPark
ObjPLSetControlRefuel
ObjPLSetControlLanding
ObjPLCheckIntoAerosphere
ObjPLCheckTakeOff
ObjPLCheckRefueling
ObjPLCheckLanding
ObjPLSetControlStop
ObjPLSetControlCrash
ObjPLSetControlCluise
ObjPLSetControlStrate
ObjPLSetControlChase
ObjPLSetControlSpace
ObjPLSetControlNormal
ObjPLMoveIntoAerosphere
ObjPLMoveTakeOffAP
ObjPLMoveTakeOff
ObjPLMovePark
ObjPLMoveRefuel0D
ObjPLMoveRefuel0C
ObjPLMoveRefuelAP
ObjPLMoveLandingAP
ObjPLMoveLanding
ObjPLMoveCrash
PLCTRLCluise
ObjPLSetEventModeAuto
ObjPLSetEventMode
ObjPLControl
ObjPLControlVWReset
PLCTRLCalcLAng
ObjGetMinMaxSpd
ObjPLMoveInit
ObjPLScrVib
ObjPLGetCondition
GHudDisp
GAscDraw
GMapBlackout
GMapFogSwap2
AddClutBlink
MakeFog2
MakeFogZ
SetFogNearFar2
MapDraw
MapPartsChange
vtxtransform
WepDraw
WepControl
WepInit
WepValSet
WepRocketRSet
WepBombSet
WepMisSet
EffkDraw
EffkControl
EffkInit
MemGetRemain
memcpyl
MemSet
MemFree
MemNoAlloc
MemAlloc
MemClear
ChkStruct
FMHMapn
FMHMap
NLZDecode
GPadMgrVibCrash0
GPadMgrVibMisHit
GPadMgrVibValHit
GPadMgrVibGndTch
GPadMgrVibStall
GPadMgrVibCtrl
GPadMgrVibInit
GPadMgrMain
GPadMgrInit
CtlrStop
CtlrInit
KsysCheck
QuitSys
InitSys
CdLoadModule
CdLoadPacks
CdLoadPack
CdGetPacksSize
CdGetPackSize
CdGetFileSize
CdLoadInit
CalcLAng14Vec
CalcWAng14Vec
CalcAng14Z0
CalcAng14
CalcWAng14
CalcAddLAng14
CalcLVec2WVec14
rasin14
ratan14
RotQMatrixZXY14
RotQMatrixYXZ14
RotMatrixZXY14
RotTransposeMatrixYXZ14
RotMatrixYXZ14
DebObjDeadPosHis
DebPlPosHis
DebMisHisInit
MissionCommands
CheckMissionCommands
MissionCommandTableInit
MissionInit
MobjControl
OrdSequence
OrdGuardObj
OrdGuardPos
OrdAttackObj
OrdAttack
OrdNoOrder
checkVectorAlt
checkActVW
ModEmgArea
ModEmgAltitude
ModCruise
ModInstigation
ModDogfight
ModHeadObj
initTObjMOnPhase
initTObjNPOnPhase
initTObjM
initTObjNP
ObjInitTablePointer
calcLocalPos
ObjCleanTgt
ObjDeleteTgt
ObjSetTgt
ObjSearchTgt
ObjGetTgtCnt
ObjTgtControl
ObjInitTgt
ObjGetAreaCaution
ObjNPActionControl
ObjNPModeControl
ObjNPOrderControl
ObjNPGeneralControl
ObjSpeedControl
ObjAngleControl
BaseAltitude
BaseHeading
BaseHorizon
ActEAltitude
ActAileronRoll
ActNop
ActGoStraight
ActHeadingPos
ActHeadingObjR
ActHeadingObj
GetMisType
GetValType
GetTGType
resignation
conscience
process control
connection
unit
active
evolution
self-preservation
mutation
epistasis
building block
heuristics
meta-rule
rule
delta
feedback
local enhancement
ethic
situated
action
philosophy
ambiguity
contingency
Tele-existance
Aero-coffin
Data-swallow
Ana-server
In-tera-net
Electoro-sphere
Antrion
ANB
Nano-bite
Sublimation
Nexus
ENSI
Aeon Generator
PIG
DOE
Geopelia
Night Raven
USEA
Global Way
Ouroboros
SARF
UPEO
NUN
MEU
Neucom Inc.
GDF
General Resource LTD.
UI-4053 Sphyrna
UI-4052 Cralias
UI-4054 Aurora
X-49 Night Raven
XR-900 Geopelia
R-701 Triakis
R-808 Phoca
R-531 Mobura
R-501 Rhincodon
R-352 Sepia (booster)
R-352 Sepia
R-311 Remora
R-103 Delphinus#3
R-211 Orcinus
R-102 Delphinus#2
R-201 Asterozoa
R-101 Delphinus#1
R-505U
EC-17U Globemaster III
Su-43 Berkut
Su-37 Super Flanker
R-201U Asterozoa
R-101U Delphinus#1
F-16XFU Gyrfalcon
F/A-18U HornetADV
MiG-33 FulcrumSS
EF2000E Typhoon II
KC777 ASST
V-22B Osprey
RAH-66B Commanche
B-1C Lancer
C-17B Globemaster III
RF-12A2 Blackbird (booster)
RF-12A2 Blackbird
XFA-36A Game
F/A-32C Erne
F-22C RaptorII
A/F-117X NAV Hawk
F-15S/MT Eagle+
F-16XA Sakerfalcon
F-16XF Gyrfalcon
F/A-18I HornetADV
…

Analysis

These are names of actual functions in the game – as evident by MemNoAlloc, which I prominently mentioned in my analysis of Namco’s PS-Y compression.

Remember how I said in my sky analysis that the skies differ for missions in the Electrosphere and in outer space? As Rythus points out, the list contains AddBG_elect and AddBG_space in addition to AddBG_sky.

GPadMgrVibPLCrash & Co. most likely manage the game pad vibration when your plane crashes. Matrix functions are not about the movie franchise, but about the transformation matrices you use in 3d games.

It seems like Project Aces, when programming this short sequence, ran out of ideas for interesting names to display and simply dumped the function names from the debug information of the Ace Combat 3 executable. The debug information is inaccessible to us, but these function names sure help in disassembling the game.

They added a few game-related strings to the beginning and to the end of the list. I cut out most of them here, as to not spoil the story too much.

Of note is their list of planes and a small encoding error: You can see R-352 Sepia █Ibooster█J in the video. This is actually Kanji parantheses (), encoded in Shift-JIS, and read back in the wrong codepage. I corrected it in the list above.

Conclusion

I’m excited to see us learning a lot from a one-second movie sequence!

While it seems like nothing more than a collection of random strings, it does tie a few loose ends in our understanding of the game. And it is probably the closest we will ever get to AC3’s source code.

Including the function names from the game instead of – say, an excerpt from a dictionary – may seem like a blunder. But on the other hand it matches the game’s story so well that it may have been an artistic decision, after all.