JTAG mode word registers

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
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!

Re: JTAG mode word registers

Postby Ian » Sat Mar 18, 2023 3:57 pm

gm_matthew wrote:
It's not the 0x9c0000xx config registers as Sega Rally 2 writes the exact same values but it uses signed fixed shading like all the other games. The gamma table hypothesis sounds intriguing though :idea:


Most games don't use fixed shading at all. Off the top of my head, scud race uses it in certain places. Star wars. I think la machine guns. Sega Rally I'm pretty sure doesn't use fixed shading.

It might be worth checking the config registers. I never could figure out what they did if anything.

I thought the unsigned values just appeared in certain parts of star wars such as the 'tunnel' section. But it's been so long since I've checked details might be wrong. I didn't think it applied to the whole game.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: JTAG mode word registers

Postby gm_matthew » Fri Apr 07, 2023 6:32 pm

Ian wrote:Most games don't use fixed shading at all. Off the top of my head, scud race uses it in certain places. Star wars. I think la machine guns. Sega Rally I'm pretty sure doesn't use fixed shading.

Sega Rally 2 uses fixed shading for the dust trails, and using signed values gives results closest to real hardware.
gm_matthew
 
Posts: 224
Joined: Fri Oct 07, 2011 7:29 am
Location: Bristol, UK

Re: JTAG mode word registers

Postby Ian » Sat Apr 08, 2023 4:25 am

ah well that's interesting to know
my local copy wasn't writing any config values for starwars. Must be some patch or something stopping it writing them. Does yours? It seems to be the only game that doesn't write them.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: JTAG mode word registers

Postby gm_matthew » Sat Apr 08, 2023 3:15 pm

The current patch for Star Wars skips any subroutines that perform JTAG access; I'm guessing it also skips writing to the config registers.

Try enabling the patch from MAME and disabling all other patches, here's what it looks like in my Games.xml:

Code: Select all
      <patches>
        <!-- skip force feedback lever check -->
        <patch region="crom" bits="32" offset="0xf6e44" value="0x60000000" /> --> <!-- from MAME -->
        <!--<patch region="crom" bits="32" offset="0xf0e48" value="0x60000000" /> --> <!-- no more needed if ffb lever rom loaded -->
        <!--<patch region="crom" bits="32" offset="0x043dc" value="0x48000090" /> --> <!-- related to joystick feedback --> <!-- no more needed if ffb lever rom loaded -->
        <!--<patch region="crom" bits="32" offset="0x029a0" value="0x60000000" /> <!-- skip force feedback setup? -->
        <!--<patch region="crom" bits="32" offset="0x02a0c" value="0x60000000" />
        <!-- Additional patches from MAME for test menu -->
        <!--<patch region="crom" bits="32" offset="0xf776c" value="0x60000000" /> <!-- unemulated JTAG stuff -->
        <!--<patch region="crom" bits="32" offset="0xf7770" value="0x60000000" /> <!-- "" -->
        <!--<patch region="crom" bits="32" offset="0xf7774" value="0x60000000" /> <!-- "" -->
      </patches>

Enable force feedback (you don't need a force feedback controller to be plugged in) or set the cabinet type to upright and it should work.
gm_matthew
 
Posts: 224
Joined: Fri Oct 07, 2011 7:29 am
Location: Bristol, UK

Re: JTAG mode word registers

Postby Bart » Sun Apr 09, 2023 12:12 am

Just tried -- it works! I don't know whether the JTAG writes are performed at the beginning of the game once or just prior to that sequence, but I have a save state right before entering the tunnel and it works correctly.

Based on your recent investigations of what the JTAG commands map to, do we know what the command we are intercepting *actually* maps to?
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: JTAG mode word registers

Postby Ian » Tue Apr 11, 2023 5:09 pm

I had a look at this again. Looked at the polygon headers in star wars and compared to other games. Really nothing stands out. I haven't extensively checked the culling nodes , but most bits there are known. Same with the viewport data. The viewport data at the end has potentially a lot of fields we aren't using but these are all zero.

The config registers as Mathew said are the same as Sega Rally. I think they set things like the screen resolution refresh rate, the overload mode (kinda vsync). Maybe some other things.

In short if it's not jtag I've no idea where this option could be set. But as far as I know the unsigned values effect the whole game, not just specific sections. So if it is jtag probably something is written to the gpu on startup.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: JTAG mode word registers

Postby Bart » Fri Apr 21, 2023 2:49 pm

I think it is JTAG. I did what Matthew suggested and lo and behold, the lighting was alright again.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Previous

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest