Good question. First, why it probably isn't the sprite hardware: the Twin Cobra board has 512 sprite entries, and we have measured at most 143 on screen at once. So there is plenty of room.
What does get tight with two players:
– Collisions. On this board a separate DSP (a TMS320C10) does the collision checks. Every extra shot is checked against every enemy, every frame. Two players firing at the Japanese rate roughly doubles that work.
– Object slots. Games like this keep shots in a fixed table in RAM. With two players, the same table has to be shared.
– Balance. Two helicopters at full rate is twice the firepower, and the stages weren't redesigned for that.
Which of these Toaplan actually had in mind, I can't say without comparing the shot code of both versions.
On the Neo Geo it would get tighter, not easier. It has 380 sprites and at most 96 per scanline, and the backgrounds are built from sprite strips too. Even now, our port runs over that line limit in about 0.5 % of frames. More shots means more sprites on the same lines.
And finally: our ports aim to be the original, so the rate of fire stays as Toaplan set it. A mixed version, Twin Cobra's 2P with Kyukyoku Tiger's fire rate, would be a hack, not the arcade game.
How did 1987 arcade games aim at you? 🎯 A look inside Twin Cobra’s math chip
I’m porting Toaplan’s Twin Cobra (1987) to the Neo Geo, and had to read its original code. The board has a secret: next to the 68000 sits a Texas Instruments TMS32010, a 14 MHz signal processor that was really built for audio filters. Toaplan used it as a math co-processor.
The 68000 drops a job into a shared mailbox and pokes a latch. The DSP wakes up, reads the game’s RAM directly, writes the answer back and sets the mailbox to 0 (“done”). It even hands the bus back early and keeps computing while the 68000 carries on. That’s two CPUs in parallel, in 1987.
What it computes, counted over 12,000 frames of play:
• Collision boxes, ~1.6 times every frame. Shots against enemies; on a hit it flags both objects.
• Your own hit check against enemies with their own hit boxes.
• The angle from an enemy to you, so it can aim.
• Steering: homing missiles turn towards you a few steps per frame, always the short way round.
• Distance to the player, without a square root: max + min/2.
• Finding a free slot for a new enemy or bullet.
• At power-on it checksums its own ROM. Wrong sum, no game.
The image shows the “aim at the player” routine. Things I love about it:
1️⃣ No divide instruction. To get dy/dx it shifts the smaller value up 8 bits and subtracts the larger one in a loop, counting the subtractions in an address register (MAR *+), because that’s the free counter.
2️⃣ Divide by 128 in two instructions: load the value shifted left by 9 into the 32-bit accumulator, then store only the high word.
3️⃣ A swap without a temp register, using DMOV. That’s the instruction meant for audio delay lines, used here to swap two variables.
4️⃣ No arctangent table. It works out which of 8 octants you’re in from the signs, takes the base angle from an 8-entry table (40 20 00 20 40 60 80 60) and approximates atan(t) ≈ t inside the octant. It’s off by up to about 4°, and nobody ever noticed.
Result: 128 directions (2.8° each). That’s why Twin Cobra’s bullets come at you from such fine angles.
On the Neo Geo there is no DSP, so I translated its program instruction by instruction into 68000 code. It runs when the game rings the mailbox and costs about 3% of the CPU.
#retrogaming #arcade #neogeo #assembly #gamedev #toaplan
@Real_Format_c Thanks! The second PCB should arrive next week. Then we'll have a complete cart of our own. The one running right now is a KOF 94 program board with EPROMs soldered in 😉 Pictures follow as soon as both boards are in.
Thank you for almost 4,000 impressions overnight for the cart, and nearly as many for Truxton. Since a lot of you asked what this actually is: these are two different things, and I want to be clear about where the difference lies.
1. The cart
It's a board of my own for the MVS system, blank. The memory chips sit in sockets, there's no soldering, and nothing is encrypted. You flash whatever you want to put on it.
It's meant for homebrew, the games people write themselves today, and for your own projects. The cart comes without games. That cart, and only that, is what the planned campaign is about.
2. Truxton
Truxton is a 1988 arcade game by Toaplan, a vertical shooter. My project with it is a hobby: I study how the game works down to the code and bring it to different hardware. The original program code is translated, picture and sound are rebuilt for the new hardware, and in the end it is compared with the original frame by frame.
It runs at my place, on a flash cart, on a CRT. It shows what is technically possible, and I simply enjoy it.
Where the line is
Truxton isn't mine. The code, the graphics and the music belong to the rights holder, even after 36 years. No amount of work that goes into a port changes that.
So for me:
– I don't sell Truxton, on any cart or in any form.
– I don't offer it for download, and there are no ROMs from me.
– Truxton is not part of the campaign. The campaign cart comes blank.
If someone asks "Can I buy the Truxton cart?", the answer is: no. An official version would only be possible with the rights holder, and that would be their decision.
What is fine: the blank cart itself, homebrew, your own games, and games that come with a licence.
My goal stays the same: take a cart out of a drawer, plug it in and play, instead of hunting for the board and the adapter and watching a capacitor pop at power-on.
One last thought. I believe that in a few months, anyone with a little understanding of code will be able to port their games themselves. We are watching the wave build up and pick up speed right now. Will it be a good thing? That's something everyone has to decide for themselves.
Questions are welcome in the comments. 👾
#RetroGaming #Homebrew #Truxton
Fair question. The game itself is equal: the same code runs, and in MAME the port matches the original board's work RAM over 18,000 frames of attract and play, and the picture is pixel-identical to an independent renderer. "Nearly" is about the hardware around it:
– Width. Truxton runs on a vertical monitor with 240 lines, so the playfield is 240 px wide. The Neo Geo shows 224 lines. Turned on its side, that's 8 px missing on the left and on the right. The HUD moves inward so nothing is lost, but the playfield is 16 px narrower.
– Refresh rate. The Toaplan board runs at 57.61 Hz, the Neo Geo at 59.19 Hz. So the frames never land on the screen at exactly the same moments as on the original.
– Busy scenes. The Neo Geo has no tilemaps, so all four Toaplan layers are rebuilt from sprite strips every frame, on top of running the game. When the screen is full, a frame sometimes needs two VBlanks: in normal play about 98 % of the board's speed, in the busiest attract scenes less.
– Sound. The board makes its music live on a YM3812. The Neo Geo has a YM2610, so the music is recorded from the original and played back as ADPCM-A samples, triggered tick for tick by the original sound program. Very close, but samples are not the chip.
And why not better? Because "better" means different. The goal is the game as Toaplan made it, slowdowns included. Anything I "improved" would no longer be the original.
Closest to the original: the original board itself in a candy cab. It costs around €900, and it can reach the end of its life at any moment.
Second closest to the original: the Neo Geo port in a candy cab.
Truxton is nearly arcade perfect on Neo Geo. 🚀 Every port makes the tools smarter, and every mistake is one we won't make again. Goal: every arcade game that's technically possible on Neo Geo. Soon. 👀 #NeoGeo#NeoArcadeProject
Short version: SF2 would be very hard, SF3 is not possible. Long version, because the reasons are the fun part:
The Neo Geo has no tilemap backgrounds. Apart from one fixed 8×8 text layer (40×32 tiles, from a 128 KiB S-ROM, cannot scroll), everything on screen is sprites: 381 of them, each a vertical strip 16 px wide and up to 32 tiles tall. And at most 96 strips per scanline. Line 97 is simply not drawn.
It can only show what is in ROM. Graphics come straight from the C-ROMs; nothing can be drawn into video RAM at runtime. It has no alpha: a pixel is opaque or transparent. Sprites can only shrink, in 1/16 steps horizontally, never grow or rotate. Line effects are possible, but only with the timer interrupt, which costs CPU time.
SF2 (CPS1, 1991)
The good news: same CPU family. A 68000 at 10 MHz against the Neo Geo's 68000 at 12 MHz, so the code itself is not the problem. The rest is:
– Width. CPS1 is 384 px wide, the Neo Geo 320. You either crop 64 px of the stage, or shrink every sprite to 13/16, which throws away 3 of every 16 pixel columns. That's not "looks like back then".
– Layers. CPS1 has three scrolling tilemaps (8×8, 16×16, 32×32) plus sprites. On the Neo Geo each layer has to be rebuilt from strips: about 21 strips per layer per scanline, so 63 of 96 are gone before the first fighter is drawn. What's left has to cover two fighters, projectiles, shadows and the HUD, on the busiest lines.
– Row scroll. The floor perspective in SF2 shifts every line horizontally. A Neo Geo strip has exactly one X position for its whole height. So either the timer IRQ rewrites the X of every floor strip band after band, which costs a lot of CPU, or the floor is cut into horizontal bands made of separate sprites: 16 bands × 21 strips = 336 of the 381 sprites. Both are possible, neither is cheap.
– Priority. CPS1 can change the layer order per frame and mask parts of a layer over the sprites. On the Neo Geo, priority is just the slot order, so the runtime has to keep re-sorting slots.
– Sound. CPS1 is a YM2151 plus an OKI MSM6295. The Neo Geo has a YM2610 and no YM2151, so the music has to be recorded from the original and played back as ADPCM-A samples.
ROM size is actually the smallest problem. SF2 has about 1.5 MiB of program (needs P2 banking on the Neo Geo) and 6 MiB of graphics. Even after converting every tile to 16×16 strips, that is far below the C-ROM limit of 64 MiB, which is 524,288 tiles.
SF3 (CPS3, 1997)
This is where it ends:
– CPU. CPS3 runs a 32-bit Hitachi SH-2 at 25 MHz. We tried translating a 32-bit RISC (an ARM-based board) to the 68000 before. It worked correctly, and it was 43× too slow. An SH-2 at twice the clock of the 68000 is hopeless.
– Graphics in RAM. CPS3 doesn't draw from graphics ROMs. It moves character data into character RAM at runtime. The Neo Geo can only show tiles that were baked into the C-ROM when the cart was built.
– Smooth zoom and translucency. CPS3 scales sprites freely and blends them. The Neo Geo only shrinks in steps and knows only opaque or transparent.
The Neo Geo is a great fighting game machine: KOF, Real Bout, Garou. Those games were designed around its limits. SF2 and SF3 were designed around other ones.
The big goal: one cartridge per game. 🎮 No flash cart, no multicart. A real Neo Geo module for every port, the way collectors want it. Soon. 👀 #NeoGeo#NeoArcadeProject
@NeoCverA@Niko_TypeX to get it right. we will not release or monetize games. Only a DIY cart and empty Eproms. Games will be everywhere soon - AI makes it easy. The cart allows users to have one game on one cart. Cho Ren Sha was only a test of what can be done on a NEO GEO.
Cho Ren Sha 68K now runs natively on Neo-Geo MVS, buttery smooth. On MiSTer: boot via HDMI (31 kHz), switch the game to 15 kHz, and every reset flashes 31 kHz again. Here: plug in the cart, power on, play. 15 kHz from the first second. #NeoGeo#X68000#NeoArcadeProject
@Niko_TypeX@NeoCverA We are talking about real hardware, not mame. Games conversions are normaly distributed in darksoft format. The idea is to burn them on a single cart - for good. One game per cart - no annoying menu everytime. That simple. Just pick your game cart plug and play it. DIY carts.
@NeoCverA We will start a kickstarter campaign soon. MVS cartridge shells with the 2 pcbs and empty eproms. The eproms can be flashed and put into sockets. Basically it is a DIY kit for making your own MVS carts. We will provide converter software from darksoft format to eprom binaries.
Terra Cresta on Neo Geo. 🛸 Original arcade boards are reaching the end of their lifespan. They belong in preservation, not in daily play. Soon you'll be able to play these classics just like the original again. 👀 #NeoGeo#NeoArcadeProject
Another arcade classic ported to Neo Geo: Pandora's Palace (Konami, 1984). 🏛️🔥 Next step? Physical carts. Not a multicart, but one game per cartridge, like it should be. 👀 Stay tuned. #NeoGeo#NeoArcadeProject