Hacker News new | comments | show | ask | jobs | submit login
Some experiments with hacking the Elektronika MK-61 (alfredklomp.com)
54 points by colinprince 357 days ago | hide | past | web | 10 comments | favorite



Oh, there was even a term for that: "еггоглогия" - errorology, or, transcribed from Cyrillic - eggogology (because latin 'r' looks like Cyrillic 'г', pronounced as 'g' in 'go') - basically, the study of undocumented features of programmable calculators. It got popularized in a series of articles in Technology for the Youth magazine in late 80s. They used funny terms for various classes of outside-of-normal-range numbers - like, supernumbers, shapeshifters, darkness, monsters, etc. Those undocumented features were pretty handy for game programming.

Here is a Wikipedia article (in Russian): https://ru.wikipedia.org/wiki/%D0%95%D0%B3%D0%B3%D0%BE%D0%B3...


The guy of LiteBSD/RetroBSD fame participated in re-implementing MK-61 using modern technology (in Russian) - http://ramlamyammambam.livejournal.com/362030.html


If Google translation isn't quite good, try Yandex - sometimes it gets something better:

https://translate.yandex.ru/translate


Fun little memory, as a kid I've been "hacking" on an Elektronika calculator as well, if you can call it that. On an Elektronika MK-18M I accidentally found that one of the scientific functions takes a noticeable amount of time to compute. The calculator would freeze for good 100ms until the answer comes back. And the interesting thing was, the processing time depended on the value I used for the function. By using what I now know is called bisection method, I found a value that choked up the calculator for good 3 seconds. This is not a hack of course but I felt like I had found a small clue about how the function is implemented in the calculator.


It probably uses CORDIC:

https://en.wikipedia.org/wiki/CORDIC

That also reminds me of the note on this page about the Sinclair Scientific calculator's speed:

http://files.righto.com/calculator/sinclair_scientific_simul...

Due to the simple loop-based algorithms, the speed of the Sinclair Scientific calculator varies from good to horribly slow depending on the values. For instance, sin .1 takes under a second, but sin 1 takes about 7.5 seconds. Arccos .2 takes about 15 seconds. Log and antilog have the overhead of recomputing the constant 229.15, and take about 1 to 2 seconds.

It's worth noting that modern low-end calculators still use very simple processors operating in the kHz range, because they're cheap, ultra-low-power, and sufficiently fast. This does occasionally manifest itself in taking a second or two for computing some more complex functions.


This is really tantalizing, but it ends exactly at the point where it would be really interesting. What do those opcodes do? Do they map directly to the processor's opcodes? Can you dump the calculator firmware this way?


Here, for example - https://github.com/sergev/mk-61#svn%2Ftrunk . From http://ramlamyammambam.livejournal.com/266692.html : "Everybody interested can reinstate the design. Here <the link above> are the sources. Will draw the schematics soon [see the link above, it has links to several blog posts]. The processor of PIC32MX2 family is chosen to simplify the assembly: it's the only 32 bit microcontroller in the world in the DIP body. And USB port isn't wasted: plans are to allow loading programs from computer. Boards, indicators, buttons, chips 74HC595N are easy to by on ebay.com"


I had one of these growing up. Remember playing a few games by entering opcodes like the article mentions. But then got a cheap-o ZX Spectrum clone. After that it was hard to go back to the calculated as Spectrum had an actual display, BASIC, a nice assembly language, storage on tape, even C, and Pascal compiler if you didn't mind reloading from tape on every mistake and segfault.


Exactly same story. We've been playing with my brother and classmates some "car racing" game on MK-61 before we've got custom ZX 81 attached to a TV (initially, "Yunost") and old cassette recorder AIWA TPR-830, where we could program the same on BASIC.


>The next question is whether these opcodes do anything interesting.

Of course they do. Say, back in 1986 a videogame (Lunolet-4?) used the screen to show the position of the spacecraft between the Earth and the Moon like this: "E L-" - the spacecraft is behind the Moon, "E -L " - the spacecraft between the Earth and the Moon.




Applications are open for YC Winter 2018

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

Search: