From 2c5b73f07eb19a983f23b16827dd63abd6dd1dc9 Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Mon, 16 Feb 2015 17:48:48 +0100
Subject: [PATCH] Improved random number generator on the Apple 2.
---
ip65/ip65.s | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ip65/ip65.s b/ip65/ip65.s
index 348a89f..a14c93a 100644
--- a/ip65/ip65.s
+++ b/ip65/ip65.s
@@ -51,8 +51,9 @@ ip65_error: .res 1 ; last error code
; outputs: AX set to a pseudo-random 16 bit number
ip65_random_word:
jsr timer_read ;sets AX
+ adc $4e ; on an Apple 2, this is RNDL
adc $9004 ; on a VIC 20, this is the raster register
- adc $d41b ; on a c64, this is a 'random' number from the SID
+ adc $d41b ; on a C64, this is a 'random' number from the SID
pha
adc ip65_ctr_arp
ora #$08 ; make sure we grab at least 8 bytes from eth_inp