16 · Appendices

Reference Tables

The addresses a reimplementation reaches for daily: process globals, condition bits, physics state, judgment tables, and the function index per chapter.

A.1Core globals

AddressNameMeaning
0x6f0408procmancurrent process ID (2=GameTask, 3=MenuTask, 4=Ending)
0x6f040csetNextProc targetrequested next process (0 = none)
0x6167f4procfunc[]{stack, task, cleanup} per process
0x42C348mainFunc[12]map-phase dispatch table
0x6d74ccGameCondition+0x0 condition · +0x4 backup · +0x8 mainMapMode · +0xc mode backup
0x6d32f8game_status876-byte run state (also dia_status/score_status views)
0x6d360c / 0x6d3610clock / scheduledgame time vs scheduled arrival (seconds)
0x6dca60menuinfomenu top-level state (0–15)
0x6f2b14menuwk68-byte menu work struct (cursor at +0xa)
0x6d5580 / 74 / 78mnkey / plkey / plkey_justmenu keys / play keys / play edges
0x6d557cisdenconcontroller type (0 digital, 2/3 detent, 4 analog)
0x6c8748..4cboot flagsUndead · DebugData · JoinDebug · GameLoop · MenuLoop
0x6e180coptiondata0x4c options (volumes +0x20.., control type +0x44, autosave +0x48)
0x6e3d88playerdata0x178c progression
0x6ec138station_statuscurrent/next station indices and flags
0x422848gameDataAll[78]per-diagram DGF_GameData pointers
0x5b8870lectdatlecture records (80 B each)
0x6dce20examstatesstartup-inspection ladder (gate at 8)
0x6f05a8_SysCountframe counter (60 Hz)

A.2Physics state & tables

AddressNameMeaning
0x6d2470Speedkm/h (float)
0x6f0450 / 54 / 58_RunMove / RunDist / _RunDirm/frame · section distance · direction
0x6d1a44 / 0x6d1a3cNotch / Brake0–5 / 0–9
0x6d1a40 / 0x6d1a38Noch / Brake (PnP copies)lever detents pre-dispatch
0x6e17acper-controller structnochMax/brakeMax/handlelock/Dnoch/Dbrake/DbrakeMax/hardBrakeFlg
0x6ec1c4 / 0x6ec200DistStop / DistStopMaxdistance to stop point / section length
0x6d2e2c / 0x6d2e40 / 0x6d2e48comLim / speedLimit / comAtclimits (km/h / table index)
0x425380limSpeed[][5,10,…,125,25(ATC),0]
0x4251a0PressResist[10]brake pressure per level
0x589de0BrakeJumpTbl[30]{BrakeFunc*, DGF_BrakeCapaRecord*}
0x589ed0brake_capa[22]0x10-byte records (speed bounds, pressure endpoints, rate)
0x58a030TrainFormation[30]{front,rear} ExtCapa index pairs
0x58a0a8ExtCapa[30]0x1c-byte: model id, weight, axles, mass, capacity, rolling/tunnel coeff
0x58ae74 / 0x58a3f0MotorCapa_DC / _AC22×0x7a4 / 1×0xa84 motor tables
0x425f60judgeTbl2 × 0x1dc profiles: stop windows + overrun thresholds
0x429760ScoreTbl2 × 0x10c profiles: bonuses + penalty values (row+0xa4)
0x425c08unlock table8-word dependency entries for setClearData
0x6d796cSaveStartNowTimedeparture-time anchor (door melody gate)
0x6d7978 / 0x6d7970startMapFunc::StationStart / cntdeparture machine state
0x6d67e8 / 0x6d67ecplayDemo::mode / cntintro cinematic state

A.3Function index by chapter

FunctionAddressChapter
main0x1918c81
ALInit0x1987e01
MainTask0x1989381, 2
motherTask0x1ffa182
trainMain0x213a502
setNextProc0x213a102
UpdatePnPCon / ReadControl / setGameKey0x1b61e4 / 0x1b633c / 0x1dbca42
ALPadImpUnix::ProcessDeviceImpl0x3950782
PollPSW0x1984bc2
ALSystemImp::UpdateAll0x226a083
ttStartTask / ttCountTask0x198d88 / —3
GameTask / GameEnd0x1e718c / 0x1e75604
setMainMapMode / mainMap0x1e7974 / 0x1e7aac4
MenuTask / MenuInit0x1ef81c / 0x1ef7105
exam_play0x1efe205
Get_Diano_Nor / getNewDiaListNo0x219d10 / 0x21f8d45
startMapFunc / mapstart_DoorClose / CheckDoorClose0x1e9968 / 0x1e98b8 / 0x1e619c6
joinMapFunc0x1e8a386
playDemo (startDemo table 0x42c1b8)0x1e41a04
setNochBrake / __setpadcontrol0x200630 / 0x20030c7
ttTrainGo / ttTrainInit0x1b9960 / 0x1b975c7
getMotorPower / DC_MotorPower0x1b9ee0 / 0x1b9d407
getBrakePower / BrakeFunc_E0x1b9ee8-family / 0x1b90057
RunRegist / StartRegist / TunnelRegist / CurveGradeRegist0x1ba3ac / 0x1ba4d0 / 0x1ba524 / 0x1ba58c7
controlAts / controlAtc0x1bd220 / —7
subLifePoint0x1cbb948
judgeStopLine / judgeLateTime / judgeOverSpeed / judgeAtcOverSpeed / judgeGSensor0x1c5fc8 / 0x1c6498 / 0x1c66e8 / 0x1c6820 / 0x1c5ee08
setGameData / initGameData / InitTimeCtl0x1a0cd0 / 0x1a078c / 0x2136309
saveGameData / loadGameDatasee symtab9
setClearData / setStartScore0x1c2238 / —9, 10
gmOverCheck / gmOverInit / gmOverFuncMain0x1e6b88 / 0x1e6bbc / 0x1e6f1410
shortReplayMapFunc / procSReplay0x1e9520 / —10
checkPause / initPause / pauseFuncMain0x1eb3fc / — / —10
entryLecture / procLecture / cancelLecture0x1c7040 / 0x1c70ec / —11
DrawThreadFunc / ExecPacketMain0x3942f0 / 0x393c7412
ALScreenImpGLES ctor0x387a0812
DALPlaySound / VoicePlay2 / StationAnnounce / PlayAnnounce / PcmCheck0x20ab60 / 0x201928 / 0x1e47e8 / 0x1e46e4 / 0x1a8e1413
ALLzDecoder::Decode / ALArchiveImp accessors0x3c0304 (HeaderCheck) / 0x31c430..14

A.4GameCondition bit summary

BitMaskName
00x001RUNNING
10x002PAUSE
20x004EMERGENCY_BRAKE
30x008ATC_ENFORCE
40x010INHIBIT
60x040UNDEAD (debug)
70x080(unresolved — no setter found)
80x100DOORS
90x200GAME_OVER
100x400REPLAY
110x800SPEEDLIMIT/MENU (dual)
120x1000JOIN_GAME
130x2000MAP_DEADLINE
160x10000LIMIT_STOP
180x40000SEVERE_STOP

Compound masks: 0x7C2 game-over suppression · 0x204 game-over+emergency · 0x104 boarding · 0x402 time-stop · 0x102 input lock · 0x1100 join init.

← 15 · Reimplementation Guide