don't click here

Source Code accidently compiled into games

Discussion in 'Technical Discussion' started by evilhamwizard, Feb 11, 2010.

  1. Chilly Willy

    Chilly Willy

    Tech Member
    751
    11
    18
    Doom 32X
    Code (Text):
    1. move #$0305,r0;105 set control register
    Lord Almighty! An interrupt for every three audio samples! And at 22kHz, that's over 7000 interrupts per second. Talk about overhead! :flunked:

    I don't know why programmers used interrupt driven audio on the 32X when SEGA went to all the trouble of giving them DMA driven PWM. Just set channel 1 of the DMA in either SH2 and let it rip! If anyone is contemplating 32X homebrew with audio, I released an example of double-buffered DMA driven PWM for the 32X over at SpritesMind. If folks are interested, I could post that here as well.
    :eng101:
     
  2. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,054
    876
    93
    Long-term happiness
    You have to wonder just how much of it was down to lack of hardware knowledge. I mean, 32X didn't exactly have the longest shelf life.
     
  3. Quickman

    Quickman

    be attitude for gains Tech Member
    5,596
    18
    18
    :x
    omg porjcet
    Alternatively, same reason they never used CSM and rarely ever went near SSG-EG on the Megadrive - the documentation didn't mention it or said "don't do this, leave it alone".
     
  4. Chilly Willy

    Chilly Willy

    Tech Member
    751
    11
    18
    Doom 32X
    This is most likely the main reason. They just used whatever "sample" code SEGA provided. Most of the effort was probably spent trying to squeeze the memory requirements down.
     
  5. SegaLoco

    SegaLoco

    W)(at did you say? Banned
    I have this sample code actually, anyone want it (although I'm surprised that it isn't talked about much, its been in the "public domain" unofficially for quite a while).
     
  6. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    I wouldn't know if this has anything to do with it, but it could also have to do with, for example, Space Harrier's sound driver allowing simultaneous FM and PWM. The chords at the beginning of the main song are FM.

    Also Chaotix seems to have its PWM routine run as a routine in the slave SH-2 main loop.
     
  7. Quickman

    Quickman

    be attitude for gains Tech Member
    5,596
    18
    18
    :x
    omg porjcet
    Yes please.
     
  8. SegaLoco

    SegaLoco

    W)(at did you say? Banned
  9. Chilly Willy

    Chilly Willy

    Tech Member
    751
    11
    18
    Doom 32X
    The DMA PWM in the SDK isn't that great - it's meant to be test code, not example code. A better example would be the demo I made.

    Here's the main part:

    Code (C):
    1. void FillSoundBuff(int offset)
    2. {
    3.    int ix;
    4.    short samp;
    5.    short *buf = (short *)(((unsigned long)sndbuf + offset * 4) | 0x20000000);
    6.    volatile int *aud_len = (int *)((unsigned int)&gAudioLen | 0x20000000);
    7.    volatile int *aud_buf = (int *)((unsigned int)&gAudioBuf | 0x20000000);
    8.    unsigned char *buffer = (unsigned char *)*aud_buf;
    9.    int iy = *aud_len;
    10.  
    11.    if (iy >= NUM_SAMPS)
    12.    {
    13.       for (ix=0; ix<NUM_SAMPS; ix++)
    14.       {
    15.          samp = buffer[0] | (buffer[1] << 8);
    16.          buf[0] = (samp >> 7) + 258;
    17.          samp = buffer[2] | (buffer[3] << 8);
    18.          buf[1] = (samp >> 7) + 258;
    19.          buffer += 4;
    20.          buf += 2;
    21.       }
    22.       *aud_buf += NUM_SAMPS * 4;
    23.       *aud_len -= NUM_SAMPS;
    24.    }
    25.    else
    26.    {
    27.       for (ix=0; ix<iy; ix++)
    28.       {
    29.          samp = buffer[0] | (buffer[1] << 8);
    30.          buf[0] = (samp >> 7) + 258;
    31.          samp = buffer[2] | (buffer[3] << 8);
    32.          buf[1] = (samp >> 7) + 258;
    33.          buffer += 4;
    34.          buf += 2;
    35.       }
    36.       for (ix=iy; ix<NUM_SAMPS; ix++)
    37.       {
    38.          buf[0] = 258;
    39.          buf[1] = 258;
    40.          buf += 2;
    41.       }
    42.       *aud_len = 0;
    43.    }
    44. }
    45.  
    46. void slave(void)
    47. {
    48.    // init DMA
    49.     SH2_DMA_SAR0 = 0;
    50.     SH2_DMA_DAR0 = 0;
    51.     SH2_DMA_TCR0 = 0;
    52.     SH2_DMA_CHCR0 = 0;
    53.     SH2_DMA_DRCR0 = 0;
    54.     SH2_DMA_SAR1 = 0;
    55.     SH2_DMA_DAR1 = 0;
    56.     SH2_DMA_TCR1 = 0;
    57.     SH2_DMA_CHCR1 = 0;
    58.     SH2_DMA_DRCR1 = 0;
    59.    SH2_DMA_DMAOR = 1; // enable DMA
    60.  
    61.     // init the sound hardware
    62.     MARS_PWM_CTRL = 0x0185; // TM = 1, RTP, RMD = right, LMD = left
    63.     if (MARS_VDP_DISPMODE & MARS_NTSC_FORMAT)
    64.         MARS_PWM_CYCLE = 23011361/44100 + 1; // 44.1kHz for NTSC clock
    65.     else
    66.         MARS_PWM_CYCLE = 22801467/44100 + 1; // 44.1kHz for PAL clock
    67.  
    68.     while (1)
    69.     {
    70.         // only do sound when sound subsytem initialized
    71.         while (MARS_SYS_COMM4 != 0)
    72.         {
    73.          if (MARS_SYS_COMM4 == 1)
    74.          {
    75.             MARS_SYS_COMM4 = 2;
    76.             MARS_PWM_MONO = 1;
    77.             MARS_PWM_MONO = 1;
    78.             MARS_PWM_MONO = 1;
    79.          }
    80.  
    81.             // start DMA on first buffer and fill second
    82.             SH2_DMA_SAR1 = (unsigned long)sndbuf | 0x20000000;
    83.             SH2_DMA_DAR1 = 0x20004034; // storing a long here will set left and right
    84.             SH2_DMA_TCR1 = NUM_SAMPS; // number longs
    85.             SH2_DMA_CHCR1 = 0x18E1; // dest fixed, src incr, size long, ext req, dack mem to dev, dack hi, dack edge, dreq rising edge, cycle-steal, dual addr, intr disabled, clear TE, dma enabled
    86.  
    87.             FillSoundBuff(NUM_SAMPS);
    88.  
    89.             // wait on DMA
    90.             while (!(SH2_DMA_CHCR1 & 2)); // wait on TE
    91.             SH2_DMA_CHCR1 = 0x18E0; // clear TE, dma disabled
    92.  
    93.             // start DMA on second buffer and fill first
    94.             SH2_DMA_SAR1 = ((unsigned long)sndbuf + NUM_SAMPS * 4) | 0x20000000;
    95.             SH2_DMA_DAR1 = 0x20004034; // storing a long here will set left and right
    96.             SH2_DMA_TCR1 = NUM_SAMPS; // number longs
    97.             SH2_DMA_CHCR1 = 0x18E1; // dest fixed, src incr, size long, ext req, dack mem to dev, dack hi, dack edge, dreq rising edge, cycle-steal, dual addr, intr disabled, clear TE, dma enabled
    98.  
    99.             FillSoundBuff(0);
    100.  
    101.             // wait on DMA
    102.             while (!(SH2_DMA_CHCR1 & 2)); // wait on TE
    103.             SH2_DMA_CHCR1 = 0x18E0; // clear TE, dma disabled
    104.         }
    105.     }
    106. }
    and here's an archive of the demo... the code above is newer... I trimmed the demo code a bit, but didn't make a new archive.

    http://www.fileden.com/files/2009/2/3/2304...udioTest32X.zip
     
  10. evilhamwizard

    evilhamwizard

    Researcher
    1,384
    429
    63
    Time for some bumpage.

    I checked out the PS2 port of Sonic R PC for Sonic Gems Collection (NTSC-J) and there's some remnants of some Maya source code for something related to editing. Not sure, can you figure it out?

    *note there's some stuff that might not be part of this file, but whatever

    Code (TCL):
    1. // Maya Mel UI Configuration File.
    2. //
    3. //  This script is machine generated.  Edit at your own risk.
    4. //
    5. //
    6.  
    7. global string $gMainPane;
    8. if (`paneLayout -exists $gMainPane`) {
    9.  
    10.     global int $gUseScenePanelConfig;
    11.     int    $useSceneConfig = $gUseScenePanelConfig;
    12.     int    $menusOkayInPanels = `optionVar -q allowMenusInPanels`;    int    $nVisPanes = `paneLayout -q -nvp $gMainPane`;
    13.     int    $nPanes = 0;
    14.     string $editorName;
    15.     string $panelName;
    16.     string $itemFilterName;
    17.     string $panelConfig;
    18.  
    19.     //
    20.     //  get current state of the UI
    21.     //
    22.     sceneUIReplacement -update $gMainPane;
    23.  
    24.     $panelName = `sceneUIReplacement -getNextPanel "modelPanel" "Top View"`;
    25.     if ("" == $panelName) {
    26.         if ($useSceneConfig) {
    27.             $panelName = `modelPanel -unParent -l "Top View" -mbv $menusOkayInPanels `;
    28.             $editorName = $panelName;
    29.             modelEditor -e
    30.                 -camera "top"
    31.                 -useInteractiveMode 0
    32.                 -displayLights "default"
    33.                 -displayAppearance "wireframe"
    34.                 -activeOnly 0
    35.                 -wireframeOnShaded 0
    36.                 -bufferMode "double"
    37.                 -twoSidedLighting 1
    38.                 -backfaceCulling 0
    39.                 -xray 0
    40.                 -displayTextures 0
    41.                 -smoothWireframe 0
    42.                 -textureAnisotropic 0
    43.                 -textureHilight 1
    44.                 -textureSampling 2
    45.                 -textureDisplay "modulate"
    46.                 -textureMaxSize 1024
    47.                 -fogging 0
    48.                 -fogSource "fragment"
    49.                 -fogMode "linear"
    50.                 -fogStart 0
    51.                 -fogEnd 100
    52.                 -fogDensity 0.1
    53.                 -fogColor 0.5 0.5 0.5 1
    54.                 -sortTransparent 1
    55.                 -nurbsCurves 1
    56.                 -nurbsSurfaces 1
    57.                 -polymeshes 1
    58.                 -subdivSurfaces 1
    59.                 -planes 1
    60.                 -lights 1
    61.                 -cameras 1
    62.                 -controlVertices 1
    63.                 -hulls 1
    64.                 -grid 1
    65.                 -joints 1
    66.                 -ikHandles 1
    67.                 -deformers 1
    68.                 -dynamics 1
    69.                 -fluids 1
    70.                 -locators 1
    71.                 -dimensions 1
    72.                 -handles 1
    73.                 -pivots 1
    74.                 -textures 1
    75.                 -strokes 1
    76.                 -shadows 0
    77.                 $editorName;
    78. modelEditor -e -viewSelected 0 $editorName;
    79.         }
    80.     } else {
    81.         $label = `panel -q -label $panelName`;
    82.         modelPanel -edit -l "Top View" -mbv $menusOkayInPanels  $panelName;
    83.         $editorName = $panelName;
    84.         modelEditor -e
    85.             -camera "top"
    86.             -useInteractiveMode 0
    87.             -displayLights "default"
    88.             -displayAppearance "wireframe"
    89.             -activeOnly 0
    90.             -wireframeOnShaded 0
    91.             -bufferMode "double"
    92.             -twoSidedLighting 1
    93.             -backfaceCulling 0
    94.             -xray 0
    95.             -displayTextures 0
    96.             -smoothWireframe 0
    97.             -textureAnisotropic 0
    98.             -textureHilight 1
    99.             -textureSampling 2
    100.             -textureDisplay "modulate"
    101.             -textureMaxSize 1024
    102.             -fogging 0
    103.             -fogSource "fragment"
    104.             -fogMode "linear"
    105.             -fogStart 0
    106.             -fogEnd 100
    107.             -fogDensity 0.1
    108.             -fogColor 0.5 0.5 0.5 1
    109.             -sortTransparent 1
    110.             -nurbsCurves 1
    111.             -nurbsSurfaces 1
    112.             -polymeshes 1
    113.             -subdivSurfaces 1
    114.             -planes 1
    115.             -lights 1
    116.             -cameras 1
    117.             -controlVertices 1
    118.             -hulls 1
    119.             -grid 1
    120.             -joints 1
    121.             -ikHandles 1
    122.             -deformers 1
    123.             -dynamics 1
    124.             -fluids 1
    125.             -locators 1
    126.             -dimensions 1
    127.             -handles 1
    128.             -pivots 1
    129.             -textures 1
    130.             -strokes 1
    131.             -shadows 0
    132.             $editorName;
    133. modelEditor -e -viewSelected 0 $editorName;
    134.         if (!$useSceneConfig) {
    135.             panel -e -l $label $panelName;
    136.         }
    137.     }
    138.  
    139.  
    140.     $panelName = `sceneUIReplacement -getNextPanel "modelPanel" "Side View"`;
    141.     if ("" == $panelName) {
    142.         if ($useSceneConfig) {
    143.             $panelName = `modelPanel -unParent -l "Side View" -mbv $menusOkayInPanels `;
    144.             $editorName = $panelName;
    145.             modelEditor -e
    146.                 -camera "side"
    147.                 -useInteractiveMode 0
    148.                 -displayLights "default"
    149.                 -displayAppearance "wireframe"
    150.                 -activeOnly 0
    151.                 -wireframeOnShaded 0
    152.                 -bufferMode "double"
    153.                 -twoSidedLighting 1
    154.                 -backfaceCulling 0
    155.                 -xray 0
    156.                 -displayTextures 0
    157.                 -smoothWireframe 0
    158.                 -textureAnisotropic 0
    159.                 -textureHilight 1
    160.                 -textureSampling 2
    161.                 -textureDisplay "modulate"
    162.                 -textureMaxSize 1024
    163.                 -fogging 0
    164.                 -fogSource "fragment"
    165.                 -fogMode "linear"
    166.                 -fogStart 0
    167.                 -fogEnd 100
    168.                 -fogDensity 0.1
    169.                 -fogColor 0.5 0.5 0.5 1
    170.                 -sortTransparent 1
    171.                 -nurbsCurves 1
    172.                 -nurbsSurfaces 1
    173.                 -polymeshes 1
    174.                 -subdivSurfaces 1
    175.                 -planes 1
    176.                 -lights 1
    177.                 -cameras 1
    178.                 -controlVertices 1
    179.                 -hulls 1
    180.                 -grid 1
    181.                 -joints 1
    182.                 -ikHandles 1
    183.                 -deformers 1
    184.                 -dynamics 1
    185.                 -fluids 1
    186.                 -locators 1
    187.                 -dimensions 1
    188.                 -handles 1
    189.                 -pivots 1
    190.                 -textures 1
    191.                 -strokes 1
    192.                 -shadows 0
    193.                 $editorName;
    194. modelEditor -e -viewSelected 0 $editorName;
    195.         }
    196.     } else {
    197.         $label = `panel -q -label $panelName`;
    198.         modelPanel -edit -l "Side View" -mbv $menusOkayInPanels  $panelName;
    199.         $editorName = $panelName;
    200.         modelEditor -e
    201.             -camera "side"
    202.             -useInteractiveMode 0
    203.             -displayLights "default"
    204.             -displayAppearance "wireframe"
    205.             -activeOnly 0
    206.             -wireframeOnShaded 0
    207.             -bufferMode "double"
    208.             -twoSidedLighting 1
    209.             -backfaceCulling 0
    210.             -xray 0
    211.             -displayTextures 0
    212.             -smoothWireframe 0
    213.             -textureAnisotropic 0
    214.             -textureHilight 1
    215.             -textureSampling 2
    216.             -textureDisplay "modulate"
    217.             -textureMaxSize 1024
    218.             -fogging 0
    219.             -fogSource "fragment"
    220.             -fogMode "linear"
    221.             -fogStart 0
    222.             -fogEnd 100
    223.             -fogDensity 0.1
    224.             -fogColor 0.5 0.5 0.5 1
    225.             -sortTransparent 1
    226.             -nurbsCurves 1
    227.             -nurbsSurfaces 1
    228.             -polymeshes 1
    229.             -subdivSurfaces 1
    230.             -planes 1
    231.             -lights 1
    232.             -cameras 1
    233.             -controlVertices 1
    234.             -hulls 1
    235.             -grid 1
    236.             -joints 1
    237.             -ikHandles 1
    238.             -deformers 1
    239.             -dynamics 1
    240.             -fluids 1
    241.             -locators 1
    242.             -dimensions 1
    243.             -handles 1
    244.             -pivots 1
    245.             -textures 1
    246.             -strokes 1
    247.             -shadows 0
    248.             $editorName;
    249. modelEditor -e -viewSelected 0 $editorName;
    250.         if (!$useSceneConfig) {
    251.             panel -e -l $label $panelName;
    252.         }
    253.     }
    254.  
    255.  
    256.     $panelName = `sceneUIReplacement -getNextPanel "modelPanel" "Front View"`;
    257.     if ("" == $panelName) {
    258.         if ($useSceneConfig) {
    259.             $panelName = `modelPanel -unParent -l "Front View" -mbv $menusOkayInPanels `;
    260.             $editorName = $panelName;
    261.             modelEditor -e
    262.                 -camera "front"
    263.                 -useInteractiveMode 0
    264.                 -displayLights "default"
    265.                 -displayAppearance "wireframe"
    266.                 -activeOnly 0
    267.                 -wireframeOnShaded 0
    268.                 -bufferMode "double"
    269.                 -twoSidedLighting 1
    270.                 -backfaceCulling 0
    271.                 -xray 0
    272.                 -displayTextures 0
    273.                 -smoothWireframe 0
    274.                 -textureAnisotropic 0
    275.                 -textureHilight 1
    276.                 -textureSampling 2
    277.                 -textureDisplay "modulate"
    278.                 -textureMaxSize 1024
    279.                 -fogging 0
    280.                 -fogSource "fragment"
    281.                 -fogMode "linear"
    282.                 -fogStart 0
    283.                 -fogEnd 100
    284.                 -fogDensity 0.1
    285.                 -fogColor 0.5 0.5 0.5 1
    286.                 -sortTransparent 1
    287.                 -nurbsCurves 1
    288.                 -nurbsSurfaces 1
    289.                 -polymeshes 1
    290.                 -subdivSurfaces 1
    291.                 -planes 1
    292.                 -lights 1
    293.                 -cameras 1
    294.                 -controlVertices 1
    295.                 -hulls 1
    296.                 -grid 1
    297.                 -joints 1
    298.                 -ikHandles 1
    299.                 -deformers 1
    300.                 -dynamics 1
    301.                 -fluids 1
    302.                 -locators 1
    303.                 -dimensions 1
    304.                 -handles 1
    305.                 -pivots 1
    306.                 -textures 1
    307.                 -strokes 1
    308.                 -shadows 0
    309.                 $editorName;
    310. modelEditor -e -viewSelected 0 $editorName;
    311.         }
    312.     } else {
    313.         $label = `panel -q -label $panelName`;
    314.         modelPanel -edit -l "Front View" -mbv $menusOkayInPanels  $panelName;
    315.         $editorName = $panelName;
    316.         modelEditor -e
    317.             -camera "front"
    318.             -useInteractiveMode 0
    319.             -displayLights "default"
    320.             -displayAppearance "wireframe"
    321.             -activeOnly 0
    322.             -wireframeOnShaded 0
    323.             -bufferMode "double"
    324.             -twoSidedLighting 1
    325.             -backfaceCulling 0
    326.             -xray 0
    327.             -displayTextures 0
    328.             -smoothWireframe 0
    329.             -textureAnisotropic 0
    330.             -textureHilight 1
    331.             -textureSampling 2
    332.             -textureDisplay "modulate"
    333.             -textureMaxSize 1024
    334.             -fogging 0
    335.             -fogSource "fragment"
    336.             -fogMode "linear"
    337.             -fogStart 0
    338.             -fogEnd 100
    339.             -fogDensity 0.1
    340.             -fogColor 0.5 0.5 0.5 1
    341.             -sortTransparent 1
    342.             -nurbsCurves 1
    343.             -nurbsSurfaces 1
    344.             -polymeshes 1
    345.             -subdivSurfaces 1
    346.             -planes 1
    347.             -lights 1
    348.             -cameras 1
    349.             -controlVertices 1
    350.             -hulls 1
    351.             -grid 1
    352.             -joints 1
    353.             -ikHandles 1
    354.             -deformers 1
    355.             -dynamics 1
    356.             -fluids 1
    357.             -locators 1
    358.             -dimensions 1
    359.             -handles 1
    360.             -pivots 1
    361.             -textures 1
    362.             -strokes 1
    363.             -shadows 0
    364.             $editorName;
    365. modelEditor -e -viewSelected 0 $editorName;
    366.         if (!$useSceneConfig) {
    367.             panel -e -l $label $panelName;
    368.         }
    369.     }
    370.  
    371.  
    372.     $panelName = `sceneUIReplacement -getNextPanel "modelPanel" "Persp View"`;
    373.     if ("" == $panelName) {
    374.         if ($useSceneConfig) {
    375.             $panelName = `modelPanel -unParent -l "Persp View" -mbv $menusOkayInPanels `;
    376.             $editorName = $panelName;
    377.             modelEditor -e
    378.                 -camera "persp"
    379.                 -useInteractiveMode 0
    380.                 -displayLights "default"
    381.                 -displayAppearance "smoothShaded"
    382.                 -activeOnly 0
    383.                 -wireframeOnShaded 0
    384.                 -bufferMode "double"
    385.                 -twoSidedLighting 1
    386.                 -backfaceCulling 0
    387.                 -xray 0
    388.                 -displayTextures 1
    389.                 -smoothWireframe 0
    390.                 -textureAnisotropic 0
    391.                 -textureHilight 1
    392.                 -textureSampling 2
    393.                 -textureDisplay "modulate"
    394.                 -textureMaxSize 1024
    395.                 -fogging 0
    396.                 -fogSource "fragment"
    397.                 -fogMode "linear"
    398.                 -fogStart 0
    399.                 -fogEnd 100
    400.                 -fogDensity 0.1
    401.                 -fogColor 0.5 0.5 0.5 1
    402.                 -sortTransparent 1
    403.                 -nurbsCurves 1
    404.                 -nurbsSurfaces 1
    405.                 -polymeshes 1
    406.                 -subdivSurfaces 1
    407.                 -planes 1
    408.                 -lights 1
    409.                 -cameras 1
    410.                 -controlVertices 1
    411.                 -hulls 1
    412.                 -grid 1
    413.                 -joints 1
    414.                 -ikHandles 1
    415.                 -deformers 1
    416.                 -dynamics 1
    417.                 -fluids 1
    418.                 -locators 1
    419.                 -dimensions 1
    420.                 -handles 1
    421.                 -pivots 1
    422.                 -textures 1
    423.                 -strokes 1
    424.                 -shadows 0
    425.                 $editorName;
    426. modelEditor -e -viewSelected 0 $editorName;
    427.         }
    428.     } else {
    429.         $label = `panel -q -label $panelName`;
    430.         modelPanel -edit -l "Persp View" -mbv $menusOkayInPanels  $panelName;
    431.         $editorName = $panelName;
    432.         modelEditor -e
    433.             -camera "persp"
    434.             -useInteractiveMode 0
    435.             -displayLights "default"
    436.             -displayAppearance "smoothShaded"
    437.             -activeOnly 0
    438.             -wireframeOnShaded 0
    439.             -bufferMode "double"
    440.             -twoSidedLighting 1
    441.             -backfaceCulling 0
    442.             -xray 0
    443.             -displayTextures 1
    444.             -smoothWireframe 0
    445.             -textureAnisotropic 0
    446.             -textureHilight 1
    447.             -textureSampling 2
    448.             -textureDisplay "modulate"
    449.             -textureMaxSize 1024
    450.             -fogging 0
    451.             -fogSource "fragment"
    452.             -fogMode "linear"
    453.             -fogStart 0
    454.             -fogEnd 100
    455.             -fogDensity 0.1
    456.             -fogColor 0.5 0.5 0.5 1
    457.             -sortTransparent 1
    458.             -nurbsCurves 1
    459.             -nurbsSurfaces 1
    460.             -polymeshes 1
    461.             -subdivSurfaces 1
    462.             -planes 1
    463.             -lights 1
    464.             -cameras 1
    465.             -controlVertices 1
    466.             -hulls 1
    467.             -grid 1
    468.             -joints 1
    469.             -ikHandles 1
    470.             -deformers 1
    471.             -dynamics 1
    472.             -fluids 1
    473.             -locators 1
    474.             -dimensions 1
    475.             -handles 1
    476.             -pivots 1
    477.             -textures 1
    478.             -strokes 1
    479.             -shadows 0
    480.             $editorName;
    481. modelEditor -e -viewSelected 0 $editorName;
    482.         if (!$useSceneConfig) {
    483.             panel -e -l $label $panelName;
    484.         }
    485.     }
    486.  
    487.  
    488.     $panelName = `sceneUIReplacement -getNextPanel "outlinerPanel" "Outliner"`;
    489.     if ("" == $panelName) {
    490.         if ($useSceneConfig) {
    491.             $panelName = `outlinerPanel -unParent -l "Outliner" -mbv $menusOkayInPanels `;
    492.             $editorName = $panelName;
    493.             outlinerEditor -e
    494.                 -mainListConnection "worldList"
    495.                 -selectionConnection "modelList"
    496.                 -showShapes 0
    497.                 -showAttributes 0
    498.                 -showConnected 0
    499.                 -showAnimCurvesOnly 0
    500.                 -autoExpand 0
    501.                 -showDagOnly 1
    502.                 -ignoreDagHierarchy 0
    503.                 -expandConnections 0
    504.                 -showUnitlessCurves 1
    505.                 -showCompounds 1
    506.                 -showLeafs 1
    507.                 -showNumericAttrsOnly 0
    508.                 -highlightActive 1
    509.                 -autoSelectNewObjects 0
    510.                 -doNotSelectNewObjects 0
    511.                 -dropIsParent 1
    512.                 -transmitFilters 0
    513.                 -setFilter "defaultSetFilter"
    514.                 -showSetMembers 1
    515.                 -allowMultiSelection 1
    516.                 -alwaysToggleSelect 0
    517.                 -directSelect 0
    518.                 -displayMode "DAG"
    519.                 -expandObjects 0
    520.                 -setsIgnoreFilters 1
    521.                 -editAttrName 0
    522.                 -showAttrValues 0
    523.                 -highlightSecondary 0
    524.                 -showUVAttrsOnly 0
    525.                 -showTextureNodesOnly 0
    526.                 -sortOrder "none"
    527.                 -longNames 0
    528.                 -niceNames 1
    529.                 $editorName;
    530.         }
    531.     } else {
    532.         $label = `panel -q -label $panelName`;
    533.         outlinerPanel -edit -l "Outliner" -mbv $menusOkayInPanels  $panelName;
    534.         $editorName = $panelName;
    535.         outlinerEditor -e
    536.             -mainListConnection "worldList"
    537.             -selectionConnection "modelList"
    538.             -showShapes 0
    539.             -showAttributes 0
    540.             -showConnected 0
    541.             -showAnimCurvesOnly 0
    542.             -autoExpand 0
    543.             -showDagOnly 1
    544.             -ignoreDagHierarchy 0
    545.             -expandConnections 0
    546.             -showUnitlessCurves 1
    547.             -showCompounds 1
    548.             -showLeafs 1
    549.             -showNumericAttrsOnly 0
    550.             -highlightActive 1
    551.             -autoSelectNewObjects 0
    552.             -doNotSelectNewObjects 0
    553.             -dropIsParent 1
    554.             -transmitFilters 0
    555.             -setFilter "defaultSetFilter"
    556.             -showSetMembers 1
    557.             -allowMultiSelection 1
    558.             -alwaysToggleSelect 0
    559.             -directSelect 0
    560.             -displayMode "DAG"
    561.             -expandObjects 0
    562.             -setsIgnoreFilters 1
    563.             -editAttrName 0
    564.             -showAttrValues 0
    565.             -highlightSecondary 0
    566.             -showUVAttrsOnly 0
    567.             -showTextureNodesOnly 0
    568.             -sortOrder "none"
    569.             -longNames 0
    570.             -niceNames 1
    571.             $editorName;
    572.         if (!$useSceneConfig) {
    573.             panel -e -l $label $panelName;
    574.         }
    575.     }
    576.  
    577.  
    578.     $panelName = `sceneUIReplacement -getNextScriptedPanel "graphEditor" "Graph Editor"`;
    579.     if ("" == $panelName) {
    580.         if ($useSceneConfig) {
    581.             $panelName = `scriptedPanel -unParent  -type "graphEditor" -l "Graph Editor" -mbv $menusOkayInPanels `;
    582.  
    583.             $editorName = ($panelName+"OutlineEd");
    584.             outlinerEditor -e
    585.                 -mainListConnection "graphEditorList"
    586.                 -selectionConnection "graphEditor1FromOutliner"
    587.                 -highlightConnection "keyframeList"
    588.                 -showShapes 1
    589.                 -showAttributes 1
    590.                 -showConnected 1
    591.                 -showAnimCurvesOnly 1
    592.                 -autoExpand 1
    593.                 -showDagOnly 0
    594.                 -ignoreDagHierarchy 0
    595.                 -expandConnections 1
    596.                 -showUnitlessCurves 1
    597.                 -showCompounds 0
    598.                 -showLeafs 1
    599.                 -showNumericAttrsOnly 1
    600.                 -highlightActive 0
    601.                 -autoSelectNewObjects 1
    602.                 -doNotSelectNewObjects 0
    603.                 -dropIsParent 1
    604.                 -transmitFilters 1
    605.                 -setFilter "0"
    606.                 -showSetMembers 0
    607.                 -allowMultiSelection 1
    608.                 -alwaysToggleSelect 0
    609.                 -directSelect 0
    610.                 -displayMode "DAG"
    611.                 -expandObjects 0
    612.                 -setsIgnoreFilters 1
    613.                 -editAttrName 0
    614.                 -showAttrValues 0
    615.                 -highlightSecondary 0
    616.                 -showUVAttrsOnly 0
    617.                 -showTextureNodesOnly 0
    618.                 -sortOrder "none"
    619.                 -longNames 0
    620.                 -niceNames 1
    621.                 $editorName;
    622.  
    623.             $editorName = ($panelName+"GraphEd");
    624.             animCurveEditor -e
    625.                 -mainListConnection "graphEditor1FromOutliner"
    626.                 -displayKeys 1
    627.                 -displayTangents 0
    628.                 -displayActiveKeys 0
    629.                 -displayActiveKeyTangents 1
    630.                 -displayInfinities 0
    631.                 -autoFit 0
    632.                 -snapTime "integer"
    633.                 -snapValue "none"
    634.                 -showResults "off"
    635.                 -showBufferCurves "off"
    636.                 -smoothness "fine"
    637.                 -resultSamples 1
    638.                 -resultScreenSamples 0
    639.                 -resultUpdate "delayed"
    640.                 $editorName;
    641.         }
    642.     } else {
    643.         $label = `panel -q -label $panelName`;
    644.         scriptedPanel -edit -l "Graph Editor" -mbv $menusOkayInPanels  $panelName;
    645.  
    646.             $editorName = ($panelName+"OutlineEd");
    647.             outlinerEditor -e
    648.                 -mainListConnection "graphEditorList"
    649.                 -selectionConnection "graphEditor1FromOutliner"
    650.                 -highlightConnection "keyframeList"
    651.                 -showShapes 1
    652.                 -showAttributes 1
    653.                 -showConnected 1
    654.                 -showAnimCurvesOnly 1
    655.                 -autoExpand 1
    656.                 -showDagOnly 0
    657.                 -ignoreDagHierarchy 0
    658.                 -expandConnections 1
    659.                 -showUnitlessCurves 1
    660.                 -showCompounds 0
    661.                 -showLeafs 1
    662.                 -showNumericAttrsOnly 1
    663.                 -highlightActive 0
    664.                 -autoSelectNewObjects 1
    665.                 -doNotSelectNewObjects 0
    666.                 -dropIsParent 1
    667.                 -transmitFilters 1
    668.                 -setFilter "0"
    669.                 -showSetMembers 0
    670.                 -allowMultiSelection 1
    671.                 -alwaysToggleSelect 0
    672.                 -directSelect 0
    673.                 -displayMode "DAG"
    674.                 -expandObjects 0
    675.                 -setsIgnoreFilters 1
    676.                 -editAttrName 0
    677.                 -showAttrValues 0
    678.                 -highlightSecondary 0
    679.                 -showUVAttrsOnly 0
    680.                 -showTextureNodesOnly 0
    681.                 -sortOrder "none"
    682.                 -longNames 0
    683.                 -niceNames 1
    684.                 $editorName;
    685.  
    686.             $editorName = ($panelName+"GraphEd");
    687.             animCurveEditor -e
    688.                 -mainListConnection "graphEditor1FromOutliner"
    689.                 -displayKeys 1
    690.                 -displayTangents 0
    691.                 -displayActiveKeys 0
    692.                 -displayActiveKeyTangents 1
    693.                 -displayInfinities 0
    694.                 -autoFit 0
    695.                 -snapTime "integer"
    696.                 -snapValue "none"
    697.                 -showResults "off"
    698.                 -showBufferCurves "off"
    699.                 -smoothness "fine"
    700.                 -resultSamples 1
    701.                 -resultScreenSamples 0
    702.                 -resultUpdate "delayed"
    703.                 $editorName;
    704.         if (!$useSceneConfig) {
    705.             panel -e -l $label $panelName;
    706.         }
    707.     }
    708.  
    709.  
    710.     $panelName = `sceneUIReplacement -getNextScriptedPanel "dopeSheetPanel" "Dope Sheet"`;
    711.     if ("" == $panelName) {
    712.         if ($useSceneConfig) {
    713.             $panelName = `scriptedPanel -unParent  -type "dopeSheetPanel" -l "Dope Sheet" -mbv $menusOkayInPanels `;
    714.  
    715.             $editorName = ($panelName+"OutlineEd");
    716.             outlinerEditor -e
    717.                 -mainListConnection "animationList"
    718.                 -selectionConnection "dopeSheetPanel1OutlinerSelection"
    719.                 -highlightConnection "keyframeList"
    720.                 -showShapes 1
    721.                 -showAttributes 1
    722.                 -showConnected 1
    723.                 -showAnimCurvesOnly 1
    724.                 -autoExpand 0
    725.                 -showDagOnly 0
    726.                 -ignoreDagHierarchy 0
    727.                 -expandConnections 1
    728.                 -showUnitlessCurves 0
    729.                 -showCompounds 1
    730.                 -showLeafs 1
    731.                 -showNumericAttrsOnly 1
    732.                 -highlightActive 0
    733.                 -autoSelectNewObjects 0
    734.                 -doNotSelectNewObjects 1
    735.                 -dropIsParent 1
    736.                 -transmitFilters 0
    737.                 -setFilter "0"
    738.                 -showSetMembers 0
    739.                 -allowMultiSelection 1
    740.                 -alwaysToggleSelect 0
    741.                 -directSelect 0
    742.                 -displayMode "DAG"
    743.                 -expandObjects 0
    744.                 -setsIgnoreFilters 1
    745.                 -editAttrName 0
    746.                 -showAttrValues 0
    747.                 -highlightSecondary 0
    748.                 -showUVAttrsOnly 0
    749.                 -showTextureNodesOnly 0
    750.                 -sortOrder "none"
    751.                 -longNames 0
    752.                 -niceNames 1
    753.                 $editorName;
    754.  
    755.             $editorName = ($panelName+"DopeSheetEd");
    756.             dopeSheetEditor -e
    757.                 -mainListConnection "dopeSheetPanel1FromOutliner"
    758.                 -highlightConnection "dopeSheetPanel1OutlinerSelection"
    759.                 -displayKeys 1
    760.                 -displayTangents 0
    761.                 -displayActiveKeys 0
    762.                 -displayActiveKeyTangents 0
    763.                 -displayInfinities 0
    764.                 -autoFit 0
    765.                 -snapTime "integer"
    766.                 -snapValue "none"
    767.                 -outliner "dopeSheetPanel1OutlineEd"
    768.                 -showSummary 1
    769.                 -showScene 0
    770.                 -hierarchyBelow 0
    771.                 $editorName;
    772.         }
    773.     } else {
    774.         $label = `panel -q -label $panelName`;
    775.         scriptedPanel -edit -l "Dope Sheet" -mbv $menusOkayInPanels  $panelName;
    776.  
    777.             $editorName = ($panelName+"OutlineEd");
    778.             outlinerEditor -e
    779.                 -mainListConnection "animationList"
    780.                 -selectionConnection "dopeSheetPanel1OutlinerSelection"
    781.                 -highlightConnection "keyframeList"
    782.                 -showShapes 1
    783.                 -showAttributes 1
    784.                 -showConnected 1
    785.                 -showAnimCurvesOnly 1
    786.                 -autoExpand 0
    787.                 -showDagOnly 0
    788.                 -ignoreDagHierarchy 0
    789.                 -expandConnections 1
    790.                 -showUnitlessCurves 0
    791.                 -showCompounds 1
    792.                 -showLeafs 1
    793.                 -showNumericAttrsOnly 1
    794.                 -highlightActive 0
    795.                 -autoSelectNewObjects 0
    796.                 -doNotSelectNewObjects 1
    797.                 -dropIsParent 1
    798.                 -transmitFilters 0
    799.                 -setFilter "0"
    800.                 -showSetMembers 0
    801.                 -allowMultiSelection 1
    802.                 -alwaysToggleSelect 0
    803.                 -directSelect 0
    804.                 -displayMode "DAG"
    805.                 -expandObjects 0
    806.                 -setsIgnoreFilters 1
    807.                 -editAttrName 0
    808.                 -showAttrValues 0
    809.                 -highlightSecondary 0
    810.                 -showUVAttrsOnly 0
    811.                 -showTextureNodesOnly 0
    812.                 -sortOrder "none"
    813.                 -longNames 0
    814.                 -niceNames 1
    815.                 $editorName;
    816.  
    817.             $editorName = ($panelName+"DopeSheetEd");
    818.             dopeSheetEditor -e
    819.                 -mainListConnection "dopeSheetPanel1FromOutliner"
    820.                 -highlightConnection "dopeSheetPanel1OutlinerSelection"
    821.                 -displayKeys 1
    822.                 -displayTangents 0
    823.                 -displayActiveKeys 0
    824.                 -displayActiveKeyTangents 0
    825.                 -displayInfinities 0
    826.                 -autoFit 0
    827.                 -snapTime "integer"
    828.                 -snapValue "none"
    829.                 -outliner "dopeSheetPanel1OutlineEd"
    830.                 -showSummary 1
    831.                 -showScene 0
    832.                 -hierarchyBelow 0
    833.                 $editorName;
    834.         if (!$useSceneConfig) {
    835.             panel -e -l $label $panelName;
    836.         }
    837.     }
    838.  
    839.  
    840.     $panelName = `sceneUIReplacement -getNextScriptedPanel "clipEditorPanel" "Trax Editor"`;
    841.     if ("" == $panelName) {
    842.         if ($useSceneConfig) {
    843.             $panelName = `scriptedPanel -unParent  -type "clipEditorPanel" -l "Trax Editor" -mbv $menusOkayInPanels `;
    844.  
    845.             $editorName = ($panelName+"ClipEditor");
    846.             clipEditor -e
    847.                 -characterOutline "clipEditorPanel1OutlineEditor"
    848.                 -menuContext "track"
    849.                 $editorName;
    850.         }
    851.     } else {
    852.         $label = `panel -q -label $panelName`;
    853.         scriptedPanel -edit -l "Trax Editor" -mbv $menusOkayInPanels  $panelName;
    854.  
    855.             $editorName = ($panelName+"ClipEditor");
    856.             clipEditor -e
    857.                 -characterOutline "clipEditorPanel1OutlineEditor"
    858.                 -menuContext "track"
    859.                 $editorName;
    860.         if (!$useSceneConfig) {
    861.             panel -e -l $label $panelName;
    862.         }
    863.     }
    864.  
    865.  
    866.     $panelName = `sceneUIReplacement -getNextScriptedPanel "hyperGraphPanel" "Hypergraph"`;
    867.     if ("" == $panelName) {
    868.         if ($useSceneConfig) {
    869.             $panelName = `scriptedPanel -unParent  -type "hyperGraphPanel" -l "Hypergraph" -mbv $menusOkayInPanels `;
    870.  
    871.             $editorName = ($panelName+"HyperGraphEd");
    872.             hyperGraph -e
    873.                 -orientation "horiz"
    874.                 -zoom 1
    875.                 -animateTransition 0
    876.                 -showShapes 0
    877.                 -showDeformers 0
    878.                 -showExpressions 0
    879.                 -showConstraints 0
    880.                 -showUnderworld 0
    881.                 -showInvisible 0
    882.                 -transitionFrames 1
    883.                 -freeform 0
    884.                 -imageEnabled 0
    885.                 -graphType "DAG"
    886.                 -updateSelection 1
    887.                 -updateNodeAdded 1
    888.                 $editorName;
    889.         }
    890.     } else {
    891.         $label = `panel -q -label $panelName`;
    892.         scriptedPanel -edit -l "Hypergraph" -mbv $menusOkayInPanels  $panelName;
    893.  
    894.             $editorName = ($panelName+"HyperGraphEd");
    895.             hyperGraph -e
    896.                 -orientation "horiz"
    897.                 -zoom 1
    898.                 -animateTransition 0
    899.                 -showShapes 0
    900.                 -showDeformers 0
    901.                 -showExpressions 0
    902.                 -showConstraints 0
    903.                 -showUnderworld 0
    904.                 -showInvisible 0
    905.                 -transitionFrames 1
    906.                 -freeform 0
    907.                 -imageEnabled 0
    908.                 -graphType "DAG"
    909.                 -updateSelection 1
    910.                 -updateNodeAdded 1
    911.                 $editorName;
    912.         if (!$useSceneConfig) {
    913.             panel -e -l $label $panelName;
    914.         }
    915.     }
    916.  
    917.  
    918.     $panelName = `sceneUIReplacement -getNextScriptedPanel "hyperShadePanel" "Hypershade"`;
    919.     if ("" == $panelName) {
    920.         if ($useSceneConfig) {
    921.             $panelName = `scriptedPanel -unParent  -type "hyperShadePanel" -l "Hypershade" -mbv $menusOkayInPanels `;
    922.         }
    923.     } else {
    924.         $label = `panel -q -label $panelName`;
    925.         scriptedPanel -edit -l "Hypershade" -mbv $menusOkayInPanels  $panelName;
    926.         if (!$useSceneConfig) {
    927.             panel -e -l $label $panelName;
    928.         }
    929.     }
    930.  
    931.  
    932.     $panelName = `sceneUIReplacement -getNextScriptedPanel "visorPanel" "Visor"`;
    933.     if ("" == $panelName) {
    934.         if ($useSceneConfig) {
    935.             $panelName = `scriptedPanel -unParent  -type "visorPanel" -l "Visor" -mbv $menusOkayInPanels `;
    936.         }
    937.     } else {
    938.         $label = `panel -q -label $panelName`;
    939.         scriptedPanel -edit -l "Visor" -mbv $menusOkayInPanels  $panelName;
    940.         if (!$useSceneConfig) {
    941.             panel -e -l $label $panelName;
    942.         }
    943.     }
    944.  
    945.  
    946.     $panelName = `sceneUIReplacement -getNextScriptedPanel "polyTexturePlacementPanel" "UV Texture Editor"`;
    947.     if ("" == $panelName) {
    948.         if ($useSceneConfig) {
    949.             $panelName = `scriptedPanel -unParent  -type "polyTexturePlacementPanel" -l "UV Texture Editor" -mbv $menusOkayInPanels `;
    950.         }
    951.     } else {
    952.         $label = `panel -q -label $panelName`;
    953.         scriptedPanel -edit -l "UV Texture Editor" -mbv $menusOkayInPanels  $panelName;
    954.         if (!$useSceneConfig) {
    955.             panel -e -l $label $panelName;
    956.         }
    957.     }
    958.  
    959.  
    960.     $panelName = `sceneUIReplacement -getNextScriptedPanel "multiListerPanel" "Multilister"`;
    961.     if ("" == $panelName) {
    962.         if ($useSceneConfig) {
    963.             $panelName = `scriptedPanel -unParent  -type "multiListerPanel" -l "Multilister" -mbv $menusOkayInPanels `;
    964.         }
    965.     } else {
    966.         $label = `panel -q -label $panelName`;
    967.         scriptedPanel -edit -l "Multilister" -mbv $menusOkayInPanels  $panelName;
    968.         if (!$useSceneConfig) {
    969.             panel -e -l $label $panelName;
    970.         }
    971.     }
    972.  
    973.  
    974.     $panelName = `sceneUIReplacement -getNextScriptedPanel "renderWindowPanel" "Render View"`;
    975.     if ("" == $panelName) {
    976.         if ($useSceneConfig) {
    977.             $panelName = `scriptedPanel -unParent  -type "renderWindowPanel" -l "Render View" -mbv $menusOkayInPanels `;
    978.         }
    979.     } else {
    980.         $label = `panel -q -label $panelName`;
    981.         scriptedPanel -edit -l "Render View" -mbv $menusOkayInPanels  $panelName;
    982.         if (!$useSceneConfig) {
    983.             panel -e -l $label $panelName;
    984.         }
    985.     }
    986.  
    987.  
    988.     $panelName = `sceneUIReplacement -getNextPanel "blendShapePanel" "Blend Shape"`;
    989.     if ("" == $panelName) {
    990.         if ($useSceneConfig) {
    991.             blendShapePanel -unParent -l "Blend Shape" -mbv $menusOkayInPanels ;
    992.         }
    993.     } else {
    994.         $label = `panel -q -label $panelName`;
    995.         blendShapePanel -edit -l "Blend Shape" -mbv $menusOkayInPanels  $panelName;
    996.         if (!$useSceneConfig) {
    997.             panel -e -l $label $panelName;
    998.         }
    999.     }
    1000.  
    1001.  
    1002.     $panelName = `sceneUIReplacement -getNextScriptedPanel "dynRelEdPanel" "Dynamic Relationships"`;
    1003.     if ("" == $panelName) {
    1004.         if ($useSceneConfig) {
    1005.             $panelName = `scriptedPanel -unParent  -type "dynRelEdPanel" -l "Dynamic Relationships" -mbv $menusOkayInPanels `;
    1006.         }
    1007.     } else {
    1008.         $label = `panel -q -label $panelName`;
    1009.         scriptedPanel -edit -l "Dynamic Relationships" -mbv $menusOkayInPanels  $panelName;
    1010.         if (!$useSceneConfig) {
    1011.             panel -e -l $label $panelName;
    1012.         }
    1013.     }
    1014.  
    1015.  
    1016.     $panelName = `sceneUIReplacement -getNextPanel "devicePanel" "Devices"`;
    1017.     if ("" == $panelName) {
    1018.         if ($useSceneConfig) {
    1019.             devicePanel -unParent -l "Devices" -mbv $menusOkayInPanels ;
    1020.         }
    1021.     } else {
    1022.         $label = `panel -q -label $panelName`;
    1023.         devicePanel -edit -l "Devices" -mbv $menusOkayInPanels  $panelName;
    1024.         if (!$useSceneConfig) {
    1025.             panel -e -l $label $panelName;
    1026.         }
    1027.     }
    1028.  
    1029.  
    1030.     $panelName = `sceneUIReplacement -getNextScriptedPanel "relationshipPanel" "Relationship Editor"`;
    1031.     if ("" == $panelName) {
    1032.         if ($useSceneConfig) {
    1033.             $panelName = `scriptedPanel -unParent  -type "relationshipPanel" -l "Relationship Editor" -mbv $menusOkayInPanels `;
    1034.         }
    1035.     } else {
    1036.         $label = `panel -q -label $panelName`;
    1037.         scriptedPanel -edit -l "Relationship Editor" -mbv $menusOkayInPanels  $panelName;
    1038.         if (!$useSceneConfig) {
    1039.             panel -e -l $label $panelName;
    1040.         }
    1041.     }
    1042.  
    1043.  
    1044.     $panelName = `sceneUIReplacement -getNextScriptedPanel "referenceEditorPanel" "Reference Editor"`;
    1045.     if ("" == $panelName) {
    1046.         if ($useSceneConfig) {
    1047.             $panelName = `scriptedPanel -unParent  -type "referenceEditorPanel" -l "Reference Editor" -mbv $menusOkayInPanels `;
    1048.         }
    1049.     } else {
    1050.         $label = `panel -q -label $panelName`;
    1051.         scriptedPanel -edit -l "Reference Editor" -mbv $menusOkayInPanels  $panelName;
    1052.         if (!$useSceneConfig) {
    1053.             panel -e -l $label $panelName;
    1054.         }
    1055.     }
    1056.  
    1057.  
    1058.     $panelName = `sceneUIReplacement -getNextScriptedPanel "componentEditorPanel" "Component Editor"`;
    1059.     if ("" == $panelName) {
    1060.         if ($useSceneConfig) {
    1061.             $panelName = `scriptedPanel -unParent  -type "componentEditorPanel" -l "Component Editor" -mbv $menusOkayInPanels `;
    1062.         }
    1063.     } else {
    1064.         $label = `panel -q -label $panelName`;
    1065.         scriptedPanel -edit -l "Component Editor" -mbv $menusOkayInPanels  $panelName;
    1066.         if (!$useSceneConfig) {
    1067.             panel -e -l $label $panelName;
    1068.         }
    1069.     }
    1070.  
    1071.  
    1072.     $panelName = `sceneUIReplacement -getNextScriptedPanel "dynPaintScriptedPanelType" "Paint Effects"`;
    1073.     if ("" == $panelName) {
    1074.         if ($useSceneConfig) {
    1075.             $panelName = `scriptedPanel -unParent  -type "dynPaintScriptedPanelType" -l "Paint Effects" -mbv $menusOkayInPanels `;
    1076.         }
    1077.     } else {
    1078.         $label = `panel -q -label $panelName`;
    1079.         scriptedPanel -edit -l "Paint Effects" -mbv $menusOkayInPanels  $panelName;
    1080.         if (!$useSceneConfig) {
    1081.             panel -e -l $label $panelName;
    1082.         }
    1083.     }
    1084.  
    1085.  
    1086.     if ($useSceneConfig) {
    1087.         string $configName = `getPanel -cwl "Current Layout"`;
    1088.         if ("" != $configName) {
    1089.             panelConfiguration -edit -label "Current Layout"
    1090.                 -defaultImage ""
    1091.                 -image ""
    1092.                 -sc false
    1093.                 -configString "global string $gMainPane; paneLayout -e -cn \"single\" -ps 1 100 100 $gMainPane;"
    1094.                 -removeAllPanels
    1095.                 -ap false
    1096.                     "Persp View"
    1097.                     "modelPanel"
    1098.                     "$panelName = `modelPanel -unParent -l \"Persp View\" -mbv $menusOkayInPanels `;\n$editorName = $panelName;\nmodelEditor -e \n    -cam `findStartUpCamera persp` \n    -useInteractiveMode 0\n    -displayLights \"default\" \n    -displayAppearance \"smoothShaded\" \n    -activeOnly 0\n    -wireframeOnShaded 0\n    -bufferMode \"double\" \n    -twoSidedLighting 1\n    -backfaceCulling 0\n    -xray 0\n    -displayTextures 1\n    -smoothWireframe 0\n    -textureAnisotropic 0\n    -textureHilight 1\n    -textureSampling 2\n    -textureDisplay \"modulate\" \n    -textureMaxSize 1024\n    -fogging 0\n    -fogSource \"fragment\" \n    -fogMode \"linear\" \n    -fogStart 0\n    -fogEnd 100\n    -fogDensity 0.1\n    -fogColor 0.5 0.5 0.5 1 \n    -sortTransparent 1\n    -nurbsCurves 1\n    -nurbsSurfaces 1\n    -polymeshes 1\n    -subdivSurfaces 1\n    -planes 1\n    -lights 1\n    -cameras 1\n    -controlVertices 1\n    -hulls 1\n    -grid 1\n    -joints 1\n    -ikHandles 1\n    -deformers 1\n    -dynamics 1\n    -fluids 1\n    -locators 1\n    -dimensions 1\n    -handles 1\n    -pivots 1\n    -textures 1\n    -strokes 1\n    -shadows 0\n    $editorName;\nmodelEditor -e -viewSelected 0 $editorName"
    1099.                     "modelPanel -edit -l \"Persp View\" -mbv $menusOkayInPanels  $panelName;\n$editorName = $panelName;\nmodelEditor -e \n    -cam `findStartUpCamera persp` \n    -useInteractiveMode 0\n    -displayLights \"default\" \n    -displayAppearance \"smoothShaded\" \n    -activeOnly 0\n    -wireframeOnShaded 0\n    -bufferMode \"double\" \n    -twoSidedLighting 1\n    -backfaceCulling 0\n    -xray 0\n    -displayTextures 1\n    -smoothWireframe 0\n    -textureAnisotropic 0\n    -textureHilight 1\n    -textureSampling 2\n    -textureDisplay \"modulate\" \n    -textureMaxSize 1024\n    -fogging 0\n    -fogSource \"fragment\" \n    -fogMode \"linear\" \n    -fogStart 0\n    -fogEnd 100\n    -fogDensity 0.1\n    -fogColor 0.5 0.5 0.5 1 \n    -sortTransparent 1\n    -nurbsCurves 1\n    -nurbsSurfaces 1\n    -polymeshes 1\n    -subdivSurfaces 1\n    -planes 1\n    -lights 1\n    -cameras 1\n    -controlVertices 1\n    -hulls 1\n    -grid 1\n    -joints 1\n    -ikHandles 1\n    -deformers 1\n    -dynamics 1\n    -fluids 1\n    -locators 1\n    -dimensions 1\n    -handles 1\n    -pivots 1\n    -textures 1\n    -strokes 1\n    -shadows 0\n    $editorName;\nmodelEditor -e -viewSelected 0 $editorName"
    1100.                 $configName;
    1101.  
    1102.             setNamedPanelLayout "Current Layout";
    1103.         }
    1104.  
    1105.         panelHistory -e -clear mainPanelHistory;
    1106.         setFocus `paneLayout -q -p1 $gMainPane`;
    1107.         sceneUIReplacement -deleteRemaining;
    1108.         sceneUIReplacement -clear;
    1109.     }
    1110.  
    1111.  
    1112. grid -spacing 5 -size 150 -divisions 5 -displayAxes yes -displayGridLines yes -displayDivisionLines yes -displayPerspectiveLabels no -displayOrthographicLabels no -displayAxesBold yes -perspectiveLabelPosition axis -orthographicLabelPosition edge;
    This might be for this, which is supposed to be for an entirely different game:

    /Dev3/drive/projects/rally/maya/WRC'04 Cars/Ford focus bp/TEXTURES/player00.tga

    Beats me.

    Anyways, here's something not really related to source code, but I decided to throw it in anyway. Just a directory listing:

    Code (Text):
    1.  Volume in drive H is FHD-1          Serial number is 15F6:3851
    2.  Directory of  H:\projects\SonicR.Win\sonicpc_disc\ps2audio\*.vag
    3.  
    4. 17/08/2004  12:56           4,864  AMY.VAG
    5. 17/08/2004  12:56          10,224  AMYSKID.VAG
    6. 17/08/2004  12:56           4,320  AMYWATER.VAG
    7. 17/08/2004  12:56          27,440  BEACH.VAG
    8. 17/08/2004  12:56          15,136  BONUS.VAG
    9. 17/08/2004  12:56           5,904  BUBBLE.VAG
    10. 17/08/2004  12:56           7,616  BUMPER1.VAG
    11. 17/08/2004  12:56           9,008  BUMPER2.VAG
    12. 17/08/2004  12:56           7,072  CHOOSE.VAG
    13. 17/08/2004  12:56          18,880  DOOR.VAG
    14. 17/08/2004  12:56          17,424  EXPLODE.VAG
    15. 17/08/2004  12:56          12,080  FIRE.VAG
    16. 17/08/2004  12:56          36,384  FLAME.VAG
    17. 17/08/2004  12:56          30,544  GETCHAOS.VAG
    18. 17/08/2004  12:56          22,048  GETTOKEN.VAG
    19. 17/08/2004  12:56          11,936  GO.VAG
    20. 17/08/2004  12:56          26,288  GOTALL.VAG
    21. 17/08/2004  12:56           4,480  HITCHAR.VAG
    22. 17/08/2004  12:56           8,496  JET.VAG
    23. 17/08/2004  12:56           6,528  JUMP.VAG
    24. 17/08/2004  12:56          16,096  PAUSE.VAG
    25. 17/08/2004  12:56           5,536  POP.VAG
    26. 17/08/2004  12:56           9,296  READY.VAG
    27. 17/08/2004  12:56          21,712  RECORD.VAG
    28. 17/08/2004  12:56          71,936  REPLAY1.VAG
    29. 17/08/2004  12:56          42,688  REPLAY2.VAG
    30. 17/08/2004  12:56          64,240  REPLAY3.VAG
    31. 17/08/2004  12:56          93,344  REPLAY4.VAG
    32. 17/08/2004  12:56          48,864  REPLAY5.VAG
    33. 17/08/2004  12:56          47,936  REPLAY6.VAG
    34. 17/08/2004  12:56           8,096  RING1.VAG
    35. 17/08/2004  12:56           3,856  RUNLEFT.VAG
    36. 17/08/2004  12:56           3,968  RUNRIGHT.VAG
    37. 17/08/2004  12:56          10,560  SELECT.VAG
    38. 17/08/2004  12:56           8,832  SET.VAG
    39. 17/08/2004  12:56           7,504  SKID1.VAG
    40. 17/08/2004  12:56           2,640  SKID2.VAG
    41. 17/08/2004  12:56          27,344  SPIN.VAG
    42. 17/08/2004  12:56          10,576  SPINGO.VAG
    43. 17/08/2004  12:56          25,984  SPINREV.VAG
    44. 17/08/2004  12:56          22,064  SPLASH.VAG
    45. 17/08/2004  12:56          16,512  SPRING.VAG
    46. 17/08/2004  12:56          19,264  TAG.VAG
    47. 17/08/2004  12:56         195,936  TAILS.VAG
    48. 17/08/2004  12:56               0  THUNDER.VAG
    49. 17/08/2004  12:56          22,448  WARP.VAG
    50. 17/08/2004  12:56           4,624  WATERRUN.VAG
    51.       1,098,528 bytes in 47 files and 0 dirs    1,966,080 bytes allocated
    52.  12,820,217,856 bytes free
    It's the only listing in sonicr.dat.

    I have stuff from other games but let's see what you guys can come up with...for once. :P
     
  11. evilhamwizard

    evilhamwizard

    Researcher
    1,384
    429
    63
    Yay, bump.

    This page is really getting big with the previous code copypasta, but whatever.

    I found this a while a go, and for some reason I don't know why I didn't post it earlier.

    This comes from Rise of the Robots for the SNES:

    EUROPE

    Code (ASM):
    1.         lda    >win_msg_table+2,x
    2.         sta    results_win+window_text+2
    3.        
    4. !loop2:        jsr    wait_frame
    5.  
    6.         ldy    #results_win
    7.         jsr    window_process
    8.  
    9.         lda    results_win+window_text
    10.         ora    results_win+window_text+2
    11.         bne    !loop2
    12.        
    13.         rts
    14.  
    15. print_gmess:    jsr    gfx_mess
    16.         jsr    check_gfx_mess
    17.         jsr    wait_frame
    18.  
    19.         rts
    20.  
    21.         if    cine
    22. cine_list:    dl    wn_cb_mc
    23.  
    24.         dl    fly_mc
    25.  
    26.         dl    cn_ld_mc
    27.         dl    ds_ld_mc
    28.  
    29.         dl    wn_cb_mc
    30.         dl    cn_ap_mc
    31.         dl    ds_ap_mc
    32.  
    33.         dl    wn_cb_mc
    34.         dl    cn_cr_mc
    35.         dl    ds_cr_mc
    36.  
    37.         dl    wn_cb_mc
    38.         dl    cn_ml_mc
    39.         dl    ds_ml_mc
    40.  
    41.         dl    wn_cb_mc
    42.         dl    cn_jp_mc
    43.         dl    ds_jp_mc
    44.  
    45.         dl    wn_cb_mc
    46.         dl    cn_sp_mc
    47.         dl    ds_sp_mc
    48.         dl    0
    49.         endif
    50.  
    51.  
    52. end_sequence:
    53.         if    en_sound!rom
    54.         jsr    play_brian
    55.         endif
    56.  
    57.         jsr    clr_palette_2
    58.         lda    #0
    59.         ldx    #256
    60.         jsr    fade_it
    61.         stz    flash_palette
    62.         stz    flash_colour
    63.         jsr    clr_pal_buff
    64.         jsr    death_hdma_on
    65.  
    66.         jsr    clear_screen
    67.  
    68.         ldx    #10
    69.         jsr    delay
    70.         jsr    wait_frame
    71.  
    72.  
    73.         jsr    screen_off
    74.         stz    nrg_dsp_flg
    75.         stz    split_mode
    76.  
    77.         lda    #29
    78.         a08
    79.         sta    w_bg1hofs
    80.         xba
    81.         sta    w_bg1hofs
    82.         lda    #$03
    83.         sta    |w_tm
    84.         lda    #(sc_1b_scrn/2)>>8
    85.         sta    w_bg1sc
    86.         lda    #(sc_2c_scrn/2)>>8
    87.         sta    w_bg2sc
    88.         a16
    89.         jsr    screen_on
    90.  
    91.         lea    window2_table,<a0
    92.         jsr    init_windows
    93.  
    94.         lea    font_dat,<a0
    95.         jsr    init_window_text
    96.  
    97.         lea    wind_mission,<a0
    98.         ldy    #window_1
    99.         jsr    create_window
    100.  
    101.         lea    mission_info,window_1+window_nexttext
    102.  
    103.         jsr    wait_log_finish
    104.  
    105.         stz    play_time
    106.  
    107.         if    en_which_logo<>1
    108.         jsr    replay_up
    109.         endif
    110.  
    111.         if    cine
    112.  
    113.  
    114. win_cine_r:    lea    cine_list,cine_list_ptr
    115.        
    116. win_cine:    lda    cine_list_ptr
    117.         ldx    cine_list_ptr+2
    118.         sta    a0
    119.         stx    a0+2
    120.         ldy    #2
    121.         lda    [a0]
    122.         ora    [a0],y
    123.         beq    win_cine_r
    124.  
    125.         lda    [a0]
    126.         sta    cine_add
    127.         lda    [a0],y
    128.         sta    cine_add+2
    129.  
    130.         lda    cine_list_ptr
    131.         clc
    132.         adc    #4
    133.         sta    cine_list_ptr
    134.  
    135.         lda    [cine_add]
    136.         sta    cine_size
    137.  
    138.         inc    cine_add
    139.         inc    cine_add
    140.  
    141.         ldx    #$200
    142.         stx    charc_set
    143.         stz    cine_count
    144.        
    145.         lda    #112
    146.         sta    cine_pal_size
    147.  
    148.         lea    unpack_b1,<a1
    149.  
    150. win_loop:
    151.         lda    cine_count
    152.         cmp    cine_size
    153.         bcs    end_win
    154.  
    155.         lda    [cine_add]
    156.         tax
    157.         inc    cine_add
    158.         inc    cine_add
    159.         lda    [cine_add]
    160.         inc    cine_add
    161.         inc    cine_add
    162.  
    163.         stx    a0
    164.         sta    a0+2
    165.  
    166.         lda    #sc_1b_scrn/2+7*32+8+3
    167.         sta    d0
    168.  
    169.         jsr    cine_frame
    170.  
    171.         jsr    wait_frame
    172.  
    173.         ldy    #window_1
    174.         jsr    window_process
    175.    
    176.         inc    play_time
    177.  
    178.         inc    cine_count
    179.         jmp    win_loop
    180.  
    181. end_win:
    182.  
    183.         jsr    clr_palette_2
    184.         lda    #16
    185.         ldx    #112
    186.         jsr    fade_it
    187.  
    188.         lda    #sc_1b_scrn/2+6*32
    189.         sta    blit_dest
    190.         lda    #12*32
    191.         sta    blit_lenth
    192.         jsr    clear_ppu
    193.  
    194.         jmp    win_cine
    195.  
    196.         endif
    197.  
    198. !wloop:        jsr    wait_frame
    199.         bra    !wloop
    200.  
    201. ;*******************************************************************************
    202. *****
    203. ;*
    204. ;* Game Message Process
    205. ;*
    206. game_mess_process:
    207.         lda    bouts_total
    208.         cmp    bouts_selected
    209.         beq    !no_final
    210.         cmp    bout_number
    211.         bne    !no_final
    212.         lda    #0
    213.         bra    !final
    214. !no_final:    lda    bout_number
    215. !final:        asl
    216.         tax
    217.         lda    >round_table,x
    218.         ldx    #$40
    219.         jsr    gfx_mess
    220.         jsr    check_gfx_mess
    221.         jsr    wait_frame
    222.  
    223.         jsr    game_mess
    224.         lda    >rest_after_mess
    225.         sta    rest
    226.  
    227.         jmp    game_loop_end
    228.  
    229.  
    230. ;*******************************************************************************
    231. *****************
    232. ;*
    233. ;* Bout over process
    234. ;*
    235.  
    236. bout_over_process:
    237. ;        jsr    clear_top
    238.  
    239.         jsr    print_results
    240.  
    241.         jsr    bout_over_mess
    242. no_game_mess:
    243.         jsr    fade_screen_off
    244.         jsr    screen_off
    245.         jsr    hdma_off
    246.  
    247.         jsr    clear_sprites
    248.  
    249.         jsr    clear_screen
    250.  
    251. ;****************************************************************************
    252. ;** Check here for replay
    253. ;**
    254.  
    255.         ldx    winner_amp
    256.         bne    !player_won
    257. ;Last game was a draw
    258.         lda    bout_number
    259.         cmp    bouts_total
    260.         bra    !not_next_opponent
    261. !player_won:      
    262.         lda    robot_won,x
    263.         cmp    bouts_toplay
    264.         bcc    !not_next_opponent
    265.  
    266.         ldx    mission
    267.         dex
    268.         bne    !new_select
    269.         lda    dead_type
    270.         beq    !dead
    271.         ldx    players
    272.         dex
    273.         bne    !dead
    274.         lda    #robot_sup
    275.         cmp    robot_opponent
    276.         bne    !next_robot
    277.         jmp    !new_robot
    278. !next_robot:
    279.         inc    robot_opponent
    280.         jmp    !new_robot
    281. !not_next_opponent:
    282.         jmp    !new_bout
    283. !dead:
    284.         jmp    !new_game
    285.  
    286. !new_robot:    lda    #gs_new_robot
    287.         sta    game_state
    288.         jmp    game_loop_end
    289.  
    290. !new_bout:    lda    #gs_new_bout
    291.         sta    game_state
    292.         jmp    game_loop_end
    293.  
    294. !new_game:    lda    #gs_new_game
    295.         sta    game_state
    296.         jmp    game_loop_end
    297.  
    298. !new_select:    lda    #gs_new_select
    299.         sta    game_state
    300.         jmp    game_loop_end
    301.  
    302.  
    303. ;*******************************************************************************
    304. *****
    305. ;*
    306. ;* Game over process
    307. ;*
    308.  
    309. ;****************************************************
    310. ;* Print results
    311.  
    312. ;RESULT (overall)=0 for
    313. game_over_process:
    314.  
    315.         stz    result            ;default to draw
    316.  
    317.         jsr    print_results        ;print the result of last bout
    318.  
    319.         teletype results_win,finalr_msg
    320.  
    321.         lda    robot_2+robot_won    ;see who won overall
    322.         cmp    robot_1+robot_won    ;If there is a winner bypass draw
    323.         bne    !not_draw
    324.  
    325. ;******************************** OVERALL DRAW **********************************
    326.  
    327.         teletype results_win,draw_msg
    328.  
    329.         jsr    game_end_mess        ;fade to red etc.
    330.  
    331.         lda    #gs_new_game        ;go play new game
    332.         sta    game_state
    333.         jmp    game_loop_end
    334.  
    335. ;*******************************************************************************
    336. *
    337.  
    338. !not_draw:    ldy    robot_2+robot_type        ;decide who is the winner
    339.         lda    #0
    340.         ldx    robot_1+robot_won
    341.         cpx    robot_2+robot_won
    342.         bcs    !r0_win                ;bypass if it is cyborg
    343.  
    344.         ldy    #0
    345.         lda    robot_2+robot_type        ;else get type of oppponent
    346.         bra    !opp_win
    347. !r0_win:
    348.         ldx    #1                ;cyborg win result
    349.         stx    result
    350.         bra    !cont_win
    351. !opp_win:
    352.         ldx    #2                ;opponent win
    353.         stx    result
    354. !cont_win:
    355.         sty    dead_type            ;who is dead
    356.  
    357.         asl
    358.         asl
    359.         tax
    360.         lda    >winv_msg_table,x
    361.         sta    results_win+window_text
    362.         lda    >winv_msg_table+2,x
    363.         sta    results_win+window_text+2
    364. !loop3:        jsr    wait_frame
    365.         ldy    #results_win
    366.         jsr    window_process
    367.         lda    results_win+window_text+2
    368.         ora    results_win+window_text
    369.         bne    !loop3
    370.  
    371.        
    372.  
    373.         ldx    mission                ;decide on conditions to display GAME OVER
    374.         dex
    375.         bne    !no_game_over            ;Not if TRAINING
    376.  
    377.         ldx    players                ;Not if 2 Player
    378.         dex
    379.         bne    !no_game_over
    380.  
    381.         lda    result                ;Not if Cyborg win
    382.         cmp    #1
    383.         beq    !no_game_over
    384.  
    385.         teletype results_win,gameover_msg        ;print GAME OVER
    386.  
    387. !no_game_over:
    388.         jsr    game_end_mess            ;Fade to red print message
    389.         jsr    dead_frame            ;Death cinematic
    390.  
    391.         lda    result
    392.         cmp    #1                ;Cyborg victory
    393.         beq    victory
    394. ;
    395. ;************************ Overall result draw or lose ***********************************
    396. ;
    397.  
    398.         ldx    mission            ;if die on mission go back to intro screen
    399.         dex                ;else go back to select screen
    400.         bne    !ns
    401.  
    402.         ldx    players
    403.         dex
    404.         bne    !ns
    405.  
    406. !ng:        lda    #gs_new_game
    407.         sta    game_state
    408.         jmp    game_loop_end
    409. !ns:
    410.         lda    #gs_new_select
    411.         sta    game_state
    412.         jmp    game_loop_end
    413.  
    414. ;************************ Cyborg Victory *************************************************
    415. victory:
    416.  
    417.         ldx    players            ;2 Players - so select
    418.         dex
    419.         bne    !new_select
    420.  
    421.         ldx    mission            ;Training - so new game
    422.         dex
    423.         bne    !new_select
    424.  
    425.         lda    robot_2+robot_type
    426.         cmp    #robot_sup
    427.         bne    !new_robot
    428.  
    429. ;*******************************************************************************
    430. *****
    431. ;
    432. ; M I S S I O N   C O M P L E T E   hurray , the end of the game
    433. ;
    434.         jsr    end_sequence        ;Victory
    435.  
    436.         lda    #gs_complete
    437.         sta    game_state
    438.         jmp    game_loop_end
    439.  
    440. !new_robot:
    441.         inc    robot_opponent
    442.         lda    #gs_new_robot
    443.         sta    game_state
    444.         jmp    game_loop_end
    445.  
    446. !new_game:
    447.         lda    #gs_new_game
    448.         sta    game_state
    449.         jmp    game_loop_end
    450.  
    451. !new_select:
    452.         lda    #gs_new_select
    453.         sta    game_state
    454.         jmp    game_loop_end
    455.  
    456. ;*******************************************************************************
    457. *****
    458.  
    459.  
    460.  
    461. set_scroll:    jsr    wait_frame
    462.         lda    scroll_pos
    463.         a08
    464.         sta    |w_bg2vofs
    465.         xba
    466.         sta    |w_bg2vofs
    467.         a16
    468.         rts
    469.  
    470. init_new_robot:
    471.         jsr    hdma_off
    472.         lda    #1
    473.         sta    tele_flag
    474.  
    475.         lda    #1
    476.         sta    split_mode
    477.  
    478.         jsr    wait_frame
    479.         jsr    clear_screen
    480.  
    481.         jsr    screen_off
    482.  
    483.         lda    #$0000
    484.         sta    robot_2+robot_score
    485.  
    486.         stz    robot_1+robot_won
    487.         stz    robot_2+robot_won
    488.  
    489.         lda    #1
    490.         sta    bout_number
    491.         lda    demo_mode
    492.         bne    no_select
    493. !sel_again:    jsr    select_screen
    494.         lda    cancel_sel
    495.         bne    !sel_again
    496.  
    497. no_select:    jsr    hdma_off
    498.         jsr    wait_frame
    499.  
    500.         lda    players
    501.         sta    players_g
    502.         lda    bouts
    503.         sta    bouts_g  
    504.         lda    timer
    505.         sta    timer_g
    506.  
    507.         lda    difficulty
    508.         sta    difficulty_g
    509.  
    510.         lda    demo_mode
    511.         beq    !no_demo
    512.  
    513.  
    514.         lda    #0
    515.         sta    players_g
    516.         lda    #1
    517.         sta    bouts_g
    518.         lda    #4
    519.         sta    timer_g
    520.         lda    #2
    521.         sta    difficulty_g
    522. !no_demo:
    523.  
    524.         lda    bouts_g
    525.         dec    a
    526.         asl
    527.         tax
    528.         lda    >bouts_table,x
    529.         sta    bouts_total
    530.         sta    bouts_selected
    531.         lsr
    532.         inc    a
    533.         sta    bouts_toplay
    534.         rts
    535. init_bout:
    536.         jsr    hdma_off
    537.  
    538.         jsr    clear_screen
    539.         jsr    clear_sprites
    540.         jsr    init_sprites
    541.         jsr    init_robots
    542.         jsr    init_background
    543.         jsr    init_vars
    544.  
    545.         jsr    inipix
    546.  
    547.         jsr    init_energy
    548.  
    549.         jsr    init_schedule
    550.  
    551.  
    552.  
    553.         jsr    wait_frame
    554.         jsr    wait_frame
    555.         jsr    wait_frame
    556.  
    557.         lda    #sc_2n_scrn/2
    558.         sta    wind_screen
    559.  
    560.         lea    window_table,<a0
    561.         jsr    init_windows
    562.         lea    font_dat,<a0
    563.         jsr    init_window_text
    564.  
    565.         lea    robot1_window,<a0
    566.         ldy    #window_1
    567.         jsr    create_window
    568.  
    569.         lea    robot2_window,<a0
    570.         ldy    #window_2
    571.         jsr    create_window
    572.  
    573. ;        jsr    players_won
    574.  
    575.         jsr    hdma_off
    576.         jsr    para_init
    577.  
    578.         jsr    hdma_on
    579.  
    580.         jsr    fade_screen_on
    581.         jsr    screen_on
    582.  
    583.         jsr    setup_collisions
    584.  
    585.         lda    #%01010010
    586.         sta    m_cgadsub
    587.         lda    #%10000010
    588.         sta    m_cgswsel
    589.  
    590.         a08
    591.         lda    timer_value
    592.         sta    timer_count
    593.         ldx    timer_g
    594.         dex
    595.         lda    >timer_table,x
    596.         sta    timer_count+1
    597.         a16
    598.         lda    >timer_table,x
    599.         and    #$ff
    600.         sta    timer_mode
    601.         lda    #2
    602.         sta    game_mode
    603.         lda    #10
    604.         sta    num_frames
    605.  
    606.         if    en_sound!rom
    607.         lda    robot_opponent
    608.         asl
    609.         asl
    610.         tax
    611.         lda    >robot_table,x
    612.         sta    a2
    613.         lda    >robot_table+2,x
    614.         sta    a2+2
    615.         ldy    #ri_music
    616.         lda    [a2],y
    617.         jsr    play_tune
    618.         endif
    619.  
    620.         jsr    wait_frame
    621.         a08
    622.         lda    #%01010000
    623.         sta    |w_cgadsub
    624.         lda    #%10000010
    625.         sta    |w_cgswsel
    626.         a16
    627.  
    628.         lda    #2
    629.         sta    spr_blit_flag
    630.         stz    shake
    631.         lda    #4
    632.         sta    sprite_blit_count
    633.  
    634.         stz    result
    635.  
    636.         lda    >rest_before_mess
    637.         sta    rest
    638.  
    639.  
    640.         stz    time_over_flag
    641.         rts
    642.  
    643.  
    644. init_sprite_blit:
    645.         stz    blit_oam
    646.         lda    #0
    647.         ldx    #4*8/2
    648.         ldy    #0
    649.  
    650. !lp:        sta    blit_tables,y
    651.         iny
    652.         iny
    653.         dex
    654.         bne    !lp
    655.  
    656.         rts
    657.  
    658. ;*******************************************************************************
    659. ********
    660. ;*
    661. ;* Pause
    662. Pause_It:
    663.         lda    game_mode
    664.         bne    !exit
    665.  
    666.         lda    #but_start
    667.         bit    |joy_0
    668.         bne    !start_it
    669.         ldx    players
    670.         dex
    671.         beq    !exit
    672.         bit    |joy_1
    673.         bne    !start_it
    674.         bra    !exit
    675. !start_it:
    676.         jsr    sprite_log_blit
    677.  
    678.         lda    #Pause_table&$ffff
    679.         ldx    #$2
    680.         jsr    gfx_mess
    681.         jsr    check_gfx_mess
    682.  
    683.         lda    #but_start
    684.         jsr    wait_button_down_up
    685.  
    686.         lda    #but_start
    687.         jsr    wait_button_down_up
    688.  
    689. !exit:
    690.         rts
    691.  
    692.  
    693.  
    694. wait_button_down_up:
    695.         tax
    696. !s0        jsr    wait_frame
    697.         txa
    698.         ldy    players
    699.         dey
    700.         beq    !p11
    701.         bit    |joy_1
    702.         bne    !s1
    703. !p11:        bit    |joy_0
    704.         beq    !s0
    705.  
    706. !s1:        jsr    wait_frame
    707.         txa
    708.         ldy    players
    709.         dey
    710.         beq    !p12
    711.         bit    |joy_1
    712.         bne    !s1
    713. !p12:        bit    |joy_0
    714.         bne    !s1
    715.  
    716.         rts
    717.  
    718.  
    719. wbdu:
    720.         tax
    721. !s0
    722.         lda    |frame_count
    723. !s0a:        cmp    |frame_count
    724.         beq    !s0a
    725.         txa
    726.         bit    |joy_0
    727.         bne    !s1
    728.         bit    |joy_1
    729.         beq    !s0
    730.  
    731. !s1:
    732.         lda    |frame_count
    733. !s1a:        cmp    |frame_count
    734.         beq    !s1a
    735.         txa
    736.         bit    |joy_0
    737.         bne    !s1
    738.         bit    |joy_1
    739.         bne    !s1
    740.  
    741.         rts
    742.  
    743. make_joystick_config
    744.         ldx    #j_config_1
    745.         ldy    #0
    746.  
    747. !loop:        lda    0,x
    748.         sta    j_config,y
    749.         inx
    750.         inx
    751.         iny
    752.         iny
    753.         cpy    #12
    754.         bcc    !loop
    755.  
    756.         rts
    757.  
    758. delay:
    759. !wl:        jsr    wait_frame
    760.         dex
    761.         bne    !wl
    762.  
    763.         rts
    764.  
    765.  
    766. gfx_mess_delay:
    767. !wl:        phx
    768.         jsr    wait_frame
    769.         jsr    clear_sprite_buf
    770.         jsr    csp
    771.         jsr    check_gfx_mess
    772.         jsr    sprite_log_blit
    773.         plx
    774.         dex
    775.         bne    !wl
    776.  
    777.         rts
    778.  
    779. sect_2_exit:
    780.         jsr    fade_screen_off
    781.         jsr    vbl_vect_off
    782.  
    783.         jsr    screen_off
    784.         jsr    hdma_off
    785.  
    786.         jsr    clear_sprites
    787.  
    788.  
    789. !loop        jmp    !loop
    790.  
    791.  
    792.  
    793. which_logo:
    794.         if    en_which_logo!rom
    795.         jml    (logo_vect)
    796.         endif
    797.         rtl
    798.  
    799.  
    800. check_timer_out:
    801.         lda    timer_mode
    802.         beq    cto_exit
    803.         lda    game_mode
    804.         bne    cto_exit
    805.         lda    timer_count
    806.         cmp    #2
    807.         bcs    cto_exit
    808.         stz    timer_count
    809.         ldy    #robot_1
    810.         lda    robot_1+robot_energylost
    811.         cmp    robot_2+robot_energylost
    812.         bcs    kill_game
    813.         ldy    #robot_2
    814. kill_game:
    815.         lda    #1
    816.         sta    time_over_flag
    817.         jsr    end_bout
    818. cto_exit:
    819.         rts
    820.  
    821.  
    822. game_end_mess:
    823.         if    en_sound!rom
    824.         jsr    fade_tune
    825.         endif
    826.  
    827.         lda    #2000
    828.         sta    |spr_blit_flag
    829.         stz    nrg_dsp_flg
    830.         jsr    wait_frame
    831.         jsr    wait_frame
    832.  
    833.         lea    palette_str,<a0
    834.         lda    #0
    835.         ldx    #256
    836.         jsr    copy_palette_2
    837.        
    838.         ldx    #256-16
    839.         ldy    #16*2
    840. !lp:        lda    palette_str2,y
    841.         and    #%0000000000011111
    842.         sta    palette_str2,y
    843.         iny
    844.         iny
    845.         dex
    846.         bne    !lp
    847.  
    848.         lda    #16
    849.         ldx    #256-16-16-16
    850.         jsr    fade_it
    851.  
    852.         jsr    wait_frame
    853.         ldy    #window_1
    854.         jsr    create_window_matrix
    855.         jsr    wait_frame
    856.         ldy    #window_2
    857.         jsr    create_window_matrix
    858.         stz    nrg_dsp_flg
    859.  
    860. !loop1:        jsr    wait_frame
    861.  
    862.         ldy    #window_1
    863.         jsr    window_process
    864.  
    865.         ldy    #window_2
    866.         jsr    window_process
    867.  
    868.         lda    window_1+window_text
    869.         ora    window_1+window_text+2
    870.         ora    window_2+window_text
    871.         ora    window_2+window_text+2
    872.  
    873.         bne    !loop1
    874.  
    875.         stz    game_mode
    876.  
    877.         lda    #4
    878.         sta    game_mode
    879.         lda    #1
    880.         sta    num_frames
    881.  
    882.         rts
    883.  
    884.  
    885. bout_over_mess:
    886.  
    887.         ldy    #window_1
    888.         jsr    create_window_matrix
    889.         jsr    wait_frame
    890.         ldy    #window_2
    891.         jsr    create_window_matrix
    892.         stz    nrg_dsp_flg
    893.  
    894. !loop1:        jsr    wait_frame
    895.  
    896.         ldy    #window_1
    897.         jsr    window_process
    898.  
    899.         ldy    #window_2
    900.         jsr    window_process
    901.  
    902.         lda    window_1+window_text
    903.         ora    window_1+window_text+2
    904.         ora    window_2+window_text
    905.         ora    window_2+window_text+2
    906.  
    907.         bne    !loop1
    908.  
    909.         lda    #100
    910.         lda    #end_time
    911.         sta    num_frames
    912.  
    913.         rts
    914.  
    915.  
    916.  
    917. game_mess:
    918.  
    919. !loop1:        jsr    wait_frame
    920.  
    921.         ldy    #window_1
    922.         jsr    window_process
    923.  
    924.         ldy    #window_2
    925.         jsr    window_process
    926.  
    927.         lda    window_1+window_text
    928.         ora    window_1+window_text+2
    929.         ora    window_2+window_text
    930.         ora    window_2+window_text+2
    931.  
    932.         bne    !loop1
    933.  
    934.         lda    #r0a&$ffff
    935.         sta    window_1+window_text
    936.         lda    #r0a>>16
    937.         sta    window_1+window_text+2
    938.         lda    robot_opponent
    939.         inc    a
    940.         asl
    941.         asl
    942.         tax
    943.         lda    >plrtab,x
    944.         sta    window_2+window_text
    945.         lda    >plrtab+2,x
    946.         sta    window_2+window_text+2
    947.  
    948.         jsr    print_windows
    949.  
    950.         lda    #scr_1_mess&$ffff
    951.         sta    window_1+window_text
    952.         lda    #scr_1_mess>>16
    953.         sta    window_1+window_text+2
    954.  
    955.         lda    #scr_2_mess&$ffff
    956.         sta    window_2+window_text
    957.         lda    #scr_2_mess>>16
    958.         sta    window_2+window_text+2
    959.  
    960.         jsr    print_windows
    961.  
    962.         stz    game_mode
    963.         lda    #-1
    964.         sta    nrg_dsp_flg
    965.  
    966. !exit:
    967.         jsr    players_won
    968.         rts
    969.  
    970.  
    971.  
    972. print_windows:
    973.  
    974. !loop:        jsr    wait_frame
    975.  
    976.         ldy    #window_2
    977.         jsr    window_process
    978.         ldy    #window_1
    979.         jsr    window_process
    980.  
    981.         lda    window_1+window_text
    982.         ora    window_1+window_text+2
    983.         ora    window_2+window_text
    984.         ora    window_2+window_text+2
    985.  
    986.         bne    !loop
    987.         rts
    988.  
    989. set_win_lose_text:
    990.         phy
    991.         phx
    992.         tya
    993.         ldy    #window_1
    994.         ldx    #window_2
    995.         cmp    #robot_1
    996.         beq    !r1
    997.         ldy    #window_2
    998.         ldx    #window_1
    999. !r1:
    1000.         lda    #player_matchlost&$ffff
    1001.         sta    window
    Cuts off, but here's another portion from the same region/build:

    Code (ASM):
    1.         rts
    2.  
    3.  
    4. schedule_process:
    5.         lea    schedule,<a1
    6.         ldx    #sch_len
    7.         ldy    #0
    8. !loop:        lda    [a1],y
    9.         bne    !s1
    10.         iny
    11.         iny
    12.         lda    [a1],y
    13.         dey
    14.         dey
    15.         sta    [a1],y
    16.         bra    !s2
    17. !s1:        sec
    18.         sbc    #1
    19.         sta    [a1],y
    20. !s2:        iny
    21.         iny
    22.         iny
    23.         iny
    24.         dex
    25.         bne    !loop
    26.         rts
    27.  
    28.  
    29.  
    30. init_robots:
    31. ;        if    en_sp1
    32.         lea    robot_1,<a2
    33.         lda    #Robot_Cyb
    34.  
    35.         ldx    #2
    36.  
    37.         jsr    irs
    38. ;        endif
    39.  
    40. ;        if    en_sp2
    41.         lea    robot_2,<a2
    42.         lda    robot_opponent
    43.  
    44.         ldx    difficulty_g
    45.  
    46.         jsr    irs
    47.  
    48.  
    49. ;        endif
    50.  
    51.  
    52.         ldx    players_g
    53.         bne    !n1
    54.         lda    robot_1+robot_flags
    55.         ora    #1<<Bit_CPU
    56.         sta    robot_1+robot_flags
    57. !n1:
    58.         cpx    #2
    59.         beq    !n2
    60.         lda    robot_2+robot_flags
    61.         ora    #1<<Bit_CPU
    62.         sta    robot_2+robot_flags
    63. !n2:
    64.         rts
    65.  
    66. init_background:
    67.  
    68.         if    en_back
    69.        
    70.         lda    robot_2+robot_type
    71.         sta    d8
    72.  
    73.         lda    #2
    74.         sta    charc_set
    75.         lda    #32
    76.         lda    #0
    77.         clc
    78.         adc    #sc_1n_scrn/2
    79.         sta    d0
    80.         lda    d8
    81.         clc
    82. ;        adc    #1
    83.         asl
    84.         asl
    85.         tax
    86.         lda    >robot_table,x
    87.         sta    a0
    88.         sta    a4
    89.         lda    >robot_table+2,x
    90.         sta    a0+2
    91.         sta    a4+2
    92.         ldy    #ri_room
    93.         lda    [a0],y
    94.         tax
    95.         iny
    96.         iny
    97.         lda    [a0],y
    98.         stx    a0
    99.         sta    a0+2
    100.         stz    d8+2
    101.         jsr    back_frame
    102.         endif
    103.  
    104.         rts
    105.  
    106.  
    107.  
    108. irs:
    109. ;Profile index
    110.         pha
    111.         txa
    112.         dec    a
    113.         and    #3
    114.         ldx    #7
    115.         jsr    mult_xa
    116.         clc
    117.         adc    bout_number
    118.         dec    a
    119.         ldx    #6
    120.         jsr    mult_xa
    121.         sta    d4
    122.         pla
    123.        
    124.  
    125.  
    126.         if    0
    127.         pha
    128.  
    129.         ldx    #(robot_parm_size)/2
    130.         lda    #0
    131.         tay
    132. !clp:
    133.         sta    [a2],y
    134.         iny
    135.         iny
    136.         dex
    137.         bne    !clp
    138.  
    139.         pla  
    140.         endif
    141.  
    142.         ldy    #robot_type
    143.         sta    [a2],y
    144.         asl
    145.         asl
    146.         tax
    147.         lda    >robot_table,x
    148.         sta    a6
    149.         lda    >robot_table+2,x
    150.         sta    a6+2
    151.         ldy    #ri_gfx
    152.         lda    [a6],y
    153.         pha
    154.         iny
    155.         iny
    156.         lda    [a6],y
    157.         ldy    #robot_gfx+2
    158.         sta    [a2],y
    159.         dey
    160.         dey
    161.         pla
    162.         sta    [a2],y
    163.  
    164.         ldx    a2
    165.         cpx    #robot_1
    166.         bne    p2_set
    167. p1_set:
    168.         lda    #sjoy0
    169.         sta    robot_joyval,x
    170.         ldy    #ri_xstartl
    171.         lda    [a6],y
    172.         sta    robot_x,x
    173.         sta    robot_x_origin,x
    174.  
    175.         lda    #robot_2
    176.         sta    robot_other,x
    177.         lda    #0
    178.         sta    robot_other+2,x
    179.  
    180.         lda    #rob_gbuff_1&$ffff
    181.         sta    robot_graphics,x
    182.         lda    #rob_gbuff_1>>16
    183.         sta    robot_graphics+2,x
    184.  
    185.         lda    #0
    186.         sta    robot_overdelay,x
    187.  
    188.         bra    set_ok
    189. p2_set:
    190.         lda    #sjoy1
    191.         sta    robot_joyval,x
    192.         ldy    #ri_xstartr
    193.         lda    [a6],y
    194.         s
    Same thing. Here's more:

    Code (ASM):
    1. ;
    2.  
    3.         ldx    mission            ;if die on mission go back to intro screen
    4.         dex                ;else go back to select screen
    5.         bne    !ns
    6.  
    7.         ldx    players
    8.         dex
    9.         bne    !ns
    10.  
    11. !ng:        lda    #gs_new_game
    12.         sta    game_state
    13.         jmp    game_loop_end
    14. !ns:
    15.         lda    #gs_new_select
    16.         sta    game_state
    17.         jmp    game_loop_end
    18.  
    19. ;************************ Cyborg Victory *************************************************
    20. victory:
    21.  
    22.         ldx    players            ;2 Players - so select
    23.         dex
    24.         bne    !new_select
    25.  
    26.         ldx    mission            ;Training - so new game
    27.         dex
    28.         bne    !new_select
    29.  
    30.         lda    robot_2+robot_type
    31.         cmp    #robot_sup
    32.         bne    !new_robot
    33.  
    34. ;*******************************************************************************
    35. *****
    36. ;
    37. ; M I S S I O N   C O M P L E T E   hurray , the end of the game
    38. ;
    39.         jsr    end_sequence        ;Victory
    40.  
    41.         lda    #gs_complete
    42.         sta    game_state
    43.         jmp    game_loop_end
    44.  
    45. !new_robot:
    46.         inc    robot_opponent
    47.         lda    #gs_new_robot
    48.         sta    game_state
    49.         jmp    game_loop_end
    50.  
    51. !new_game:
    52.         lda    #gs_new_game
    53.         sta    game_state
    54.         jmp    game_loop_end
    55.  
    56. !new_select:
    57.         lda    #gs_new_select
    58.         sta    game_state
    59.         jmp    game_loop_end
    60.  
    61. ;*******************************************************************************
    62. *****
    63.  
    64.  
    65.  
    66. set_scroll:    jsr    wait_frame
    67.         lda    scroll_pos
    68.         a08
    69.         sta    |w_bg2vofs
    70.         xba
    71.         sta    |w_bg2vofs
    72.         a16
    73.         rts
    74.  
    75. init_new_robot:
    76.         jsr    hdma_off
    77.         lda    #1
    78.         sta    tele_flag
    79.  
    80.         lda    #1
    81.         sta    split_mode
    82.  
    83.         jsr    wait_frame
    84.         jsr    clear_screen
    85.  
    86.         jsr    screen_off
    87.  
    88.         lda    #$0000
    89.         sta    robot_2+robot_score
    90.  
    91.         stz    robot_1+robot_won
    92.         stz    robot_2+robot_won
    93.  
    94.         lda    #1
    95.         sta    bout_number
    96.         lda    demo_mode
    97.         bne    no_select
    98. !sel_again:    jsr    select_screen
    99.         lda    cancel_sel
    100.         bne    !sel_again
    101.  
    102. no_select:    jsr    hdma_off
    103.         jsr    wait_frame
    104.  
    105.         lda    players
    106.         sta    players_g
    107.         lda    bouts
    108.         sta    bouts_g  
    109.         lda    timer
    110.         sta    timer_g
    111.  
    112.         lda    difficulty
    113.         sta    difficulty_g
    114.  
    115.         lda    demo_mode
    116.         beq    !no_demo
    117.  
    118.  
    119.         lda    #0
    120.         sta    play
    More:

    Code (ASM):
    1.         dec    d0        ;any more shards to create ?
    2.         beq    !exit        ;end if not
    3.  
    4. !na:        lda    a4
    5.         clc
    6.         adc    #shard_parm_size
    7.         sta    a4
    8.         dec    d1
    9.         beq    !exit
    10.         jmp    !lp
    11. !exit:
    12.         rts
    13.  
    14. create_spark:
    15.         lda    #no_sparks
    16.         sta    d0
    17.  
    18.         ldx    #spark_buff
    19. !spl:
    20.         lda    spark_y,x
    21.         bne    !not_clear
    22.  
    23.         lda    shard_coordx
    24.         sta    spark_x,x
    25.  
    26.         lda    shard_coordy
    27.         sta    spark_y,x
    28.  
    29.         stz    spark_frame,x
    30.  
    31.         rts
    32. !not_clear:
    33.         txa
    34.         clc
    35.         adc    #spark_parm_size
    36.         tax
    37.         dec    d0
    38.         bne    !spl
    39.         rts
    40.        
    41.  
    42.  
    43.  
    44. vert_on:
    45.         if    en_vert
    46.         sei
    47.         a08
    48.         lda    #%10110001
    49.         sta    |w_nmitimen
    50.  
    51.         a16
    52.  
    53.         lda    >htv
    54.         sta    |w_htimel
    55.  
    56.         cli
    57.         endif
    58.         rts
    59.  
    60.  
    61.  
    62. np_set:
    63.         ldx    #max_dma_p
    64.         ldy    #50
    65.  
    66.         a08
    67.         lda    r_stat78
    68.         a16
    69.         bit    #1<<4
    70.         bne    !pal
    71.         ldx    #max_dma_n
    72.         ldy    #60
    73. !pal:
    74.         if    en_ntsc
    75.         ldx    #max_dma_n
    76.         ldy    #60
    77.         endif
    78.  
    79.         stx    max_dma
    80.         sty    timer_value
    81.         rts
    82.  
    83.  
    84. vert_off:
    85.         if    en_vert
    86.         jsr    wait_frame
    87.        
    88.         sei
    89.  
    90.         a08
    91.  
    92.         lda    #%10000001
    93.         sta    |w_nmitimen
    94.  
    95.         a16
    96.  
    97.         cli
    98.         endif
    99.         rts
    100.  
    101.  
    102. ;0978 266333
    103.  
    104. debug:
    105.         if    en_debug
    106.         if    rom=0
    107.  
    108.  
    109.         if    0
    110.         pv    robot_2+robot_aioverride,0
    111.         pv    robot_2+robot_aioverridemode,3
    112.         pv    robot_2+robot_mode,6
    113.         pv    robot_2+robot_int,9
    114.         pv    robot_2+robot_motivation,12
    115.         pv    robot_2+robot_speed,15
    116.         pv    robot_2+robot_firepowerdelay,18
    117.         pv    robot_2+robot_aitimer,21
    118.         pv    robot_2+robot_aimoveaddr,24
    119.         pv    robot_2+robot_aimoveaddr+2,27
    120.         pv    robot_2+robot_aimoveaddr+4,30
    121.         endif
    122.  
    123.  
    124.         if    0
    125.         pv    robot_2+robot_mode,0
    126.         pv    robot_2+robot_frame,3
    127.         pv    robot_2+robot_y,6
    128.         pv    robot_2+robot_ymax,9
    129.         endif
    130.  
    131.  
    132.         if    1
    133.         pv    robot_1+robot_frame,0
    134.         pv    robot_2+robot_frame,3
    135.         pw    cur_col_pos,6
    136.         pw    cur_col_diff,11
    137.         pw    cur_col_xy,16
    138.         pw    cur_col_xy+2,21
    139.  
    140.         pv    robot_1+robot_cur_hit+2,26
    141.         pv    robot_2+robot_cur_hit+2,29
    142.         endif
    143.         endif
    144.         endif
    145.  
    146.         rts
    147. reset_energy:
    148.         ldy    a2
    149.         lda    robot_type,y
    150.         asl
    MORE:

    Code (ASM):
    1.                   SET16
    2.                  lda      #(MusicDriver&$ffff)      ;download driver (24 bit address)
    3.                  sta      <SonyAddr                                                                                 lda      #RamII
    4.                 lda      #MusicDriver>>16
    5.                  sta      <SonyAddr+2
    6.                  jsr      SONY_send
    7.  
    8.          CLR16
    9.                  lda      #$82              ;DOWNLOAD data (music)
    10.                  sta      >APU_PORT0
    11.                  SET16
    12.                  lda      mus_data
    13.                  sta      <SonyAddr
    14.                  lda      mus_data+2
    15.                  sta      <SonyAddr+2
    16.                  jsr      SONY_send
    17.  
    18.          CLR16
    19.                  lda      #$82              ;DOWNLOAD data (samples)
    20.                  sta      >APU_PORT0
    21.                  SET16
    22.                  lda      samp_1
    23.                  sta      <SonyAddr
    24.                  lda      samp_1+2
    25.                  sta      <SonyAddr+2
    26.                  jsr      SONY_send
    27.  
    28.          CLR16
    29.                  lda      #$82              ;DOWNLOAD data (samples)
    30.                  sta      >APU_PORT0
    31.                  SET16
    32.                  lda      samp_2
    33.                  sta      <SonyAddr
    34.                  lda      samp_2+2
    35.                  sta      <SonyAddr+2
    36.                  jsr      SONY_send
    37.  
    38.          CLR16
    39.                  sta      >APU_PORT3
    40.                  plp                        ;restore any interrupts
    41.          SET16
    42.                  rts
    43.  
    44.  
    45. ;-----------------------------------------------------------------------------
    46. SONY_send:       jsr      Boot_APU
    47.                  CLR16
    48. !wait0:          lda      >APU_PORT0        ;wait for handshake
    49.                  bne      !wait0
    50.                  dec      a
    51.                  sta      >APU_PORT2        ;acknowledge handshake
    52.                  sta      <callnum          ;init call number to $FF
    53.                  rts
    54.  
    55.  
    56. ;-------------------------------------------------------------------------------
    57. ; Once the Sound_Init routine has been called, the following routine can be
    58. ; used to download additional music data (or sample data with '#Musicdata'
    59. ; replaced by '#Samples') which is required for later levels of the game.
    60. ;-------------------------------------------------------------------------------
    61.  
    62. Send_Data:
    63.          stx    mus_data
    64.          sta    mus_data+2
    65. send_mus_data:
    66.              CLR16
    67.                  php
    68.                  sei                        ;disable any other interrupts
    69. S_D0:            lda      >APU_PORT0        ;latest value sent by SOUND CPU
    70.                  cmp      <callnum
    71.                  bne      S_D0              ;previous call still not finished
    72.  
    73.                  lda      #$82              ;DOWNLOAD data (music)
    74.                  sta      >APU_PORT0
    75.                  inc      <callnum
    76.                  lda      <callnum
    77.                  sta      >APU_PORT3        ;forces a new call
    78.                  SET16
    79.          lda      mus_data
    80.                  sta      <SonyAddr
    81.          lda      mus_data+2
    82.                  sta      <SonyAddr+2
    83.                  jsr      SONY_send
    84.  
    85.                  sta      >AP
    More:

    Code (ASM):
    1. code:    incbin    abslogo.bin
    2.         endif
    3.  
    4.  
    5. dr
    6.  
    7.  
    8. hctab:
    9. hct        =    0
    10.         rept    6
    11.         dw    hct,hct+$10
    12. hct        =    hct+$43
    13.         endr
    14.  
    15.         endif
    16.  
    17. dtune_time:    dw    400
    18. hit_scale:
    19.         dw    $80
    20.  
    21. reverse_off:    db    $2f,$2f,$2f,$2f,$2f,$2f,$2f,$2f,$2f
    22.  
    23. power_table:
    24.         dw    robot_min_power-2
    25.         dw    robot_mid_power-2
    26.         dw    robot_max_power-2
    27.  
    28.  
    29. sel_ts:        dw    %00000000
    30. sel_adsub    dw    %01010010
    31. sel_swel    dw    %00010010
    32.  
    33. option_table:    dw    3,2,3,4,2,2,3
    34.  
    35.  
    36.         if    en_sound!rom
    37. music_table:    dl    music1,music1,music2,music3,music4,musict

    The USA BETA version has some fragments as well, but besides that and the European version - these are the only two versions with source code references.
     
  12. Bibin

    Bibin

    DON'T LET THE SUN LAUGH AT YOU. Member
    882
    0
    0
    New York City
    Ghost in the Machine
    I chuckled.
     
  13. SegaLoco

    SegaLoco

    W)(at did you say? Banned
    Damn you, I was gonna say that. Seems they searched for *.vag files, maybe a little joke to mess with the other devs XD... (Probably not though)