Regarding the Sonic CD symbol lists Clownacy posted above: could someone please explain the format they use?
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.
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: Spoiler 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): Spoiler 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: Spoiler 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: Spoiler 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): 813080c0 <action>: action(): 813080c0: 94 21 ff f0 stwu r1,-16(r1) C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:40 813080c4: 7c 08 02 a6 mflr r0 813080c8: 90 01 00 14 stw r0,20(r1) 813080cc: 93 e1 00 0c stw r31,12(r1) 813080d0: 93 c1 00 08 stw r30,8(r1) C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:44 813080d4: 3c 60 81 36 lis r3,-32458 813080d8: 3b e3 c2 c4 addi r31,r3,-15676 C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:45 813080dc: 3b c0 00 00 li r30,0 813080e0: 48 00 00 40 b 81308120 <action+0x60> C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:46 813080e4: 88 1f 00 00 lbz r0,0(r31) 813080e8: 28 00 00 00 cmplwi r0,0 813080ec: 41 82 00 2c beq 81308118 <action+0x58> C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:53 813080f0: 7f e3 fb 78 mr r3,r31 813080f4: 88 9f 00 00 lbz r4,0(r31) 813080f8: 38 04 ff ff addi r0,r4,-1 813080fc: 54 05 10 3a rlwinm r5,r0,2,0,29 81308100: 3c 80 81 35 lis r4,-32459 81308104: 38 04 42 70 addi r0,r4,17008 81308108: 7c 80 2a 14 add r4,r0,r5 8130810c: 81 84 00 00 lwz r12,0(r4) 81308110: 7d 89 03 a6 mtctr r12 81308114: 4e 80 04 21 bctrl C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:56 81308118: 3b de 00 01 addi r30,r30,1 8130811c: 3b ff 00 44 addi r31,r31,68 81308120: 2c 1e 00 80 cmpwi r30,128 81308124: 41 80 ff c0 blt 813080e4 <action+0x24> C:\project\GEMS\application\SonicCD\src\gc\main\ACTION.C:57 81308128: 83 e1 00 0c lwz r31,12(r1) 8130812c: 83 c1 00 08 lwz r30,8(r1) 81308130: 80 01 00 14 lwz r0,20(r1) 81308134: 7c 08 03 a6 mtlr r0 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. Also took a further dive into R11A.ELF and organized the symbols by section and filename: Spoiler Code (Text): main\ACTION.C .text action speedset_0 speedset2 actionsub frameout patset spatset main\ACTSET.C .text flagwkclr actsetchk actsetinit actset tm_setchk actnoset actwkchk actwkchk2 frameout_s frameout_s00 frameout_s0 .bss pAsetadr_dummy pAsetadr_w pAsetadrz_w main\DAI_K.C .text dai_k dai_k_init dai_k_move k_move jumpchk_d .data k_daipat0 k_daipat1 k_daipat2 k_daipat k_daichg0 k_daichg dai_k_move_tbl pattbl_20 main\DAI_RD1.C .text dodai dodai_init dodai_move dodai_ud dodai_lr dodai_ride1 dodai_ride2 dodai_nA dodai_nB dodai_fix dodai_fal dodai_up dodai_upx dodai_rm dodai_lm dodai_sub dai_fout vfuta vfuta_init vfuta_move1 vfuta_move2 .data dai11a_pat1 dai11a_pat2 dai11a_pat3 dai11a_pattbl dodai_acttbl dai_hstbl_13 dai_mcnttbl_14 dodai_mtype vfuta_pat0 vfuta_pat1 vfutapat vfuta_tbl main\DIRCOL.C .text dircolm dircol dircol2 dircol_d dircol_d3 dircol_r dircol_r2 dircol_r3 dircol_l dircol_l2 dircol_l3 dircol_u dircol_u2 dircol_u3 emycol_u emycol_d emycol_d2 emycol_d3 dircolchk dircolchk1 main\DUMMY.C .text pa_set fadeout_s main\EDIT.C .text edit .bss CKeyTogle main\EMIE1.C .text emie1 emie1_init emie1_matu emie1_dakii emie1_tobii emie1_tobim emie_play setdirect speedset speedsetx speedsety jumpchk_d_0 pljumpset dakicheck empatchg emie1clrset emie1clrsetx heartset heart1 heart1_init heart1_move .data em1_tbl emie1_clr ht1_tbl main\EMIE1CG.C .data pat0 pat1 pat2 pat3 pat4 pat5 pat6 pat7 pat8 pat9 patA patB patC patD patE patF pat10 emie1pat moji_pchg run_pchg kiss_pchg stnd2_pchg moji2_pchg kyoro_pchg em_pchg main\ENEMY.C .text ene_ari ari_init ari_fall ari_move ene_chou chou_init chou_move ene_ka ka_init ka_move ka_turn ka_down ka_stop ene_kamemusi kamemusi_init kamemusi_fall kamemusi_move area kamemusi_stop kamemusi_stop1 kamemusi_tama kamemusi_tama_init tama tama_init tama_move ene_tagame_a tagame_init tagame_wait tagame_wait1 tagame_jump tagame_jump1 ene_tama .data ari_pchg00 ari_pchg01 ari_pchg ari0 ari1 ari2 ari3 ari_pat chou_pchg00 chou_pchg01 chou_pchg chou1e chou2e chou3e chou1b chou2b chou3b e_chou_pat b_chou_pat pchg_e_0 pchg_e_1 pchg_e pchg_b_0 pchg_b_1 pchg_b ka1e ka2e ka3e ka4e ka5e ka1b ka2b ka3b ka4b ka5b b_ka_pat e_kamem_pchg00 e_kamem_pchg01 e_kamem_pchg b_kamem_pchg00 b_kamem_pchg01 b_kamem_pchg kamem_pat00e kamem_pat00b kamem_pat01 kamem_pat02 e_kamem_pat b_kamem_pat tama_pchg00 tama_pchg tama_pat00 tama_pat01 tama_pat02 tama_pat03 tama_pat e_tagame_pchg00 e_tagame_pchg01 e_tagame_pchg b_tagame_pchg00 b_tagame_pchg01 b_tagame_pchg tagame_pat00 tagame_pat01 tagame_pat02 tagame_pat03e tagame_pat04e tagame_pat05e tagame_pat03b tagame_pat04b tagame_pat05b tagame_pat06 e_tagame_pat b_tagame_pat main\EQU.C .bss ta_flag clrspflg_save flagworkcnt flagworkcnt2 pl_suu main_play pl_air pltimeover_f plring_f2 pl_suu_f plring_f pltime_f plscore_f plring plscore play_start start_flag plpower_b plpower_m plpower_s plpower_a plflag plflag_s plxposi_s plyposi_s plring_s pltime_s time_flag scralim_down_s scra_h_posit_s scra_v_posit_s scrb_h_posit_s scrb_v_posit_s scrc_h_posit_s scrc_v_posit_s scrz_h_posit_s scrz_v_posit_s waterposi_m_s water_flag_s waterflag_s plring_f2_s generate_flag plsubchg_flag enkeino projector_flag special_flag conbine_flag enecgflg emie3end extrascore markerno gf_flag chibi_s tv_flag edittimer time_stop sys_pattim sys_patno sys_pattim2 sys_patno2 sys_pattim3 sys_patno3 sys_pattim4 sys_patno4 sys_ringtimer editstack editstack2 mapcheck blkno edit_user sysdirec prio_flag init_flag boss_sound shut_flag st6clrchg chibi_flag mapwrt_cnt startcolor colorcnt int_flg linkdata cltbladr ranum cgwrtcnt cgwrttim dmastack waterposi waterposi_m watermoveposi waterspeed water_flag waterflag waterflag2 scralim_n_left scralim_n_right scralim_n_up scralim_n_down scralim_left scralim_right scralim_up scralim_down scrar_no scra_h_keep scra_v_keep scra_hz scra_vz scra_vline scrh_flag scrv_flag scra_h_count scra_v_count scrb_h_count scrb_v_count scrc_h_count scrc_v_count scrz_h_count scrz_v_count limmoveflag playpatno1 kusya_flag plmaxspdwk pladdspdwk plretspdwk playpatno playwrtflag asetposi time_item backto_cnt scr_cnt demo_adr demo_cnt swbufcnt scra_hline bossflag bossstart loopmapno loopmapno2 ballmapno ballmapno2 watercoliflag waterstop mizuflag sekichyuflag plautoflag specflag dai2rmvflag emyscorecnt timebonus ringbonus bonus_f edplayflag ms_wflg lpKeepWork lpFadeFlag lpcolorwk4 lpcolorwk3 lpcolorwk2 lpcolorwk switchflag waterdirec clchgtim clchgcnt plposiwkadr scdadr byecnt1 byecnt0 asetadrz2 asetadrz asetadr2 asetadr actset_rno dirstk scrflagz scrflagc scrflagb scrflaga scr_timer scr_die scroll_start zone_flag scrz_v_posit scrz_h_posit scrc_v_posit scrc_h_posit scrb_v_posit scrb_h_posit scra_v_posit scra_h_posit divdevwk cgchgtim cgchgcnt pauseflag intcnt hscroll vscroll swdata2 swdata1 swdata gmmode actwk lphscrollbuff playposiwk pbuffer hscrollwork flowwk blockwk pmapwk linework col_x col_y scrflagzw scrflagcw scrflagbw scrflagaw scrz_v_posiw scrz_h_posiw scrc_v_posiw scrc_h_posiw scrb_v_posiw scrb_h_posiw scra_v_posiw scra_h_posiw systemtimer editmode editno flowercnt flowerposi debugflag demoflag debugwork pltime stageno gametimer gameflag flagwork main\ET1.C .text et m_init m_wait m_die m1wait a_hover .data tpat00 tpat01 tpat07 tpat02 tpat03 tpat04 tpat05 tpat06 pat_et tbl0sproffset tbl0 pchg0 pchg main\ETC.C .text sinset atan_sonic main\FCOL.C .text fcol fcol_d fcol_r fcol_u fcol_l scdend scdchk scdchk2 scdend_r scdchk_r scdchk2_r scramapad dirchk scdcnv st_elseDataChk st_wackyDataChk st_starDataChk st_metalDataChk CCset CSset main\GAME.C .text DLL_meminit DLL_memfree Print_Msg Get_vscroll Get_scra_h_posiw Get_scrb_h_posiw SetDebugFlag game game_init play_act_set scdset syspatchg back_to_cnt bye_cnt sdfdout sdfdin da_set main .data da_tbl_189 .bss Interupt_Counter PauseIcon SetGrid EAsprset ClrSpriteDebug WaveRequest CDPlay CDPause ChangeTileBmp WaveAllStop sMemSet sMemCpy sRandom sPrintf sOutputDebugString sOpenFile sReadFile sCloseFile lpghWnd sGetFileSize main\GOAL.C .text gene gene_init gene_move0 gene_move1 kira_set kira_move gene_coli bring2 bring2init bring2move0 bring2move1 bigring bring_init bring_move0 bring_move1 bring_coli mosugu mosug_init mosug_move0 mosug_move1 offset_set goal goal_init goal_move0 goal_move1 goal_move2 goal_move3 .data gene_tbl bring2_tbl bigring_tbl mosugu_tbl goal_tbl main\IO.C .text SWdataSet scrinit main\ITEM.C .text timedisp td_init td_move t_item t_item_init t_item_move0 t_item_move1 t_item_move2 flagwkadr ride_on_chk_i item iteminit itemmove itemmove2 itemmove3 itemget powerup_init item2 item2init item2move item2die error_item .data itemchg0 itemchg1 itemchg2 itemchg3 itemchg4 itemchg5 itemchg6 itemchg7 itemchg8 itemchg9 itemchg ite00 ite01 ite02 ite03 ite04 ite05 ite06 ite07 ite08 ite09 ite0a ite0b ite0c ite0d ite0e ite0f ite10 ite11 ite12 ite13 itempat cor00 cor01 cor02 cor03 cor04 cor05 cor06 cor07 cor08 cor09 cor0a cor0b cor0c cor0d cor0e cor0f corepat main\PLAYER.C .text bye_chk play00 muteki_set play00init mizuki_set mapno_chk scr_h play00move playpowercnt playposiwkset plwaterchk playsave backto_chk play00walk play00jump ball00walk ball00jump chk11 levermove lmovecol plwalk_l plwalk_r balllmove ballwalk_l ballwalk_r jumpmove limitchk ballchk ballset jumpchk jumpchk2 keispd keispd2 fallchk direcchg jumpcolchk jumpcolsub jumpcolsub0 play00damage play00damage_sub play00die play00die_sub play00erase loopchk st7_x patchgmain patchgmain2 playrunchg playrunchg2 playrunchg3 platetc_chg little_runchg little_patchg frip_spd .bss WaveClear Brake_Req Brake_Sw main\PLAYPAT1.C .data pat00 pat01 pat02 pat03 pat04 pat05 pat06 pat07 pat08 pat09 pat0a pat0b pat0c pat0d pat0e pat0f pat10 pat11 pat12 pat13 pat14 pat15 pat16 pat17 pat18 pat19 pat1a pat1b pat1c pat1d pat1e pat1f pat20 pat21 pat22 pat23 pat24 pat25 pat26 pat27 pat28 pat29 pat2a pat2b pat2c pat2d pat2e pat2f pat30 pat31 pat32 pat33 pat34 pat35 pat36 pat37 pat38 pat39 pat3a pat3b pat3c pat3d pat3e pat3f pat40 pat41 pat42 pat43 pat44 pat45 pat46 pat47 pat48 pat49 pat4a pat4b pat4c pat4d pat4e pat4f pat50 pat51 pat52 pat53 pat54 pat55 pat56 pat57 pat58 pat59 pat5a pat5b pat5c pat5d pat5e pat5f pat60 pat61 pat62 pat63 pat64 pat65 pat66 pat67 pat68 pat69 pat6a pat6b pat6c pat6d pat6e pat6f pat70 pat71 pat72 pat73 pat74 pat75 pat76 pat77 pat78 pat79 pat7a pat7b pat7c pat7d pat7e pat7f pat80 pat81 pat82 pat83 pat84 pat85 pat86 pat87 pat88 pat89 pat8a pat8b pat8c pat8d pat8e pat8f pat90 pat91 pat92 pat93 pat94 pat95 pat96 pat97 pat98 pat99 pat9a pat9b pat9c pat9d pat9e pat9f pata0 pata1 pata2 pata3 pata4 pata5 pata6 pata7 pata8 pata9 pataa patab patac patad patae pataf patb0 patb1 patb2 patb3 patb4 patb5 patb6 patb7 patb8 patb9 patba patbb patbc patbd patbe patbf patc0 patc1 patc2 patc3 patc4 patc5 sncpat main\PLAYSP.C .text playsp main\PLAYSUB.C .text patchg playsave0 marker marker_init marker_move0 marker_move1 marker_move2 plairset tensuu_set tensuu0 bakuha baku_init baku_move baku_die flower flow_init flow_move0 flow_move1 flow_sub flow_sub1 flow_move2 flow_move3 mizukiri mizuki_init mizuki_move mizuki_move2 futa ride_on_chk_f futa_init futa_move futa_move2 futa_move3 exit2_set col_chk exit2 exit2_init exit2_move exit2_erase baria bariainit bariamove mutekimove backtomove muteki_sub actionsub0 ball ball_init ball_move ball_ball ball_rd7 ball_coli .data flowchg0 flowchg1 flowchg2 flowchg3 flowchg flo00 flo01 flo02 flo03 flo04 flo05 flo06 flo07 flow_pat main\PLCHG.C .data plchg00 plchg01 plchg02 plchg03 plchg04 plchg05 plchg06 plchg07 plchg08 plchg09 plchg10 plchg11 plchg12 plchg13 plchg14 plchg15 plchg16 plchg17 plchg18 plchg19 plchg20 plchg21 plchg22 plchg23 plchg24 plchg25 plchg26 plchg27 plchg28 plchg29 plchg30 plchg31 plchg32 plchg33 plchg34 plchg35 plchg36 plchg37 plchg38 plchg39 plchg40 plchg41 plchg42 plchg43 plchg44 plchg45 plchg46 plchg47 plchg48 plchg49 plchg50 plchg51 plchg52 plchg53 plchg54 plchg55 plchg56 plchg57 playchg main\RIDECHK.C .text ride_on_clr ride_on_set hitchk_u ridechk ride_on_chk hitchk hit_v hit_x push_set push_clr hit_y hit_yu hit_yu1 hit_yu0 hit_e side_coli hit_set hit_clr main\RING.C .text ring ringinit_0 ringmove ringget ringgetsub ringdie ringerase flyring flyringinit flyringmove flyringget flyringdie flyringerase .data ringsp0 ringsp1 ringsp2 ringsp3 ringsp4 ringsp5 ringsp6 ringsp7 ringsp8 ringpat ringchg0 ringchg1 ringchg2 ringchg main\SCORE.C .text tensuu ten_init ten_move score score_init score_move scoreup scoreset ringinit scoreinit posiwrt bonuswrt ringwrt scorewrt scorewrt2 posiwrt0 playsuuwrt timewrt1 timewrt timewrt0 .data subtbl subtblh4 tenpat0 tenpat1 tenpat2 tenpat3 tenpat4 tenpat5 tenpat scorepat0 scorepat1 scorepat2 scorepat3 scorepat scoreinittbl ringinittbl main\SCRCHK.C .text scrchk zone1chk zone11chk zone12chk zone13chk zone3chk zone31chk zone33chk zone6chk zone5chk zone51chk zone53chk zone8chk zone81chk zone83chk zone4chk zone41chk zone42chk zone4chk zone7chk zone71chk zone72chk zone73chk bossclr_scr bossclr_scrset main\SPRING.C .text iwa iwa_init iwa_move koma koma_init koma_move koma_move2 spring_d spr_d_init spr_d_move spring sjumpinit ride_on_chk_s sjumpmove sjumpmove2 sjumpmove3 ride_on_chk_s1 sdushmove sdushmove2 sdushmove3 ride_on_chk_s2 sjump2move sjump2move2 sjump2move3 sjump3move sjump3move2 sjump3move3 .data spat00 spat01 spat02 spat03 spat04 spat05 spat06 spat07 spat08 kpat00 kpat01 ipat00 spat10 spat11 spat12 spat13 spat14 spat15 spat16 spat17 spat18 springpat spring90pat spring45pat springpat2 spring90pat2 spring45pat2 komapat iwapat springchg0 springchg komachg0 komachg sjump_move_tbl main\SUICIDE.C .text enemy_suicide friend_suicide main\TAKI.C .text taki taki_init taki_move jisin_set jisin .data shibukichg0 shibukichg shibuki0 shibuki1 shibukipat taki_move_tbl main\TBL0.C .data genechg0 genechg1 genechg genepat0 genepat1 genepat2 genepat3 genepat4 genepat5 genepat6 genepat7 genepat8 genepat bringchg0 bringchg bringpat0 bringpat1 bringpat2 bringpat3 bringpat bring2chg0 bring2chg bring2pat0 bring2pat1 bring2pat2 bring2pat3 bring2pat4 bring2pat5 bring2pat6 bring2pat7 bring2pat goalchg0 goalchg goalsp0 goalsp1 goalsp2 goalsp3 goalsp4 goalsp5 goalpat main\TBL1.C .data bariachg0 bariachg1 bariachg2 bariachg3 bariachg4 bariachg5 bariachg6 bariachg7 bariachg8 bariachg bar00 bar01 bar02 bar03 bar04 bar05 bar06 bar07 bar08 bar09 bar0a bar0b bar0c bariapat exit2chg0 exit2chg1 exit2chg2 exit2chg exi00 exi01 exi02 exi03 exi04 exi05 exi06 exit2pat futachg0 futachg fut00 fut01 futapat mizukichg0 mizukichg miz00 miz01 miz02 mizukipat baku_chg0 baku_chg1 bakuchg bak00 bak01 bak02 bak03 bak04 bak05 bak06 bakupat mkchg markerchg pat00_0 pat01_0 pat02_0 pat03_0 markerpat main\TREE.C .text hoshi hoshi_init hoshi_move kasoku0 k0_init k0_move kasoku kasoku_init kasoku_move .data hoshi_tbl k0_tbl kasoku_tbl hoshipat0 hoshipat1 hoshipat kasokuchg0 kasokuchg1 kasokuchg2 kasokuchg kasokupat_a kasokupat_b kasokupat_c kasokupat_d kasokupat_e kasokupat_f kasokupat_g kasokupat_h kasokupat_i kasokupat_j kasokupat main\ZONE.C .text over over_init over_move title title_init title_move0 title_move1 title_back0 title_back1 title_wait clear clear_init0 clear_init clear_move0 clear_move1 clear_move2 clear_wait .data game0 game1 gamepat time0 time1 timepat gotpat0 gotpat1 gotpat2 gotpat3 madepat0 madepat1 madepat2 madepat3 bonuspat bonuspat0 gotpat gotpat_0 madepat madepat_0 cleartbl .bss ClearSountWait WaitCount main\ZONETBL1.C .data titletbl titlepat0 titlepat1 titlepat2 titlepat3 titlepat4 titlepat5 titlepat6 titlepat7 titlepat8 title_pat main\R1\ACT11A.C .text noact .data act_tbl main\R1\COL1A.C .text clchgctr colchg11a clchg_sub0 fadein0 fadein0_new fadein1 fadein2 fadeout_new fadeout1 fadeout2 flashin flashin_new flashin1 flashin2 flashout_new flashout1 flashout2 colorset colorset2 colorset00 FadeProc .data clst1_1a0 clst1_1a1 advacolor advacolor2 gamecolor zone1colora0 zone1colora1 zone1colora colortbl col1a0cnt col1a0col col1a1cnt col1a1col col1a2cnt col1a2col col1a3cnt col1a3col col1a4cnt col1a4col col1a5cnt col1a5col .bss FadeCount main\R1\DEV11A.C .data mapinittbl main\R1\EDTBL11A.C .data edit_tbl main\R1\KOWASI1.C .text kowasi m_init_0 m_wait_0 m_down .data spr_kowasi00 spr_kowasi01 spr_kowasi02 spr_kowasi03 spr_kowasi04 spr_kowasi05 spr_kowasi06 spr_kowasi07 spr_kowasi08 spr_kowasi09 spr_kowasi0a spr_kowasi0b spr_kowasi0c spr_kowasi0d pat_kowasi main\R1\KUZUR11A.C .data pata00 patbase_kuzure_a tbla00 tbla patc00 patc01 patc02 patc03 patc04 patc05 patc06 patc patb00 patb01 patb02 patb03 patb04 patbase_kuzure_b tblb00 tblb01 tblb02 tblb03 tblb04 tblb patd00 patd01 patd02 patd03 patd04 patd05 patd main\R1\KUZURE.C .text kuzureru_tikei acta_init acta_check actb_wait actb_down actb_init_a actb_init_b main\R1\SCR11A.C .text enecginit divdevset scr_set playposiset scrbinit scroll scroll_h scrh_move right_check left_check scroll_v sv_move_main sv_move_main1 sv_move_main2 sv_move_sub2 sv_move_sub sv_move_minus scrv_up_ch sv_move_plus scrv_down_ch scrv_move scrollb_v scrollb_h scrollc_h scrollz_h scrollwrt scrollwrtb hblockwrt hblockwrt1 vblockwrt blockwrt mapadrset mapadrset1 mapadrset99 mapadrset2 block_wrt block_chk vramadrset vramadrset1 vramadrset0 vramadrset99 scr11a_test mapwrt mapwrt2 mapwrt3 mapwrt_z81a mapwrt_sub mapinit mapset .data z81awrttbl vblockwrtbtbl mapwrt_tbl main\R1\SHOOT1.C .text kage kage_init kage_move ana kage1_init kage1_move0 kage1_move1 kage1_chk kage1_clr shooter shooterinit shootermove shootermove2 shootermove3 shooterspdset mspd_set .data kag00 kag01 kagepat ana00 kage1pat shooterposi_0 shooterposi_1 shooterposi_2 shooterpositbl main\R1\SISAKE.C .text colli_pl_sikake_d colli_pl_sikake tobita1 tobita_init tobita_stop_r tobita_stop_l tobita_ride_r tobita_ride_l tobita_yure_r tobita_yure_l hariyama hari_init hari_normal .data tobita1chg0 tobita1chg1 tobita1chg2 tobitastop1 tobitastop2 tobita1chg tobita_a tobita_b tobita_c tobita_r_a tobita_r_b tobita_r_c tobita1_pat pat0_0 hari12pat main\R1\Z11ACT.C .data dummyarea asettbl asettblz main\BLOCK.C .text block block_init block_move block_move2 block_move3 block_move4 block_move5 block_move6 block_ride ride_on_chk_b .data block_tbl blockchg0 blockchg1 blockchg2 blockchg block0 block1 block2 block3 block4 block5 blockpat main\LOADER2.C .text ShortSWAP GetRoundStr ReadBlockMap ReadScrolMap soundset .data SeToWavTbl main\BMP.C .bss SprBmp main\R1\COLI1.C .text pcol CollitblDataXchk CollitblDataYchk ColliHitChk pcolitem pcolnomal pcolplay2 pcolplay pcole playdamagechk playdamageset playdieset pcolspecial eggman_chk yago main_attack .data escoretbl colitbl .bss bCarry main\R1\Z11ATBL.C .data scddirtbl scdtblwk scdtblwk2 zone1scd mapwka mapwkb main\SAVE.C .text playloadb playload main\R1\FRIEND1.C .text t_roll rev_h set_sproffset friend t_init t_move t_movie p_init p_move p_movie .data pchg00 pchg01 pchg10 pchg0_0 pchg1 spr_flicky1 spr_flicky2 spr_ricky1 spr_ricky2 spr_ricky3 spr_ricky4 spr_friend0 spr_ricky5 pat_friend0 pat_friend1 tbl0sproffset main\R1\MOVIE1.C .text move1 die mm_init mm_wait mm_die m_baku mm1wait sub s_init s_move .data movie1_pchg00 movie1_pchg01 movie1_pchg spr_movie1 spr_movie2 spr_movie3 spr_movie4 spr_movie5 spr_movie0 pat_movie tbl0_0 Spoiler Code (Text): main\ACTION.C RunObjects ObjectMoveAndFall ObjectMove DisplaySprite DeleteObject BuildSprites main\ACTSET.C ObjectsManager SingleObjLoad SingleObjLoad2 MarkObjGone main\DAI_K.C Spinning Platform main\DAI_RD1.C Platform Vertical flapping door main\DIRCOL.C CalcRoomInFront CalcRoomOverHead CheckFloorDist ObjCheckFloorDist CheckRightWallDist ObjCheckRightWallDist CheckCeilingDist ObjCheckCeilingDist CheckLeftWallDist ObjCheckLeftWallDist main\DUMMY.C Routine to set object's tile ID Routine to fade out music main\EDIT.C DebugMode main\EMIE1.C Amy main\EMIE1CG.C Amy mappings and animations main\ENEMY.C Anton Pata-Bata Mosqui Kamemusi Tamabboh(?) Taga-Taga main\EQU.C Level variables main\ET1.C Robot generator main\ETC.C CalcSine CalcAngle main\FCOL.C AnglePos Find_Tile FindFloor FindWall ConvertCollisionArray main\GAME.C Main level routine Routine to spawn player LoadCollisionIndexes ChangeRingFrame Routine to update time warp timer Routine to update bored timer Routine to pause music Routine to unpause music Routine to play level music main\GOAL.C Flower capsule Big ring Goal post Signpost main\IO.C ReadJoypads ClearScreen main\ITEM.C Monitor/Time post main\PLAYER.C Sonic main\PLAYPAT1.C Sonic mappings main\PLAYSP.C Routine for handling special level collision main\PLAYSUB.C AnimateSprite Checkpoint ResumeMusic Test badnik Explosion Flower Spin tunnel waterfall splash Spin tunnel door Spin tunnel door splash Powerup (shield, invincibility stars, time warp stars) Spin tunnel tag main\PLCHG.C Sonic animations main\RIDECHK.C SolidObject main\RING.C Ring Lost rings from getting hurt main\SCORE.C HUD object AddPoints HudUpdate Hud_InitRings HudBase main\SCRCHK.C RunDynamicLevelEvents main\SPRING.C Moving spring with wheel object Spring object main\SUICIDE.C Time zone checks for animals and badniks main\TAKI.C Scrapped waterfall effect Scrapped earthquake effect main\TBL0.C Flower capsule animations and mappings Big ring animations and mappings Signpost animations and mappings main\TBL1.C Powerup animations and mappings Spin tunnel door splash animations and mappings Spin tunnel door animations and mappings Spin tunnel waterfall splash animations and mappings Explosion animations and mappings Checkpoint animations and mappings main\TREE.C 3D star plant 3D loop/ramp booster main\ZONE.C Game over Title card End results card main\ZONETBL1.C Title card mappings main\R1\ACT11A.C Null object ObjectIndex main\R1\COL1A.C PalCycle_Load Pal_FadeFromBlack Pal_FadeToBlack Pal_FadeFromWhite Pal_FadeToWhite PalLoad_ForFade PalLoad_Now main\R1\DEV11A.C LevelArtPointers ArtLoadCues(?) main\R1\EDTBL11A.C JmpTbl_DbgObjLists main\R1\KOWASI1.C Breakable wall main\R1\KUZUR11A.C Collapsing platform mappings main\R1\KUZURE.C Collapsing platform main\R1\SCR11A.C Routine to initialize object graphics LoadPLC LevelSizeLoad InitCameraValues DeformBgLayer ScrollHoriz ScrollVerti Bg_Scroll_Y BGScroll_Block1 BGScroll_Block2 BGScroll_Block3 LoadTilesAsYouMove DrawBlocks_LR DrawBlocks_TB DrawBlock GetBlock Routine to place a block at a position Routine to check if a block is on screen CalcBlockVRAMPos DrawInitialBG loadZoneBlockMaps loadLevelLayout main\R1\SHOOT1.C Hollow log background Sonic shaped hole Hidden spin tunnel main\R1\SISAKE.C Springboard Spikes main\R1\Z11ACT.C Object layout data main\BLOCK.C Small platform main\LOADER2.C Gems Collection specific loading routines PlaySound main\R1\COLI1.C TouchResponse main\R1\Z11ATBL.C ColCurveMap ColArray ColArray2 Level collision data Level layout data main\SAVE.C Routine for loading data saved at checkpoint Routine for loading data saved in time travel main\R1\FRIEND1.C Animal main\R1\MOVIE1.C Metal Sonic projector
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".)
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.
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?
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: ; )
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.
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.
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): struct _anon0 { unsigned char actno; unsigned char actflg; unsigned short sproffset; _anon3** patbase; _anon5 xposi; _anon5 yposi; _anon9 xspeed; _anon9 yspeed; _anon9 mspeed; unsigned char sprhsize; unsigned char sprvsize; unsigned char sprhs; unsigned char sprpri; unsigned char patno; _anon9 mstno; unsigned char patcnt; unsigned char pattim; unsigned char pattimm; unsigned char colino; unsigned char colicnt; unsigned char cddat; unsigned char cdsts; unsigned char r_no0; unsigned char r_no1; _anon9 direc; _anon9 userflag; unsigned char dummy[2]; unsigned char actfree[22]; }; "_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): union _anon5 { int l; _anon7 w; _anon8 b; }; struct _anon7 { short l; short h; }; struct _anon8 { char b4; char b3; char b2; char b1; }; union _anon9 { short w; _anon10 b; }; struct _anon10 { char l; char h; }; 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.
I know in other programs I've examined, the typedef itself is usually recorded too, is that not the case here?
Apparently, not with the Metrowerks/CodeWarrior compiler/linker, at least with anonymous structures and unions.
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): actno equ 0 actflg equ 1 sproffset equ 2 patbase equ 4 xposi equ 8 yposi equ $c xspeed equ $10 yspeed equ $12 mspeed equ $14 sprhsize equ $17 sprvsize equ $16 sprhs equ $19 sprpri equ $18 patno equ $1a mstno equ $1c patcnt equ $1b pattim equ $1e pattimm equ $1f colino equ $20 colicnt equ $21 cddat equ $22 cdsts equ $23 r_no0 equ $24 r_no1 equ $25 direc equ $26 userflag equ $28 dummy equ $2a actfree equ $2c ...and when converting to other systems, they just input the sizes without shifting the actual order around.