Live data from Hacker News

Si78c: Memory-accurate reimplementation of Space Invaders in C

github.com

11–20 of 21 posts

Re: Si78c: Memory-accurate reimplementation of Space Invaders in C

#11
I always felt it's misleading to display these as white on black. In the original arcade they'd be visually suspended over a painted background, with colored cellophane applied to the glass.

http://tipsgeneral.com/how-to/geek-trivia-the-screen-of-spac...

Though, having said that, this source I just looked up to get a screenshot suggests that's actually an enhancement added after the initial release.

edit to add: a better, non-blogspammy article that discusses this and provides an emulator:

https://tobiasvl.github.io/blog/space-invaders/

Re: Si78c: Memory-accurate reimplementation of Space Invaders in C

#12

The keyboard controls are: a LEFT d RIGHT 1 1P 2 2P j FIRE 5 COIN t TILT TILT! I was surprised and amused to see that there's an actual tilt sensor input. I think most people with a passing familiarity with arcade machines know that pinball machines had "tilt" sensors. People would smack, shake, tilt, etc. the tables in an attempt to change the trajectory of the ball. Or, perhaps they just abused them out of frustrat…

Were tilt sensors a damage prevention thing? I always assumed it was just an anti-cheat

Re: Si78c: Memory-accurate reimplementation of Space Invaders in C

#13

The keyboard controls are: a LEFT d RIGHT 1 1P 2 2P j FIRE 5 COIN t TILT TILT! I was surprised and amused to see that there's an actual tilt sensor input. I think most people with a passing familiarity with arcade machines know that pinball machines had "tilt" sensors. People would smack, shake, tilt, etc. the tables in an attempt to change the trajectory of the ball. Or, perhaps they just abused them out of frustrat…

Were tilt sensors a damage prevention thing? I always assumed it was just an anti-cheat

Most pinball machines have two tilt sensors, one is the regular one that, in modern incarnations, chides you for tilting and if you do it too much will end your current ball. There's a second, the slam tilt sensor that mostly detects kicking the coin door, etc, and reboots the machine (ending the whole game and maybe dropping any existing credits)

Re: Si78c: Memory-accurate reimplementation of Space Invaders in C

#16

The keyboard controls are: a LEFT d RIGHT 1 1P 2 2P j FIRE 5 COIN t TILT TILT! I was surprised and amused to see that there's an actual tilt sensor input. I think most people with a passing familiarity with arcade machines know that pinball machines had "tilt" sensors. People would smack, shake, tilt, etc. the tables in an attempt to change the trajectory of the ball. Or, perhaps they just abused them out of frustrat…

Were tilt sensors a damage prevention thing? I always assumed it was just an anti-cheat

I'm wondering if it was just "vestigial" from whatever boards they were using. I imagine a pinball machine base overlaps a fair amount with it's coin mechanisms.

Re: Si78c: Memory-accurate reimplementation of Space Invaders in C

#17
I admire the dedication to projects like this.

First you have to (or someone else has to) disassemble the original binary, since the original source code is usually long gone.

Then you have to actually go through the code to try to understand it all - this is difficult to do in a high level language, but even more so in assembly. Even if it's already disassembled and someone else has already added comments it's still not easy.

If you don't already know the ASM language being used, you have to also learn that as you go.

Only once you have a complete understanding of the ASM code can you even begin reimplementing it in C.

Then you have to test it and make sure it actually functions like the original.

Re: Si78c: Memory-accurate reimplementation of Space Invaders in C

#18

> The original code is interrupt driven, and partially co-operatively multitasked. The game spends about a third of the time running the main thread, which gets pre-empted by the midscreen and vblank interrupts. The other two thirds of the time is split between those interrupt contexts, which are not pre-empted, but decide when to return to main. That's just how interrupts work; it is not cooperative multitasking. Ta…

Agreed.

Especially since usually the entire point of an interrupt triggered by some hardware-related event (vsync, hsync etc) is that the main thread is not yielding or doing anything at all to cooperate.

Re: Si78c: Memory-accurate reimplementation of Space Invaders in C

#19

The keyboard controls are: a LEFT d RIGHT 1 1P 2 2P j FIRE 5 COIN t TILT TILT! I was surprised and amused to see that there's an actual tilt sensor input. I think most people with a passing familiarity with arcade machines know that pinball machines had "tilt" sensors. People would smack, shake, tilt, etc. the tables in an attempt to change the trajectory of the ball. Or, perhaps they just abused them out of frustrat…

Were tilt sensors a damage prevention thing? I always assumed it was just an anti-cheat

I'm just guessing...

I suspect it was damage prevention, much more so than cheating.

Cheating only affected the arcade owners if you were cheating on a busy machine, and somehow cheating well enough to actually extend your game. Longer games = less quarters.

But, really, how many people were cheating at pinball well enough to extend their games? I think that would take some serious skill. I think most people banging the machines damaged the machines far more often than they extended their games. So I think it was mostly about that.

Post reply on HN