|
@@ -45,13 +45,6 @@
|
45
|
45
|
#include "table_speed_shot.h"
|
46
|
46
|
#include "main.h"
|
47
|
47
|
|
48
|
|
-/*
|
49
|
|
- * TODO: The gb-interceptor has problems emulating the
|
50
|
|
- * DIV register properly. When using it to initialize
|
51
|
|
- * our random number generator seed, the emulation
|
52
|
|
- * runs out-of-sync with the real hardware.
|
53
|
|
- * Using a constant seed 'fixes' this.
|
54
|
|
- */
|
55
|
48
|
//#define CONSTANT_SEED 42
|
56
|
49
|
|
57
|
50
|
uint8_t debug_menu_index = 0;
|
|
@@ -675,7 +668,12 @@ void main(void) NONBANKED {
|
675
|
668
|
waitpadup();
|
676
|
669
|
seed |= ((uint16_t)DIV_REG) << 8;
|
677
|
670
|
#endif
|
678
|
|
- initarand(seed);
|
|
671
|
+
|
|
672
|
+ // store in an SRAM variable, so the
|
|
673
|
+ // value goes over the cartridge bus.
|
|
674
|
+ // gives gb-interceptor a chance to see it.
|
|
675
|
+ prng_seed = seed;
|
|
676
|
+ initarand(prng_seed);
|
679
|
677
|
|
680
|
678
|
while (1) {
|
681
|
679
|
if (conf_state()->in_progress && ask_continue()) {
|