Post Reply 
4K HP 67 Games rom attached for testing
11-05-2016, 07:04 AM (This post was last modified: 11-05-2016 07:08 AM by Dieter.)
Post: #95
RE: 4K HP 67 Games rom attached for testing
Gene, thank you for the text file. This time it worked.

(11-05-2016 12:44 AM)Gene Wrote:  The text listing includes the global random number generator (LBL S) which expects a seed in register 00.

I think the obvious choice for the RNG is LBL "R", and for the seed prompt LBL "S". ;-)

(11-05-2016 12:44 AM)Gene Wrote:  It uses the preferred generator. All programs need to be reshuffled to use 00 as the RN register.

Not all programs need this reshuffle.

(11-05-2016 12:44 AM)Gene Wrote:  The PI + style RN generators fail several randomness tests. Some seeds repeat the random numbers in a very short cycle or are not centered on a 0.5 mean, etc. A lot of work was done in the PPC Journal on these in the past. The LBL S routine shown here is the one we should use.

OK. But do these mathematical properties really matter for use in game programs? Also the frac(9821x+0,211327) is slower and uses 2–3x the memory of the simple generator.

(11-05-2016 12:44 AM)Gene Wrote:  Once in a ROM, the XEQ S

...XEQ "R". ;-)

BTW for the preferred generator the seed must be positive. So there should be an ABS in the seed prompt routine.

(11-05-2016 12:44 AM)Gene Wrote:  ...would really become a TWO BYTE XROM call. Best way to code this is to put in a TIME instruction (which will be coded as an XROM) and then Angel can find the TIME instruction and redirect it to the XROM S it should be.

We can directly use an XROM xx,yy instruction. Just provide the numbers for ROM and function.

(11-05-2016 12:44 AM)Gene Wrote:  Another routine LBL L (load?) should be
RCL 00
STO 00

That's the seed prompt, so it's LBL "S".

(11-05-2016 12:44 AM)Gene Wrote:  Another XROM call (Let's put DATE in as the placeholder) would replace the XEQ L in the programs.

See above.

Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
HP-67 AOS program to debug - Gene - 10-30-2016, 02:11 AM
RE: 4K HP 67 Games rom attached for testing - Dieter - 11-05-2016 07:04 AM

User(s) browsing this thread: 1 Guest(s)