1K hires: calculation game

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1K hires: calculation game

Post by dr beep »

Some alterations already.
This version has an error in division (with remainder).

Working on the final version......
User avatar
gammaray
Posts: 590
Joined: Sun Apr 17, 2016 2:44 am
Location: Texas

Re: 1K hires: calculation game

Post by gammaray »

Maybe I am ahead of things, but I don't see "583" or any other number in target box.
screen of calcmax.jpg
screen of calcmax.jpg (51.41 KiB) Viewed 2983 times
5-TS1000,UK ZX81<-Sheelagh, US ZX81, 2-TS1500/KDLX , 3-TS2040 printer, 2-TS2020 cassette decks, ZXPAND+AY, ZeddyNET, ZXBlast, UDG, ZX8CCB, AERCO, BUILDS/REPAIRS ZX Spectrum, ZX80 Minstrel, ZXMAX48 v1 v2, 2-TS-2068, ROM, 16kRAM
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1K hires: calculation game

Post by dr beep »

You need to set hires emulation to WRX (classic error).
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1K hires: calculation game

Post by dr beep »

Well,

The game needs conclusion.
This version has an error in the divisionroutine ( divide by zero is a constant loop).
I found some room to repair it so the routines can be used by finding a solution by the computer.
The multiplier is slower than a larger cersion so I tested the slower routine with the fastest solutionfinder.
The timing is slower, but not too much to be to slow. So a shorter routine can be used.

I will add the solutionfinder first in a >1K version and then in a lowres <1K version.
Hope that last will fit...
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1K hires: calculation game

Post by dr beep »

Almost the solver coded. The code is there, but not yet working as on the ZX Spectrum
Size 1142 in hires.
Since hires has at least 256 bytes data it will fit in 1K lowres with solver.
Now to make solver work.
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1K hires: calculation game

Post by dr beep »

The solver is working, but the computer is cheating sometimes by taking more time than allowed
(the routine is a lot slower on the ZX81 than on the ZX Spectrum) so I need to set a timebreak and don't allow further calculations.

Sometimes I won from the computer and otherway around....
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1K hires: calculation game

Post by dr beep »

Computer is cut off after 20 sec.
Now show how computer comes to result and if player of computer wins.
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1K hires: calculation game

Post by dr beep »

So I am almost ready....

This version could be the base for the lowres version with solver so I do a prerelease before finishing it.

This version is a game against the computer.

Press NL to start

Write down the numbers while number is generated
When number shows do your calculations until operands appear.
It is the end of time indicator.
Now enter your result by selecting the numbers and its operand
by pressing the matching numbers 1-6 for a number and 7-0 for an
operand. When a mistake is made you can press Q to restart after a
calculation. The markers <> are for the computer.

When your calculation is ready, you press NL
Now the computer will show its result.
After each step you press NL.
The markers < and > indicate that the number
pointing to is used and the other is unused in the
calculation.

Later the result will be compared for who wins (to do)

The order of operands is altered for a better result
in computercalculations. Numbers above 1000 are shown
with a leading letter.

Have fun....
cm+1K.p
(1.32 KiB) Downloaded 145 times
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1K hires: calculation game

Post by dr beep »

1K lowres with solutionfinder will be tough.

I need at least 60 bytes on a stack and a copy of it and a normal stack, so 150 bytes stack only.
Program must therefore fit in 1024-150=874 bytes. Still over 900 bytes now.
dr beep
Posts: 2079
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 1K hires: calculation game

Post by dr beep »

I am struggling to fit the display in 1K lowres version.
I think I am at the right track, but some alterations are still needed to fit 1K.
Post Reply