How hard would it be to hack these racers?

General software. From trouble with the Banyan Tree to OCP Art Studio, post any general software chat here. Could include game challenges...
User avatar
goodboy
Microbot
Posts: 139
Joined: Tue Jul 23, 2019 8:22 am
Location: Russia

OutRun

Post by goodboy »

User avatar
thealfest
Dizzy
Posts: 56
Joined: Sat Feb 10, 2024 11:26 am
Location: Ukraine
Contact:

Re: How hard would it be to hack these racers?

Post by thealfest »

Old-User wrote: Mon Mar 04, 2024 12:42 am So you have confirmed that 128K version does run a bit slower? That's really unfortunate. :|
(What about forcing 48k version to run on 128k machine as 48k version, i.e. , no ay, no bank switching? Assuming that's possible to hack would there be any benefit compared to a 48k machine?)
I was comparing 128k version running on machines with and without memory contention to estimate the performance cost of running some code in slow memory. I do not see any speed improvements on 48k machine.
Old-User
Dizzy
Posts: 57
Joined: Fri Jan 20, 2023 7:48 pm

Re: How hard would it be to hack these racers?

Post by Old-User »

thealfest wrote: Mon Mar 04, 2024 10:53 am I was comparing 128k version running on machines with and without memory contention to estimate the performance cost of running some code in slow memory. I do not see any speed improvements on 48k machine.
@thealfest : I think I may have stumbled on a workaround to force 48k version to run on 128k machine, at least on emulation... :shock:

Can I send you a small file for you to test if it also works with you?
User avatar
thealfest
Dizzy
Posts: 56
Joined: Sat Feb 10, 2024 11:26 am
Location: Ukraine
Contact:

Re: How hard would it be to hack these racers?

Post by thealfest »

@Old-User Sure
XoRRoX
Manic Miner
Posts: 233
Joined: Wed Jul 11, 2018 6:34 am

Re: How hard would it be to hack these racers?

Post by XoRRoX »

As using the AY chip isn't as CPU-hungry as the beeper, I'm wondering if the 128k version plays faster.
AndyC
Dynamite Dan
Posts: 1409
Joined: Mon Nov 13, 2017 5:12 am

Re: How hard would it be to hack these racers?

Post by AndyC »

XoRRoX wrote: Tue Mar 05, 2024 12:51 pm As using the AY chip isn't as CPU-hungry as the beeper, I'm wondering if the 128k version plays faster.
Yeah, I would expect so unless it still has beeper FX (I can't remember off hand).
Old-User
Dizzy
Posts: 57
Joined: Fri Jan 20, 2023 7:48 pm

Re: How hard would it be to hack these racers?

Post by Old-User »

XoRRoX wrote: Tue Mar 05, 2024 12:51 pm As using the AY chip isn't as CPU-hungry as the beeper, I'm wondering if the 128k version plays faster.
Unfortunately it doesn't.
48K version plays faster.
toot_toot
Manic Miner
Posts: 678
Joined: Thu Nov 29, 2018 7:17 pm

Re: How hard would it be to hack these racers?

Post by toot_toot »

The weird thing about Outrun, which I’m surprised that nobody pointed out when it was released, is just how S-L-O-W the timer runs at. Like a second in the game timer takes about 2 seconds in real life. And nobody said “that isn’t right”. it’s also strange that the developers didn’t pick up on this, it’s like it’s supposed to be running at 2x speed but somehow when the game is finally running on the Spectrum it’s half speed.



Try it on 2x playback and it looks much better, but then the music isn’t right. It’s too fast.
Old-User
Dizzy
Posts: 57
Joined: Fri Jan 20, 2023 7:48 pm

Re: How hard would it be to hack these racers?

Post by Old-User »

toot_toot wrote: Tue Mar 05, 2024 5:00 pm The weird thing about Outrun, which I’m surprised that nobody pointed out when it was released, is just how S-L-O-W the timer runs at. Like a second in the game timer takes about 2 seconds in real life. And nobody said “that isn’t right”. it’s also strange that the developers didn’t pick up on this, it’s like it’s supposed to be running at 2x speed but somehow when the game is finally running on the Spectrum it’s half speed.



Try it on 2x playback and it looks much better, but then the music isn’t right. It’s too fast.


Alan Laird tells in the interview that the graphic density he decided to use in the game is responsible for bringing the game speed way down, sometimes 3 fps.
This must be true because a simple level like stage 2 (first left turn, the "dusty desert") runs much faster than the rest and plays surprisingly decent.
The timer is a good way to tell how fast or slow the game is running (cpu load/code execution?) since it cannot even keep with true seconds interval, it lags or speeds up according to the performance variation of the different stages.

However, there must be something else also responsible for the performance hit and it seems to me that has to do with 128k mode "engaging".
Even if a 128k machine is used and the lighter 48k levels are loaded instead of 128k levels the game still runs slower (than on a 48k machine).
If 48K version is forced to run on 128k machine the game plays as "fast" as the 48k version running on a 48k machine. I've tried and confirmed this.

Maybe there was not enough time to optimize the game for a 128k machine, overlooked some technical aspect that causes the additional slowdown or simply put "...but this game was never destined to be lightening fast."
User avatar
thealfest
Dizzy
Posts: 56
Joined: Sat Feb 10, 2024 11:26 am
Location: Ukraine
Contact:

Re: How hard would it be to hack these racers?

Post by thealfest »

@Old-User
One "second" in outrun is just 10 frames (full screen updates).
AndyC
Dynamite Dan
Posts: 1409
Joined: Mon Nov 13, 2017 5:12 am

Re: How hard would it be to hack these racers?

Post by AndyC »

The timer is probably just counting every X game frames, it's less accurate but fairer on a player since they don't get penalised for game slowdown that way.

I can't off hand think of a reason the game would run slower on a 128, especially not the 48K version. Unless it's still using the ROM interrupt handler (which takes longer on the 128) or is doing some floating bus thing on the 48 to give it more time for drawing and just disabling that code if it doesn't think it's a real 48K.
User avatar
thealfest
Dizzy
Posts: 56
Joined: Sat Feb 10, 2024 11:26 am
Location: Ukraine
Contact:

Re: How hard would it be to hack these racers?

Post by thealfest »

AndyC wrote: Tue Mar 05, 2024 6:52 pm The timer is probably just counting every X game frames, it's less accurate but fairer on a player since they don't get penalised for game slowdown that way.
Yes it is 1/10th, you can clearly see it in "lap" line.

I`ve just measured speed again and there`s no difference in performance between 48k and 128k machines. For both it took about 11 videoframes (11/50 second) to render new game frame on average.
toot_toot
Manic Miner
Posts: 678
Joined: Thu Nov 29, 2018 7:17 pm

Re: How hard would it be to hack these racers?

Post by toot_toot »

Looking at Enduro Racer, which I’m going to presume uses the same engine as Outrun as it’s by the same authors, and while the timer isn’t exactly matched with a real world clock it’s still a lot faster/smoother. Plus it’s moving a lot of sprites around, the other bikes, trees, the various rocks as well as playing AY music and beeper sound FX.



It does make you think there’s a fundamental bug somewhere in Outrun that’s slowing things down.
User avatar
thealfest
Dizzy
Posts: 56
Joined: Sat Feb 10, 2024 11:26 am
Location: Ukraine
Contact:

Re: How hard would it be to hack these racers?

Post by thealfest »

@toot_toot It is not a bug, Alan said that the game engine was improved in later games.
AndyC
Dynamite Dan
Posts: 1409
Joined: Mon Nov 13, 2017 5:12 am

Re: How hard would it be to hack these racers?

Post by AndyC »

toot_toot wrote: Tue Mar 05, 2024 7:08 pm It does make you think there’s a fundamental bug somewhere in Outrun that’s slowing things down.
Outrun has more features like multiple roads/branching etc. All of which makes things slower.
Old-User
Dizzy
Posts: 57
Joined: Fri Jan 20, 2023 7:48 pm

Re: How hard would it be to hack these racers?

Post by Old-User »

Maybe I didn't make myself clear or... I'm just talking rubbish. :lol:

The 48k version of the game doesn't load normally on 128k machines. As far as I understand it checks the presence of the AY chip and changes to AY music/Fx and uses bank switching. What we get in the end is the enhanced 128k version, not the 48k version (beeper music /fx) running on 128k hardware.
But when forced to the game plays faster, or should I say, with the better responsiveness found on the 48k version.
Last edited by Old-User on Tue Mar 05, 2024 7:28 pm, edited 1 time in total.
User avatar
thealfest
Dizzy
Posts: 56
Joined: Sat Feb 10, 2024 11:26 am
Location: Ukraine
Contact:

Re: How hard would it be to hack these racers?

Post by thealfest »

@AndyC
But sprites in Enduro are much bigger and active screen area is also much bigger. I think the Enduro engine is just more advanced.

@Old-User
But 48k version is not faster than 128k.
Old-User
Dizzy
Posts: 57
Joined: Fri Jan 20, 2023 7:48 pm

Re: How hard would it be to hack these racers?

Post by Old-User »

thealfest wrote: Tue Mar 05, 2024 7:26 pm
@Old-User
But 48k version is not faster than 128k.
Ok, I cannot refute that. I'm not saying you're wrong. I don't have the knowledge to explain it in the same terms.

What I am trying to say is that, from my experience (and that is mostly playing the game on real 48k/128k machines), the 48k version always feels more responsive and "faster" (can't quantify that, 1 fps, 2fps, 3fps?).

It's not that much of a difference of course but my eyes tell me its moving less jerky.
User avatar
thealfest
Dizzy
Posts: 56
Joined: Sat Feb 10, 2024 11:26 am
Location: Ukraine
Contact:

Re: How hard would it be to hack these racers?

Post by thealfest »

@Old-User
If there`s any difference you should be able to measure it. I recorded videos in emulator and compared them frame by frame. It is not very accurate but it is more accurate than just "see" or "feel".
By the way - 1 fps difference would be more than 20% for Outrun.
User avatar
goodboy
Microbot
Posts: 139
Joined: Tue Jul 23, 2019 8:22 am
Location: Russia

Re: How hard would it be to hack these racers?

Post by goodboy »

128k version must be slower (there's more graphics)
User avatar
thealfest
Dizzy
Posts: 56
Joined: Sat Feb 10, 2024 11:26 am
Location: Ukraine
Contact:

Re: How hard would it be to hack these racers?

Post by thealfest »

@goodboy
May be, I only measured speed at the beginning of the first level.
User avatar
PeteProdge
Bugaboo
Posts: 3588
Joined: Mon Nov 13, 2017 9:03 am

Re: How hard would it be to hack these racers?

Post by PeteProdge »

With Enduro Racer, they've not bothered with sprite masking - the pixels are just plonked on whatever's there, so that makes the graphics easier shift in a fast way.
Reheated Pixels - a combination of retrogaming, comedy and factual musing, is here!
New video: Nine ZX Spectrum magazine controversies - How Crash, Your Sinclair and Sinclair User managed to offend the world!
AndyC
Dynamite Dan
Posts: 1409
Joined: Mon Nov 13, 2017 5:12 am

Re: How hard would it be to hack these racers?

Post by AndyC »

thealfest wrote: Tue Mar 05, 2024 7:26 pm @AndyC
But sprites in Enduro are much bigger and active screen area is also much bigger. I think the Enduro engine is just more advanced.
Outrun effectively has to calculate and render two roads all the time (it's how branching and highways work), which requires significantly more maths than the single road of Enduro. And the progression was Nightmare Rally -> Enduro -> Outrun, as evidenced by the interview with Alan Laird.
Old-User
Dizzy
Posts: 57
Joined: Fri Jan 20, 2023 7:48 pm

Re: How hard would it be to hack these racers?

Post by Old-User »

Meanwhile, my first ever :dance (and probably only one :lol: ) spectrum game hack is progressing.

No mock up! :roll:

Image


Next step will be re-arrange the order of some stages to match course layout of international version of Outrun.
And finally change the color of the road on some of them to a more suitable one (above - stage 1, coconut beach - is now bright yellow instead of green :x ) given the limitations of the spectrum palette.
Old-User
Dizzy
Posts: 57
Joined: Fri Jan 20, 2023 7:48 pm

Re: How hard would it be to hack these racers?

Post by Old-User »

All right, order has been altered and color changed on some of the stages:

- Gateway is now white;
- Wilderness is now dark yellow;
- Alps is pink;
- Seaside Town is bright cyan;

Also, I've been trying to change key "M" for "Space" because it's better on 48k+ or +2.
I've located the routine and managed to set new key but the change isn't permanent. It seems to default to "M" if called again. :?
Post Reply