Wednesday, March 21, 2012

Vroom Vroom

Some good news - the main Ferrari is implemented. Controls are also complete, which means you can drive through all the levels of the game, albeit without collisions or crash sequences yet. The handling feels right though. Here are some screenshots:

 

The code, as usual, is rather comical. The original assembler manages to combine sound effect triggering logic, score updates and logic to trigger tyre smoke when turning into sharp bends into one almighty routine. I guess coding practices have come on somewhat since 1986. It's kind of funny to be the first person to delve into this code in over 25 years. 

I continue to find bugs in the original codebase, which I'm optionally fixing in my conversion. There will probably be a menu option to toggle my fixes. The latest can be reproduced as follows:
  • Drive into the level a bit.
  • Come to a standstill.
  • Turn the wheel leftmost, then let it centre itself
  • Accelerate and notice the car veers off to the left, even though the wheel is now centered
I can patch this bug on the anniversary edition the next time I do a release, if there's demand. I suspect no-one ever noticed it though. Can it be reproduced easily on hardware?

Update: Yes, it's been reproduced on hardware. Interestingly, it can't be reproduced on the Sega Saturn port.

13 comments:

Anonymous said...

I noticed a couple of times you've touched on the 'quality' of the code - I wonder sometimes if the programmer(s) simply didn't have the luxury of time to refine and optimise.

Even myself back in the day would have segmented those routines into conditional sequences; simply better practice.

But then saying that portions of this game code transcends into other titles/ or visa versa - perhaps they simply botch it together to get it out the door.

Or they had enough CPU(s) overhead to not care about re-factoring.. who knows :-/

Anyways it's looking good ;-)

Anonymous said...

I've been following your progress, and I must say this is great work! Thanks for looking into and improving this amazing game :)

Supper said...

Wow, you've really been moving this along lately. Looks great, keep it up!

yt said...

Glad you've been enjoying the updates. I appreciate this is a slow moving project.

If there's anything in particular you want to hear about, let me know!

Anonymous said...

I tested this bug on my upright running a stock Rev B board and I confirm the steering behavior. I even tried turning my wheel all the way right and then centering and the game still goes left after accelerating from a stop. I can't say I really noticed it before, I think I naturally compensated for it all this time.

Magic Knight said...

I've just tried out both of my Out Run boards, one of which has your new ROMs and the other has the old Japanese ROMs. In neither case did the car veer off to the left. I'm using a Power Drift control panel though, maybe that makes a difference?

yt said...

Magic Knight - That could well be the sensativity of the different control panel. If the steering value isn't stable, the bug wouldn't be triggered.

I'm interested to test whether the Saturn port has this bug when I have a spare moment, along with some of the other issues.

I've finished the interactions with scenery and sprites. I'm working on porting the traffic code next.

Magic Knight said...

My control panel is very stable, in test mode it always returns to a value of about 80 for the steering wheel's pot. What kind of values are you getting? When I used a PC wheel the pot would loosen up a lot and the car would drift to the right, so I have to tape it down.

yt said...

Not sure in that case - the bug is definitely there in Rev. B.

I can see the line of code that causes that behaviour and Alex verified above on hardware.

Magic Knight said...

I've had another mess around with my PCB. I could replicate your problem, but only if the car was in high gear. If the car was in low gear it seems to go straight every time. The effect in high gear is noticeable, but it's not nearly as dramatic as the effect in MAME.

barito said...

Being also present in the saturn version, could it be that they set that tendency to turn left after an accel on purpouse? Maybe that was somehow related to the desire to create a simulator ...

yt said...

Unlikely it was intentional, but I have no evidence to back my belief up. The OutRun code is full of strange bugs, once you start delving into it.

The Saturn hardware is ultimately an evolution of the OutRun boardset. I highly suspect that Rutubo used some kind of 68k -> SH2 conversion utility to directly convert the code.

They were specialising in conversions of arcade ports, so reasonable to assume they had some kind of pipeline in place to facilitate the process.

MC said...
This comment has been removed by the author.