Jump to content



4

some pretty awesome graphics for the Lynx!

Electrocops Alien Vs Predator Battlewheels

61 replies to this topic

#51 solidcorp OFFLINE  

solidcorp

    Moonsweeper

  • 346 posts
  • Location:Wheaton Illinois

Posted Fri Nov 25, 2011 2:17 PM

PART III : "The stun runner bug"

To refresh your memory, here is where I began my journey...

View Postsolidcorp, on Wed Oct 26, 2011 11:15 AM, said:

View PostTursi, on Mon Oct 24, 2011 10:06 PM, said:

Though now that I have you, let me corner you about the one and only thing in STUN Runner that bugged me (and only a little, though I considered it cheating). You only slow down when you change polygons - meaning you can maintain top speed around corners by staying on the ground! Not true in the arcade! Respond? ;)

Well, um, I did the game like 20 years ago (1990-1991?). I still have the source code, sort of... The Amiga 3000's battery leaked in storage and ruined its motherboard. The hard disk *might* still work, I did just recover all my old ST files last year from 25 year old Supra and Mega drives. I also have the Amiga floppy disk backups somewhere and *might* be able to restore them *if* I can find a floppy drive and the right software.
...
As far as speed is concerned, there is (or at least should be) a sweet spot, or what is now in racing games called a blue line, an optimal path through the levels. In stun runners tubes it would be on the outside, where a pendulum would swing if you were truly racing around the corners. The stars in the first levels are placed on that line to train you where you should be on the track for maximum speed. In the flat areas only the walls slow you down, and I don't think anything slows you down while boosting. The problem you *may* be having with S.T.U.N. Runner (if there is not a bug) is that the controls are touchy and you really can be harshly penalized for climbing too high up the walls. I put a lot of work into the centrifugal sweet spot aspect, if I didn't then the star placement painstakingly reproduced from the coin op wouldn't work.

Well, here we are.

I have since verified the function of the Lynx game and the coin op game and they are clearly different as described, and I have managed to recover the Lynx source, but the story doesn't end there.

First, let's look at the offending code, here is an excerpt from the function xyphysics in srship.src, starting at line 534:

   ; ***** DETERMINE WHETHER TO USE TUNNEL OR FLAT PHYSICS
lda shipterrain
cmp #WARP
beq .38
bit #FLATFLAG
bne .50
lda shipangle
cmp #TUNFLATR+1
bge .50
cmp #TUNFLATL-1
blt .50
.38
   ; ***** TUNNEL PHYSICS *****
   ; ***** CURVATURE DECELERATION
   ; sweetspot = shipangle-(curvature+sign(curvature))*16
   ; there is no curvature deceleration on flats
stz temp0
lda dx2tab+2
beq .41
bpl .49
dec
dec
.49
inc
asl
asl
asl
asl
.41
eor #$ff
sec
adc shipangle
   ; set max speed depending on deviation from shipangle
   ; the net is $80-A with max check
bmi .47
eor #$ff
inc
.47
   ; give a little lee way in terms of max speed
sec
sbc #$80
bpl .42
lda #shipmaxvx
.42
cmp #shipmaxvmax
blt .43
lda #shipmaxvmax
.43
sta shipmaxv
.70
   ; ***** CENTRIFUGAL/GRAVITY FORCE FOR TUNNEL
   ; CG pulls toward shipangle-(curvature)*16
stz temp0
lda dx2tab+2
beq .72
asl
asl
asl
asl
.72
eor #$ff
sec
adc shipangle
   ; A contains the deviation from the CG vector
   ; add -A/4 to shipvx
eor #$ff
inc
bpl .71
dec temp0
.71
lsr temp0
ror
lsr temp0
ror
adc shipvx
sta shipvx
   ; if the ship is moving slow and shipangle has the
   ; opposite sign of the curvature then tell the person
   ; how to play
lda speed
cmp #20
bge .7f
lda dx2tab+2
beq .7f
bmi .77
lda shipangle
bpl .7f
bra .78
.77
lda shipangle
bmi .7f
.78
   ; try to announce "the outside wall is faster in turns"
lda #OUTSIDEWALLSBIT
sta msgbits
lda #msgtime
sta msgtimer
.7f
jmp .80
.50
   ; ***** FLAT PHYSICS *****
   ; reset shipmaxv
lda #shipmaxvmax
sta shipmaxv
   ; ***** CENTRIFUGAL FORCE FOR FLATS
   ; force pulls shipx in d2x direction
   ; shipvx =  shipvx+shipv*(curve+-1)*4/256
lda #4
  ldx dx2tab+2
beq .60
; bpl .51
; dec
; dec
; dex
;.51
; inc
; sta MATHD
; stx MATHC
; lda shipv
; sta MATHB
; stz MATHA
; WAITMATH
; lda MATHG
; asl MATHH
; rol
; asl MATHH
; rol
   ; this centripital force adds 1, or -1 to shipvx
   ; depending on the direction of curve only
   ; if the ship is moving fast enough
bpl .51
lda #-4
.51
ldx shipv
cpx #$40
bge .52
lda #0
.52
clc
adc shipvx
sta shipvx
.60
   ; ***** FRICION ON WALLS FOR FLATS

The cause of the observed behaviour is due the these 5 lines near the top.
lda shipangle
cmp #TUNFLATR+1
bge .50
cmp #TUNFLATL-1
blt .50

This is very peculiar in the following ways.
  • The preceding code, clearly identifies and acts on the type of track (flat or tunnel) that the ship is
    		   ; ***** DETERMINE WHETHER TO USE TUNNEL OR FLAT PHYSICS
    		lda shipterrain
    		cmp #WARP
    		beq .38
    		bit #FLATFLAG
    		bne .50	
    	
    but goes on to test the ship's angle in the tunnel on the following 5 lines and if in the bottom, go execute the flat track physics code
    		lda shipangle
    		cmp #TUNFLATR+1
    		bge .50
    		cmp #TUNFLATL-1
    		blt .50
    		
  • Later in the FLAT PHYSICS section of the file, note that code for centrifugal force was written but commented out.
    		   ; ***** CENTRIFUGAL FORCE FOR FLATS
    		   ; force pulls shipx in d2x direction
    		   ; shipvx =  shipvx+shipv*(curve+-1)*4/256	
    	lda #4
    		  ldx dx2tab+2
    		beq .60
    		; bpl .51
    		; dec
    		; dec
    		; dex
    		;.51
    		; inc
    		; sta MATHD
    		; stx MATHC
    		; lda shipv
    		; sta MATHB
    		; stz MATHA
    		; WAITMATH
    		; lda MATHG
    		; asl MATHH
    		; rol
    		; asl MATHH
    		; rol	
Both of these suggest that the current function was not in the original design but were changed for some reason.

OK, so now I've found the source of the issue (pardon the pun) but could still not tell you weather this was an error, or deliberate, so I pulled all the paperwork back out of storage and read every note and piece of correspondence I still have from S.T.U.N. Runner and found this.

It is the official Lynx S.T.U.N. Runner Atari Games review, the pre-release beta review of the Lynx game by the main programmer of the coin op game. It all came back to me right in item 2.


Posted ImagePosted ImagePosted ImagePosted Image

Item #2
Posted Image

I did exactly that, and to further adapt the game for the Lynx, Atari Corp management/QA requested I treat the floor of the tunnels the same as flat sections of track. Most of the time, enemies would force you off the floor anyway.

The whole Lynx recovery photo album inlcuding some coin op source, the full resolution letters, and more can be found here:
https://picasaweb.go...feat=directlink

So, the bottom line is, yes there is a discrepancy, but it is not a bug, it's an adaptation and at one point in development, it was true to the coin op.

That was fun and the very happy side effect is that I have all that source material recovered and backed up on DVD now.

Thanks for pointing it out Tursi!

:)

#52 solidcorp OFFLINE  

solidcorp

    Moonsweeper

  • 346 posts
  • Location:Wheaton Illinois

Posted Fri Nov 25, 2011 2:24 PM

View PostIsgoed, on Fri Nov 25, 2011 1:56 PM, said:

Very interesting read... keep 'em coming!

Do you have any "secret documents" about the Panther console, that nobody knows about?

Yea, full dev docs I think - from emacs instructions to tech specs and floppies too. I just went and looked and couldn't find them. That's not to say I don't have them, it's just that at least they are not where I expected to find them. I may have just came across the floppies and thought I had the manuals. If I come across them, I'll let you know.
I thought it was lame. After working on the Lynx, going back to a display list platform with just a single scan line video buffer more like a 400/800/7800 just seemed like a big mistake.

For that matter, does anyone have any documentation on the later Atari quad core "Project X"?
It was post PSX and I think Bill Rebock left Sony to join Atari on that one, and the Brittish tech guy, Miller I think his name was, was the head engineer.

Edited by solidcorp, Fri Nov 25, 2011 3:02 PM.


#53 Tursi OFFLINE  

Tursi

    Stargunner

  • 1,448 posts
  • Location:SJC

Posted Fri Nov 25, 2011 4:47 PM

View Postsolidcorp, on Fri Nov 25, 2011 2:17 PM, said:

So, the bottom line is, yes there is a discrepancy, but it is not a bug, it's an adaptation and at one point in development, it was true to the coin op.

That was fun and the very happy side effect is that I have all that source material recovered and backed up on DVD now.

Thanks for pointing it out Tursi!

hehe.. that was a fun and awesome read. Thank you for going to so much trouble, not to mention documenting all of it! It put a smile on my face to have that question resolved after so long!

#54 Horst OFFLINE  

Horst

    Chopper Commander

  • 241 posts
  • Location:Ingersoll

Posted Sat Nov 26, 2011 4:47 PM

This is really interesting. Thanks for all your efforts.

#55 Emehr OFFLINE  

Emehr

    River Patroller

  • 3,217 posts
  • Happiness is... a chomping Pac-Man!
  • Location:An obscure body in the SK system

Posted Sat Nov 26, 2011 5:32 PM

This is really fun to read. Glad to hear you recovered your source code for STUN Runner, solidcorp. Thanks for searching and sharing! :)

#56 Duranik OFFLINE  

Duranik

    Space Invader

  • 24 posts

Posted Sun Nov 27, 2011 3:23 AM

Quote

For that matter, does anyone have any documentation on the later Atari quad core "Project X"?
It was post PSX and I think Bill Rebock left Sony to join Atari on that one, and the Brittish tech guy, Miller I think his name was, was the head engineer.

The system was called "Nuon". The company VMLabs, the tech was used in a couple of DVD Players around 2001, it was very hard to develop
for, only a few games were produced like Tempest 3000, Iron Soldier 3 etc..
You can find more information here http://www.nuon-dome.com/ . The latest SDK is available in the download section.

It would be awesome if you could find some more Panther information, as there is very little stuff to find for this system unfortunately.

#57 solidcorp OFFLINE  

solidcorp

    Moonsweeper

  • 346 posts
  • Location:Wheaton Illinois

Posted Sun Nov 27, 2011 12:39 PM

View PostDuranik, on Sun Nov 27, 2011 3:23 AM, said:

Quote

For that matter, does anyone have any documentation on the later Atari quad core "Project X"?
It was post PSX and I think Bill Rebock left Sony to join Atari on that one, and the Brittish tech guy, Miller I think his name was, was the head engineer.

The system was called "Nuon". The company VMLabs, the tech was used in a couple of DVD Players around 2001, it was very hard to develop
for, only a few games were produced like Tempest 3000, Iron Soldier 3 etc..
You can find more information here http://www.nuon-dome.com/ . The latest SDK is available in the download section.

It would be awesome if you could find some more Panther information, as there is very little stuff to find for this system unfortunately.

The attached PANTHER folder was on my ST C: boot disk drive.

Most of it is a standard 68k ST development environment.

Of particular interest are the header files PAN.H and SPECIAL.H which are dated 1/10/1991 and 12/9/1990 respectively.

Attached Files


Edited by solidcorp, Sun Nov 27, 2011 12:47 PM.


#58 Punisher5.0 OFFLINE  

Punisher5.0

    River Patroller

  • 2,236 posts
  • Location:Illinois

Posted Sun Nov 27, 2011 9:34 PM

Thanks for the interesting read solidcorp!

#59 Ninjabba OFFLINE  

Ninjabba

    Moonsweeper

  • 424 posts
  • Location:Lurking in the Darkness

Posted Mon Nov 28, 2011 4:33 AM

Wow, this topic really turned into a historical goldmine!

#60 frogstar_robot OFFLINE  

frogstar_robot

    Dragonstomper

  • 719 posts

Posted Mon Nov 28, 2011 6:37 PM

I haven't tried this lately but Linux does have support for Amiga partitions. I recovered my friend's Amiga disk about 7 years ago with Debian. It was an IDE disk so I just stuck it in my PC and copied off his files. It isn't clear to me if recent distros are still building in that support or not though I suppose you could use an old Knoppix release or similar to avoid building kernels and suchlike.

These days I would ddrescue to image the entire disk then loopback mount the partitions. You may only have one good crack at reading that old disk hence imaging with a rescue copier. I would also just put the disk in a USB enclosure.

#61 solidcorp OFFLINE  

solidcorp

    Moonsweeper

  • 346 posts
  • Location:Wheaton Illinois

Posted Tue Nov 29, 2011 4:37 PM

View Postfrogstar_robot, on Mon Nov 28, 2011 6:37 PM, said:

I haven't tried this lately but Linux does have support for Amiga partitions. I recovered my friend's Amiga disk about 7 years ago with Debian. It was an IDE disk so I just stuck it in my PC and copied off his files. It isn't clear to me if recent distros are still building in that support or not though I suppose you could use an old Knoppix release or similar to avoid building kernels and suchlike.

These days I would ddrescue to image the entire disk then loopback mount the partitions. You may only have one good crack at reading that old disk hence imaging with a rescue copier. I would also just put the disk in a USB enclosure.

Thanks, I saw that but forgot it. I think they still have the support, or it is easy to add. My only unix machine is an ancient laptop running Xubuntu without a SCSI interface anyway, as a matter of fact I only have one old web server that has a SCSI card in it. I ended up backing up the drives by taking disk images of them with Roadkil's Disk Image, a tool off the Ultimate Boot CD for Windows, an excellent collection of the best free tools adapted from the original Ultimate Boot CD.

Anyway, I have the raw binary disk images backed up and now I can mine that however I want at my leisure. (the byte level disk format is even documented on many sites like this one)

Thanks for the tip.

#62 Stephen ONLINE  

Stephen

    River Patroller

  • 3,243 posts
  • A8 Gear Head
  • Location:Akron, Ohio

Posted Mon Dec 5, 2011 1:09 PM

Awesome read - I missed the topic when it was first posted. Congrats on recovering those disks - sounds like a lot of work, but definitely worth it!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users