Interesting Article on Emulation of Certain Seibu Games

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
Post Reply
User avatar
Master O
Posts: 272
Joined: Sun Sep 09, 2007 4:19 am

Interesting Article on Emulation of Certain Seibu Games

Post by Master O »

http://mamedev.emulab.it/kale/

I wonder what this means for the emulation of a certain shmup...
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Interesting Article on Emulation of Certain Seibu Games

Post by Ed Oscuro »

Master O wrote:I wonder what this means for the emulation of a certain shmup...
Nice share! It tells you what you want to know in the article:
This fixes: Raiden 2 intro (ship objects now scrolls down correctly), Zero Team intro (the scrolling was a bit off before during the bike / van chase) and Seibu Cup Soccer now Kick Offs (although the players then decides that is the right time to make a strike action and leave the poor GK alone). Unfortunately, this also breaks Zero Team gameplay again, but 0.147 was just released so I have some time to understand why it crashes even if the fix is definitely right.
User avatar
Master O
Posts: 272
Joined: Sun Sep 09, 2007 4:19 am

Re: Interesting Article on Emulation of Certain Seibu Games

Post by Master O »

Ed Oscuro wrote:
Master O wrote:I wonder what this means for the emulation of a certain shmup...
Nice share! It tells you what you want to know in the article:
This fixes: Raiden 2 intro (ship objects now scrolls down correctly), Zero Team intro (the scrolling was a bit off before during the bike / van chase) and Seibu Cup Soccer now Kick Offs (although the players then decides that is the right time to make a strike action and leave the poor GK alone). Unfortunately, this also breaks Zero Team gameplay again, but 0.147 was just released so I have some time to understand why it crashes even if the fix is definitely right.
What I said was rhetorical. I know that is what the article said.

I was going for dramatic effect with the ellipses at the end of the sentence.
Op Intensify
Posts: 1090
Joined: Sun Apr 29, 2012 2:19 am

Re: Interesting Article on Emulation of Certain Seibu Games

Post by Op Intensify »

We've been hearing teases for some time now of Raiden II/DX possibly getting MAME support. I'd love if it could finally happen within the year. Raiden Project is hella pricey, and the US version lacks tate. The DX port never made it outside Japan.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: Interesting Article on Emulation of Certain Seibu Games

Post by BPzeBanshee »

Agreed. This is excellent progress, and if it gets properly emulated will be the definitive way to play.

Some of those jokes about Raiden II getting fully emulated causing the apocalypse on December 21st might not be far off. :P
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Interesting Article on Emulation of Certain Seibu Games

Post by Ed Oscuro »

Master O wrote:What I said was rhetorical. I know that is what the article said.

I was going for dramatic effect with the ellipses at the end of the sentence.
what a tweest!

Anyway, Zero Team looks completely playable there, at least for a jaunt around. It is pretty sobering to read about the enemy behavior being radically altered by fixed protection though - but given what they're dealing with here it's a small price to pay for being able to at least see it in action. That bad guy with the girl (motorbike shot) looks tiny (in comparison) and seems to be playing another game to me...I'm gonna put my money down on this: Seibu's brawler looks better than Toaplan's, a reflection of their relative status as developers.
Op Intensify wrote:We've been hearing teases for some time now of Raiden II/DX possibly getting MAME support.
Well, it does have MAME support, it's just not playable. Yeah, sorry about that guys. Couldn't help it.
User avatar
ptoing
Posts: 1118
Joined: Wed Jan 11, 2006 10:36 pm
Location: Gurmany
Contact:

Re: Interesting Article on Emulation of Certain Seibu Games

Post by ptoing »

I am sure it will get emulated properly at some point. Just look at all the stuff that got done in the last few years, including fixing Beestorm which was "emulated" for a long time but not properly. So yeah, I am sure it will happen.
User avatar
Master O
Posts: 272
Joined: Sun Sep 09, 2007 4:19 am

Re: Interesting Article on Emulation of Certain Seibu Games

Post by Master O »

ptoing wrote:I am sure it will get emulated properly at some point. Just look at all the stuff that got done in the last few years, including fixing Beestorm which was "emulated" for a long time but not properly. So yeah, I am sure it will happen.
You also forgot the sound and corrupted graphics in Batsugun.
User avatar
ptoing
Posts: 1118
Joined: Wed Jan 11, 2006 10:36 pm
Location: Gurmany
Contact:

Re: Interesting Article on Emulation of Certain Seibu Games

Post by ptoing »

And V-Five/Grindstormer and Dogyuun.
IseeThings
Posts: 534
Joined: Thu Dec 16, 2010 6:38 pm
Location: California

Re: Interesting Article on Emulation of Certain Seibu Games

Post by IseeThings »

Raiden 2 / Seibu protection is a fair bit more annoying than any of the ones you mention.

Beestorm was an open and shut case of needing the internal ARM rom, which wasn't really that hard to extract on that game but nobody had done it (lack of interest mainly)

The later Toaplan games needed better emulation of the CPU (For which there were docs) and (for all games except Batsugun) the 256 byte encryption table figuring out. The mixing in Batsugun was just a case of writing proper code based on the PAL, rather than 'fast' code which made too many assumptions in the name of performance.

Seibu protection is a custom programmed gate array, you can't just dump the internal ROM like Beestorm and emulate it, or implement what the docs say, you have to figure out each and every operation, which includes an awful lot of maths ops which will directly influence shots, enemy behaviour, collisions etc. The downside is that unless you manage to get all that *perfect* then you're not going to get precisely the correct behaviour and getting it perfect is no easy task because you have to understand the algorithms used by the hardware, Kale is already seeing that many of the maths function implementations he's coming up with are giving results which don't quite match the hardware.

He's also still working at quite a high level, most of the commands the games execute are made of several smaller commands, no attempt has been made to understand those yet.

The only positive compared to something like the remaining Toaplan sound emulation is that at least here we already have all the pieces, we're not missing critical MCU code or anything like that.
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Interesting Article on Emulation of Certain Seibu Games

Post by trap15 »

Well, I tried to make sense of the low-level commands at one point. Of course I failed though :P
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: Interesting Article on Emulation of Certain Seibu Games

Post by BPzeBanshee »

Yeah, I did notice the actual gameplay started to go a bit different in the last MAME build I compiled. None of the tanks wanted to leave the houses they were 'hiding' in (layering is still messed up/flickering/not drawing some things so they actually look more like they're on top of the houses), and the bosses did weird dimension trickery where they wouldn't move but reappear after scrolling off the bottom of the screen. I think it'll still be a long while before this gets done properly myself.
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Interesting Article on Emulation of Certain Seibu Games

Post by Ed Oscuro »

Some fruits of the work in MAME, although the description isn't promising it is still progress. More to come, I hope!

http://git.redump.net/mame/commit/?id=1 ... e8caa4219f
User avatar
To Far Away Times
Posts: 2067
Joined: Tue Sep 11, 2012 12:42 am

Re: Interesting Article on Emulation of Certain Seibu Games

Post by To Far Away Times »

It's hard to believe a game this old, and beloved by many, has never been emulated properly.

When it comes to copy protection, the guys at Seibu must have been coding geniuses.
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Interesting Article on Emulation of Certain Seibu Games

Post by trap15 »

It's not part of the main game code. It's a dedicated hardware protection. And it's programmable to an extent. But not to enough of an extent to really understand without extensive hardware tests.

It's really a hardcore protection.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
IseeThings
Posts: 534
Joined: Thu Dec 16, 2010 6:38 pm
Location: California

Re: Interesting Article on Emulation of Certain Seibu Games

Post by IseeThings »

Ed Oscuro wrote:Some fruits of the work in MAME, although the description isn't promising it is still progress. More to come, I hope!

http://git.redump.net/mame/commit/?id=1 ... e8caa4219f
This is just copying some code FROM the Raiden 2 simulation to the other games, it's not really progress at all and doesn't change a thing with R2.

Right now, for legacy reasons there are just 2 copies of the simulation, although this will be reduced to one in rather short order.

Raiden 2 / DX are already available in ports, that probably automatically means a lot of people simply don't care about emulating the original properly because they can already play it in some form. Also it matters very little how beloved a game is, you can have 5 million rabid fans and not a single one any coding ability. The number of people doing classic emulation hasn't increased in any significant way over the years, you get the occasional 'me to' developer who does nothing original, or the 'look at me' developers trying to emulate the latest systems instead for fame / fortune, but the people doing the hard work of figuring things out are just the same as the people doing the hard work figuring things out 6-7 years ago, minus the ones who no longer have time fore it.

The fruit machine stuff I've been doing in MAME is similar, it seems to have hundreds of fans over here, but when asked for real help reverse engineering things and coding the emulator there is practically nobody. There are plenty of people to throw resources at you, but nobody to figure things out / code things / improve the MAME architecture to better support them.
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Interesting Article on Emulation of Certain Seibu Games

Post by Ed Oscuro »

True - I don't want to mislead anybody.

It is interesting to see how the work gets boiled down to one or two summary sentences in the update descriptions, definitely.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: Interesting Article on Emulation of Certain Seibu Games

Post by BPzeBanshee »

http://git.redump.net/mame/commit/?id=0 ... 1a74fe3f08

More updates. Not Raiden II specific but still progress.

Is anyone actually building MAME builds with these changes to see for themselves what's new? I've been doing it for various reasons (trying to make my own custom MAME build) and it's interesting seeing what's working and what's stopped working.
User avatar
Master O
Posts: 272
Joined: Sun Sep 09, 2007 4:19 am

Re: Interesting Article on Emulation of Certain Seibu Games

Post by Master O »

http://mamedev.emulab.it/kale/

Another minor update. Interesting if anyone here's into the actual technical underpinnings of COP.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: Interesting Article on Emulation of Certain Seibu Games

Post by BPzeBanshee »

I certainly am. A bit of the programming terms are above my head (which is why I compile my own builds to start to learn more of these things) but it's nonetheless interesting to see the steps that are made towards the final result. :)
Post Reply