Street Fighter on the SAM Coupé

HEXdidnt

Well-known member
Joined
13 Jun 2021
Messages
151 (0.28/day)
A few years back, an ambitious coder made a complete conversion of Street Fighter for the SAM Coupé in honour of the game's 30th Anniversary. Considering it's based on the Amiga/Atari ST conversion by Tiertex, it's not bad - about as playable as their 16-bit versions. Graphically, it's a 1:1 conversion from the Amiga (16 colour mode), with the sounds/music coming from the ST version. It even takes advantage of the 1Mb RAM box to remove the need for multi-loading and to deliver 2-layer backgrounds: the skies don't scroll like they do on the arcade, but everything in front of the sky scrolls independently of it when moving around each stage.

Problem is, Tiertex had done their usual lazy, shoddy job, and it wasn't as good-looking as it should have been on the 16 bit machines. This, naturally, carried over to the SAM conversion. The original palette uses something like 7 skin/brick tones, 4 shades of blue (2 of which translated poorly to the SAM, turning purple), 2 shades of grey, then a single red, and rounded off with Black and White. They also cut five of the match backgrounds - the second from each country - so the opponents didn't all have their own unique arenas. Two of the Bonus Stages were edited out entirely, the map was removed and they didn't bother with any of the fighters' portraits, substituting the in-game sprite for all the between-match info screens.

Perhaps the weirdest thing is that Street Fighter didn't have an overabundance of animation in the arcade game - not a patch on the sequel - Ryu had about 75 frames IN TOTAL, with all the others (bar Ken) having far fewer. Even so, Tiertex cut down the animations, so the somersault had about 2 frames of animation versus the arcade's 4, and Ryu's 'walk-on' animation for each stage (a whole 6 frames) was deemed redundant. Perhaps their worst transgression was giving all the sprites black outlines to ensure they stood out against the flat backgrounds.

On a bit of a whim yesterday, I nabbed all the battle stage backdrops from the arcade version and ran them through Photoshop to apply an optimised 16-colour palette (the closest possible SAM analogue to DawnBringer's) just to see what came out.
Optimised Palette.png

Lots of experimentation was required to get the appropriate level of dithering, with some requiring two separate passes - one for the foreground, one for the background (skies in particular were troublesome).

Here are the results:
Mockup Screen.png
A mockup of the screen cropped to 256x192 pixels, with the background and both fighters using the same palette of 16 colours. On a modern LCD screen, the background looks pretty grainy... But I think it'd probably look great on a CRT.

The sprites shown are 1:1 transfers from the arcade game (Ryu stands a colossal 92px tall) with the colours manually trimmed down, since each fighter had a unique palette of circa 16 colours. Some turned out better than others, but still way better than Tiertex's efforts at redrawing the sprites for the home computers (Ryu becoming 80px tall).

And now for the backgrounds... As mentioned, all of these are derived from the arcade graphics, and all I've done is reduce them to the 16 colours of the optimised palette shown above, using Photoshop's Indexed Colour options, then trimmed them vertically to 192px tall.

China #1
Backdrop-China-Gen-SAM.png

China #2
Backdrop-China-Lee-SAM.png

England #1
Backdrop-England-Birdie-SAM.png

England #2
Backdrop-England-Eagle-SAM.png

Japan #1
Backdrop-Japan-Geki-SAM.png

Japan #2
Backdrop-Japan-Retsu-SAM.png

USA #1
Backdrop-USA-Joe-SAM.png

USA #2
Backdrop-USA-Mike-SAM.png

Thailand #1
Backdrop-Thailand-Adon-SAM.png

Thailand #2
Backdrop-Thailand-Sagat-SAM.png

I've no idea whether it would be feasible to 'remix' the existing SAM conversion, to add in new graphics... but would be cool if possible. Been looking at some other arcade games as well - kind of amazing what this optimised 16-colour palette can adapt itself to...
 

HEXdidnt

Well-known member
Joined
13 Jun 2021
Messages
151 (0.28/day)
Put together a little animation - kind of an 'Attract Mode' thing - featuring some of the converted graphics to date. Note this uses the same 16-colour palette throughout.
Intro-Anim-v2.gif

In theory, it'd be possible to recreate this animation on the SAM itself - it just requires that I transfer the elements over via SimCoupe. Turning the images on the PC into SAM-readable code is the bit I don't know how to do at the moment. If I can figure all that out, I'll try to put together a rolling demo. On a small-ish CRT (or possibly a big one, via RF lead), this would probably look amazing...
 

HEXdidnt

Well-known member
Joined
13 Jun 2021
Messages
151 (0.28/day)
As mentioned earlier in the chat, I've been working on transferring my GIF animation over to the SAM using nothing but BASIC.

I had a bit of a mare in the early afternoon, when I mistakenly over-wrote the disk image in the file transfer utility without having first refreshed to reflect the addition of the BASIC programs, thus losing about 4-5 hours' work. Mostly undaunted, I took another run at it, and completed the first half of the demo earlier this evening. Figured I should leave working on the second half till tomorrow, lest I make another foolish mistake.

The only thing that rescued it was that I'd written down all the necessary coordinates for the initial creation of all the component parts. Eight SCREEN$ are loaded, one at a time. For each one, the GRAB command assigns a defined area of screen to a string, which can then be PUT back wherever you wish. It's even possible to mask a sprite in SAM BASIC - you just GRAB a sprite of equal size, in which the pixels you want use palette slot #15 and the ones you don't use slot #0, then you just PUT the sprite string, followed by the appropriate mask string, at the desired location. The only masks used here are on the four iterations of the Street Fighter logo.

The main drawback is that GRAB has an 8K limit per sprite so, for example, the largest two instances of the Street Fighter logo had to be split. The 'full size' one, with the drop shadow, is actually 4 sprites of 64x154px, while the next one down is two sprites of 90x60px. Each frame of the collapsing wall took two sprites as well.
simc0066.gif
Assuming I get it finished tomorrow, I'll stick it onto an SD card so I can run it on the SAM itself, and bring it along to the meet on Thursday.

Just for fun, I've added one of the SAM's stock sound effects (POW) for the moment the wall first cracks.

It's very convincing.
 

HEXdidnt

Well-known member
Joined
13 Jun 2021
Messages
151 (0.28/day)
In case anyone's interested in viewing the full demo, completed earlier this afternoon, it can be downloaded from my website.

You'll need the SAM Coupé emulator, SimCoupe, to run the demo. The latest version of SimCoupe can be found here, on Simon Owen's GitHub.

I've tried it on my real SAM, and there's a stutter/delay in one of the early frames of the animation... Not sure why, but I may take another look at some point.
 

HEXdidnt

Well-known member
Joined
13 Jun 2021
Messages
151 (0.28/day)
As mentioned at the Club this week, I'm working on an extension to this demo, whereby the levels scroll back and forth. First draft is painfully slow, but it works:
simc0077.gif
The first thing this demo does is load 4 full-screen images and grab the necessary components into memory: the scores/stamina bars/win lights (in 2 halves since the whole thing is marginally over the 8K limit) and the timer from the first, then 32 vertical strips of 8x192px from each of the other 3. It then rebuilds the screen 32 strips at a time, adding the other elements over the top, flipping between two screens and only showing the completed result of each. The reason it's so slow is that it's placing those 35 elements every time, using BASIC.

However, SAM BASIC has a scroll function which can work in either of four directions, so a faster alternative would be to place the 32 strips initially, then just scroll 8px each time and only add a single new strip. Problem is the foreground elements: If I place them on the background, they'd also scroll, so I'd have to re-place the relevant areas of the background, then scroll, add the new strip and put back the foreground elements in each frame. Still, that's a total of 7 elements rather than 35, so it should be correspondingly quicker to move. It won't ever be super-quick or smooth, because it's in BASIC.

Once I'm done with this, I'm planning to see how well this process works with graphics from Street Fighter II... Here's a couple of first drafts:
Stage-Blanka-SAM.pngStage-Ken-SAM.png
Blanka's stage was converted from a single flat image, while Ken's was cobbled together from separate elements on a sprite sheet. In both cases, I manually matched the predominant blue in the sky to one of the colours available in the SAM 16 palette, to reduce stippling to the minimum. I could probably to the same with the darker blue of the sea, to be honest...

...And I've just realised that the first game only has about three or four different sky patterns, and they're palette-swapped between usages: England #2, Japan #1, USA #2 and both Thailand stages use the same light cloud, England #1, USA #1 and Japan #2 use the same heavy cloud. China seems to be the only one with two unique skies.
 
G

GCC

Guest
Your demo i saw down the club looked great and very well done. I looking forward to seeing the other bits you will be adding to it
 

HEXdidnt

Well-known member
Joined
13 Jun 2021
Messages
151 (0.28/day)
I've completed a couple of updates today - some of the stage backgrounds have been updated to reduce the stippling, with the same tricks also applied to the intro animation. Looking forward to seeing it running on the SAM myself (will probably give it a quick run when I visit my folks later), though I'm still a bit baffled by the stalling during the animation. Might transfer it to floppy disk while I'm there, just out of curiosity.

Also, the second demo - stage scrolling - is now very much in progress... Mostly done, in fact, just with a weird bug to figure out, whereby the second round of scrolling goes adrift. Where I originally had one stage scroll back and forth repeatedly, I have now added a menu to select which of the ten stages to view, and it now drops back to the menu having completed a single circuit. Weirdly, grabbing a whole new set of 96 background strips and starting the cycle from scratch doesn't fix the bug.

It's in BASIC, again, so it's quite slow... But looks pretty good, given the arcade game most often scrolls its stages in 8px chunks.
 

HEXdidnt

Well-known member
Joined
13 Jun 2021
Messages
151 (0.28/day)
Kept forgetting to update this to say that I finally solved the bug the day after my previous post. I had two variables governing the vertical slices of each stage, one for grabbing all of them, and then defining which slice to put back in on each scroll movement, and another defining where it should be placed. I found that I was resetting the former, but not the latter, so the slices were put back in the wrong position after the first full cycle. Once I reset the second variable, it all worked perfectly.

What I'll probably try next is saving compressed versions of each screen, to see if there's any way I can get both parts of the demo on a single disk... but I very much doubt it. 780k doesn't go very far...

I've been considering activating a YouTube account so I can upload videos of the complete demo(s) in action, possibly some of the older ones as well. My Aliens Vs. Predator demo from 1991 got uploaded there back in 2012, but I should be able to grab a better version from the emulator...

For the moment, here's the finished Street Fighter 'Attract Mode' demo:

And here's the stage scroller:
 
Last edited:

mikeitstop

Well-known member
Joined
20 Jun 2021
Messages
75 (0.14/day)
This is very cool! I was not a fan of the Amiga version of SFII, after playing on the SNES. On top of everything else - how many disks!!
 

HEXdidnt

Well-known member
Joined
13 Jun 2021
Messages
151 (0.28/day)
Yes, if I remember correctly, the only home versions worth playing were on the SNES/Megadrive... Not only were they not very well written, but the single-button controller was a bit of a stumbling block. Anything more than about three disks really needs to be HD installable, though. The only upside to the Amiga version was that it wasn't done by Tiertex.

The will-they-won't-they finish it remake/tech demo looks decent though...
 
Top Bottom