Sega Racing Classic 2 ROM

Discuss Supermodel and your favorite Model 3 games. Show off your latest threads, this is the place to see and be seen.
Forum rules
Keep it classy!
  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!
Bart
Site Admin
Posts: 87
Joined: Tue Nov 07, 2023 5:50 am

Sega Racing Classic 2 ROM

Post by Bart »

Anyone up for trying to get src2 up and running in Supermodel? Not sure if it's possible. My initial attempt results in an invalid PowerPC instruction being hit after pressing the test button at the "Network Board Not Present" screen.

The "Sega Racing Classic 2" ROM is named src2.par and is a PAR archive. The files within can be extracted using ParTool:

Code: Select all

eprom.bin
crom0x.bin
crom1x.bin
crom2x.bin
crom3x.bin
vrom.bin
In order to load these, I've made a change to how ROM loading works in Supermodel, allowing byte layout to be specified directly (only for strides <= 8, I'll need to extend this for stride=32, for VROM). Make sure to use git version ccca9af once it appears on the download page.

Here's what I've got so far. Use this Games.xml file:

Code: Select all

<games>
  <game name="src2">
    <identity>
      <title>Sega Racing Classic 2</title>
      <version>Japan, Revision A</version>
      <manufacturer>Sega</manufacturer>
      <year>1998</year>
    </identity>
    <hardware>
      <platform>Sega Model 3</platform>
      <stepping>2.1</stepping>
      <mpeg_board>DSB2</mpeg_board>
      <drive_board>Wheel</drive_board>
      <real3d_status_bit_set_percent_of_frame>24</real3d_status_bit_set_percent_of_frame>
      <netboard>true</netboard>
	  <audio>QuadFrontRear</audio>
      <inputs>
        <input type="common" />
        <input type="vehicle" />
        <input type="shift4" />
        <input type="vr4" />
      </inputs>
      <encryption_key>0x29250e16</encryption_key>
    </hardware>
    <roms>
      <region name="crom" stride="8" chunk_size="8" byte_layout="32107654">
        <file offset="0" name="eprom.bin" />
      </region>
      <!--
      <region name="crom" stride="8" chunk_size="2" byte_swap="true">
        <file offset="0" name="epr-21181.20" crc32="0xBF0007ED" />
        <file offset="2" name="epr-21180.19" crc32="0x6E7B98ED" />
        <file offset="4" name="epr-21179.18" crc32="0xD5FFB4D6" />
        <file offset="6" name="epr-21178.17" crc32="0x230BF8AC" />
      </region>
      -->
      <region name="banked_crom" stride="8" chunk_size="8" byte_layout="32107654">
        <!-- CROM0 -->
        <file offset="0x0000000" name="crom0x.bin" />
        <!-- CROM1 -->
        <file offset="0x2000000" name="crom1x.bin" />
        <!-- CROM2 -->
        <file offset="0x4000000" name="crom2x.bin" />
        <!-- CROM3 -->
        <file offset="0x6000000" name="crom3x.bin" />

        <!-- CROM0 -->
        <!--
        <file offset="0x0000000" name="mpr-21185.4" crc32="0xB6D5D2A1" />
        <file offset="0x0000002" name="mpr-21184.3" crc32="0x25616403" />
        <file offset="0x0000004" name="mpr-21183.2" crc32="0xB4B44805" />
        <file offset="0x0000006" name="mpr-21182.1" crc32="0xBA8E667F" />
        -->
        <!-- CROM1 -->
        <!--
        <file offset="0x2000000" name="mpr-21189.8" crc32="0xCB439C45" />
        <file offset="0x2000002" name="mpr-21188.7" crc32="0x753FC2A5" />
        <file offset="0x2000004" name="mpr-21187.6" crc32="0x3BD14EE6" />
        <file offset="0x2000006" name="mpr-21186.5" crc32="0xA6128662" />
        -->
        <!-- CROM2 -->
        <!--
        <file offset="0x4000000" name="mpr-21193.12" crc32="0x4638FEF4" />
        <file offset="0x4000002" name="mpr-21192.11" crc32="0x60CBB1FA" />
        <file offset="0x4000004" name="mpr-21191.10" crc32="0xA2BDCFE0" />
        <file offset="0x4000006" name="mpr-21190.9"  crc32="0x984D56EB" />
        -->
        <!-- CROM3 -->
        <!--
        <file offset="0x6000000" name="mpr-21197.16" crc32="0x04015247" />
        <file offset="0x6000002" name="mpr-21196.15" crc32="0x0AB46DB5" />
        <file offset="0x6000004" name="mpr-21195.14" crc32="0x7F39761C" />
        <file offset="0x6000006" name="mpr-21194.13" crc32="0x12C7A414" />
        -->
      </region>
      <region name="vrom" stride="32" chunk_size="2">
        <file offset="0"  name="mpr-21198.26" crc32="0x42EC9ED4" />
        <file offset="2"  name="mpr-21199.27" crc32="0xFA28088C" />
        <file offset="4"  name="mpr-21200.28" crc32="0xFBB5AA1D" />
        <file offset="6"  name="mpr-21201.29" crc32="0xE6B13469" />
        <file offset="8"  name="mpr-21202.30" crc32="0xE6B4C2BE" />
        <file offset="10" name="mpr-21203.31" crc32="0x32D08D33" />
        <file offset="12" name="mpr-21204.32" crc32="0xEF18FE0A" />
        <file offset="14" name="mpr-21205.33" crc32="0x4687BEA6" />
        <file offset="16" name="mpr-21206.34" crc32="0xEC2D6884" />
        <file offset="18" name="mpr-21207.35" crc32="0xEEAA510B" />
        <file offset="20" name="mpr-21208.36" crc32="0xB222FEF0" />
        <file offset="22" name="mpr-21209.37" crc32="0x170A28CE" />
        <file offset="24" name="mpr-21210.38" crc32="0x460CEFE0" />
        <file offset="26" name="mpr-21211.39" crc32="0xC84759CE" />
        <file offset="28" name="mpr-21212.40" crc32="0x6F8A75E0" />
        <file offset="30" name="mpr-21213.41" crc32="0xDE75BEC6" />
      </region>
      <region name="sound_program" stride="1" chunk_size="1" byte_swap="true">
        <file offset="0" name="epr-21325.21" crc32="0x004AD6AD" />
      </region>
      <region name="sound_samples" stride="1" chunk_size="1" byte_swap="true">
        <file offset="0x000000" name="mpr-21285.22" crc32="0x7CDCA6AC" />
        <file offset="0x400000" name="mpr-21287.24" crc32="0x06B66F17" />
        <file offset="0x800000" name="mpr-21286.23" crc32="0x749DFEF0" />
        <file offset="0xC00000" name="mpr-21288.25" crc32="0x14BEE38E" />
      </region>
      <region name="mpeg_program" stride="1" chunk_size="1" byte_swap="true">
        <file offset="0" name="epr-20886.ic2" crc32="0x65B05F98" />
      </region>
      <region name="mpeg_music" stride="1" chunk_size="1">
        <file offset="0x000000" name="mpr-20887.ic18" crc32="0xA0757684" />
        <file offset="0x400000" name="mpr-20888.ic20" crc32="0xB495FE65" />
        <file offset="0x800000" name="mpr-20889.ic22" crc32="0x18EEC79E" />
        <file offset="0xC00000" name="mpr-20890.ic24" crc32="0xAAC96FA2" />
      </region>
      <!--
      <region name="driveboard_program" stride="1" chunk_size="1" required="false">
        <file offset="0" name="epr-20985.bin" crc32="0xB139481D" />
      </region>
      -->
    </roms>
  </game>
</games>
You should be able to take a dayto2pe ROM set and drop the SRC2 files in there. "crom" is laid out correctly: "32107654". This string is a series of byte indices for every 8-byte stride chunk. So, eprom.bin is loaded into the "crom" region, and then the layout is reshuffled so that byte 3 goes first, byte 2 next, byte 1 next, byte 0 next, etc.

I'm pretty sure this is the same for banked CROM.
ArcadeStriker
Posts: 3
Joined: Thu Nov 09, 2023 5:56 pm

Re: Sega Racing Classic 2 ROM

Post by ArcadeStriker »

Interesting; I'm not able to test this myself buuuuut something I could suggest as an idea to bypass the network board crash is to make a NVRAM with the original game that's already set to Single and then boot SRC2. I guess that it might be unlikely since you probably already had a Daytona 2 PE NVRAM with that set on your folder but it could be worth trying if that's the only issue so far to see it running in Supermodel.
Bart
Site Admin
Posts: 87
Joined: Tue Nov 07, 2023 5:50 am

Re: Sega Racing Classic 2 ROM

Post by Bart »

Didn't work but it was a good idea. Had a moment to look at it. The failure happens here:

Code: Select all

0x0009A3FC: 0x4855D803	bla	0x0055D800
In dayto2pe this address (in RAM) has been loaded with valid code:

Code: Select all

0x0055D800: 0x3821FFF0	addi	r1,r1,-0x10
0x0055D804: 0x7C0802A6	mfspr	r0,lr
0x0055D808: 0x90010000	stw	r0,0x00(r1)
0x0055D80C: 0x38606671	li	r3,0x00006671
0x0055D810: 0x3C800011	li	r4,0x00110000
0x0055D814: 0x38845000	addi	r4,r4,0x5000
0x0055D818: 0x3CA00056	li	r5,0x00560000
0x0055D81C: 0x38A5D960	addi	r5,r5,-0x26A0
0x0055D820: 0x3CC00056	li	r6,0x00560000
0x0055D824: 0x80C6D95C	lwz	r6,-0x26A4(r6)
0x0055D828: 0x3CE00056	li	r7,0x00560000
0x0055D82C: 0x38E7D9BC	addi	r7,r7,-0x2644
0x0055D830: 0x3D000056	li	r8,0x00560000
0x0055D834: 0x8108D9B8	lwz	r8,-0x2648(r8)
0x0055D838: 0x48000039	bl	0x0055D870
0x0055D83C: 0x2C03FFFF	cmpi	cr0,0,r3,-0x01
0x0055D840: 0x4182001C	bt	cr0[eq],0x0055D85C
0x0055D844: 0x3C600056	li	r3,0x00560000
0x0055D848: 0x3863DF00	addi	r3,r3,-0x2100
0x0055D84C: 0x80830000	lwz	r4,0x00(r3)
0x0055D850: 0x0CC40200	twi	6,r4,0x200
0x0055D854: 0x7C8803A6	mtspr	lr,r4
0x0055D858: 0x4E800020	bclr	0x14,0
In src2:

Code: Select all

0x0055D800: 0x2B245F8C	cmpli	cr6,1,r4,0x5F8C
0x0055D804: 0xD6CBA189	stfsu	f22,-0x5E77(r11)
0x0055D808: 0xC697B48E	lfsu	f20,-0x4B72(r23)
0x0055D80C: 0xE36A659F	?
0x0055D810: 0x07144B56	?
0x0055D814: 0xAA2D4FE7	lha	r17,0x4FE7(r13)
0x0055D818: 0x83719EBA	lwz	r27,-0x6146(r17)
0x0055D81C: 0x2DF4365E	?
0x0055D820: 0xD56B68AC	stfsu	f11,0x68AC(r11)
0x0055D824: 0xAB60EBB5	lha	r27,0xFFFFEBB5
0x0055D828: 0x376AE837	addic.	r27,r10,-0x17C9
0x0055D82C: 0x7B3A0CC3	?
0x0055D830: 0x9F7DA04C	stbu	r27,-0x5FB4(r29)
0x0055D834: 0xA08AC02A	lhz	r4,-0x3FD6(r10)
0x0055D838: 0x4A2B4982	ba	0xFE2B4980
0x0055D83C: 0x9153B13D	stw	r10,-0x4EC3(r19)
0x0055D840: 0x49DBC518	b	0x02319D58
0x0055D844: 0x332500B8	addic	r25,r5,0xB8
0x0055D848: 0x9F070114	stbu	r24,0x114(r7)
0x0055D84C: 0xFF18CAFE	fnmadd	f24,f24,f11,f25
0x0055D850: 0xB3475C83	sth	r26,0x5C83(r7)
0x0055D854: 0x3A26BCD5	addi	r17,r6,-0x432B
0x0055D858: 0xDF39DF85	stfdu	f25,-0x207B(r25)
Hmm...
Bart
Site Admin
Posts: 87
Joined: Tue Nov 07, 2023 5:50 am

Re: Sega Racing Classic 2 ROM

Post by Bart »

Ok, I figured it out. I was using daytona2's encryption key for the security board RAM instead of dayto2pe. The games have some sort of protection. The CROMs are identical -- not a single byte changed. That means the Daytona 2 logo is still present. If you look in the Yakuza directory structure you'll see the Sega Racing Classic 2 logo is just a normal image. They simply render it manually when they know the title screen is being shown.

I haven't yet figured out the VROMs and won't have time until the weekend. I've heard the Dodge Viper pace car has been replaced. My guess is that the VROMs are also unaltered from the dayto2pe set and they simply look for the Viper being rendered and manually swap in a model. That would be the easiest way to do it (modifying the VROM would be extremely difficult if not outright impossible).

Here is the corrected Games.xml file:

Code: Select all

  <game name="src2">
    <identity>
      <title>Sega Racing Classic 2</title>
      <version>Japan, Revision A</version>
      <manufacturer>Sega</manufacturer>
      <year>1998</year>
    </identity>
    <hardware>
      <platform>Sega Model 3</platform>
      <stepping>2.1</stepping>
      <mpeg_board>DSB2</mpeg_board>
      <drive_board>Wheel</drive_board>
      <real3d_status_bit_set_percent_of_frame>24</real3d_status_bit_set_percent_of_frame>
      <netboard>true</netboard>
	  <audio>QuadFrontRear</audio>
      <inputs>
        <input type="common" />
        <input type="vehicle" />
        <input type="shift4" />
        <input type="vr4" />
      </inputs>
      <encryption_key>0x29222CC4</encryption_key>
    </hardware>
    <roms>
      <region name="crom" stride="8" chunk_size="8" byte_layout="32107654">
        <file offset="0" name="eprom.bin" />
      </region>
      <region name="banked_crom" stride="8" chunk_size="8" byte_layout="32107654">
        <!-- CROM0 -->
        <file offset="0x0000000" name="crom0x.bin" />
        <!-- CROM1 -->
        <file offset="0x2000000" name="crom1x.bin" />
        <!-- CROM2 -->
        <file offset="0x4000000" name="crom2x.bin" />
        <!-- CROM3 -->
        <file offset="0x6000000" name="crom3x.bin" />
      </region>
      <region name="vrom" stride="32" chunk_size="2">
        <file offset="0"  name="mpr-21198.26" crc32="0x42EC9ED4" />
        <file offset="2"  name="mpr-21199.27" crc32="0xFA28088C" />
        <file offset="4"  name="mpr-21200.28" crc32="0xFBB5AA1D" />
        <file offset="6"  name="mpr-21201.29" crc32="0xE6B13469" />
        <file offset="8"  name="mpr-21202.30" crc32="0xE6B4C2BE" />
        <file offset="10" name="mpr-21203.31" crc32="0x32D08D33" />
        <file offset="12" name="mpr-21204.32" crc32="0xEF18FE0A" />
        <file offset="14" name="mpr-21205.33" crc32="0x4687BEA6" />
        <file offset="16" name="mpr-21206.34" crc32="0xEC2D6884" />
        <file offset="18" name="mpr-21207.35" crc32="0xEEAA510B" />
        <file offset="20" name="mpr-21208.36" crc32="0xB222FEF0" />
        <file offset="22" name="mpr-21209.37" crc32="0x170A28CE" />
        <file offset="24" name="mpr-21210.38" crc32="0x460CEFE0" />
        <file offset="26" name="mpr-21211.39" crc32="0xC84759CE" />
        <file offset="28" name="mpr-21212.40" crc32="0x6F8A75E0" />
        <file offset="30" name="mpr-21213.41" crc32="0xDE75BEC6" />
      </region>
      <region name="sound_program" stride="1" chunk_size="1" byte_swap="true">
        <file offset="0" name="epr-21325.21" crc32="0x004AD6AD" />
      </region>
      <region name="sound_samples" stride="1" chunk_size="1" byte_swap="true">
        <file offset="0x000000" name="mpr-21285.22" crc32="0x7CDCA6AC" />
        <file offset="0x400000" name="mpr-21287.24" crc32="0x06B66F17" />
        <file offset="0x800000" name="mpr-21286.23" crc32="0x749DFEF0" />
        <file offset="0xC00000" name="mpr-21288.25" crc32="0x14BEE38E" />
      </region>
      <region name="mpeg_program" stride="1" chunk_size="1" byte_swap="true">
        <file offset="0" name="epr-20886.ic2" crc32="0x65B05F98" />
      </region>
      <region name="mpeg_music" stride="1" chunk_size="1">
        <file offset="0x000000" name="mpr-20887.ic18" crc32="0xA0757684" />
        <file offset="0x400000" name="mpr-20888.ic20" crc32="0xB495FE65" />
        <file offset="0x800000" name="mpr-20889.ic22" crc32="0x18EEC79E" />
        <file offset="0xC00000" name="mpr-20890.ic24" crc32="0xAAC96FA2" />
      </region>
      <!--
      <region name="driveboard_program" stride="1" chunk_size="1" required="false">
        <file offset="0" name="epr-20985.bin" crc32="0xB139481D" />
      </region>
      -->
    </roms>
  </game>
  
Ravsieg
Posts: 6
Joined: Mon Nov 13, 2023 4:14 pm

Re: Sega Racing Classic 2 ROM

Post by Ravsieg »

This is the reason I'm trying to get my emulator to work - as posted on a separate board.

Not sure if this is the default on Power Edition, or just a matter of dipswitches that are inaccessible via Like a Dragon Gaiden's port, but we're unable to swap Dennis St James's vocals for Takenobu Mitsuyoshi's by holding Start before the race starts.
Bart
Site Admin
Posts: 87
Joined: Tue Nov 07, 2023 5:50 am

Re: Sega Racing Classic 2 ROM

Post by Bart »

I'm surprised anyone wants to listen to him for these tracks (loved him in the original Daytona, though). :lol:

But as I said, they don't emulate the sound hardware and none of the sound ROMs are included at all. So it will almost certainly be futile unless they've included the Mitsuyoshi tracks. Your best bet is to figure out how the audio tracks are stored and replace them, if possible.
Ravsieg
Posts: 6
Joined: Mon Nov 13, 2023 4:14 pm

Re: Sega Racing Classic 2 ROM

Post by Ravsieg »

Can't have enough of Takedude's energy!

Anyway, so, I'm inept at this and failed to infer that they don't emulate the sound hardware from your previous messages.

So, correct me I'm wrong, but this means that the MPEG music feeds off the Yakuza files and is triggered whenever the game detects it's time for it, much like the SRC2 logo does - and, possibly, the generic pace car model as well.

One question though. I've heard that, on Power Edition and holding specific view buttons before the race starts, you can choose your BGM regardless of the track.
VR1 -> SLING SHOT (Beginner BGM)
VR2 -> I CAN DO IT (Advanced BGM)
VR3 -> SKYSCRAPER SEQUENCE (Expert BGM=
VR4 -> All four ending themes in sequence

However, VR3 and VR4 are swapped around in SRC2. I suspect this is because they've mislabeled "View 3" and "View 4" on the button settings, however. On SRC2, View 4 is the default one from behind the car, but View 3 is the high camera. That's the other way around in PE, isn't it?
PDNEJOH
Posts: 6
Joined: Wed Nov 08, 2023 3:51 am

Re: Sega Racing Classic 2 ROM

Post by PDNEJOH »

Ravsieg wrote: Thu Nov 16, 2023 10:48 pm One question though. I've heard that, on Power Edition and holding specific view buttons before the race starts, you can choose your BGM regardless of the track.
VR1 -> SLING SHOT (Beginner BGM)
VR2 -> I CAN DO IT (Advanced BGM)
VR3 -> SKYSCRAPER SEQUENCE (Expert BGM=
VR4 -> All four ending themes in sequence

However, VR3 and VR4 are swapped around in SRC2. I suspect this is because they've mislabeled "View 3" and "View 4" on the button settings, however. On SRC2, View 4 is the default one from behind the car, but View 3 is the high camera. That's the other way around in PE, isn't it?
Yes, VR3 (Yellow) should be behind the car and VR4 (Green) should be the high one in BOTE and PE.
Bart
Site Admin
Posts: 87
Joined: Tue Nov 07, 2023 5:50 am

Re: Sega Racing Classic 2 ROM

Post by Bart »

Ravsieg wrote: Thu Nov 16, 2023 10:48 pm
So, correct me I'm wrong, but this means that the MPEG music feeds off the Yakuza files and is triggered whenever the game detects it's time for it, much like the SRC2 logo does - and, possibly, the generic pace car model as well.
Yeah that’s how I believe it works. It’s really simple to do this with Model 3 because the architecture is so well compartmentalized. The way music and sound work are that the CPU writes a couple bytes to a port. The sound and MPEG boards listen for these commands and play the appropriate sound effect or song. The CPU doesn’t care after it issues the command.

So you can just listen for these commands and instead of emulating the hardware as we do, just play the appropriate sound asset.

Same with 3D models. The CPU sends up a database of stuff to render, with pointers to the models in the Real3D’s memory (including its own private ROM space that the CPU cannot even see), and it transforms and renders them. So in an emulator you can literally have an if-statement checking for the known model of interest and then run a special routine to render something else or re-point it at a new model in the Real3D model format.
Ravsieg
Posts: 6
Joined: Mon Nov 13, 2023 4:14 pm

Re: Sega Racing Classic 2 ROM

Post by Ravsieg »

Bart wrote: Fri Nov 17, 2023 2:21 am
Ravsieg wrote: Thu Nov 16, 2023 10:48 pm
So, correct me I'm wrong, but this means that the MPEG music feeds off the Yakuza files and is triggered whenever the game detects it's time for it, much like the SRC2 logo does - and, possibly, the generic pace car model as well.
Yeah that’s how I believe it works. It’s really simple to do this with Model 3 because the architecture is so well compartmentalized. The way music and sound work are that the CPU writes a couple bytes to a port. The sound and MPEG boards listen for these commands and play the appropriate sound effect or song. The CPU doesn’t care after it issues the command.

So you can just listen for these commands and instead of emulating the hardware as we do, just play the appropriate sound asset.

Same with 3D models. The CPU sends up a database of stuff to render, with pointers to the models in the Real3D’s memory (including its own private ROM space that the CPU cannot even see), and it transforms and renders them. So in an emulator you can literally have an if-statement checking for the known model of interest and then run a special routine to render something else or re-point it at a new model in the Real3D model format.
Interesting. That was really informative & in the kind of language I can understand, thank you.
PDNEJOH wrote: Thu Nov 16, 2023 11:46 pm
Ravsieg wrote: Thu Nov 16, 2023 10:48 pm One question though. I've heard that, on Power Edition and holding specific view buttons before the race starts, you can choose your BGM regardless of the track.
VR1 -> SLING SHOT (Beginner BGM)
VR2 -> I CAN DO IT (Advanced BGM)
VR3 -> SKYSCRAPER SEQUENCE (Expert BGM=
VR4 -> All four ending themes in sequence

However, VR3 and VR4 are swapped around in SRC2. I suspect this is because they've mislabeled "View 3" and "View 4" on the button settings, however. On SRC2, View 4 is the default one from behind the car, but View 3 is the high camera. That's the other way around in PE, isn't it?
Yes, VR3 (Yellow) should be behind the car and VR4 (Green) should be the high one in BOTE and PE.
Cheers.
I figured as much. Mislabelled buttons was by far the most likely possibility - what were the odds they'd bother with reprogramming that cute easter egg, and making a mistake while at it?

There were probably no Daytona USA experts on the QA squad, for that to slip through, though.
Post Reply