← Back to columns

Bēmaga, 30 years later — porting a 100-line BASIC game to iPhone

2026-06-03

Heads up — this one has nothing to do with parenting. There was this 80s Japanese hobby-programming magazine called Microcomputer BASIC Magazine, but everyone just called it Bēmaga. Every issue printed the full source code of a small game; you'd type the whole thing into your PC-9801 by hand. I took one — a 2-player tennis game called Receive No.1 — and ported the entire 100-line N88-BASIC listing to iPhone, line for line. Plus the one thing the original couldn't pull off in 1990s hardware: a CPU opponent, trained with a Genetic Algorithm.

Nothing to do with parenting today. If anything, my kid probably wouldn't get the appeal of this one.

I brought Receive No.1 back, 30 years later, on iPhone.

Quick context for folks outside Japan: in the 80s and 90s there was a magazine called マイコン BASIC マガジン (everyone shortened it to ベーマガ / Bēmaga). It was a hobbyist-programming monthly, and the wild thing about it was that every issue printed the full source listing of a tiny game right there in the magazine. You'd buy the issue, sit at your PC-9801, and type the entire thing in by hand, line number by line number. Receive No.1 was one of those — a 2-player tennis game written in N88-BASIC (a Microsoft-licensed BASIC dialect that shipped on NEC PCs), in about 100 lines.

Same code. Same physics. Same bugs, probably.

670 BEEP:IF SU=T THEN SU=ABS(SU-3) ELSE P(SU)=P(SU)+1
680 GOSUB *TOKUTENKAKU:IF P(SU)=15 THEN GOTO *SHOUHAI

From that scoring line, all the way down to BX=BX+VX:BY=BY+VY/1.5:VY=VY+1 for the gravity model, HX=X+7+32*CS(AA), HY=Y+31*SN(AA) for the arm hit-box, and a DIM CS(360), SN(360) lookup table holding sin/cos at 22.5° steps — I moved the original logic onto a phone, verbatim.

Because the physics matches, all of the original quirks carry over:

The thing 1990s hardware couldn't do: a CPU opponent

View Receive No.1 →