Hacker News new | past | comments | ask | show | jobs | submit login
Tetris for Applesoft BASIC (paleotronic.com)
49 points by empressplay 8 months ago | hide | past | web | favorite | 14 comments

I wrote a Tetris game for the TRS-80 in the early 90's. To save on CPU and memory, I directly represented the state of the board, including the "cup" the pieces fell into, in video memory. On the first run I accidentally only drew half of the bottom of the cup, and I dropped a piece through the hole, where it sliced into whatever RAM was just past the video memory, crashing the system.

Just like Tron escaping the game grid. :-)

Jeff Minter calls doing that a trip into "happy fun memoryland."

I really like reading old mags & BASIC+ASM sources. Often there are interesting things to be found there; the old computers had very limited memory and a lot of tricks had to be used to make things fit. And the BASIC memory was even smaller than the machine memory. It was really amazing what some devs did and do. I got into firmware development for devices with the same kind of restrictions (our MCU has 24kb of usable memory) because I like this kind of bit fiddling.

My favorite mags are http://www.msxcomputermagazine.nl/ and, even more, but more unorganized, https://www.msx.org/forum/msx-talk/general-discussion/msx-gi... .

I seem to remember on the ZX81 using numbers took 5 bytes, so you could save a lot of memory by using inbuilt constants in stupid ways.

So you wouldn't use 0, you would use NOT PI

Let a=NOT PI

SGN PI for 1

COS PI for -1


Those bytes counted when you only had 1K RAM.

Hey, the number 3 has my first computer in the front page! the Yashica YC-64. I still have it in working condition.

Ah! That is one of the few MSX systems I do not have yet... I have all of them including east EU/Russian knock-offs. In my experience MSX systems were far far more robust that C64 for instance; I have a lot of C64’s; most of them are broken; all MSX’s still work. That can have many causes but looking at the PCBs and components it seems they really tried to make C64 as cheap as possible while MSXs have more robust components.

Do you have the Brazilian Gradiente MSX?

acorn user was my favourite


Writing a simple Tetris clone (or at least starting one) is a pretty good coding test that be done in a sort amount of time. Anyone who can't figure out a few simple algorithms for detecting full lines or moving pieces down the screen probably won't be able to figure out any useful ones for other programs.

Too bad if they got wind of the practice, The Tetris Company LLC would sue any company that did it into a smoldering crater.

Calm down please, you’re off topic.

Tetris related, if you haven't seen Ecstasy of Order you should watch it today.

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact