A downloadable game

Attributed to Newton

A PUR-80 10 line BASIC game for the Sharp MZ-80K.

Written by Tim Holyoake [@psychotimmy (twitter)]

Game Description:

Using good judgement and skill, work out which of the 20 phrases presented to you are attributed to Sir Isaac Newton.

Simply answer Y if you think the phrase is attributed to Newton. All other responses mean that you think it is not his wisdom.

Each phrase is allocated a number of Newton points. If a phrase scores 18 points or more, it means it is attributed to Newton. As words always score the same number of points during each game, it should become easier to work out which phrases are attributed to Newton as the game progresses.

Your aim is for your wisdom score to be as close to 100% by the end of the game as possible.

Code and documentation:

Lines 1-3 – Game data. U is set to the number of phrases.

Line 4 – String array variables holding each part of the phrase (S\$,V\$ and A\$). N stores a random number of points per word so that the phrase's 'Newton points' can be calculated using function FNA().

Lines 4-5 – Initialise game data and clear the screen.

Line 6 – Generate a random phrase and calculate the number of Newton points it has (stored in numeric variable O).

Lines 6-7 – Print out the phrase and ask if it is attributed to Newton.

Line 8 – If the guess is “Y” and O>17 or if it is “N” and O<18 add one to the score and tell the player they have given the right answer. Branch to line 10.

Line 9 – Reached only if the guess is incorrect. If the guess was that the phrase was attributed to Newton, tell the player who really said it (Einstein, of course).

Line 10 – Display the number of Newton points the phrase was worth, to enable the player to guess better next time. Display the wisdom percentage of the player. If this isn't the twentieth phrase display the next one.

 Status Released Author BASIC 10Liner Genre Educational Tags 8-Bit, basic, basic10liner, mz80k, sharp

## Install instructions

Emulator:

The one available from http://takeda-toshiya.my.coocan.jp/mz80k/index.html is recommended.

Follow the link at the top of this page to the common source code project, download and extract the binary archive (for Windows XP/Vista/7/8/8.1/10).

In the emulator directory this process creates, you need to install the MZ-80K European fonts and monitor program. These can be downloaded from:

SP-1002 monitor ROM: https://original.sharpmz.org/mz-80k/download/80kmoni.zip (ipl.rom)

MZ-80K fonts (EU): https://original.sharpmz.org/mz-80k/download/80kcg.zip (font.rom)

Unzip, and rename the monitor ROM to ipl.rom and the font file to font.rom. Place them in the emulator directory (where the mz80k.exe file will be found).

Next, load a copy of the Sharp SP-5025 BASIC interpreter. The MZ-80K was supplied with BASIC on tape, rather than it being pre-loaded in ROM.

A copy of the SP-5025 BASIC interpreter can be downloaded from here:

Unzip the file and load the resulting .mzf file into the emulator by:

1. Typing LOAD <return> into the emulator window

2. Selecting CMT -> Play from the emulator menu and selecting the BASIC SP-5025.mzf you have just downloaded.

3. Select CMT->Eject to remove the BASIC tape from the emulated tape drive

4. Type LOAD <return> into the emulator window

5. Select CMT->Play from the emulator menu and select the Newton MZ80K.mzf file provided for the contest.

If all is well, typing LIST <return> into the emulator after the program has loaded should result in the program being displayed. (Note – if the program fails to load, try rewinding the tape in the CMT menu and then using the play button it provides. The tape controls in the emulator are idiosyncratic, to say the least).

You’re now ready to RUN! Enjoy!

## Download

Attributed to Newton.pdf 90 kB
Newton MZ80K.mzf 826 bytes
BASIC SP-5025.mzf 12 kB

## Leave a comment

Log in with itch.io to leave a comment.