From 5a43ca9a7aaf41921954f9dcbbbc38034036b942 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Sat, 10 Mar 2018 22:36:31 -0600 Subject: [PATCH] Return random data in read contexts This applies only to addresses which aren't meant to return meaningful data. --- src/apple2.dd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/apple2.dd.c b/src/apple2.dd.c index 214bf9c..814d9dd 100644 --- a/src/apple2.dd.c +++ b/src/apple2.dd.c @@ -9,6 +9,8 @@ * itself. */ +#include + #include "apple2.dd.h" #include "apple2.dec.h" #include "apple2.enc.h" @@ -598,7 +600,7 @@ SEGMENT_READER(apple2_dd_switch_read) apple2_dd_switch_latch(drive, 0); } - return 0; + return (vm_8bit)(arc4random() & 0xff); } /*