don't click here

Everything That I Know About Sonic the Hedgehog's Source Code

Discussion in 'General Sonic Discussion' started by Clownacy, Mar 30, 2022.

  1. Brainulator

    Brainulator

    Regular garden-variety member Member
    Regarding the Sonic CD symbol lists Clownacy posted above: could someone please explain the format they use?
     
  2. Clownacy

    Clownacy

    Tech Member
    1,101
    692
    93
  3. Impish

    Impish

    Member
    With the higher quality image, the device on the right appears to be a Sony product; the logo on the top left of the device is clearly a Sony logo, and the other writing on it appears to be the same as that on other Sony receivers/amplifiers I own from the period. Its definitely not a Teradrive. I'll keep looking for a matching model, but if anything my guess it is actually a video recording set up, and that receiver either has an integrated or attached VCR unit (Betamax or VHS, this was the transition period for Sony). Would have been handy for providing footage for advertisements straight from development versions of games.
     
    • Informative Informative x 1
    • List
  4. Devon

    Devon

    La mer va embrassé moi et délivré moi lakay. Tech Member
    1,425
    1,743
    93
    your mom
    Reposting stuff that I put on the SSRG thread:

    I've been digging through the Sonic 2 Nick Arcade and Sonic CD Gems collection symbols for a bit, among other things, and gathered a little collection of what certain labels were called in the source code:
    • Sonic 1 debug font = ascii
    • PlaySound = bgmset
    • PlaySound_Special = soundset
    • ClearScreen = scrinit
    • QueueDMATransfer = dmactrset
    • EniDec = mapdevr
    • RandomNumber = random
    • CalcSine = sinset
    • CalcAngle = atan
    • PalLoad1 = colorset
    • PalLoad2 = colorset2
    • PalPointers = colortbl
    • Pal_FadeFromBlack = fadein
    • Pal_FadeToBlack = fadeout
    • Pal_FadeFromWhite = flashin
    • Pal_FadeToWhite = flashout
    • PalCycle_Load = clchgctr
    • ChangeRingFrame = syspatchg
    • LevelSizeLoad = scr_set
    • DeformBgLayer = scroll
    • RunDynamicLevelEvents = scrchk
    • loadZoneBlockMaps = mapinit
    • LoadTilesAsYouMove = scrollwrt
    • LoadTilesFromStart = mapwrt
    • LoadCollisionIndexes = scdset
    • ConvertCollisionArray = scdcnv
    • BuildSprites = patset
    • DrawSprite = spatset
    • RunObjects = action
    • Obj_Index = act_tbl
    • DisplaySprite = actionsub
    • DeleteObject = frameout
    • MarkObjGone = frameoutchk
    • MarkObjGone_P1 = frameoutchkd
    • AnimateSprite = patchg
    • SingleObjLoad = actwkchk
    • SingleObjLoad2 = actwkchk2
    • TouchResponse = pcol
    • HurtCharacter = playdamageset
    • KillCharacter = playdieset
    • Sonic_ResetOnFloor = jumpcolsub
    • DebugMode = edit
    • JmpTbl_DbgObjLists = edittbl
    • SolidObject = hitchk
    • ObjectMoveAndFall = speedset
    • ObjectMove = speedset2
    • Obj79_SaveData = playsave
    • Obj79_LoadData = playload
    • AddPoints = scoreup
    • HudUpdate = scoreset
    • Hud_InitRings = ringinit
    • Hud_Base = scoreinit
    • AniArt_Load = efectwrt
    • LevelArtPointers = mapinittbl
    • ArtLoadCues = divdevtbl
    • SonicDynPLC = playwrtpat
    • Sonic 1 ColArray = scdtbl1/scdtbl
    • Sonic 1 ColArray2 = scdtbl2
    • Sonic 2 ColArray = scdtbl3
    • Sonic 2 ColArray2 = scdtbl4
    • Sonic 1 ColCurveMap = scddirtbl1
    • Sonic 2 ColCurveMap = scddirtbl2
    • Kos_Z80 (Sonic 1 PCM driver) = pcm_top (followed by pcm_end at the end)

    Sonic 2 Nick Arcade objects (also referenced the leaked debug mode code):
    • Obj01/Sonic = play00
    • Obj02/Tails = fox (probably)
    • Obj03/Pathswapper = colichg
    • Obj06/EHZ corkscrew = sloop
    • Obj09/Sonic (special stage) = play01
    • Obj0B/Rotating CPZ floor = kaiten
    • Obj0C/Small CPZ platform = prodai
    • Obj10/Sonic (proto debug object) = play02
    • Obj12/HPZ emerald = gem
    • Obj13/HPZ waterfall = wfall
    • Obj14/HTZ seesaw = sisoo
    • Obj14/HTZ seesaw ball = sball
    • Obj18/Platform = shima
    • Obj1F/GHZ Crabmeat = kani
    • Obj21/HUD = score
    • Obj22/GHZ Buzz Bomber = hachi
    • Obj25/Ring = ring
    • Obj26/Monitor = item
    • Obj2B/GHZ Chopper = fish
    • Obj36/Spikes = toge
    • Obj38/Shield = baria
    • Obj38/Invincibility stars = muteki
    • Obj3B/GHZ purple rock = jyama
    • Obj3D/GHZ boss = boss1
    • Obj3E/Animal prison = masin
    • Obj41/Sonic 1 spring = sjump
    • Obj41/Sonic 2 spring = bane
    • Obj42/GHZ Newtron = kamere
    • Obj44/GHZ wall = kageb
    • Obj48/GHZ boss ball = btama
    • Obj49/EHZ waterfall = taki
    • Obj4A/Octopus = oct
    • Obj4B/Buzzer = wasp
    • Obj4C/Batbot = bbat/ba
    • Obj4D/Rhinobot = stego
    • Obj4E/Alligator bot = gator
    • Obj4F/Dinobot = redz
    • Obj50/Seahorse = seahorse
    • Obj51/Skyhorse = skyhorse
    • Obj52/Pirahna = bfish/bfish2/fish2
    • Obj54/Snail = snail
    • Obj55/Boss parent = bossba
    • Obj55/EHZ boss subtype = drillerguy
    • Obj56/Boss explosion = billbomb
    • Obj57/EHZ boss object 1 = bossdriller
    • Obj58/EHZ boss object 2 = driller
    • Obj79/Checkpoint = save
    • Obj8A/Sonic 1 credits = staff

    Variables:
    • MainCharacter = playerwk
    • Camera_X_pos = scra_h_posit
    • Camera_Y_pos = scra_v_posit
    • Camera_BG_X_pos = scrb_h_posit
    • Camera_BG_Y_pos = scrb_v_posit
    • Camera_Min_Y_pos = scralim_up
    • Camera_Max_Y_pos = scralim_n_down
    • Camera_Min_Y_pos_Debug_Copy = editstack
    • Camera_Max_Y_pos_Debug_Copy = editstack2
    • Game_Mode = gmmode
    • Ctrl_1_Held = swdata1
    • Ctrl_1_Press = swdata1+1
    • Current_ZoneAndAct = stageno
    • Current_Zone = stageno
    • Current_Act = stageno+1
    • Debug_object = editno
    • Debug_Accel_Timer = edittimer
    • Debug_Speed = edittimer+1
    • v_ssrotate (Sonic 1) = rotspd
    • v_ssangle (Sonic 1) = rotdir

    Object variables/SSTs:
    • id = actno
    • render_flags = actflg
    • art_tile = sproffset
    • mappings = patbase
    • x_pos = xposi
    • y_pos = yposi
    • x_vel = xspeed
    • y_vel = yspeed
    • mapping_frame = patno
    • anim = mstno
    • status = cddat
    • subtype = userflag

    Other information:
    • Some of these other symbols were found in other data that hasn't been really properly documented out there yet. There's a whole section other symbols and even older code (I found an earlier version of the Emerald Hill boss and documented it here).
    • Mappings and DPLCs were definitely done in assembly, possibly by hand. Sprite mappings are generally labelled as "XXXXXpat", with labels for each sprite frame generally being labelled as "XXXXXspNN".
    • Tile data is labelled as "XXXXXcg".
    • Sonic 1 special stage maps are labelled as 'rotmaptblN"
    • Zones are referred to by their ID, not their name.
    • PLC lists are just labelled as "ddevNN".
    • There's a function that would load the Sonic 1 collision data if it was in Green Hill Zone, but it relies on how their development hardware worked, hence why it doesn't work in the build we have.
    • An object's main routine index table is labelled as "XXXXX_move_tbl".
    • An object's initialization routine is labelled as "XXXXXinit".
    • An object's main update routine is labelled as "XXXXXmove".
    • A common local label used when a free object slot was not found is ".worknai".
    • There's actually a reference to a totally scrapped boss that appeared to initially been made for Chemical Plant. Said symbols are "vacumeguy" and "bossvac".
    • Due to the nature of them using linking and XREFs, there's actually a couple of reused labels that are, of course, not exported.
    • Sonic CD developers called the functions that refer to the animals being deleted with a bad future set and the badniks being destroyed with a good future set as "friend_suicide" and "enemy_suicide" respectively. I know that English wasn't their native tongue, but I found it amusing.
    • Amy was called "emie" in Sonic CD's source code.
    • The "I'm outta here" in Sonic CD routine is just called "bye".
    Of course, this isn't every symbol that's been leaked out, and I'm lacking on Sonic CD's for now, but it's a good chunk I have documented. This should be helpful on documenting the rest later on. A while ago, I did do a quick test of setting up every label in TouchResponse/pcol here. RAM and object variables aren't set up, though, just the code labels.

    Running a Sonic CD ELF file through objdump with the "-l" option while disassembling adds in the filenames and line numbers.
    The information is there.

    Example:
    Code (Text):
    1. 813080c0 <action>:
    2. action():
    3. 813080c0:       94 21 ff f0     stwu    r1,-16(r1)
    4. C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:40
    5. 813080c4:       7c 08 02 a6     mflr    r0
    6. 813080c8:       90 01 00 14     stw     r0,20(r1)
    7. 813080cc:       93 e1 00 0c     stw     r31,12(r1)
    8. 813080d0:       93 c1 00 08     stw     r30,8(r1)
    9. C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:44
    10. 813080d4:       3c 60 81 36     lis     r3,-32458
    11. 813080d8:       3b e3 c2 c4     addi    r31,r3,-15676
    12. C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:45
    13. 813080dc:       3b c0 00 00     li      r30,0
    14. 813080e0:       48 00 00 40     b       81308120 <action+0x60>
    15. C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:46
    16. 813080e4:       88 1f 00 00     lbz     r0,0(r31)
    17. 813080e8:       28 00 00 00     cmplwi  r0,0
    18. 813080ec:       41 82 00 2c     beq     81308118 <action+0x58>
    19. C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:53
    20. 813080f0:       7f e3 fb 78     mr      r3,r31
    21. 813080f4:       88 9f 00 00     lbz     r4,0(r31)
    22. 813080f8:       38 04 ff ff     addi    r0,r4,-1
    23. 813080fc:       54 05 10 3a     rlwinm  r5,r0,2,0,29
    24. 81308100:       3c 80 81 35     lis     r4,-32459
    25. 81308104:       38 04 42 70     addi    r0,r4,17008
    26. 81308108:       7c 80 2a 14     add     r4,r0,r5
    27. 8130810c:       81 84 00 00     lwz     r12,0(r4)
    28. 81308110:       7d 89 03 a6     mtctr   r12
    29. 81308114:       4e 80 04 21     bctrl
    30. C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:56
    31. 81308118:       3b de 00 01     addi    r30,r30,1
    32. 8130811c:       3b ff 00 44     addi    r31,r31,68
    33. 81308120:       2c 1e 00 80     cmpwi   r30,128
    34. 81308124:       41 80 ff c0     blt     813080e4 <action+0x24>
    35. C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:57
    36. 81308128:       83 e1 00 0c     lwz     r31,12(r1)
    37. 8130812c:       83 c1 00 08     lwz     r30,8(r1)
    38. 81308130:       80 01 00 14     lwz     r0,20(r1)
    39. 81308134:       7c 08 03 a6     mtlr    r0
    40. 81308138:       38 21 00 10     addi    r1,r1,16

    Also, structure variables names are included in the .debug section, including the ones for objects, but I'm not quite sure how to get them extracted.
    [​IMG]

    Also took a further dive into R11A.ELF and organized the symbols by section and filename:
    Code (Text):
    1. main\ACTION.C
    2.     .text
    3.         action
    4.         speedset_0
    5.         speedset2
    6.         actionsub
    7.         frameout
    8.         patset
    9.         spatset
    10.  
    11. main\ACTSET.C
    12.     .text
    13.         flagwkclr
    14.         actsetchk
    15.         actsetinit
    16.         actset
    17.         tm_setchk
    18.         actnoset
    19.         actwkchk
    20.         actwkchk2
    21.         frameout_s
    22.         frameout_s00
    23.         frameout_s0
    24.  
    25.     .bss
    26.         pAsetadr_dummy
    27.         pAsetadr_w
    28.         pAsetadrz_w
    29.  
    30. main\DAI_K.C
    31.     .text
    32.         dai_k
    33.         dai_k_init
    34.         dai_k_move
    35.         k_move
    36.         jumpchk_d
    37.  
    38.     .data
    39.         k_daipat0
    40.         k_daipat1
    41.         k_daipat2
    42.         k_daipat
    43.         k_daichg0
    44.         k_daichg
    45.         dai_k_move_tbl
    46.         pattbl_20
    47.  
    48. main\DAI_RD1.C
    49.     .text
    50.         dodai
    51.         dodai_init
    52.         dodai_move
    53.         dodai_ud
    54.         dodai_lr
    55.         dodai_ride1
    56.         dodai_ride2
    57.         dodai_nA
    58.         dodai_nB
    59.         dodai_fix
    60.         dodai_fal
    61.         dodai_up
    62.         dodai_upx
    63.         dodai_rm
    64.         dodai_lm
    65.         dodai_sub
    66.         dai_fout
    67.         vfuta
    68.         vfuta_init
    69.         vfuta_move1
    70.         vfuta_move2
    71.  
    72.     .data
    73.         dai11a_pat1
    74.         dai11a_pat2
    75.         dai11a_pat3
    76.         dai11a_pattbl
    77.         dodai_acttbl
    78.         dai_hstbl_13
    79.         dai_mcnttbl_14
    80.         dodai_mtype
    81.         vfuta_pat0
    82.         vfuta_pat1
    83.         vfutapat
    84.         vfuta_tbl
    85.    
    86. main\DIRCOL.C
    87.     .text
    88.         dircolm
    89.         dircol
    90.         dircol2
    91.         dircol_d
    92.         dircol_d3
    93.         dircol_r
    94.         dircol_r2
    95.         dircol_r3
    96.         dircol_l
    97.         dircol_l2
    98.         dircol_l3
    99.         dircol_u
    100.         dircol_u2
    101.         dircol_u3
    102.         emycol_u
    103.         emycol_d
    104.         emycol_d2
    105.         emycol_d3
    106.         dircolchk
    107.         dircolchk1
    108.  
    109. main\DUMMY.C
    110.     .text
    111.         pa_set
    112.         fadeout_s
    113.  
    114. main\EDIT.C
    115.     .text
    116.         edit
    117.  
    118.     .bss
    119.         CKeyTogle
    120.  
    121. main\EMIE1.C
    122.     .text
    123.         emie1
    124.         emie1_init
    125.         emie1_matu
    126.         emie1_dakii
    127.         emie1_tobii
    128.         emie1_tobim
    129.         emie_play
    130.         setdirect
    131.         speedset
    132.         speedsetx
    133.         speedsety
    134.         jumpchk_d_0
    135.         pljumpset
    136.         dakicheck
    137.         empatchg
    138.         emie1clrset
    139.         emie1clrsetx
    140.         heartset
    141.         heart1
    142.         heart1_init
    143.         heart1_move
    144.  
    145.     .data
    146.         em1_tbl
    147.         emie1_clr
    148.         ht1_tbl
    149.  
    150. main\EMIE1CG.C
    151.     .data
    152.         pat0
    153.         pat1
    154.         pat2
    155.         pat3
    156.         pat4
    157.         pat5
    158.         pat6
    159.         pat7
    160.         pat8
    161.         pat9
    162.         patA
    163.         patB
    164.         patC
    165.         patD
    166.         patE
    167.         patF
    168.         pat10
    169.         emie1pat
    170.         moji_pchg
    171.         run_pchg
    172.         kiss_pchg
    173.         stnd2_pchg
    174.         moji2_pchg
    175.         kyoro_pchg
    176.         em_pchg
    177.  
    178. main\ENEMY.C
    179.     .text
    180.         ene_ari
    181.         ari_init
    182.         ari_fall
    183.         ari_move
    184.         ene_chou
    185.         chou_init
    186.         chou_move
    187.         ene_ka
    188.         ka_init
    189.         ka_move
    190.         ka_turn
    191.         ka_down
    192.         ka_stop
    193.         ene_kamemusi
    194.         kamemusi_init
    195.         kamemusi_fall
    196.         kamemusi_move
    197.         area
    198.         kamemusi_stop
    199.         kamemusi_stop1
    200.         kamemusi_tama
    201.         kamemusi_tama_init
    202.         tama
    203.         tama_init
    204.         tama_move
    205.         ene_tagame_a
    206.         tagame_init
    207.         tagame_wait
    208.         tagame_wait1
    209.         tagame_jump
    210.         tagame_jump1
    211.         ene_tama
    212.  
    213.     .data
    214.         ari_pchg00
    215.         ari_pchg01
    216.         ari_pchg
    217.         ari0
    218.         ari1
    219.         ari2
    220.         ari3
    221.         ari_pat
    222.         chou_pchg00
    223.         chou_pchg01
    224.         chou_pchg
    225.         chou1e
    226.         chou2e
    227.         chou3e
    228.         chou1b
    229.         chou2b
    230.         chou3b
    231.         e_chou_pat
    232.         b_chou_pat
    233.         pchg_e_0
    234.         pchg_e_1
    235.         pchg_e
    236.         pchg_b_0
    237.         pchg_b_1
    238.         pchg_b
    239.         ka1e
    240.         ka2e
    241.         ka3e
    242.         ka4e
    243.         ka5e
    244.         ka1b
    245.         ka2b
    246.         ka3b
    247.         ka4b
    248.         ka5b
    249.         b_ka_pat
    250.         e_kamem_pchg00
    251.         e_kamem_pchg01
    252.         e_kamem_pchg
    253.         b_kamem_pchg00
    254.         b_kamem_pchg01
    255.         b_kamem_pchg
    256.         kamem_pat00e
    257.         kamem_pat00b
    258.         kamem_pat01
    259.         kamem_pat02
    260.         e_kamem_pat
    261.         b_kamem_pat
    262.         tama_pchg00
    263.         tama_pchg
    264.         tama_pat00
    265.         tama_pat01
    266.         tama_pat02
    267.         tama_pat03
    268.         tama_pat
    269.         e_tagame_pchg00
    270.         e_tagame_pchg01
    271.         e_tagame_pchg
    272.         b_tagame_pchg00
    273.         b_tagame_pchg01
    274.         b_tagame_pchg
    275.         tagame_pat00
    276.         tagame_pat01
    277.         tagame_pat02
    278.         tagame_pat03e
    279.         tagame_pat04e
    280.         tagame_pat05e
    281.         tagame_pat03b
    282.         tagame_pat04b
    283.         tagame_pat05b
    284.         tagame_pat06
    285.         e_tagame_pat
    286.         b_tagame_pat
    287.  
    288. main\EQU.C
    289.     .bss
    290.         ta_flag
    291.         clrspflg_save
    292.         flagworkcnt
    293.         flagworkcnt2
    294.         pl_suu
    295.         main_play
    296.         pl_air
    297.         pltimeover_f
    298.         plring_f2
    299.         pl_suu_f
    300.         plring_f
    301.         pltime_f
    302.         plscore_f
    303.         plring
    304.         plscore
    305.         play_start
    306.         start_flag
    307.         plpower_b
    308.         plpower_m
    309.         plpower_s
    310.         plpower_a
    311.         plflag
    312.         plflag_s
    313.         plxposi_s
    314.         plyposi_s
    315.         plring_s
    316.         pltime_s
    317.         time_flag
    318.         scralim_down_s
    319.         scra_h_posit_s
    320.         scra_v_posit_s
    321.         scrb_h_posit_s
    322.         scrb_v_posit_s
    323.         scrc_h_posit_s
    324.         scrc_v_posit_s
    325.         scrz_h_posit_s
    326.         scrz_v_posit_s
    327.         waterposi_m_s
    328.         water_flag_s
    329.         waterflag_s
    330.         plring_f2_s
    331.         generate_flag
    332.         plsubchg_flag
    333.         enkeino
    334.         projector_flag
    335.         special_flag
    336.         conbine_flag
    337.         enecgflg
    338.         emie3end
    339.         extrascore
    340.         markerno
    341.         gf_flag
    342.         chibi_s
    343.         tv_flag
    344.         edittimer
    345.         time_stop
    346.         sys_pattim
    347.         sys_patno
    348.         sys_pattim2
    349.         sys_patno2
    350.         sys_pattim3
    351.         sys_patno3
    352.         sys_pattim4
    353.         sys_patno4
    354.         sys_ringtimer
    355.         editstack
    356.         editstack2
    357.         mapcheck
    358.         blkno
    359.         edit_user
    360.         sysdirec
    361.         prio_flag
    362.         init_flag
    363.         boss_sound
    364.         shut_flag
    365.         st6clrchg
    366.         chibi_flag
    367.         mapwrt_cnt
    368.         startcolor
    369.         colorcnt
    370.         int_flg
    371.         linkdata
    372.         cltbladr
    373.         ranum
    374.         cgwrtcnt
    375.         cgwrttim
    376.         dmastack
    377.         waterposi
    378.         waterposi_m
    379.         watermoveposi
    380.         waterspeed
    381.         water_flag
    382.         waterflag
    383.         waterflag2
    384.         scralim_n_left
    385.         scralim_n_right
    386.         scralim_n_up
    387.         scralim_n_down
    388.         scralim_left
    389.         scralim_right
    390.         scralim_up
    391.         scralim_down
    392.         scrar_no
    393.         scra_h_keep
    394.         scra_v_keep
    395.         scra_hz
    396.         scra_vz
    397.         scra_vline
    398.         scrh_flag
    399.         scrv_flag
    400.         scra_h_count
    401.         scra_v_count
    402.         scrb_h_count
    403.         scrb_v_count
    404.         scrc_h_count
    405.         scrc_v_count
    406.         scrz_h_count
    407.         scrz_v_count
    408.         limmoveflag
    409.         playpatno1
    410.         kusya_flag
    411.         plmaxspdwk
    412.         pladdspdwk
    413.         plretspdwk
    414.         playpatno
    415.         playwrtflag
    416.         asetposi
    417.         time_item
    418.         backto_cnt
    419.         scr_cnt
    420.         demo_adr
    421.         demo_cnt
    422.         swbufcnt
    423.         scra_hline
    424.         bossflag
    425.         bossstart
    426.         loopmapno
    427.         loopmapno2
    428.         ballmapno
    429.         ballmapno2
    430.         watercoliflag
    431.         waterstop
    432.         mizuflag
    433.         sekichyuflag
    434.         plautoflag
    435.         specflag
    436.         dai2rmvflag
    437.         emyscorecnt
    438.         timebonus
    439.         ringbonus
    440.         bonus_f
    441.         edplayflag
    442.         ms_wflg
    443.         lpKeepWork
    444.         lpFadeFlag
    445.         lpcolorwk4
    446.         lpcolorwk3
    447.         lpcolorwk2
    448.         lpcolorwk
    449.         switchflag
    450.         waterdirec
    451.         clchgtim
    452.         clchgcnt
    453.         plposiwkadr
    454.         scdadr
    455.         byecnt1
    456.         byecnt0
    457.         asetadrz2
    458.         asetadrz
    459.         asetadr2
    460.         asetadr
    461.         actset_rno
    462.         dirstk
    463.         scrflagz
    464.         scrflagc
    465.         scrflagb
    466.         scrflaga
    467.         scr_timer
    468.         scr_die
    469.         scroll_start
    470.         zone_flag
    471.         scrz_v_posit
    472.         scrz_h_posit
    473.         scrc_v_posit
    474.         scrc_h_posit
    475.         scrb_v_posit
    476.         scrb_h_posit
    477.         scra_v_posit
    478.         scra_h_posit
    479.         divdevwk
    480.         cgchgtim
    481.         cgchgcnt
    482.         pauseflag
    483.         intcnt
    484.         hscroll
    485.         vscroll
    486.         swdata2
    487.         swdata1
    488.         swdata
    489.         gmmode
    490.         actwk
    491.         lphscrollbuff
    492.         playposiwk
    493.         pbuffer
    494.         hscrollwork
    495.         flowwk
    496.         blockwk
    497.         pmapwk
    498.         linework
    499.         col_x
    500.         col_y
    501.         scrflagzw
    502.         scrflagcw
    503.         scrflagbw
    504.         scrflagaw
    505.         scrz_v_posiw
    506.         scrz_h_posiw
    507.         scrc_v_posiw
    508.         scrc_h_posiw
    509.         scrb_v_posiw
    510.         scrb_h_posiw
    511.         scra_v_posiw
    512.         scra_h_posiw
    513.         systemtimer
    514.         editmode
    515.         editno
    516.         flowercnt
    517.         flowerposi
    518.         debugflag
    519.         demoflag
    520.         debugwork
    521.         pltime
    522.         stageno
    523.         gametimer
    524.         gameflag
    525.         flagwork
    526.  
    527. main\ET1.C
    528.     .text
    529.         et
    530.         m_init
    531.         m_wait
    532.         m_die
    533.         m1wait
    534.         a_hover
    535.  
    536.     .data
    537.         tpat00
    538.         tpat01
    539.         tpat07
    540.         tpat02
    541.         tpat03
    542.         tpat04
    543.         tpat05
    544.         tpat06
    545.         pat_et
    546.         tbl0sproffset
    547.         tbl0
    548.         pchg0
    549.         pchg
    550.  
    551. main\ETC.C
    552.     .text
    553.         sinset
    554.         atan_sonic
    555.  
    556. main\FCOL.C
    557.     .text
    558.         fcol
    559.         fcol_d
    560.         fcol_r
    561.         fcol_u
    562.         fcol_l
    563.         scdend
    564.         scdchk
    565.         scdchk2
    566.         scdend_r
    567.         scdchk_r
    568.         scdchk2_r
    569.         scramapad
    570.         dirchk
    571.         scdcnv
    572.         st_elseDataChk
    573.         st_wackyDataChk
    574.         st_starDataChk
    575.         st_metalDataChk
    576.         CCset
    577.         CSset
    578.  
    579. main\GAME.C
    580.     .text
    581.         DLL_meminit
    582.         DLL_memfree
    583.         Print_Msg
    584.         Get_vscroll
    585.         Get_scra_h_posiw
    586.         Get_scrb_h_posiw
    587.         SetDebugFlag
    588.         game
    589.         game_init
    590.         play_act_set
    591.         scdset
    592.         syspatchg
    593.         back_to_cnt
    594.         bye_cnt
    595.         sdfdout
    596.         sdfdin
    597.         da_set
    598.         main
    599.  
    600.     .data
    601.         da_tbl_189
    602.  
    603.     .bss
    604.         Interupt_Counter
    605.         PauseIcon
    606.         SetGrid
    607.         EAsprset
    608.         ClrSpriteDebug
    609.         WaveRequest
    610.         CDPlay
    611.         CDPause
    612.         ChangeTileBmp
    613.         WaveAllStop
    614.         sMemSet
    615.         sMemCpy
    616.         sRandom
    617.         sPrintf
    618.         sOutputDebugString
    619.         sOpenFile
    620.         sReadFile
    621.         sCloseFile
    622.         lpghWnd
    623.         sGetFileSize
    624.  
    625. main\GOAL.C
    626.     .text
    627.         gene
    628.         gene_init
    629.         gene_move0
    630.         gene_move1
    631.         kira_set
    632.         kira_move
    633.         gene_coli
    634.         bring2
    635.         bring2init
    636.         bring2move0
    637.         bring2move1
    638.         bigring
    639.         bring_init
    640.         bring_move0
    641.         bring_move1
    642.         bring_coli
    643.         mosugu
    644.         mosug_init
    645.         mosug_move0
    646.         mosug_move1
    647.         offset_set
    648.         goal
    649.         goal_init
    650.         goal_move0
    651.         goal_move1
    652.         goal_move2
    653.         goal_move3
    654.  
    655.     .data
    656.         gene_tbl
    657.         bring2_tbl
    658.         bigring_tbl
    659.         mosugu_tbl
    660.         goal_tbl
    661.  
    662. main\IO.C
    663.     .text
    664.         SWdataSet
    665.         scrinit
    666.  
    667. main\ITEM.C
    668.     .text
    669.         timedisp
    670.         td_init
    671.         td_move
    672.         t_item
    673.         t_item_init
    674.         t_item_move0
    675.         t_item_move1
    676.         t_item_move2
    677.         flagwkadr
    678.         ride_on_chk_i
    679.         item
    680.         iteminit
    681.         itemmove
    682.         itemmove2
    683.         itemmove3
    684.         itemget
    685.         powerup_init
    686.         item2
    687.         item2init
    688.         item2move
    689.         item2die
    690.         error_item
    691.  
    692.     .data
    693.         itemchg0
    694.         itemchg1
    695.         itemchg2
    696.         itemchg3
    697.         itemchg4
    698.         itemchg5
    699.         itemchg6
    700.         itemchg7
    701.         itemchg8
    702.         itemchg9
    703.         itemchg
    704.         ite00
    705.         ite01
    706.         ite02
    707.         ite03
    708.         ite04
    709.         ite05
    710.         ite06
    711.         ite07
    712.         ite08
    713.         ite09
    714.         ite0a
    715.         ite0b
    716.         ite0c
    717.         ite0d
    718.         ite0e
    719.         ite0f
    720.         ite10
    721.         ite11
    722.         ite12
    723.         ite13
    724.         itempat
    725.         cor00
    726.         cor01
    727.         cor02
    728.         cor03
    729.         cor04
    730.         cor05
    731.         cor06
    732.         cor07
    733.         cor08
    734.         cor09
    735.         cor0a
    736.         cor0b
    737.         cor0c
    738.         cor0d
    739.         cor0e
    740.         cor0f
    741.         corepat
    742.  
    743. main\PLAYER.C
    744.     .text
    745.         bye_chk
    746.         play00
    747.         muteki_set
    748.         play00init
    749.         mizuki_set
    750.         mapno_chk
    751.         scr_h
    752.         play00move
    753.         playpowercnt
    754.         playposiwkset
    755.         plwaterchk
    756.         playsave
    757.         backto_chk
    758.         play00walk
    759.         play00jump
    760.         ball00walk
    761.         ball00jump
    762.         chk11
    763.         levermove
    764.         lmovecol
    765.         plwalk_l
    766.         plwalk_r
    767.         balllmove
    768.         ballwalk_l
    769.         ballwalk_r
    770.         jumpmove
    771.         limitchk
    772.         ballchk
    773.         ballset
    774.         jumpchk
    775.         jumpchk2
    776.         keispd
    777.         keispd2
    778.         fallchk
    779.         direcchg
    780.         jumpcolchk
    781.         jumpcolsub
    782.         jumpcolsub0
    783.         play00damage
    784.         play00damage_sub
    785.         play00die
    786.         play00die_sub
    787.         play00erase
    788.         loopchk
    789.         st7_x
    790.         patchgmain
    791.         patchgmain2
    792.         playrunchg
    793.         playrunchg2
    794.         playrunchg3
    795.         platetc_chg
    796.         little_runchg
    797.         little_patchg
    798.         frip_spd
    799.  
    800.     .bss
    801.         WaveClear
    802.         Brake_Req
    803.         Brake_Sw
    804.  
    805. main\PLAYPAT1.C
    806.     .data
    807.         pat00
    808.         pat01
    809.         pat02
    810.         pat03
    811.         pat04
    812.         pat05
    813.         pat06
    814.         pat07
    815.         pat08
    816.         pat09
    817.         pat0a
    818.         pat0b
    819.         pat0c
    820.         pat0d
    821.         pat0e
    822.         pat0f
    823.         pat10
    824.         pat11
    825.         pat12
    826.         pat13
    827.         pat14
    828.         pat15
    829.         pat16
    830.         pat17
    831.         pat18
    832.         pat19
    833.         pat1a
    834.         pat1b
    835.         pat1c
    836.         pat1d
    837.         pat1e
    838.         pat1f
    839.         pat20
    840.         pat21
    841.         pat22
    842.         pat23
    843.         pat24
    844.         pat25
    845.         pat26
    846.         pat27
    847.         pat28
    848.         pat29
    849.         pat2a
    850.         pat2b
    851.         pat2c
    852.         pat2d
    853.         pat2e
    854.         pat2f
    855.         pat30
    856.         pat31
    857.         pat32
    858.         pat33
    859.         pat34
    860.         pat35
    861.         pat36
    862.         pat37
    863.         pat38
    864.         pat39
    865.         pat3a
    866.         pat3b
    867.         pat3c
    868.         pat3d
    869.         pat3e
    870.         pat3f
    871.         pat40
    872.         pat41
    873.         pat42
    874.         pat43
    875.         pat44
    876.         pat45
    877.         pat46
    878.         pat47
    879.         pat48
    880.         pat49
    881.         pat4a
    882.         pat4b
    883.         pat4c
    884.         pat4d
    885.         pat4e
    886.         pat4f
    887.         pat50
    888.         pat51
    889.         pat52
    890.         pat53
    891.         pat54
    892.         pat55
    893.         pat56
    894.         pat57
    895.         pat58
    896.         pat59
    897.         pat5a
    898.         pat5b
    899.         pat5c
    900.         pat5d
    901.         pat5e
    902.         pat5f
    903.         pat60
    904.         pat61
    905.         pat62
    906.         pat63
    907.         pat64
    908.         pat65
    909.         pat66
    910.         pat67
    911.         pat68
    912.         pat69
    913.         pat6a
    914.         pat6b
    915.         pat6c
    916.         pat6d
    917.         pat6e
    918.         pat6f
    919.         pat70
    920.         pat71
    921.         pat72
    922.         pat73
    923.         pat74
    924.         pat75
    925.         pat76
    926.         pat77
    927.         pat78
    928.         pat79
    929.         pat7a
    930.         pat7b
    931.         pat7c
    932.         pat7d
    933.         pat7e
    934.         pat7f
    935.         pat80
    936.         pat81
    937.         pat82
    938.         pat83
    939.         pat84
    940.         pat85
    941.         pat86
    942.         pat87
    943.         pat88
    944.         pat89
    945.         pat8a
    946.         pat8b
    947.         pat8c
    948.         pat8d
    949.         pat8e
    950.         pat8f
    951.         pat90
    952.         pat91
    953.         pat92
    954.         pat93
    955.         pat94
    956.         pat95
    957.         pat96
    958.         pat97
    959.         pat98
    960.         pat99
    961.         pat9a
    962.         pat9b
    963.         pat9c
    964.         pat9d
    965.         pat9e
    966.         pat9f
    967.         pata0
    968.         pata1
    969.         pata2
    970.         pata3
    971.         pata4
    972.         pata5
    973.         pata6
    974.         pata7
    975.         pata8
    976.         pata9
    977.         pataa
    978.         patab
    979.         patac
    980.         patad
    981.         patae
    982.         pataf
    983.         patb0
    984.         patb1
    985.         patb2
    986.         patb3
    987.         patb4
    988.         patb5
    989.         patb6
    990.         patb7
    991.         patb8
    992.         patb9
    993.         patba
    994.         patbb
    995.         patbc
    996.         patbd
    997.         patbe
    998.         patbf
    999.         patc0
    1000.         patc1
    1001.         patc2
    1002.         patc3
    1003.         patc4
    1004.         patc5
    1005.         sncpat
    1006.  
    1007. main\PLAYSP.C
    1008.     .text
    1009.         playsp
    1010.  
    1011. main\PLAYSUB.C
    1012.     .text
    1013.         patchg
    1014.         playsave0
    1015.         marker
    1016.         marker_init
    1017.         marker_move0
    1018.         marker_move1
    1019.         marker_move2
    1020.         plairset
    1021.         tensuu_set
    1022.         tensuu0
    1023.         bakuha
    1024.         baku_init
    1025.         baku_move
    1026.         baku_die
    1027.         flower
    1028.         flow_init
    1029.         flow_move0
    1030.         flow_move1
    1031.         flow_sub
    1032.         flow_sub1
    1033.         flow_move2
    1034.         flow_move3
    1035.         mizukiri
    1036.         mizuki_init
    1037.         mizuki_move
    1038.         mizuki_move2
    1039.         futa
    1040.         ride_on_chk_f
    1041.         futa_init
    1042.         futa_move
    1043.         futa_move2
    1044.         futa_move3
    1045.         exit2_set
    1046.         col_chk
    1047.         exit2
    1048.         exit2_init
    1049.         exit2_move
    1050.         exit2_erase
    1051.         baria
    1052.         bariainit
    1053.         bariamove
    1054.         mutekimove
    1055.         backtomove
    1056.         muteki_sub
    1057.         actionsub0
    1058.         ball
    1059.         ball_init
    1060.         ball_move
    1061.         ball_ball
    1062.         ball_rd7
    1063.         ball_coli
    1064.  
    1065.     .data
    1066.         flowchg0
    1067.         flowchg1
    1068.         flowchg2
    1069.         flowchg3
    1070.         flowchg
    1071.         flo00
    1072.         flo01
    1073.         flo02
    1074.         flo03
    1075.         flo04
    1076.         flo05
    1077.         flo06
    1078.         flo07
    1079.         flow_pat
    1080.  
    1081. main\PLCHG.C
    1082.     .data
    1083.         plchg00
    1084.         plchg01
    1085.         plchg02
    1086.         plchg03
    1087.         plchg04
    1088.         plchg05
    1089.         plchg06
    1090.         plchg07
    1091.         plchg08
    1092.         plchg09
    1093.         plchg10
    1094.         plchg11
    1095.         plchg12
    1096.         plchg13
    1097.         plchg14
    1098.         plchg15
    1099.         plchg16
    1100.         plchg17
    1101.         plchg18
    1102.         plchg19
    1103.         plchg20
    1104.         plchg21
    1105.         plchg22
    1106.         plchg23
    1107.         plchg24
    1108.         plchg25
    1109.         plchg26
    1110.         plchg27
    1111.         plchg28
    1112.         plchg29
    1113.         plchg30
    1114.         plchg31
    1115.         plchg32
    1116.         plchg33
    1117.         plchg34
    1118.         plchg35
    1119.         plchg36
    1120.         plchg37
    1121.         plchg38
    1122.         plchg39
    1123.         plchg40
    1124.         plchg41
    1125.         plchg42
    1126.         plchg43
    1127.         plchg44
    1128.         plchg45
    1129.         plchg46
    1130.         plchg47
    1131.         plchg48
    1132.         plchg49
    1133.         plchg50
    1134.         plchg51
    1135.         plchg52
    1136.         plchg53
    1137.         plchg54
    1138.         plchg55
    1139.         plchg56
    1140.         plchg57
    1141.         playchg
    1142.  
    1143. main\RIDECHK.C
    1144.     .text
    1145.         ride_on_clr
    1146.         ride_on_set
    1147.         hitchk_u
    1148.         ridechk
    1149.         ride_on_chk
    1150.         hitchk
    1151.         hit_v
    1152.         hit_x
    1153.         push_set
    1154.         push_clr
    1155.         hit_y
    1156.         hit_yu
    1157.         hit_yu1
    1158.         hit_yu0
    1159.         hit_e
    1160.         side_coli
    1161.         hit_set
    1162.         hit_clr
    1163.  
    1164. main\RING.C
    1165.     .text
    1166.         ring
    1167.         ringinit_0
    1168.         ringmove
    1169.         ringget
    1170.         ringgetsub
    1171.         ringdie
    1172.         ringerase
    1173.         flyring
    1174.         flyringinit
    1175.         flyringmove
    1176.         flyringget
    1177.         flyringdie
    1178.         flyringerase
    1179.  
    1180.     .data
    1181.         ringsp0
    1182.         ringsp1
    1183.         ringsp2
    1184.         ringsp3
    1185.         ringsp4
    1186.         ringsp5
    1187.         ringsp6
    1188.         ringsp7
    1189.         ringsp8
    1190.         ringpat
    1191.         ringchg0
    1192.         ringchg1
    1193.         ringchg2
    1194.         ringchg
    1195.  
    1196. main\SCORE.C
    1197.     .text
    1198.         tensuu
    1199.         ten_init
    1200.         ten_move
    1201.         score
    1202.         score_init
    1203.         score_move
    1204.         scoreup
    1205.         scoreset
    1206.         ringinit
    1207.         scoreinit
    1208.         posiwrt
    1209.         bonuswrt
    1210.         ringwrt
    1211.         scorewrt
    1212.         scorewrt2
    1213.         posiwrt0
    1214.         playsuuwrt
    1215.         timewrt1
    1216.         timewrt
    1217.         timewrt0
    1218.  
    1219.     .data
    1220.         subtbl
    1221.         subtblh4
    1222.         tenpat0
    1223.         tenpat1
    1224.         tenpat2
    1225.         tenpat3
    1226.         tenpat4
    1227.         tenpat5
    1228.         tenpat
    1229.         scorepat0
    1230.         scorepat1
    1231.         scorepat2
    1232.         scorepat3
    1233.         scorepat
    1234.         scoreinittbl
    1235.         ringinittbl
    1236.  
    1237. main\SCRCHK.C
    1238.     .text
    1239.         scrchk
    1240.         zone1chk
    1241.         zone11chk
    1242.         zone12chk
    1243.         zone13chk
    1244.         zone3chk
    1245.         zone31chk
    1246.         zone33chk
    1247.         zone6chk
    1248.         zone5chk
    1249.         zone51chk
    1250.         zone53chk
    1251.         zone8chk
    1252.         zone81chk
    1253.         zone83chk
    1254.         zone4chk
    1255.         zone41chk
    1256.         zone42chk
    1257.         zone4chk
    1258.         zone7chk
    1259.         zone71chk
    1260.         zone72chk
    1261.         zone73chk
    1262.         bossclr_scr
    1263.         bossclr_scrset
    1264.  
    1265. main\SPRING.C
    1266.     .text
    1267.         iwa
    1268.         iwa_init
    1269.         iwa_move
    1270.         koma
    1271.         koma_init
    1272.         koma_move
    1273.         koma_move2
    1274.         spring_d
    1275.         spr_d_init
    1276.         spr_d_move
    1277.         spring
    1278.         sjumpinit
    1279.         ride_on_chk_s
    1280.         sjumpmove
    1281.         sjumpmove2
    1282.         sjumpmove3
    1283.         ride_on_chk_s1
    1284.         sdushmove
    1285.         sdushmove2
    1286.         sdushmove3
    1287.         ride_on_chk_s2
    1288.         sjump2move
    1289.         sjump2move2
    1290.         sjump2move3
    1291.         sjump3move
    1292.         sjump3move2
    1293.         sjump3move3
    1294.  
    1295.     .data
    1296.         spat00
    1297.         spat01
    1298.         spat02
    1299.         spat03
    1300.         spat04
    1301.         spat05
    1302.         spat06
    1303.         spat07
    1304.         spat08
    1305.         kpat00
    1306.         kpat01
    1307.         ipat00
    1308.         spat10
    1309.         spat11
    1310.         spat12
    1311.         spat13
    1312.         spat14
    1313.         spat15
    1314.         spat16
    1315.         spat17
    1316.         spat18
    1317.         springpat
    1318.         spring90pat
    1319.         spring45pat
    1320.         springpat2
    1321.         spring90pat2
    1322.         spring45pat2
    1323.         komapat
    1324.         iwapat
    1325.         springchg0
    1326.         springchg
    1327.         komachg0
    1328.         komachg
    1329.         sjump_move_tbl
    1330.  
    1331. main\SUICIDE.C
    1332.     .text
    1333.         enemy_suicide
    1334.         friend_suicide
    1335.  
    1336. main\TAKI.C
    1337.     .text
    1338.         taki
    1339.         taki_init
    1340.         taki_move
    1341.         jisin_set
    1342.         jisin
    1343.  
    1344.     .data
    1345.         shibukichg0
    1346.         shibukichg
    1347.         shibuki0
    1348.         shibuki1
    1349.         shibukipat
    1350.         taki_move_tbl
    1351.  
    1352. main\TBL0.C
    1353.     .data
    1354.         genechg0
    1355.         genechg1
    1356.         genechg
    1357.         genepat0
    1358.         genepat1
    1359.         genepat2
    1360.         genepat3
    1361.         genepat4
    1362.         genepat5
    1363.         genepat6
    1364.         genepat7
    1365.         genepat8
    1366.         genepat
    1367.         bringchg0
    1368.         bringchg
    1369.         bringpat0
    1370.         bringpat1
    1371.         bringpat2
    1372.         bringpat3
    1373.         bringpat
    1374.         bring2chg0
    1375.         bring2chg
    1376.         bring2pat0
    1377.         bring2pat1
    1378.         bring2pat2
    1379.         bring2pat3
    1380.         bring2pat4
    1381.         bring2pat5
    1382.         bring2pat6
    1383.         bring2pat7
    1384.         bring2pat
    1385.         goalchg0
    1386.         goalchg
    1387.         goalsp0
    1388.         goalsp1
    1389.         goalsp2
    1390.         goalsp3
    1391.         goalsp4
    1392.         goalsp5
    1393.         goalpat
    1394.  
    1395. main\TBL1.C
    1396.     .data
    1397.         bariachg0
    1398.         bariachg1
    1399.         bariachg2
    1400.         bariachg3
    1401.         bariachg4
    1402.         bariachg5
    1403.         bariachg6
    1404.         bariachg7
    1405.         bariachg8
    1406.         bariachg
    1407.         bar00
    1408.         bar01
    1409.         bar02
    1410.         bar03
    1411.         bar04
    1412.         bar05
    1413.         bar06
    1414.         bar07
    1415.         bar08
    1416.         bar09
    1417.         bar0a
    1418.         bar0b
    1419.         bar0c
    1420.         bariapat
    1421.         exit2chg0
    1422.         exit2chg1
    1423.         exit2chg2
    1424.         exit2chg
    1425.         exi00
    1426.         exi01
    1427.         exi02
    1428.         exi03
    1429.         exi04
    1430.         exi05
    1431.         exi06
    1432.         exit2pat
    1433.         futachg0
    1434.         futachg
    1435.         fut00
    1436.         fut01
    1437.         futapat
    1438.         mizukichg0
    1439.         mizukichg
    1440.         miz00
    1441.         miz01
    1442.         miz02
    1443.         mizukipat
    1444.         baku_chg0
    1445.         baku_chg1
    1446.         bakuchg
    1447.         bak00
    1448.         bak01
    1449.         bak02
    1450.         bak03
    1451.         bak04
    1452.         bak05
    1453.         bak06
    1454.         bakupat
    1455.         mkchg
    1456.         markerchg
    1457.         pat00_0
    1458.         pat01_0
    1459.         pat02_0
    1460.         pat03_0
    1461.         markerpat
    1462.  
    1463. main\TREE.C
    1464.     .text
    1465.         hoshi
    1466.         hoshi_init
    1467.         hoshi_move
    1468.         kasoku0
    1469.         k0_init
    1470.         k0_move
    1471.         kasoku
    1472.         kasoku_init
    1473.         kasoku_move
    1474.  
    1475.     .data
    1476.         hoshi_tbl
    1477.         k0_tbl
    1478.         kasoku_tbl
    1479.         hoshipat0
    1480.         hoshipat1
    1481.         hoshipat
    1482.         kasokuchg0
    1483.         kasokuchg1
    1484.         kasokuchg2
    1485.         kasokuchg
    1486.         kasokupat_a
    1487.         kasokupat_b
    1488.         kasokupat_c
    1489.         kasokupat_d
    1490.         kasokupat_e
    1491.         kasokupat_f
    1492.         kasokupat_g
    1493.         kasokupat_h
    1494.         kasokupat_i
    1495.         kasokupat_j
    1496.         kasokupat
    1497.  
    1498. main\ZONE.C
    1499.     .text
    1500.         over
    1501.         over_init
    1502.         over_move
    1503.         title
    1504.         title_init
    1505.         title_move0
    1506.         title_move1
    1507.         title_back0
    1508.         title_back1
    1509.         title_wait
    1510.         clear
    1511.         clear_init0
    1512.         clear_init
    1513.         clear_move0
    1514.         clear_move1
    1515.         clear_move2
    1516.         clear_wait
    1517.  
    1518.     .data
    1519.         game0
    1520.         game1
    1521.         gamepat
    1522.         time0
    1523.         time1
    1524.         timepat
    1525.         gotpat0
    1526.         gotpat1
    1527.         gotpat2
    1528.         gotpat3
    1529.         madepat0
    1530.         madepat1
    1531.         madepat2
    1532.         madepat3
    1533.         bonuspat
    1534.         bonuspat0
    1535.         gotpat
    1536.         gotpat_0
    1537.         madepat
    1538.         madepat_0
    1539.         cleartbl
    1540.  
    1541.     .bss
    1542.         ClearSountWait
    1543.         WaitCount
    1544.  
    1545. main\ZONETBL1.C
    1546.     .data
    1547.         titletbl
    1548.         titlepat0
    1549.         titlepat1
    1550.         titlepat2
    1551.         titlepat3
    1552.         titlepat4
    1553.         titlepat5
    1554.         titlepat6
    1555.         titlepat7
    1556.         titlepat8
    1557.         title_pat
    1558.  
    1559. main\R1\ACT11A.C
    1560.     .text
    1561.         noact
    1562.  
    1563.     .data
    1564.         act_tbl
    1565.  
    1566. main\R1\COL1A.C
    1567.     .text
    1568.         clchgctr
    1569.         colchg11a
    1570.         clchg_sub0
    1571.         fadein0
    1572.         fadein0_new
    1573.         fadein1
    1574.         fadein2
    1575.         fadeout_new
    1576.         fadeout1
    1577.         fadeout2
    1578.         flashin
    1579.         flashin_new
    1580.         flashin1
    1581.         flashin2
    1582.         flashout_new
    1583.         flashout1
    1584.         flashout2
    1585.         colorset
    1586.         colorset2
    1587.         colorset00
    1588.         FadeProc
    1589.  
    1590.     .data
    1591.         clst1_1a0
    1592.         clst1_1a1
    1593.         advacolor
    1594.         advacolor2
    1595.         gamecolor
    1596.         zone1colora0
    1597.         zone1colora1
    1598.         zone1colora
    1599.         colortbl
    1600.         col1a0cnt
    1601.         col1a0col
    1602.         col1a1cnt
    1603.         col1a1col
    1604.         col1a2cnt
    1605.         col1a2col
    1606.         col1a3cnt
    1607.         col1a3col
    1608.         col1a4cnt
    1609.         col1a4col
    1610.         col1a5cnt
    1611.         col1a5col
    1612.  
    1613.     .bss
    1614.         FadeCount
    1615.  
    1616. main\R1\DEV11A.C
    1617.     .data
    1618.         mapinittbl
    1619.  
    1620. main\R1\EDTBL11A.C
    1621.     .data
    1622.         edit_tbl
    1623.  
    1624. main\R1\KOWASI1.C
    1625.     .text
    1626.         kowasi
    1627.         m_init_0
    1628.         m_wait_0
    1629.         m_down
    1630.  
    1631.     .data
    1632.         spr_kowasi00
    1633.         spr_kowasi01
    1634.         spr_kowasi02
    1635.         spr_kowasi03
    1636.         spr_kowasi04
    1637.         spr_kowasi05
    1638.         spr_kowasi06
    1639.         spr_kowasi07
    1640.         spr_kowasi08
    1641.         spr_kowasi09
    1642.         spr_kowasi0a
    1643.         spr_kowasi0b
    1644.         spr_kowasi0c
    1645.         spr_kowasi0d
    1646.         pat_kowasi
    1647.  
    1648. main\R1\KUZUR11A.C
    1649.     .data
    1650.         pata00
    1651.         patbase_kuzure_a
    1652.         tbla00
    1653.         tbla
    1654.         patc00
    1655.         patc01
    1656.         patc02
    1657.         patc03
    1658.         patc04
    1659.         patc05
    1660.         patc06
    1661.         patc
    1662.         patb00
    1663.         patb01
    1664.         patb02
    1665.         patb03
    1666.         patb04
    1667.         patbase_kuzure_b
    1668.         tblb00
    1669.         tblb01
    1670.         tblb02
    1671.         tblb03
    1672.         tblb04
    1673.         tblb
    1674.         patd00
    1675.         patd01
    1676.         patd02
    1677.         patd03
    1678.         patd04
    1679.         patd05
    1680.         patd
    1681.  
    1682. main\R1\KUZURE.C
    1683.     .text
    1684.         kuzureru_tikei
    1685.         acta_init
    1686.         acta_check
    1687.         actb_wait
    1688.         actb_down
    1689.         actb_init_a
    1690.         actb_init_b
    1691.  
    1692. main\R1\SCR11A.C
    1693.     .text
    1694.         enecginit
    1695.         divdevset
    1696.         scr_set
    1697.         playposiset
    1698.         scrbinit
    1699.         scroll
    1700.         scroll_h
    1701.         scrh_move
    1702.         right_check
    1703.         left_check
    1704.         scroll_v
    1705.         sv_move_main
    1706.         sv_move_main1
    1707.         sv_move_main2
    1708.         sv_move_sub2
    1709.         sv_move_sub
    1710.         sv_move_minus
    1711.         scrv_up_ch
    1712.         sv_move_plus
    1713.         scrv_down_ch
    1714.         scrv_move
    1715.         scrollb_v
    1716.         scrollb_h
    1717.         scrollc_h
    1718.         scrollz_h
    1719.         scrollwrt
    1720.         scrollwrtb
    1721.         hblockwrt
    1722.         hblockwrt1
    1723.         vblockwrt
    1724.         blockwrt
    1725.         mapadrset
    1726.         mapadrset1
    1727.         mapadrset99
    1728.         mapadrset2
    1729.         block_wrt
    1730.         block_chk
    1731.         vramadrset
    1732.         vramadrset1
    1733.         vramadrset0
    1734.         vramadrset99
    1735.         scr11a_test
    1736.         mapwrt
    1737.         mapwrt2
    1738.         mapwrt3
    1739.         mapwrt_z81a
    1740.         mapwrt_sub
    1741.         mapinit
    1742.         mapset
    1743.  
    1744.     .data
    1745.         z81awrttbl
    1746.         vblockwrtbtbl
    1747.         mapwrt_tbl
    1748.  
    1749. main\R1\SHOOT1.C
    1750.     .text
    1751.         kage
    1752.         kage_init
    1753.         kage_move
    1754.         ana
    1755.         kage1_init
    1756.         kage1_move0
    1757.         kage1_move1
    1758.         kage1_chk
    1759.         kage1_clr
    1760.         shooter
    1761.         shooterinit
    1762.         shootermove
    1763.         shootermove2
    1764.         shootermove3
    1765.         shooterspdset
    1766.         mspd_set
    1767.  
    1768.     .data
    1769.         kag00
    1770.         kag01
    1771.         kagepat
    1772.         ana00
    1773.         kage1pat
    1774.         shooterposi_0
    1775.         shooterposi_1
    1776.         shooterposi_2
    1777.         shooterpositbl
    1778.    
    1779. main\R1\SISAKE.C
    1780.     .text
    1781.         colli_pl_sikake_d
    1782.         colli_pl_sikake
    1783.         tobita1
    1784.         tobita_init
    1785.         tobita_stop_r
    1786.         tobita_stop_l
    1787.         tobita_ride_r
    1788.         tobita_ride_l
    1789.         tobita_yure_r
    1790.         tobita_yure_l
    1791.         hariyama
    1792.         hari_init
    1793.         hari_normal
    1794.  
    1795.     .data
    1796.         tobita1chg0
    1797.         tobita1chg1
    1798.         tobita1chg2
    1799.         tobitastop1
    1800.         tobitastop2
    1801.         tobita1chg
    1802.         tobita_a
    1803.         tobita_b
    1804.         tobita_c
    1805.         tobita_r_a
    1806.         tobita_r_b
    1807.         tobita_r_c
    1808.         tobita1_pat
    1809.         pat0_0
    1810.         hari12pat
    1811.  
    1812. main\R1\Z11ACT.C
    1813.     .data
    1814.         dummyarea
    1815.         asettbl
    1816.         asettblz
    1817.  
    1818. main\BLOCK.C
    1819.     .text
    1820.         block
    1821.         block_init
    1822.         block_move
    1823.         block_move2
    1824.         block_move3
    1825.         block_move4
    1826.         block_move5
    1827.         block_move6
    1828.         block_ride
    1829.         ride_on_chk_b
    1830.  
    1831.     .data
    1832.         block_tbl
    1833.         blockchg0
    1834.         blockchg1
    1835.         blockchg2
    1836.         blockchg
    1837.         block0
    1838.         block1
    1839.         block2
    1840.         block3
    1841.         block4
    1842.         block5
    1843.         blockpat
    1844.  
    1845. main\LOADER2.C
    1846.     .text
    1847.         ShortSWAP
    1848.         GetRoundStr
    1849.         ReadBlockMap
    1850.         ReadScrolMap
    1851.         soundset
    1852.  
    1853.     .data
    1854.         SeToWavTbl
    1855.  
    1856. main\BMP.C
    1857.     .bss
    1858.         SprBmp
    1859.  
    1860. main\R1\COLI1.C
    1861.     .text
    1862.         pcol
    1863.         CollitblDataXchk
    1864.         CollitblDataYchk
    1865.         ColliHitChk
    1866.         pcolitem
    1867.         pcolnomal
    1868.         pcolplay2
    1869.         pcolplay
    1870.         pcole
    1871.         playdamagechk
    1872.         playdamageset
    1873.         playdieset
    1874.         pcolspecial
    1875.         eggman_chk
    1876.         yago
    1877.         main_attack
    1878.  
    1879.     .data
    1880.         escoretbl
    1881.         colitbl
    1882.  
    1883.     .bss
    1884.         bCarry
    1885.  
    1886. main\R1\Z11ATBL.C
    1887.     .data
    1888.         scddirtbl
    1889.         scdtblwk
    1890.         scdtblwk2
    1891.         zone1scd
    1892.         mapwka
    1893.         mapwkb
    1894.  
    1895. main\SAVE.C
    1896.     .text
    1897.         playloadb
    1898.         playload
    1899.  
    1900. main\R1\FRIEND1.C
    1901.     .text
    1902.         t_roll
    1903.         rev_h
    1904.         set_sproffset
    1905.         friend
    1906.         t_init
    1907.         t_move
    1908.         t_movie
    1909.         p_init
    1910.         p_move
    1911.         p_movie
    1912.  
    1913.     .data
    1914.         pchg00
    1915.         pchg01
    1916.         pchg10
    1917.         pchg0_0
    1918.         pchg1
    1919.         spr_flicky1
    1920.         spr_flicky2
    1921.         spr_ricky1
    1922.         spr_ricky2
    1923.         spr_ricky3
    1924.         spr_ricky4
    1925.         spr_friend0
    1926.         spr_ricky5
    1927.         pat_friend0
    1928.         pat_friend1
    1929.         tbl0sproffset
    1930.    
    1931. main\R1\MOVIE1.C
    1932.     .text
    1933.         move1
    1934.         die
    1935.         mm_init
    1936.         mm_wait
    1937.         mm_die
    1938.         m_baku
    1939.         mm1wait
    1940.         sub
    1941.         s_init
    1942.         s_move
    1943.  
    1944.     .data
    1945.         movie1_pchg00
    1946.         movie1_pchg01
    1947.         movie1_pchg
    1948.         spr_movie1
    1949.         spr_movie2
    1950.         spr_movie3
    1951.         spr_movie4
    1952.         spr_movie5
    1953.         spr_movie0
    1954.         pat_movie
    1955.         tbl0_0
    Code (Text):
    1. main\ACTION.C
    2.     RunObjects
    3.     ObjectMoveAndFall
    4.     ObjectMove
    5.     DisplaySprite
    6.     DeleteObject
    7.     BuildSprites
    8.  
    9. main\ACTSET.C
    10.     ObjectsManager
    11.     SingleObjLoad
    12.     SingleObjLoad2
    13.     MarkObjGone
    14.  
    15. main\DAI_K.C
    16.     Spinning Platform
    17.  
    18. main\DAI_RD1.C
    19.     Platform
    20.     Vertical flapping door
    21.  
    22. main\DIRCOL.C
    23.     CalcRoomInFront
    24.     CalcRoomOverHead
    25.     CheckFloorDist
    26.     ObjCheckFloorDist
    27.     CheckRightWallDist
    28.     ObjCheckRightWallDist
    29.     CheckCeilingDist
    30.     ObjCheckCeilingDist
    31.     CheckLeftWallDist
    32.     ObjCheckLeftWallDist
    33.  
    34. main\DUMMY.C
    35.     Routine to set object's tile ID
    36.     Routine to fade out music
    37.  
    38. main\EDIT.C
    39.     DebugMode
    40.  
    41. main\EMIE1.C
    42.     Amy
    43.  
    44. main\EMIE1CG.C
    45.     Amy mappings and animations
    46.  
    47. main\ENEMY.C
    48.     Anton
    49.     Pata-Bata
    50.     Mosqui
    51.     Kamemusi
    52.     Tamabboh(?)
    53.     Taga-Taga
    54.  
    55. main\EQU.C
    56.     Level variables
    57.  
    58. main\ET1.C
    59.     Robot generator
    60.  
    61. main\ETC.C
    62.     CalcSine
    63.     CalcAngle
    64.  
    65. main\FCOL.C
    66.     AnglePos
    67.     Find_Tile
    68.     FindFloor
    69.     FindWall
    70.     ConvertCollisionArray
    71.  
    72. main\GAME.C
    73.     Main level routine
    74.     Routine to spawn player
    75.     LoadCollisionIndexes
    76.     ChangeRingFrame
    77.     Routine to update time warp timer
    78.     Routine to update bored timer
    79.     Routine to pause music
    80.     Routine to unpause music
    81.     Routine to play level music
    82.  
    83. main\GOAL.C
    84.     Flower capsule
    85.     Big ring
    86.     Goal post
    87.     Signpost
    88.  
    89. main\IO.C
    90.     ReadJoypads
    91.     ClearScreen
    92.  
    93. main\ITEM.C
    94.     Monitor/Time post
    95.  
    96. main\PLAYER.C
    97.     Sonic
    98.  
    99. main\PLAYPAT1.C
    100.     Sonic mappings
    101.  
    102. main\PLAYSP.C
    103.     Routine for handling special level collision
    104.  
    105. main\PLAYSUB.C
    106.     AnimateSprite
    107.     Checkpoint
    108.     ResumeMusic
    109.     Test badnik
    110.     Explosion
    111.     Flower
    112.     Spin tunnel waterfall splash
    113.     Spin tunnel door
    114.     Spin tunnel door splash
    115.     Powerup (shield, invincibility stars, time warp stars)
    116.     Spin tunnel tag
    117.  
    118. main\PLCHG.C
    119.     Sonic animations
    120.  
    121. main\RIDECHK.C
    122.     SolidObject
    123.  
    124. main\RING.C
    125.     Ring
    126.     Lost rings from getting hurt
    127.  
    128. main\SCORE.C
    129.     HUD object
    130.     AddPoints
    131.     HudUpdate
    132.     Hud_InitRings
    133.     HudBase
    134.  
    135. main\SCRCHK.C
    136.     RunDynamicLevelEvents
    137.  
    138. main\SPRING.C
    139.     Moving spring with wheel object
    140.     Spring object
    141.  
    142. main\SUICIDE.C
    143.     Time zone checks for animals and badniks
    144.  
    145. main\TAKI.C
    146.     Scrapped waterfall effect
    147.     Scrapped earthquake effect
    148.  
    149. main\TBL0.C
    150.     Flower capsule animations and mappings
    151.     Big ring animations and mappings
    152.     Signpost animations and mappings
    153.  
    154. main\TBL1.C
    155.     Powerup animations and mappings
    156.     Spin tunnel door splash animations and mappings
    157.     Spin tunnel door animations and mappings
    158.     Spin tunnel waterfall splash animations and mappings
    159.     Explosion animations and mappings
    160.     Checkpoint animations and mappings
    161.  
    162. main\TREE.C
    163.     3D star plant
    164.     3D loop/ramp booster
    165.  
    166. main\ZONE.C
    167.     Game over
    168.     Title card
    169.     End results card
    170.  
    171. main\ZONETBL1.C
    172.     Title card mappings
    173.  
    174. main\R1\ACT11A.C
    175.     Null object
    176.     ObjectIndex
    177.  
    178. main\R1\COL1A.C
    179.     PalCycle_Load
    180.     Pal_FadeFromBlack
    181.     Pal_FadeToBlack
    182.     Pal_FadeFromWhite
    183.     Pal_FadeToWhite
    184.     PalLoad_ForFade
    185.     PalLoad_Now
    186.  
    187. main\R1\DEV11A.C
    188.     LevelArtPointers
    189.     ArtLoadCues(?)
    190.  
    191. main\R1\EDTBL11A.C
    192.     JmpTbl_DbgObjLists
    193.  
    194. main\R1\KOWASI1.C
    195.     Breakable wall
    196.  
    197. main\R1\KUZUR11A.C
    198.     Collapsing platform mappings
    199.  
    200. main\R1\KUZURE.C
    201.     Collapsing platform
    202.  
    203. main\R1\SCR11A.C
    204.     Routine to initialize object graphics
    205.     LoadPLC
    206.     LevelSizeLoad
    207.     InitCameraValues
    208.     DeformBgLayer
    209.     ScrollHoriz
    210.     ScrollVerti
    211.     Bg_Scroll_Y
    212.     BGScroll_Block1
    213.     BGScroll_Block2
    214.     BGScroll_Block3
    215.     LoadTilesAsYouMove
    216.     DrawBlocks_LR
    217.     DrawBlocks_TB
    218.     DrawBlock
    219.     GetBlock
    220.     Routine to place a block at a position
    221.     Routine to check if a block is on screen
    222.     CalcBlockVRAMPos
    223.     DrawInitialBG
    224.     loadZoneBlockMaps
    225.     loadLevelLayout
    226.  
    227. main\R1\SHOOT1.C
    228.     Hollow log background
    229.     Sonic shaped hole
    230.     Hidden spin tunnel
    231.  
    232. main\R1\SISAKE.C
    233.     Springboard
    234.     Spikes
    235.  
    236. main\R1\Z11ACT.C
    237.     Object layout data
    238.  
    239. main\BLOCK.C
    240.     Small platform
    241.  
    242. main\LOADER2.C
    243.     Gems Collection specific loading routines
    244.     PlaySound
    245.  
    246. main\R1\COLI1.C
    247.     TouchResponse
    248.  
    249. main\R1\Z11ATBL.C
    250.     ColCurveMap
    251.     ColArray
    252.     ColArray2
    253.     Level collision data
    254.     Level layout data
    255.  
    256. main\SAVE.C
    257.     Routine for loading data saved at checkpoint
    258.     Routine for loading data saved in time travel
    259.  
    260. main\R1\FRIEND1.C
    261.     Animal
    262.  
    263. main\R1\MOVIE1.C
    264.     Metal Sonic projector
     
    • Informative Informative x 4
    • Like Like x 3
    • Agree Agree x 1
    • List
  5. Brainulator

    Brainulator

    Regular garden-variety member Member
    A question and a thought:
    • Where do "xspeed" and "yspeed" come from? Is it just the February 1990 footage?
    • I guess I didn't take a full look, but I honestly couldn't tell if "mapdevr" was referring to the Enigma decompression routine or the "write tilemap to VRAM" routine. Thinking about it some more, if mapdevr is EniDec, then I suspect that it the name consists of "map(pings)" + "dev" (I don't know what this is, but it seems to mean compression, given "divdevtbl" et al) + "r" (which I guess means "reverse"). (If it means anything, according to the Sonic Jam symbols linked above, RAM address $F6F4 is called "bitdev_d6".)
     
  6. Devon

    Devon

    La mer va embrassé moi et délivré moi lakay. Tech Member
    1,425
    1,743
    93
    your mom
    xspeed and yspeed can be found both in the 1990 footage and those structure member names found in the ELF files (still dunno the .debug section format x.x)

    I am certain mapdevr is EniDec. Even if the addresses are for an older build, you can still follow a general pattern with them, and it lines up.
     
    Last edited: Jun 12, 2022
  7. Brainulator

    Brainulator

    Regular garden-variety member Member
    Yeah, I saw that everything else lines up relative to each other, I just didn't look too closely. Thanks for that!

    I just noticed "xspeed" and "yspeed" in that image above. Is it possible to send me the pictured binary to see if I can make out something from them?
     
  8. Devon

    Devon

    La mer va embrassé moi et délivré moi lakay. Tech Member
    1,425
    1,743
    93
    your mom
    Contained are an objdump dump, R11A's ELF file, and its .debug section isolated. From the Gamecube version.

    EDIT: I did some more digging, and I think I'm on a lead. Found a thread on this very site asking about extracting debug data from a PS2 ELF (specifically DDRMAX2), which led me to a thread from a different site that successfully did it and explained how. The Gems Collection ELF files on the PS2 appear to have used the same compiler as DDRMAX2, AND I have found an archive of the compiler. Will update soon.

    EDIT 2: IT WORKS! Will post results in a bit~

    EDIT 3: ; )
     

    Attached Files:

    Last edited: Jun 12, 2022
  9. Brainulator

    Brainulator

    Regular garden-variety member Member
    Sprite status table variables, it looks like:
    • actno: equals $00. Means "action number" and is the thing we call the object's ID.
    • actflg: equals $01. Means "action flags" and are what we call "render flags".
    • sproffset: equals $02. The sprite's offset in VRAM.
    • patbase: equals $04. The pattern table base address... or mappings address, if you prefer.
    • xposi: equals $08. The object's X-position.
    • yposi: equals $0C. The object's Y-position.
    • xspeed: equals $10. The object's X-speed.
    • yspeed: equals $12. The object's Y-speed.
    • mspeed: equals $14. I'm not sure what the label is meant to be read as; our disassemblies call it "inertia" or "ground velocity".
    Those are consistent with Sonic 1 and 2. The next several differ, suggesting changes in the SST format at some point in the pipeline (see also Sonic Jam and its version of Sonic 3 & Knuckles).
    • sprhsize: equals $16. The sprite's horizontal size, as a radius. Was originally $17; this seems to be swapped with the next one.
    • sprvsize: equals $17. The sprite's vertical size, as a radius. Was originally $16; see above.
    • sprhs: equals $18. The sprite's horizontal size, in dots, it seems. Was originally $19.
      • sprvs, sprvo, and sprho also show up alongside sprhs in the February 1990 footage, but not here. Also, see next.
    • sprpri: equals $19. The sprite's priority; was originally $18.
      • sprhs and sprpri are swapped from Sonic 1 and 2, apparently reverting back to the Sonic 1 prototype format. Perhaps the other out-of-order symbols are also indicative of such changes?
    • patno: equals $1A. The object's pattern number (or mapping frame).
      • patno and mstno actually match the Sonic 1 and 2 code.
    • mstno: equals $1C. Master pattern number, aka pattern change number, aka animation number.
    • patcnt: equals $1E. Pattern counter; was originally $1B (unsure why it was moved; patno is still a byte and $1B is not shown with a value).
    • pattim: equals $1F. Pattern timer counter; was originally $1E.
    • pattimm: equals $20. Pattern timer master; was originally $1F.
    • colino: equals $21. Collision number (size and type); was originally $20.
    • colicnt: equals $22. Collision counter; was originally $21.
    • cddat: equals $23. Not sure what the name means (collision detection data?), but it's the status bitfield. Was originally $22.
    • cdsts: equals $24. Not sure what the name means (collision detection status?), but it's referred to by us as the respawn number. Was originally $23.
    • r_no0: equals $25. Routine number 0; was originally $24.
    • r_no1: equals $26. Routine number 1; was originally $25.
    • direc: equals $28. Direction; seems like the angle value Sonic uses. If so, this was originally $26.
    • userflag: equals $2A. User flags, or what we call the object's subtype. Was originally $28; takes up a word of space.
    • dummy: equals $2C. Dummy padding. Probably was different in the original code ($2A?); note that userflag is already word-sized. There is a size attached to dummy, but I can't make out what it is.
    • actfree: equals $2E. Action numbers free space; basically, custom RAM set aside for each object's use. Probably was different in the original code ($2C?). There is a size attached to actfree, but I can't make out what it is.
     
    • Like Like x 2
    • Informative Informative x 1
    • List
  10. Brainulator

    Brainulator

    Regular garden-variety member Member
    Figured I'd make a follow-up to my previous post in light of new findings:
    • At some point, it occurred to me that mspeed probably means master speed, which, come to think of it, does line up with what we see.
    • dummy takes up 2 bytes and actfree takes up 22 ($16) bytes.
    • Looking at mstno and direc again, I think the blank bytes at $1B and $27 are just automatically-inserted padding that serve to keep 2-byte values at even addresses.
    Something seems off, though; adding everything together, each object has $44 bytes of RAM, which, when accounting for the 2 bytes of lost RAM above, results in there being 2 more bytes of RAM listed than originally existed.
     
    • Informative Informative x 2
    • Like Like x 1
    • List
  11. Devon

    Devon

    La mer va embrassé moi et délivré moi lakay. Tech Member
    1,425
    1,743
    93
    your mom
    I thought it was just "move speed", as that holds Sonic's movement speed on the ground.
    Actually, according to the Sonic CD debug info in Gems Collection, they're actually defined as 16-bit words, using a structure that can access the individual bytes via a union. I do know that sometimes, "direct" or "angle" gets used as a full word in Sonic 1, and this does align with how "mstno" or "anim" is used in the original. In the original, SST $1D is used to track animation changes, which was also ported here. Seems like the original never had a separate definition for that, and just added 1 to "mstno".

    Here's the full structure as generated via dwarf2cpp
    Code (Text):
    1.  
    2. struct _anon0
    3. {
    4.     unsigned char actno;
    5.     unsigned char actflg;
    6.     unsigned short sproffset;
    7.     _anon3** patbase;
    8.     _anon5 xposi;
    9.     _anon5 yposi;
    10.     _anon9 xspeed;
    11.     _anon9 yspeed;
    12.     _anon9 mspeed;
    13.     unsigned char sprhsize;
    14.     unsigned char sprvsize;
    15.     unsigned char sprhs;
    16.     unsigned char sprpri;
    17.     unsigned char patno;
    18.     _anon9 mstno;
    19.     unsigned char patcnt;
    20.     unsigned char pattim;
    21.     unsigned char pattimm;
    22.     unsigned char colino;
    23.     unsigned char colicnt;
    24.     unsigned char cddat;
    25.     unsigned char cdsts;
    26.     unsigned char r_no0;
    27.     unsigned char r_no1;
    28.     _anon9 direc;
    29.     _anon9 userflag;
    30.     unsigned char dummy[2];
    31.     unsigned char actfree[22];
    32. };

    "_anon9" being a 16-bit value with individually accessibly byte. Similar for "_anon5", but that's a 32-bit value instead. "_anon3" is just sprite mappings data.

    Code (Text):
    1. union _anon5
    2. {
    3.     int l;
    4.     _anon7 w;
    5.     _anon8 b;
    6. };
    7.  
    8. struct _anon7
    9. {
    10.     short l;
    11.     short h;
    12. };
    13.  
    14. struct _anon8
    15. {
    16.     char b4;
    17.     char b3;
    18.     char b2;
    19.     char b1;
    20. };
    21.  
    22. union _anon9
    23. {
    24.     short w;
    25.     _anon10 b;
    26. };
    27.  
    28. struct _anon10
    29. {
    30.     char l;
    31.     char h;
    32. };

    Things do indeed get padded out for alignment, though.

    Also, the reason why the structures don't have names, is because it appears they were defined via a "typedef struct" in the actual source code, with the name of the structure going after the data to fulfill the typedef, and as such, without a tag assigned to it at the start of the structure, it's treated as an anonymous structure, and thus, their names did not get placed in the debug info. Same deal for unions.
     
    Last edited: Sep 18, 2022
    • Informative Informative x 2
    • List
  12. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,795
    383
    63
    SonLVL
    I know in other programs I've examined, the typedef itself is usually recorded too, is that not the case here?
     
  13. Devon

    Devon

    La mer va embrassé moi et délivré moi lakay. Tech Member
    1,425
    1,743
    93
    your mom
    Apparently, not with the Metrowerks/CodeWarrior compiler/linker, at least with anonymous structures and unions.
     
  14. Brainulator

    Brainulator

    Regular garden-variety member Member
    That probably makes more sense, actually. I just thought "m = master" in light of pattim and pattimm (then again, they probably would have used speedm for that purpose).
    Um, I was saying that bytes $1B - the one in between patno ($1A) and mstno ($1C) - and $27 - the one in between r_no1 ($26) and direc ($28) - are both inserted by the compiler so that mstno and direc, respectively, are aligned to even values (so CPUs with address error problems akin to the 68000 do not suffer). I wondered in the previous post why byte $1B goes unused, and this was my answer.

    The SST variable order does make sense when considering how things are logically grouped; animation/master pattern stuff after the animation/master pattern number, sprite sizes all clumped together... seeing as I mentioned above how Sonic Jam's version of Sonic 3 & Knuckles is 2 bytes bigger than in the original, combined with a change in order between sprhs and sprpri that can be seen in the Sonic 1 prototype and final version, I suspect that the original equate file would have looked something like this:
    Code (Text):
    1. actno       equ 0
    2. actflg      equ 1
    3. sproffset   equ 2
    4. patbase     equ 4
    5. xposi       equ 8
    6. yposi       equ $c
    7. xspeed      equ $10
    8. yspeed      equ $12
    9. mspeed      equ $14
    10. sprhsize    equ $17
    11. sprvsize    equ $16
    12. sprhs       equ $19
    13. sprpri      equ $18
    14. patno       equ $1a
    15. mstno       equ $1c
    16. patcnt      equ $1b
    17. pattim      equ $1e
    18. pattimm     equ $1f
    19. colino      equ $20
    20. colicnt     equ $21
    21. cddat       equ $22
    22. cdsts       equ $23
    23. r_no0       equ $24
    24. r_no1       equ $25
    25. direc       equ $26
    26. userflag    equ $28
    27. dummy       equ $2a
    28. actfree     equ $2c
    ...and when converting to other systems, they just input the sizes without shifting the actual order around.
     
    Last edited: Sep 18, 2022
  15. Devon

    Devon

    La mer va embrassé moi et délivré moi lakay. Tech Member
    1,425
    1,743
    93
    your mom
    Ah, whoops. My bad.
     
  16. Devon

    Devon

    La mer va embrassé moi et délivré moi lakay. Tech Member
    1,425
    1,743
    93
    your mom
    I would like to add something regarding ROM sections.

    I've been taking a look at Sonic Jam, and I realized that each game has been split up into different files. In Sonic 1's case, there's "AC.SN1", "ACTTBL.SN1" (also ACTTBL_E.SN1" and "ACTTBL_N.SN1", because Jam has different difficulty settings), "DATA.SN1", and "TBL.SN1". "AC" is the game code, "DATA" holds compressed graphics, tilemaps, and stage blocks/chunks. "TBL" holds collision data, uncompressed graphics, and stage layouts (including special stages), and "ACTTBL" holds object layouts.

    I then took a look at the disassembly, and I noticed that the padding between sections corresponds to how the game was split up in Jam.

    "DATA" starts off with the Sega Logo graphics, and in the original ROM, you can see the padding placed before said graphics.
    Code (Text):
    1.        rept $300
    2.            dc.b   $FF
    3.        endm
    4. Nem_SegaLogo:   binclude   "artnem/Sega Logo (JP1).bin" ; large Sega logo
    5.            even

    The last piece of data in the "DATA" file is the graphics for the logo in the ending, and look at that, another piece of padding right after it in the original ROM:
    Code (Text):
    1. Nem_EndStH:   binclude   "artnem/Ending - StH Logo.bin"
    2.        even
    3.  
    4.        if Revision=0
    5.        rept $104
    6.        dc.b $FF           ; why?
    7.        endm
    8.        else
    9.        rept $40
    10.        dc.b $FF
    11.        endm
    12.        endif

    After this bit of padding is the stage collision data, which so happens to be the "TBL" section
    Code (Text):
    1.        if Revision=0
    2.        rept $104
    3.        dc.b $FF           ; why?
    4.        endm
    5.        else
    6.        rept $40
    7.        dc.b $FF
    8.        endm
    9.        endif
    10. ; ---------------------------------------------------------------------------
    11. ; Collision data
    12. ; ---------------------------------------------------------------------------
    13. AngleMap:   binclude   "collide/Angle Map.bin"
    14.        even
    15. CollArray1:   binclude   "collide/Collision Array (Normal).bin"
    16.        even
    17.        ...

    The last bit of data in the "TBL" file is the graphics for the special stage ring, and in the original ROM, you can see another bit of padding placed after it:
    Code (Text):
    1. Art_BigRing:   binclude   "artunc/Giant Ring.bin"
    2.        even
    3.  
    4.        align   $100

    And after that are the stage object layouts, aka "ACTTBL":
    Code (Text):
    1.        align   $100
    2.  
    3. ; ---------------------------------------------------------------------------
    4. ; Sprite locations index
    5. ; ---------------------------------------------------------------------------
    6. ObjPos_Index:
    7.        ; GHZ
    8.        dc.w ObjPos_GHZ1-ObjPos_Index, ObjPos_Null-ObjPos_Index
    9.        dc.w ObjPos_GHZ2-ObjPos_Index, ObjPos_Null-ObjPos_Index
    10.        dc.w ObjPos_GHZ3-ObjPos_Index, ObjPos_Null-ObjPos_Index
    11.        dc.w ObjPos_GHZ1-ObjPos_Index, ObjPos_Null-ObjPos_Index

    The "ACTTBL" file ends with the last object layout, and, of course, in the original ROM, after that is some more padding:
    Code (Text):
    1. ObjPos_Null:   dc.b $FF, $FF, 0, 0, 0,   0
    2.  
    3.        if Revision=0
    4.        rept $62A
    5.        dc.b $FF
    6.        endm
    7.        else
    8.        rept $63C
    9.        dc.b $FF
    10.        endm
    11.        endif

    Which is then followed by the sound driver after.

    So, based on this info, you can see that the original game had multiple ROM sections: the code ("AC"), compressed graphics, tilemaps, and stage blocks and chunks ("DATA"), stage collision, layouts (both regular and special stages), and uncompressed graphics ("TBL"), stage object layouts ("ACTTBL"), and then finally the sound driver and data. This is why such "useless" padding exists. Each section was aligned.

    Sonic 2 works similarly, but it also adds the "RINGACT" (ring layouts) and "TBL2" (additional compressed graphics, placed between the sound driver + drum samples and music + SFX data) sections.
     
    Last edited: May 15, 2023
    • Informative Informative x 8
    • Like Like x 2
    • List
  17. Devon

    Devon

    La mer va embrassé moi et délivré moi lakay. Tech Member
    1,425
    1,743
    93
    your mom
    So, I was taking a look at the Sonic 2 patent, and I saw this (fyi, yes I know this isn't anything new, but there's just some things I feel like pointing out for the sake of this thread)

    [​IMG]

    [​IMG]

    The patent has some pretty interesting things to note. Objects are indeed called sprites, with its structure of variables in RAM being a "sprite status table", which definitely shows where we got that name from. Stuff related to graphics and animation line up with the official variables names as well. The patent also goes into detail about how the corkscrew, pathswapping mechanism, and 2 player mode work, including detail on how the teleportation/swap monitor works.

    From what I can tell, 16x16 blocks are referred to as "graphics (path) blocks", which its associated collision IDs referring to "collision blocks". Chunks don't seem to be referenced, since with collision and path swapping, that all happens on the block level, not the chunk level, so chunks are irrelevant in this case. The loop used to demonstrate the system is basically just a generic image referred to as just an "overlay path". As such, the sectioning shown in these images are on the block level.

    [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG]

    [​IMG]
    [​IMG]

    Here's this tidbit from how the corkscrew works I wanna quickly mention. (sloop = the corkscrew in EHZ, called a "shuttle loop")

    [​IMG]

    [​IMG]

    The "ride flag" that it refers to is bit 3 in the status SST ($22) for player 1, or bit 4 for player 2. And sure enough, the corkscrew object (Obj06) makes use of this flag to indicate that the player is running on it. Not quite sure why they refer to it or the "hit" flag as separate bytes, though.
     
    Last edited: Sep 14, 2023
  18. Gestalt

    Gestalt

    Sphinx in Chains Member
    It's great they stayed authentic to their own set of rules, even though it was "just a corkscrew".
     
  19. BenoitRen

    BenoitRen

    Tech Member
    797
    393
    63
    I hadn't seen this patent text before. It's always great to find official names and descriptions. It inspired me to start a page on Sonic CD's sprite status table.
     
  20. Brainulator

    Brainulator

    Regular garden-variety member Member
    The patent text actually helped aid my understanding of those variables (for example, connecting "actno" with "action number"), hence why I made this post above (some of the later posts are also worth noting).