Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by dudleysoft71 »

My latest BBC Micro port is a version of a game most of you here should be familiar with (even if you aren't with this particular version),

Elite - The New Kind was a PC port released in 2001, this is the original 1.0 release, there was a later 1.1 version but I cannot find source code for that version.

This game was written using the Allegro library, I've ported this to the beebScreen library.

This version is kind of a hybrid version, since sound via the PiTubeDirect is still an issue and work in progress, and since this is based on the original Elite, I decided that the best method of putting sound in was to use the same sounds as the original BBC Micro version, since there is nicely annotated source for Elite it was easy to pull those effects out (it uses 4 envelopes and has just 10 sound effects in total), so I just use the same audio as the original Beeb.

There is one major difference between this version and the original Beeb version, this version is exclusively in Mode 2, no split mode, I did consider changing it to use a split mode, I may look into it in future once I've sorted out mode 1 dithering (and NULA dithering), but for now it's Mode 2 for the full screen, however that does mean that we can have stuff like this:
tnk_space.png
and this:
tnk_title.png
(note these are older shots, I've cleaned up the scanner panel since taking these, and have a cleaner font)

Of course the true value of Mode 2 comes when mixed with the VideoNULA, launching with -N on the command line will enable VideNULA mode, this uses a dynamic 16 colour palette, which makes the control panel look much nicer.

I don't have any screenshots of the NULA version at present :(

You can download an ADFS (unfortuneatly it's too big for a single DFS disk, and relies on directories for it's data and save games so currently it's ADFS only. Once it's loaded it only needs disk access to load and save commanders and save settings.
tnk_options.png
The main menu is accessed by pressing @, this also works in space, although load/save is disabled when in space.

All other keys are the same as the original BBC Micro version,
Cursors don't work in the menu, you have to use S and X for up and down, and < and > for left and right in the star chart views.
tnk_market.png
The market has a highlight cursor you can move up and down, and then buy/sell using left and right.

You can choose to use the solid rendering for ships and stations, or have wireframe, and also choose between wireframe, solid green, SNES (saturn style bands of colour) or Fractal rendering for the planet.

The whole game should be playable, and it includes both missions from the original Beeb Elite, I haven't fully tested it but I have bought and sold between systems and it works well, although the game definitely feels strange running at 50FPS with ships on screen.

To aid starting a new game there is a commander in the save directory called QSTART, this has 1000.0 credits and a docking computer installed, but otherwise it's the same as the normal commander, you can also force this to load on start by calling Elite with *TNK -E

This build works on both the PiTubeDirect Native ARM co-processor, and the ARM7TDMI co-processor in BeebEm and can be booted directory from the ADFS floppy image.

Download here:
Elite-TNK.zip
(98.97 KiB) Downloaded 171 times
There are still a few little graphical niggles I'd like to sort out but the game is basically working.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
marcusjambler
Posts: 1147
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by marcusjambler »

:shock: :shock: =D>
Very awesome work... I'll give it a go at the weekend :D
strawberrytau
Posts: 101
Joined: Sun Mar 11, 2018 8:58 am
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by strawberrytau »

This looks amazing. How do I load from ADFS on a Beeb using TurboMMC and an SD card?
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by dudleysoft71 »

Unfortunately TurboMMC only supports DFS disk images, I'm not sure I can fit this game on a DFS disk image, you need either a physical floppy drive or a Gotek drive, and an ADFS rom installed, or a BeebSCSI had or Pi1Mhz for a hard disk (works even without a floppy controller).

I will look into a floppy version, I think I can move the data to side 2, I hope the graphics will fit into 200k, I haven't looked, there is still space on the 640k ADFS disk image, so it might be possible. I'll have to do a separate build since it will need different file names to load from dfs floppy.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
Lardo Boffin
Posts: 2977
Joined: Thu Aug 06, 2015 7:47 am
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by Lardo Boffin »

That is properly impressive running on my Master! And amazingly fast. :shock:
Adventure Language on GitHub
Atom, issue 5, YARRB + video noise killer
Elk
A number of econetted (is that a word?) Beebs
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA
User avatar
trixster
Posts: 1173
Joined: Wed May 06, 2015 12:45 pm
Location: York
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by trixster »

This really is incredible! Amazing work!
User avatar
trixster
Posts: 1173
Joined: Wed May 06, 2015 12:45 pm
Location: York
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by trixster »

I don’t seem to be able to get this to work on my Master with PiTubeDirect and Datacentre.

I’ve flashed the Elite-tnk.adl onto a fresh cf card and that appears ok on the machine, but loading TNK just seems to sit with a flashing cursor
8DBE574C-E6BC-4E6E-B602-3E3CE9490CCB.jpeg
Any ideas?
User avatar
Lardo Boffin
Posts: 2977
Joined: Thu Aug 06, 2015 7:47 am
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by Lardo Boffin »

I ran it from the disc image on a gotek ok with my Master with Datacentre and pi co proc. I didn't try moving it to the CF card.
Adventure Language on GitHub
Atom, issue 5, YARRB + video noise killer
Elk
A number of econetted (is that a word?) Beebs
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA
User avatar
trixster
Posts: 1173
Joined: Wed May 06, 2015 12:45 pm
Location: York
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by trixster »

Im using ADFS Explorer to flash the image to the cf card. Is it messing up the file names, perhaps?
RobC
Posts: 3816
Joined: Sat Sep 01, 2007 10:41 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by RobC »

Have the load and execution addresses copied across correctly? Try doing *INFO to see what they're set to.
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by dudleysoft71 »

As Rob says the most obvious thing is the load/execute addresses, they should both be F000.

Since its not displayed any text then it hasn't started executing the main game, the first thing it does is displays a banner telling you what it's called, then it will show each data file as it loads it. Then it switches to mode 2 and the game starts.

The only other thing I can think of is that the file has gotten corrupted, how did you put the files on the cf card? I have no experience with the datacentre, the catalogue looks fine, and the filenames look fine, I was wondering if perhaps windows had mangled the file and turned CR into CR/LF.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
trixster
Posts: 1173
Joined: Wed May 06, 2015 12:45 pm
Location: York
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by trixster »

This is what adfs explorer shows
71F4CB0B-AFA4-4AE7-8B62-D8383A8C913E.jpeg
With adfs explorer you can either get it to write an image to the cf card (either an image of an adfs hd or floppy image), or you can format the CF card in the beeb using HDInit on the datacentre and then drag-drop the adfs image onto the mounted cf card in adfs explorer. I’ve used both ways successfully when writing the images of your other release to cf, and using Rob’s Doom images
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by dudleysoft71 »

I use BeebImage to make my adl images (and HDD images), I don't suppose you can load the adl image directly? I don't have the disk image on hand to check, so I can't compare to my own version right now.

Can you try to load the adl image you've got in BeebEm, select the ARM7TDMI coprocessor, and try loading it in there? I find it easier to set it to BBC Master since you don't have to muck around with ROM configurations to get ADFS. But it does run on any model.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
trixster
Posts: 1173
Joined: Wed May 06, 2015 12:45 pm
Location: York
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by trixster »

@Lardo Boffin - could you try running it on your Datacentre?
User avatar
trixster
Posts: 1173
Joined: Wed May 06, 2015 12:45 pm
Location: York
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by trixster »

dudleysoft71 wrote: Tue Jul 20, 2021 11:47 pm
Can you try to load the adl image you've got in BeebEm, select the ARM7TDMI coprocessor, and try loading it in there? I find it easier to set it to BBC Master since you don't have to muck around with ROM configurations to get ADFS. But it does run on any model.
Yes, that works ok so the image is fine.

I can only guess Im not using ADFS Explorer correctly (it's been a while since I used it!), or there's a datacentre incompatibility.

When I try and load it there's quite a long amount of disk activity (5 seconds or so) and then nothing.
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by dudleysoft71 »

Since you're not seeing the banner that probably means it's failed to load the original executable.

Can you try *LOADing just the executable? You should return to the command prompt if it works.

If that works do *GO F000 which should run the game. Might help track down when it's failing.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
Lardo Boffin
Posts: 2977
Joined: Thu Aug 06, 2015 7:47 am
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by Lardo Boffin »

trixster wrote: Fri Jul 23, 2021 6:21 pm @Lardo Boffin - could you try running it on your Datacentre?
Will do.

Will it be a good enough test to just *COPY the files across from the disc image from gotek? I recently replaced my HDD and haven’t yet got round to getting another copy of ADFS Explorer.
Adventure Language on GitHub
Atom, issue 5, YARRB + video noise killer
Elk
A number of econetted (is that a word?) Beebs
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA
User avatar
trixster
Posts: 1173
Joined: Wed May 06, 2015 12:45 pm
Location: York
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by trixster »

dudleysoft71 wrote: Fri Jul 23, 2021 7:40 pm
Can you try *LOADing just the executable? You should return to the command prompt if it works.

If that works do *GO F000 which should run the game. Might help track down when it's failing.
*LOAD TNK seems ok, after a spot of cf access the command prompt comes back, but then *GO F000 results in the flashing cursor and then nothing more
User avatar
Lardo Boffin
Posts: 2977
Joined: Thu Aug 06, 2015 7:47 am
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by Lardo Boffin »

I used TreeCopy to copy the files from the ADFS floppy image to my datacentre CF card and it works fine.
Adventure Language on GitHub
Atom, issue 5, YARRB + video noise killer
Elk
A number of econetted (is that a word?) Beebs
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA
User avatar
trixster
Posts: 1173
Joined: Wed May 06, 2015 12:45 pm
Location: York
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by trixster »

Yeah, I just got it working too :)

As suspected, user error on my part! I wasn’t using adfs explorer correctly. What I was doing was creating a hdd image that was exactly the size of the elite-tnk.adl image, so I think when I was trying to load it it was running out of space!

So I formatted thd cf card as a new 512mb hdd. I then used adfs explorer to extract the contents of elite-tnk.adl to the pc and then drag/dropped them onto the new cf hdd image in adfs explorer. It works now.

Sorry for the false alarms!
RobC
Posts: 3816
Joined: Sat Sep 01, 2007 10:41 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by RobC »

I got it running from my DC yesterday too.

The solid 3D with the full NuLA colours looks amazing and really smooth :shock: =D> =D>

I think using the Beeb sounds works really well as it makes for an amazing combination of the familiar (reminding you that it's running on the Beeb) and the jaw-dropping!
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by dudleysoft71 »

I need to check the timestep since it seems to be running too fast, I thought it might have been due to the game running at 50fps most of the time, but it seems to be even faster than that, so perhaps I'm doing something silly with the update code.

I'm really grateful for the fully documented source code for the original BBC elite, that's what allowed me to use the original sound effects, otherwise I'd have struggled to pull the right data out of the game.

I'll have to come back at some point when I've got a better plan for Mode 1 dithering, it would be nice to get it running in higher resolution, I've tried to make the text as readable as possible, but it's difficult since it was designed for Mode 1 originally, and TNK uses a proportional font and is even higher resolution.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
User avatar
marcusjambler
Posts: 1147
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by marcusjambler »

I've had this and quake running on and off all weekend :D
So fantastic to see this running so smoothly on the beeb... As RobC says the familiarity and newness is awesome...
Even the original keystrip is still relevent :D =D>

I must say it is a little quick although I did manage to dock first try :lol:
Last edited by marcusjambler on Mon Jul 26, 2021 2:01 pm, edited 1 time in total.
RobC
Posts: 3816
Joined: Sat Sep 01, 2007 10:41 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by RobC »

dudleysoft71 wrote: Mon Jul 26, 2021 11:53 am I'll have to come back at some point when I've got a better plan for Mode 1 dithering, it would be nice to get it running in higher resolution, I've tried to make the text as readable as possible, but it's difficult since it was designed for Mode 1 originally, and TNK uses a proportional font and is even higher resolution.
When I was looking at this, I wondered about using mode 1 (or one of the NuLA attribute modes) for the information screens.

I can't remember the details but the algorithm I used for dithering in mode 1 on Doom was fairly simple and seemed to work okay. I can dig out the details if you want?

EDIT: On the speed, I did notice that the hyperspace countdown seemed very fast.
RobC
Posts: 3816
Joined: Sat Sep 01, 2007 10:41 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by RobC »

Had great fun playing this today.

Just wondered if there's a trick to replacing the scanner BMP? I tried modifying scanbbc.bmp so that the 3D scanner looked like the original Beeb one but it messed up the colours for the rest of the screen. (I suspect it might be to do with the palette associated with the BMP as I quickly edited it in MS Paint...)
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by dudleysoft71 »

Yeah, Everything takes it's palette from the scanner, so all the graphics will have to use the same palette as the scanner. It's Probably easiest to set the scanner palette from one of the other bmp files. It should contain the standard BBC palette somewhere within it.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
RobC
Posts: 3816
Joined: Sat Sep 01, 2007 10:41 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by RobC »

Thanks - that did the trick. I prefer the original scanner as it's designed for 128 pixels rather than 256.

Here's what it looks like:
scanbbc.jpg
scanbbc.jpg (6.27 KiB) Viewed 4843 times
And here's the modified disk image in case anyone else wants to use it:
Elite-TNK.zip
(94.05 KiB) Downloaded 68 times
User avatar
Mince
Posts: 524
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by Mince »

I've just stumbled across this — excellent stuff and looks lovely with a VideoNuLA!

I did have a bit of trouble getting everything sorted because the Integra B seems to interfere with it and needed disabling with OSMODE 0 and a powercycle, but it ran OK after that. (I don't know if that's something to do with the VDU driver for the Integra B messing up the VideoNuLA since I think they both will get in there - the Integra B to handle the shadow modes.)

My only grumble is it's TOO fast (even on my Pi Zero), especially when chasing a single ship — is there a way to put some sort of slowdown or frame cap on it? I don't think PiTubeDirect has a speed option for the ARM does it?
BBC Master— PiTube 3A+ PiVDU, PicoTube, Pi1MHz, MMFS, ANFS, MultiOS
BBC B — Integra ß, PiTube Zero 2W, Pi1MHz, MMFS, DFS, ADFS, ANFS
Electron — Plus 1 w/ AP6 2V2, AP5, PiTube 3A+, Pi1MHz, PRES AP3+4, Elkeconet or ATI/ABR, ElkSD 64/Plus 1
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by KenLowe »

Mince wrote: Fri Oct 01, 2021 6:29 pm I've just stumbled across this — excellent stuff and looks lovely with a VideoNuLA!

I did have a bit of trouble getting everything sorted because the Integra B seems to interfere with it and needed disabling with OSMODE 0 and a powercycle, but it ran OK after that. (I don't know if that's something to do with the VDU driver for the Integra B messing up the VideoNuLA since I think they both will get in there - the Integra B to handle the shadow modes.)

My only grumble is it's TOO fast (even on my Pi Zero), especially when chasing a single ship — is there a way to put some sort of slowdown or frame cap on it? I don't think PiTubeDirect has a speed option for the ARM does it?
Thought I'd see if I could get this working on any of my machines with IntegraB. Unfortunately, my beeb that has VideoNuLa installed has a 8271 controller, so I've not been able to test it on that machine. Instead I've loaded it up on another machine with a 1770 controller, and it's loaded up fine from floppy on that machine (with IntegraB active - running in OSMODE 4).

I'll try running it on my VideoNuLa enabled beeb tomorrow, on the assumption that I'll be able to copy the files over to an ADFS HDD and run it from there instead of from an ADFS floppy.
User avatar
dudleysoft71
Posts: 298
Joined: Tue May 26, 2020 6:56 pm
Contact:

Re: Elite - The New Kind BBC Micro + PiTubeDirect + ARM7TDMI (BeebEm)

Post by dudleysoft71 »

KenLowe wrote: Fri Oct 01, 2021 8:49 pm I'll try running it on my VideoNuLa enabled beeb tomorrow, on the assumption that I'll be able to copy the files over to an ADFS HDD and run it from there instead of from an ADFS floppy.
Yeah it should just run off an ADFS hdd image, I used to have an 8271 FDC before I swapped it to a 1770 controller when I moved to a gotek drive, and it worked fine via the 1mhz pi scsi emulator.
James Watson - DudleySoft

BBC Model B 32K - PiTubeDirect, Pi1Mhz, Smally Mouse, Gotek, DFS/ADFS, 4xSWRAM.
Post Reply

Return to “miscellaneous new bbc and electron games”