ST 1MB: Williams Defender WIP

Latest news in the Atari world

Moderators: Mug UK, Silver Surfer, Moderator Team

Post Reply
sark02
Atari freak
Atari freak
Posts: 73
Joined: Sat Feb 15, 2025 11:23 am

ST 1MB: Williams Defender WIP

Post by sark02 »

Here's a work-in-progress port of the 6809E Williams Defender sources from the HistoricalSource repo on github https://github.com/Historicalsource/Defender, to the Atari ST, running at 50Hz and requiring at least 1MB RAM.

The algorithms and game play are by Eugene Jarvis, Sam Dicker, et al.. If it feels like Defender, then that's because of them. If it doesn't, then that's because of me.

Work-In-Progress. Currently implemented bad guys are Landers, Mutants, and UFOs. At the end of a game, the game restarts. No attract mode or high-score table yet.

Keys are:

D/C Up/Down

S Smart Bomb

F Hyperspace

M Thrust

L Fire

SPACE Reverse

Let me know if you encounter problems, or game play issues.
You do not have the required permissions to view the files attached to this post.
User avatar
chronicthehedgehog
Captain Atari
Captain Atari
Posts: 340
Joined: Sun May 08, 2022 5:24 pm
Location: The Midlands

Re: ST 1MB: Williams Defender WIP

Post by chronicthehedgehog »

I love that game. It will be good to have an arcade accurate version on the ST
:cheers:
User avatar
chronicthehedgehog
Captain Atari
Captain Atari
Posts: 340
Joined: Sun May 08, 2022 5:24 pm
Location: The Midlands

Re: ST 1MB: Williams Defender WIP

Post by chronicthehedgehog »

I had a quick look and you've nailed the look, feel and sound of it.

If you get time, it would be cool to support the JagPad or have redefinable keys.

Great work!
User avatar
AtariCrypt
Atari Super Hero
Atari Super Hero
Posts: 556
Joined: Fri Mar 14, 2014 5:04 pm
Location: Lancashire, England
Contact:

Re: ST 1MB: Williams Defender WIP

Post by AtariCrypt »

Like - WOW - I've just played and I agree with chronicthehedgehog. This feels authentic but is also so smooth and responsive. The keys are a bit awkward for me so yeah, I'd love the same joystick/pad support. Excellent work!!
AtariCrypt - Atari ST gaming website
https://ataricrypt.blogspot.com
sark02
Atari freak
Atari freak
Posts: 73
Joined: Sat Feb 15, 2025 11:23 am

Re: ST 1MB: Williams Defender WIP

Post by sark02 »

Thanks for the feedback. I haven't touched an ST in... well... about 35 years, so I'm unfamiliar with the JagPad. Let me do some googling, otherwise if you have any sort of technical reference docs I'd appreciate it.

Here's today's build, with Bombers and Swarmers - completing the list of baddies. Next step is finishing the attract mode, and a high-score table. Then I can take a look at some sort of configuration, like keys and gamepad. I thought joystick control might be a bit tricky. I remember playing Defender and Dropzone on the 8-bits, and going from the joystick to the keyboard was prone to error... But that (at least) is simple enough to add.

Thanks again for checking it out.
You do not have the required permissions to view the files attached to this post.
User avatar
chronicthehedgehog
Captain Atari
Captain Atari
Posts: 340
Joined: Sun May 08, 2022 5:24 pm
Location: The Midlands

Re: ST 1MB: Williams Defender WIP

Post by chronicthehedgehog »

sark02 wrote: Wed Feb 19, 2025 7:52 pm Thanks for the feedback. I haven't touched an ST in... well... about 35 years, so I'm unfamiliar with the JagPad. Let me do some googling, otherwise if you have any sort of technical reference docs I'd appreciate it.

Here's today's build, with Bombers and Swarmers - completing the list of baddies. Next step is finishing the attract mode, and a high-score table. Then I can take a look at some sort of configuration, like keys and gamepad. I thought joystick control might be a bit tricky. I remember playing Defender and Dropzone on the 8-bits, and going from the joystick to the keyboard was prone to error... But that (at least) is simple enough to add.

Thanks again for checking it out.
Yep mixed joystick/keyboard games can be tricky. I'd probably take the keyboard over that :)
Tbh, probably not many people will have JagPads for their STEs/Falcons so I feel a bit selfish for suggesting it. They do have a lot of buttons though :)

Some info here, but I have no personal experience of coding for it.
https://docs.dev-docs.org/htm/search.ph ... d+joystick
sark02
Atari freak
Atari freak
Posts: 73
Joined: Sat Feb 15, 2025 11:23 am

Re: ST 1MB: Williams Defender WIP

Post by sark02 »

Thanks for the FAQ; I'll add it to my reading list!

With the sampled sound, the ST can get a little choppy when things get busy. Handling ~10,000 interrupts/sec takes a toll. If you notice that in real gameplay, you can press Q to turn off sound and things should stay smooth. I was considering a STE-specific build, using the STEs DMA sound to relieve the CPU, but the STE-format samples blow past the 1MB limit, so it would be a 2MB game... making it more of a tech demo than a widely playable game, as I suspect most STE owners have 1MB machines. Still, investigating this is on my TODO. Might still be worth it, even as a tech demo.
User avatar
Ragstaff
Atari Super Hero
Atari Super Hero
Posts: 807
Joined: Mon Oct 20, 2003 3:39 am
Location: Melbourne Australia
Contact:

Re: ST 1MB: Williams Defender WIP

Post by Ragstaff »

sark02 wrote: Wed Feb 19, 2025 8:56 pmas I suspect most STE owners have 1MB machines. Still, investigating this is on my TODO. Might still be worth it, even as a tech demo.
I'm not challenging your overall point and I'm sure many people appreciate the 1mb target from an authenticity perspective. However for the record I believe most STE's have upgraded RAM. A few forum threads have touched on it over the years and even at the end of ST Format's life there was a reader survey. There may be a self selecting cohort bias at play but every time the result is that most people have more RAM.
I remember in the late 90's, early 2000's when 1mb 30 pin Simms were almost worthless. I had tubs of them. I'd leave the case off my STE and swap in and out all day for compatibility reasons
sark02
Atari freak
Atari freak
Posts: 73
Joined: Sat Feb 15, 2025 11:23 am

Re: ST 1MB: Williams Defender WIP

Post by sark02 »

Thanks for the data point. I guess my viewpoint is rooted around 1990, where me my circle of university friends had mostly STs and a few STEs, and they were all 1MB. Didn't know anyone back then with more than that. Who knew times moves on and people upgrade their machines? :-)
CiH
Atari God
Atari God
Posts: 1261
Joined: Wed Feb 11, 2004 4:34 pm
Location: Middle Earth (Npton) UK
Contact:

Re: ST 1MB: Williams Defender WIP

Post by CiH »

I'll add my vote for a 2MB STE version.

Being one of those smug buggers with 4MB :mrgreen:
"Where teh feck is teh Hash key on this Mac?!"
User avatar
DarkLord
Ultimate Atarian
Ultimate Atarian
Posts: 5761
Joined: Mon Aug 16, 2004 12:06 pm
Location: Prestonsburg, KY - USA
Contact:

Re: ST 1MB: Williams Defender WIP

Post by DarkLord »

I don't have 1 single machine in the ST family that has less than 4 megs of RAM (and one,
my STacy, has 12 megs of RAM). :cheers:
Welcome To DarkForce! http://www.darkforce.org "The Fuji Lives.!"
Atari SW/HW based BBS - Telnet:darkforce-bbs.dyndns.org 1040
User avatar
Atari030
Atari Super Hero
Atari Super Hero
Posts: 782
Joined: Mon Feb 27, 2012 6:14 am
Location: Melbourne, Australia

Re: ST 1MB: Williams Defender WIP

Post by Atari030 »

Five 4MB Mega/STE's, and two 14MB Falcons here. Two Jag pads as well. Looking forward to having a crack. :-) Everyone I know has 4MB.
User avatar
Ragstaff
Atari Super Hero
Atari Super Hero
Posts: 807
Joined: Mon Oct 20, 2003 3:39 am
Location: Melbourne Australia
Contact:

Re: ST 1MB: Williams Defender WIP

Post by Ragstaff »

As we are risking self selecting cohort bias, can we put a call out for anyone who has an STE with only 1mb of RAM? There must be a few, and I would genuinely love to know! Also, I'm not trying to prove a point and pressure the OP to change target platform if he doesn't want to, or is attached to it for other reasons.
Btw, I forgot to mention in my previous post that even in the late 90's, that ST Format survey showed something like 85% of STE respondents had 2 or 4mb of RAM. BUT we must remember that by that point in time, the demographic was already tilted towards enthusiasts more than casual users.
Don't you hate re-reading a previous post and realising you forgot to make the actual point you started typing for? :lol:
User avatar
Atari030
Atari Super Hero
Atari Super Hero
Posts: 782
Joined: Mon Feb 27, 2012 6:14 am
Location: Melbourne, Australia

Re: ST 1MB: Williams Defender WIP

Post by Atari030 »

It would be interesting to know what everyone uses. STFM's are nice but for the most part the STE is the chariot of choice if you want to get anywhere and because we are all enthusiast now I'd bet that percentage is quite a bit higher than it used to be.

And then there are the, ahem, emulator crowd......

I have 2 MSTE's and 3 STE's but I also 2 MST's, an original ST and 5 STFM's. I know Falcons are a bit far up the flagpole for most. In the end whatever platform its written for we will most likely be happy. :-)
User avatar
Marakatti
Atari God
Atari God
Posts: 1415
Joined: Sat Jun 18, 2005 9:58 am
Location: Finland
Contact:

Re: ST 1MB: Williams Defender WIP

Post by Marakatti »

Wow, a great conversion indeed with an excellent sound fx and action! Takes a while to get used to the keyboard controls, but worth it. Fantastic work!

And considering STe specs, I believe most users already have 4mb of RAM, as it has been practically free to upgrade using old PC SIMMs for decades.
--------------------------< Member of Atarimania >-------------------/|\---
---/|\---------------< ST / STe / Falcon030 / TT030 >---------------------
-< archiving and researching software history since the mid 90's >-
--------------------------> www.atarimania.com <--------------------------
User avatar
AtariCrypt
Atari Super Hero
Atari Super Hero
Posts: 556
Joined: Fri Mar 14, 2014 5:04 pm
Location: Lancashire, England
Contact:

Re: ST 1MB: Williams Defender WIP

Post by AtariCrypt »

2 STe computers and a Mega STe
All have 4mb..

I’ve two older ST(f) computers wimping out with “only” 1mb ;)

STe is the way to go .. my 2c … :cheers:
AtariCrypt - Atari ST gaming website
https://ataricrypt.blogspot.com
sark02
Atari freak
Atari freak
Posts: 73
Joined: Sat Feb 15, 2025 11:23 am

Re: ST 1MB: Williams Defender WIP

Post by sark02 »

Ha! Ok, ok... Message received! I've started to look at STE DMA sound...
danboid
Captain Atari
Captain Atari
Posts: 167
Joined: Wed Aug 21, 2024 9:20 pm
Contact:

Re: ST 1MB: Williams Defender WIP

Post by danboid »

I have tested this on my 520STFM w/ 4 MB RAM and it works wonderfully! This is one of the best arcade conversions I've seen on the ST. Joust and Toki are another notable couple for me.

Do you plan to open source this? What language(s) have you used if not m68k?

A start has been made on a Uzebox Defender but I don't think its reached a playable state yet.
The 'Uzebox Omega is a fully open source games console that you can build in a weekend, even with no previous electronics experience:

https://uzebox.org/wiki/Omega
Straker
Atarian
Atarian
Posts: 4
Joined: Fri Sep 15, 2023 9:59 pm

Re: ST 1MB: Williams Defender WIP

Post by Straker »

My favourite game of all time. It plays perfectly. Thank you for making my day :-)
User avatar
spiny
Disk Imager Supreme
Disk Imager Supreme
Posts: 2884
Joined: Mon Aug 11, 2003 11:53 pm
Location: just outside bristol
Contact:

Re: ST 1MB: Williams Defender WIP

Post by spiny »

it's about £10 to upgrade an STe to 4meg, I'd be incredibly surprised if anyone out there hasn't yet, unless like me they own more than one.
I also have 4meg FMs and a couple of 12Meg machines, though these are Alt-Ram - I have literally no idea how that particular memory can be used, if at all, outside of Gem :) Note to anyone wanting to comment on alt ram, please start a new thread :)
elliot
Captain Atari
Captain Atari
Posts: 390
Joined: Tue Mar 17, 2009 2:00 pm

Re: ST 1MB: Williams Defender WIP

Post by elliot »

I think most people with an STE have 4mb now.

I am officially very bad at this game.
Falcon with CT60 in rack mountable case. Two STFMs, one upgraded lots. My original STE from when I was a teen with Switchable TOS, 1.44Mb drive, 4MB RAM, Supra Hard Drive and very very yellow case. Mega STE with (currently none working) Crazy Dots 2. Atari 2600 and a Jag. And a mountain of commercial software and lots of hardware addons.
elliot
Captain Atari
Captain Atari
Posts: 390
Joined: Tue Mar 17, 2009 2:00 pm

Re: ST 1MB: Williams Defender WIP

Post by elliot »

Okay so if by 10,000 interrupts I assume the samples are playing at 10Khz on a 1Mb so going to 12.5Khz of STE pushes it over 1Mb by just a bit. If we all agree we have 4Mb STEs can we do the samples at 25Khz?

Go big or go home!

Is it also one sample at a time playing (i.e. if a new sample needs to be played the old sample gets stopped half way through)? On an STE you could set DAC DMA to play a looping sample buffer (buf length = length biggest sample + a bit) in Stereo and mix the next sample on the other channel. Old sample keeps playing and new sample comes in whilst old finishes. You could use the blitter (seeing as not being used) to load the new sample and also use it to clear any old one. I did this in a game, you set the DAC DMA in a loop and leave it playing nothing and just load left or right with sample data when needed (it is just even or odd, Blitter is happy with that using X,Y stuff) and clear once you test that left or right sample has finished. The "plus a bit" is to give you time to make sure your test for the completion of the old sample has finished (this "plus a bit" means you can test less often) then you just clear that "side" of the buffer.

Pseudo code idea is;

Play NewSample(sam)
If lastsample = LEFT then
Blit From sam to CurrentPlayBackLoc.Right of Length = BufLen - (CurrentPlaBackLoc - BufLocation)
Blit From Sam + (CurrentPlaBackLoc - BufLocation) to BufLocation With Length sam.length - (CurrentPlaBackLoc - BufLocation))
lastsample = RIGHT
Else
Blit From sam to CurrentPlayBackLoc.Left of Length = BufLen - (CurrentPlaBackLoc - BufLocation)
Blit From Sam + (CurrentPlaBackLoc - BufLocation) to BufLocation With Length sam.length - (CurrentPlaBackLoc - BufLocation))
lastsample = Left
End

Periodic test of of the buffer whether the CurrentPlaybackLoc for Left or Right has past the end of playing the last sample means you need to clear the Left or Right at that point. Also, if the Blitter is used for nothing else you will find that many of the Blitter registers will be pre filled for you. From memory this is "frowned upon" but....

I have no idea if that makes sense.
Falcon with CT60 in rack mountable case. Two STFMs, one upgraded lots. My original STE from when I was a teen with Switchable TOS, 1.44Mb drive, 4MB RAM, Supra Hard Drive and very very yellow case. Mega STE with (currently none working) Crazy Dots 2. Atari 2600 and a Jag. And a mountain of commercial software and lots of hardware addons.
chicane
Captain Atari
Captain Atari
Posts: 268
Joined: Mon Jul 02, 2012 11:25 am
Location: Leeds, UK

Re: ST 1MB: Williams Defender WIP

Post by chicane »

Great project OP - thanks for your work. It brings together two of my favourite topics - arcade pefrect conversions and 50fps on the humble ST. 😀

In terms of sound, you might consider using a software mixer to play multiple samples simultaneously if cpu time permits.

Masteries on this very forum kindly provided me with the base technology and we extended and used it to great effect in Lotus and Faster.

I’m more of a graphics coder but I must admit that good sound adds so much to the overall experience of playing a game.
sark02
Atari freak
Atari freak
Posts: 73
Joined: Sat Feb 15, 2025 11:23 am

Re: ST 1MB: Williams Defender WIP

Post by sark02 »

danboid wrote: Thu Feb 20, 2025 6:12 pm Do you plan to open source this? What language(s) have you used if not m68k?
Yes, I'll throw it up on github once it's finished and I've done a cleanup pass. I'm not particularly protective of it, as it's not my game, just my technical port, and sharing technical examples makes us all better.

It's mostly in 'C', hand-converted function by function from the original 6809E assembler source, with 68k assembler for task scheduling, and then my own 'C' and 68k assembler for sprite shifting/plotting, interrupts, and sound. Tools-wise, it's all programmed on Linux and cross-compiled, then tested on Hatari, then when I do a build I'm going to post, I create a .ST file and test it on STEEM on Windows.

I do have a 1MB Atari ST, but it's in storage and hasn't been powered on since the early '90s... I started this effort in November and posted a few early builds in January to AtariAge, as I wanted the lower border overscan tested on a real machine.. with hilariously broken results. I appreciate the patience of a few folks over there...

I have STE DMA sound in now, and the ship can be flown with a (classic) joystick. Just working on putting it all together so a single .ST file will work on both an ST or a STE, and use either YM samples or STE-DMA samples according to machine capabilities and RAM (so a 1MB STE would use YM samples as the DMA samples are too big to fit).
elliot wrote: Fri Feb 21, 2025 1:27 am Okay so if by 10,000 interrupts I assume the samples are playing at 10Khz on a 1Mb so going to 12.5Khz of STE pushes it over 1Mb by just a bit. If we all agree we have 4Mb STEs can we do the samples at 25Khz?

Go big or go home!
For the new STE code, I'm playing most samples at 12.5kHz. I'll do a test to see if I can hear any difference at 25kHz... But the Defender sound board doesn't emit particularly complex sounds, so there might not be any improvement (just a longer wait at startup).

On mixing multiple samples: The Defender arcade game has a separate sound board running a CPU that generates a single wave at a time. When multiple sounds want to play, Defender prioritizes each sound and sends the highest-priority sound byte to the sound board to play. So, no need to mix anything - only one sound ever plays at any one instant.

Thanks all for the feedback!
sark02
Atari freak
Atari freak
Posts: 73
Joined: Sat Feb 15, 2025 11:23 am

Re: ST 1MB: Williams Defender WIP

Post by sark02 »

Here is today's build, supporting DMA samples on STEs with 2MB+ of RAM, or YM2149 samples on STEs and STs with 1MB RAM. STEs with DMA sound will have much less chop when the screen gets busy.

Most of the STE samples are 12.5kHz. A few, where I could hear a difference, are 25kHz, but not all as that blew beyond 2MB.

Initial classic joystick support is in, supporting joystick 1 up/down/left/right/fire.

Let me know if you have problems, and thanks or the feedback!
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “News & Announcements”