Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

reminisce about classic bbc micro and acorn electron games here
Related forum: adventures


mike12f
Posts: 77
Joined: Wed Nov 03, 2021 9:40 am
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by mike12f »

I tried modifying the source code of Flicker-free elite to get the Cobra mark 3 welcome screen running at 50FPS, by using B-em running at 200% speed rate. To get the smoothness of rotation I want, I tried modifying the source code to lower the rotation rate of the spacecraft by a factor of 2 (so the overall speed of rotation looks the same to the human eye despite the 200% emulator speed, but so that it just looks a lot smoother!)

To do this, I want to lower the rotation rate in the https://www.bbcelite.com/cassette/main/ ... /mvs5.html routine, from 3.6degrees/frame to 3.6/2 degrees per frame.

Also, by dividing the rate of angle change by 2, the small angle approximations should become more precise, so there should be less "wobble" of the wings of the spacecraft.

So I want to change the 2 lines:

X = X * (1 - 1/512) + Y / 16
Y = Y * (1 - 1/512) - X / 16
To
X = X * (1 - 1/512/4) + Y / 32
Y = Y * (1 - 1/512/4) - X / 32

I think the relevant code is in this file: https://github.com/markmoxon/disc-elite ... docked.asm

I'm not too strong at 6502, but to do this, I tried to add a two more "LSR A"s into the source code, and doubled up some pairs of " LSR A:ROR P" lines, but now I get an overflow error of some kind:

beebasm -i 1-source-files/main-sources/elite-source-docked.asm -v >> 3-assembled-output/compile.txt
1-source-files/main-sources/elite-source-docked.asm:33175: error: Guard point hit.

SKIP 178 \ These bytes appear to be unused
^
make: *** [Makefile:39: build] Error 1

Is this because I've lengthened the code, and overflowed an important page boundary or something?

Does anyone think what I want to achieve is simple and achievable or even worth it? :D
Last edited by mike12f on Mon Jan 23, 2023 6:20 pm, edited 5 times in total.
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

mike12f wrote: Sun Jan 22, 2023 3:07 pm I'm not too strong at 6502, but to do this, I tried to add a few more "LSR A"s into the source code, but now I get an overflow error of some kind:

beebasm -i 1-source-files/main-sources/elite-source-docked.asm -v >> 3-assembled-output/compile.txt
1-source-files/main-sources/elite-source-docked.asm:33175: error: Guard point hit.

SKIP 178 \ These bytes appear to be unused
^
make: *** [Makefile:39: build] Error 1

Is this because I've lengthened the code, and overflowed an important page boundary or something?
Yes, that's exactly what's happened. Replace the SKIP 178 with ORG &6000 and it should now work, and will still save the correct size of binary.

Edit: Actually, changing it to SKIPTO &6000 might be better. It all comes out the same in the wash!

Mark
mike12f
Posts: 77
Joined: Wed Nov 03, 2021 9:40 am
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by mike12f »

Thanks that worked.

Here is a screen capture, showing B-em running at 400% speed, with the elite source code modified to make the spaceship rotate at quarter speed.

https://i.imgur.com/zDzuZrG.mp4

It's not fixed the fins wobbling unfortunately. So not quite as smooth as I'd hoped.

But smoother than the original. Here is the original, running at 100% for comparison.

https://i.imgur.com/TtbYrBf.mp4

Cool! I just hacked Elite! :D
mike12f
Posts: 77
Joined: Wed Nov 03, 2021 9:40 am
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by mike12f »

I tried to figure out why the wobble is still there, and I suspect it is because the "TIDY" routine (which orthonormalises the 3 vectors) is not that precise (being only 16 bit accuracy throughout).

For example, I tried raising the frequency of call to TIDY and I found the wobbles were mostly synchronised with the calls to the TIDY routine. I also lowered the frequency of the calls to TIDY in MVEIT by changing the AND#15 to something else.. It does seem that TIDY is the culprit. But I realise that TIDY is essential.

I called TIDY every single frame (by changing the AND#15 to AND#1), and found the spaceship stopped rotating altogether, which I wasn't expecting. That could be a strong illustration the inaccuracy of TIDY perhaps?

So it looks like there's nothing I can do to fix those wobbles (other than rewriting the TIDY routine to use 32 bit accuracy for all of its internal variables??)
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

mike12f wrote: Sun Jan 22, 2023 5:53 pm I called TIDY every single frame (by changing the AND#15 to AND#1), and found the spaceship stopped rotating altogether, which I wasn't expecting.
I just tried changing to AND #1, and the Cobra still spins fine for me, so not sure what's happening there!

That said, changing the AND #15 to AND #1 won't run TIDY on every iteration anyway. The code looks like this, if we change the AND to AND #1:

Code: Select all

 LDA MCNT               \ Fetch the main loop counter

 EOR XSAV               \ Fetch the slot number of the ship we are moving, EOR
 AND #1                 \ with the loop counter and apply mod 1 to the result.
 BNE MV3 
On the title screen, the Cobra is always spawned into slot 2 (the first empty slot), so XSAV = 2. This gives:

Code: Select all

A = MCNT EOR XSAV AND #1
  = MCNT EOR %10 AND %1
  = MCNT AND %1
So this will run TIDY on the Cobra in slot 2 on every other iteration round the main loop (specifically, on iterations when MCNT is even).

To force TIDY to run every loop, you could just replace BNE MV3 with NOP:NOP.

You can also disable TIDY altogether by replacing JSR TIDY with NOP:NOP:NOP - this is the only place that TIDY is called in the whole codebase, so this disables it entirely. If the wobble is still there, then you know it isn't anything to do with TIDY. I suspect that you will find this is the case - I think you will get the same spinning effect with the same wobble, but over time the ship will slowly start to stretch and break. I think it will take quite a while to happen, as I did exactly this experiment when trying to work out what TIDY did, and it took a lot of flying around to get things to fall apart (though when they started going, they went spectacularly wrong)! Here's a video of things falling apart if you disable TIDY:

https://www.bbcelite.com/media/wonky_el ... _elite.mp4

Neither of these NOP-outs should stop the Cobra from spinning, as this logic simply skips the call to TIDY.

As for the wobble, I wonder if it happens when the number of lines in the ship changes during the rotation, as then the one-by-one swap-out won't necessarily be redrawing lines that are in the same place within the ship - you could be erasing a line on one end of the ship and redrawing it somewhere totally different. That might explain some kind of wobble?

Mark
Eleccy
Posts: 21
Joined: Mon Mar 21, 2022 10:24 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by Eleccy »

Hi Mark, Sorry i didn't spot this message earlier. I do sill have the tape actually, haven't tried loading it recently but presume it still works.. Whats a good way to get you a copy? I'm not sure offhand how to make a uef file, could look into that. Or failing that i'd be willing to post the cassette

Cheers
Adrian

MarkMoxon wrote: Sat Jun 11, 2022 8:58 pm
Eleccy wrote: Sat Jun 11, 2022 8:45 pm This is amazing, all these flicker free versions. Thanks so much.
My pleasure! :-)
Eleccy wrote: Sat Jun 11, 2022 8:45 pm I played Elite on the electron back in the day. My version was the original in which you could only access one galaxy. I didn't know a later version fixed that bug. Looking forward to trying flicker free version out on my original hardware. Maybe i should play long enough to see another galaxy
I don't suppose you still have your original tape? I'm trying to track down a copy of the original Electron version with the galaxy bug, but haven't managed to find it yet.

And if anyone else out there has a copy of the original bugged Electron version, do let me know!

Mark
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

Hi Adrian.
Eleccy wrote: Sun Mar 17, 2024 10:16 pm
MarkMoxon wrote: Sat Jun 11, 2022 8:58 pm And if anyone else out there has a copy of the original bugged Electron version, do let me know!
I do sill have the tape actually, haven't tried loading it recently but presume it still works.. Whats a good way to get you a copy? I'm not sure offhand how to make a uef file, could look into that. Or failing that i'd be willing to post the cassette
It's great that you have the tape! That's exciting. :-)

I've never converted a tape to a UEF so I'm no expert, but I think the first step is to record the tape sound as a WAV file - that's what this thread says (and it also explains how difficult this whole process is!):

viewtopic.php?t=14239

Do you have any means of playing the tape into a PC to record it as a WAV file? If so, then that might be worth a try.

If not, then while I'd be happy to have a go, it's probably worth asking whether there's anyone out there who's more of an expert in this. There's a whole section of Stardot dedicated to game preservation - might be a good place to ask?

viewforum.php?f=84

I can post if you like, but it’s your tape, so please, after you!

It would be great to be able to extract the game code for the original release, so thanks for replying! It's one of the missing sources from my collection, and it would be really interesting to see what caused the bug...

Mark
User avatar
Diminished
Posts: 1235
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by Diminished »

Eleccy wrote: Sun Mar 17, 2024 10:16 pm Hi Mark, Sorry i didn't spot this message earlier. I do sill have the tape actually, haven't tried loading it recently but presume it still works.. Whats a good way to get you a copy? I'm not sure offhand how to make a uef file, could look into that. Or failing that i'd be willing to post the cassette

Cheers
Adrian
MarkMoxon wrote: Mon Mar 18, 2024 7:16 pm
I've never converted a tape to a UEF so I'm no expert, but I think the first step is to record the tape sound as a WAV file - that's what this thread says (and it also explains how difficult this whole process is!):

viewtopic.php?t=14239
I am obliged to point out that that thread is old, and there exists alternative software for this job nowadays.

(I also don't agree with some of the advice in that thread.)
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

Diminished wrote: Mon Mar 18, 2024 8:10 pm I am obliged to point out that that thread is old, and there exists alternative software for this job nowadays.
Excellent! That looks like a much better approach. :D

We still need to work out how to generate a WAV file from that tape, but at least we know what to do with it now. Thank you.

Mark
User avatar
Diminished
Posts: 1235
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by Diminished »

MarkMoxon wrote: Mon Mar 18, 2024 9:05 pm Excellent! That looks like a much better approach. :D
The devil is in the detail. I didn't intend to spend two years on the problem. :x
Eleccy wrote: Sun Mar 17, 2024 10:16 pm Hi Mark, Sorry i didn't spot this message earlier. I do sill have the tape actually, haven't tried loading it recently but presume it still works.. Whats a good way to get you a copy? I'm not sure offhand how to make a uef file, could look into that.
Some recommendations:

If you're going to make a WAV file from the tape, try to wind the tape through completely a couple of times before beginning playback. One big problem with old tapes is that the mechanisms (spindles etc.) tend to become sticky, which can cause dips in playback speed. These transients are often undetectable by ear, but they will cause bad transcription errors.

Otherwise 44100 Hz sampling rate, 16-bit, in stereo, is advised. If you don't want all the fiddling of trying to make a UEF or CSW or TIBET out of it, you can just upload a WAV or FLAC file (maybe put it on Google Drive?)

(I have an ulterior motive: I like to keep original recordings of as many tapes as possible -- they're useful for Quadbike testing.)
Eleccy
Posts: 21
Joined: Mon Mar 21, 2022 10:24 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by Eleccy »

I have a couple of tape recorders, I can probably record a wav file without too much bother. I think i'll need to order an audio cable first though.

I'll see what i can do, would be nice to make a small contribution to the elite project :D
bob147
Posts: 340
Joined: Thu May 02, 2019 10:02 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by bob147 »

Preservation is a funny thing. At the time, I imagine the devs wanted this dodgy version buried, forgotten, never spoken of again. Now it's a rare desirable find because it's broken! :D good luck with your tape dumping adventure.
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

Eleccy wrote: Mon Mar 18, 2024 11:05 pm I have a couple of tape recorders, I can probably record a wav file without too much bother. I think i'll need to order an audio cable first though.

I'll see what i can do, would be nice to make a small contribution to the elite project :D
That would be absolutely brilliant - it really would be something to preserve the original release of Electron Elite. Good luck! :D

Mark
Eleccy
Posts: 21
Joined: Mon Mar 21, 2022 10:24 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by Eleccy »

bob147 wrote: Tue Mar 19, 2024 8:16 am Preservation is a funny thing. At the time, I imagine the devs wanted this dodgy version buried, forgotten, never spoken of again. Now it's a rare desirable find because it's broken! :D good luck with your tape dumping adventure.
Yes it is wierd, for many years i thought the electron version was that version and had one galaxy because of machine limitations. Had never heard it was a bug and got patched!

Although as i recall you could buy a galactic hyperdrive if you wanted to waste 5000Credits
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

Eleccy wrote: Sun Mar 17, 2024 10:16 pm
MarkMoxon wrote: Sat Jun 11, 2022 8:58 pm And if anyone else out there has a copy of the original bugged Electron version, do let me know!
I do sill have the tape actually, haven't tried loading it recently but presume it still works.. Whats a good way to get you a copy? I'm not sure offhand how to make a uef file, could look into that. Or failing that i'd be willing to post the cassette
So... I apologise for this, but I just checked the UEF for Electron Elite from Ian Bell's site, and this version contains the galactic hyperspace bug! It also has a file called "V1" on the tape, so it looks like the original bugged version has been staring me in the face all this time. So it turns out that there's no need to WAV your tape. Whoops! Sorry about that.

I seem to remember trying to crack the tape protection and failing, which is probably why I haven't analysed it yet. To get around this I might just take a memory dump of the loaded game and compare the binaries, as I'm not a very good pirate, it turns out. If anyone fancies cracking the tape protection for Electron Elite to extract the binaries, here's a link to the UEF:

http://www.elitehomepage.org/archive/a/a4090000.zip

(Edit: corrected link)

The binaries are encrypted, which I can cope with, but it's the tape protection I'm stuck on (though I guess I can always set a breakpoint just after the binary is loaded and before it's decrypted, so perhaps that's an easier approach than tape-hacking!).

In the meantime, I'm off to hunt for the instructions that cause the bug, so I can roll another variant into the repository.

Mark
Last edited by MarkMoxon on Thu Mar 21, 2024 3:06 pm, edited 3 times in total.
User avatar
Diminished
Posts: 1235
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by Diminished »

MarkMoxon wrote: Thu Mar 21, 2024 12:06 pma file called "V1" on the tape
It may be unwise to read too much into the meaning of "V1". Many early Acornsoft tapes have these zero-length files on them, and I don't know what they're for. It is tempting to interpret them as software version numbers, but I don't know whether this is actually the case.

(Thanks to the Snapper source code, we do actually have the software that generated these files).
This link is broken.
bob147
Posts: 340
Joined: Thu May 02, 2019 10:02 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by bob147 »

http://www.elitehomepage.org/archive/a/a4090010.zip

This worked through my browser

Edit - corrected file name to avoid confusion
Last edited by bob147 on Thu Mar 21, 2024 1:59 pm, edited 1 time in total.
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

Diminished wrote: Thu Mar 21, 2024 1:11 pm This link is broken.
Weird! I copied that link from Ian Bell's site from the bottom of this page, so it looks like the link is broken on his site:

http://www.elitehomepage.org/c64/index.htm

Anyway, should have been .org not .com, as bob147 says. I've edited the original.

Mark
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

Diminished wrote: Thu Mar 21, 2024 1:11 pm
MarkMoxon wrote: Thu Mar 21, 2024 12:06 pma file called "V1" on the tape
It may be unwise to read too much into the meaning of "V1". Many early Acornsoft tapes have these zero-length files on them, and I don't know what they're for. It is tempting to interpret them as software version numbers, but I don't know whether this is actually the case.
Interesting! I don't remember seeing any different V numbers either, come to think of it. Are there any V1.1's or V2's out there?

Regardless, I will ignore these files from now on. Thanks!

Mark
User avatar
Diminished
Posts: 1235
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by Diminished »

MarkMoxon wrote: Thu Mar 21, 2024 1:50 pmAre there any V1.1's or V2's out there?
Here's my Electron Snapper:
Screenshot 2024-03-21 at 14.12.05.png
The two repeats of the same data are labelled using .1 and .2 suffixes. I don't know if I've ever seen a V2.x. Perhaps I have, and I just don't remember.
bob147
Posts: 340
Joined: Thu May 02, 2019 10:02 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by bob147 »

Is it not in fact http://www.iancgbell.clara.net/elite/ar ... 090000.zip which is labelled aco rather than sup? I'm assuming acornsoft release is older than superior software
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

bob147 wrote: Thu Mar 21, 2024 2:35 pm Is it not in fact http://www.iancgbell.clara.net/elite/ar ... 090000.zip which is labelled aco rather than sup? I'm assuming acornsoft release is older than superior software
Ah, yes, you are right. I really shouldn't have bothered to post that link, should I? :D

Just to correct my earlier incompetence:

Acornsoft:
http://www.iancgbell.clara.net/elite/ar ... 090000.zip
http://www.elitehomepage.org/archive/a/a4090000.zip

Superior:
http://www.iancgbell.clara.net/elite/ar ... 090010.zip
http://www.elitehomepage.org/archive/a/a4090010.zip

I think the Acornsoft one contains the galactic hyperspace bug. Presumably the Superior one doesn't, I haven't checked.

Edit: The Acornsoft one contains the galactic hyperspace bug, while the Superior one doesn't.

Mark
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

Following the penny-drop that Ian Bell's site contains both the bugged and bug-fix versions of Acorn Electron Elite, I have extended my electron-elite-beebasm repository to support the building of both variants; see the repository README for details.

The original Acornsoft version from Ian Bell's site has the bugged galactic hyperdrive. It fails to work because the internal hyperspace counter doesn't get set to a non-zero value, so the countdown never starts.

Interestingly, not only dpes it have the bugged galactic hyperdrive, but it has a different galactic hyperdrive too; if it had worked it would have been triggered by CAPS-LOCK-H instead of CTRL-H, it would have counted down from 5 instead of 15, and it would have dropped you at a random system in the next galaxy, rather than the nearest system to (96, 96) as with all the other versions. It's an interesting variant!

You can see the differences between the variants by searching the source code for _IB_SUPERIOR (for features in the Superior Software variant) or _IB_ACORNSOFT (for features in the Acornsoft variant). Note that the variants I've analysed are the ones from Ian Bell's website; I don't know if these differ from the officially released cassettes.

That's another variant ticked off the list, anyway.

Mark
bob147
Posts: 340
Joined: Thu May 02, 2019 10:02 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by bob147 »

Thats so cool, that little bug hiding an electron exclusive hyperdrive implementation.
Eleccy
Posts: 21
Joined: Mon Mar 21, 2022 10:24 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by Eleccy »

MarkMoxon wrote: Thu Mar 21, 2024 12:06 pm
So... I apologise for this, but I just checked the UEF for Electron Elite from Ian Bell's site, and this version contains the galactic hyperspace bug! It also has a file called "V1" on the tape, so it looks like the original bugged version has been staring me in the face all this time. So it turns out that there's no need to WAV your tape. Whoops! Sorry about that.
No worries, I hadn't made any progress with that.Glad you located the elusive bugged version
MarkMoxon wrote: Fri Mar 22, 2024 4:23 pm
The original Acornsoft version from Ian Bell's site has the bugged galactic hyperdrive. It fails to work because the internal hyperspace counter doesn't get set to a non-zero value, so the countdown never starts.

Interestingly, not only dpes it have the bugged galactic hyperdrive, but it has a different galactic hyperdrive too; if it had worked it would have been triggered by CAPS-LOCK-H instead of CTRL-H, it would have counted down from 5 instead of 15, and it would have dropped you at a random system in the next galaxy, rather than the nearest system to (96, 96) as with all the other versions. It's an interesting variant!
Thats really interesting, thanks for sharing :)
cjpinder
Posts: 31
Joined: Fri Jul 03, 2020 6:00 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by cjpinder »

MarkMoxon wrote: Fri Mar 22, 2024 4:23 pm The original Acornsoft version from Ian Bell's site has the bugged galactic hyperdrive. It fails to work because the internal hyperspace counter doesn't get set to a non-zero value, so the countdown never starts.
I don't think this is why it doesn't work because it was possible to get it to work by repeatedly hammering some keys down. I remember reading about the workaround in Electron User and getting it to work BITD.
MarkMoxon wrote: Fri Mar 22, 2024 4:23 pm Interestingly, not only dpes it have the bugged galactic hyperdrive, but it has a different galactic hyperdrive too; if it had worked it would have been triggered by CAPS-LOCK-H instead of CTRL-H, it would have counted down from 5 instead of 15, and it would have dropped you at a random system in the next galaxy, rather than the nearest system to (96, 96) as with all the other versions. It's an interesting variant!
The different key combination (CAPS-LOCK-H) is probably what stopped it working. Maybe something to do with how that key combo was read, or couldn't be read.

Christian.
paulb
Posts: 1767
Joined: Mon Jan 20, 2014 9:02 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by paulb »

cjpinder wrote: Sun Mar 24, 2024 11:48 pm The different key combination (CAPS-LOCK-H) is probably what stopped it working. Maybe something to do with how that key combo was read, or couldn't be read.
There are two differing descriptions in Electron User of a supposed remedy:

"Don't Give Up - It Works!", Electron User, June 1985.
"Mission impossible", Electron User, April 1987.

The former, more complete, description involves Func+Ctrl+H whereas the latter, brief mention of the remedy involves Ctrl+H+V+Space instead.

Without spending much time reviewing the keyboard circuit, and considering keyboard matrix circuits generally, I could imagine that phantom keypresses might be conjured up by combinations of keys.
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

cjpinder wrote: Sun Mar 24, 2024 11:48 pm
MarkMoxon wrote: Fri Mar 22, 2024 4:23 pm The original Acornsoft version from Ian Bell's site has the bugged galactic hyperdrive. It fails to work because the internal hyperspace counter doesn't get set to a non-zero value, so the countdown never starts.
I don't think this is why it doesn't work because it was possible to get it to work by repeatedly hammering some keys down. I remember reading about the workaround in Electron User and getting it to work BITD.
Whoops! Thanks Christian, I got that wrong. I've corrected my commentary. Instead, the issue that I meant to describe is that the first tick of the galactic hyperspace countdown can take a varying amount of time, depending on the value of QQ22 when the countdown starts (so it could take 255 main loop iterations to tick down the first number in the countdown, in a worst case scenario). But it would still start ticking, so you are absolutely correct that this isn't the part of the code that breaks the hyperdrive in the first place.
cjpinder wrote: Sun Mar 24, 2024 11:48 pm The different key combination (CAPS-LOCK-H) is probably what stopped it working. Maybe something to do with how that key combo was read, or couldn't be read.
Makes sense. To work, the code first needs to detect H to jump to hyp, and then to detect CAPS LOCK to jump to Ghy, so presumably holding down both keys breaks the detection of at least one of them?

Thanks for pointing that out!

Mark
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Flicker-free Elite for all versions (inc. 6502SP and Elite-A)

Post by MarkMoxon »

paulb wrote: Mon Mar 25, 2024 12:22 am
cjpinder wrote: Sun Mar 24, 2024 11:48 pm The different key combination (CAPS-LOCK-H) is probably what stopped it working. Maybe something to do with how that key combo was read, or couldn't be read.
There are two differing descriptions in Electron User of a supposed remedy:

"Don't Give Up - It Works!", Electron User, June 1985.
"Mission impossible", Electron User, April 1987.

The former, more complete, description involves Func+Ctrl+H whereas the latter, brief mention of the remedy involves Ctrl+H+V+Space instead.

Without spending much time reviewing the keyboard circuit, and considering keyboard matrix circuits generally, I could imagine that phantom keypresses might be conjured up by combinations of keys.
Interesting! The first one does say to press CAPS LOCK and H (and CTRL and FUNC as well), so I'm guessing that it's the first combination that eventually does the trick. The second one (CTRL, H, V, space) doesn't seem to fit the code, so it would have to rely on keyboard weirdness to work. Or it could just be bad advice; they don't sound terribly confident in it!

Mark
Post Reply

Return to “8-bit acorn software: classic games”