.ThrobRevsNoTorque STA T \ Store A in T LDA VIA+&68 \ Read 6522 User VIA T1C-L timer 2 low-order counter \ (SHEILA &68), which decrements one million times a \ second and will therefore be pretty random AND #7 \ Set A = A mod 8, which is a random number in the range \ 0 to 7 CLC \ Set A = A + T ADC T \ = random 0-7 + T \ Fall through into SetRevsNoTorque to set the rev \ counter to A and zero the engine torqueName: ThrobRevsNoTorque [Show more] Type: Subroutine Category: Driving model Summary: Set the rev counter after adding a random throb and zero the engine torque Deep dive: Modelling the engineContext: See this subroutine in context in the source code References: This subroutine is called as follows: * CalcRevsNoTorque calls ThrobRevsNoTorque * ProcessEngineStart calls ThrobRevsNoTorque
Set the following: * revCount = A + rand(0-7) * revsOnGearChange = revCount * engineTorque = 0 * soundRevTarget = revTarget + 25
[X]
Configuration variable VIA = &FE00
Memory-mapped space for accessing internal hardware, such as the video ULA, 6845 CRTC and 6522 VIAs (also known as SHEILA)