random generator compatibility fix, updated binaries

This commit is contained in:
FeralChild64 committed 2020-02-19 17:37:15 +01:00
1 parent de605cd5ee
commit 8a8d27b234
12 files changed
+31 -3

No files matched your search

+1 -1
View File
@@ -372,7 +372,7 @@ $(TARGET_X16_x): $(SEG_LIST_X16) build/chargen.rom
dd if=/dev/zero bs=8192 count=8 of=build/x16_padding_64_KB
cat $(DIR_X16)/basic.seg_0 > $(TARGET_X16_x)
cat $(DIR_X16)/kernal.seg_0 >> $(TARGET_X16_x)
cat build/chargen.rom >> $(TARGET_X16_x)
cat build/chargen.rom >> $(TARGET_X16_x)
cat $(DIR_X16)/basic.seg_1 >> $(TARGET_X16_x)
cat $(DIR_X16)/kernal.seg_1 >> $(TARGET_X16_x)
rm -f build/x16_padding_*
+1
View File
@@ -237,6 +237,7 @@ Floating point mathematical routines - not official, but well known and broadly
| `$BFED` | `exp_FAC1` | NOT DONE | |
| `$E043` | `poly1_FAC1` | NOT DONE | |
| `$E059` | `poly2_FAC1` | NOT DONE | |
| `$E097` | `rnd_FAC1` | PARTIAL | requires `sgn_FAC1_A` |
| `$E09A` | `rnd_A` | DONE | |
| `$E0BE` | `rnd_generate` | DONE | |
| `$E264` | `cos_FAC1` | NOT DONE | |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
This is an important floating point math routine, referenced by ACME SDK, see here:
- https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
+20
View File
@@ -0,0 +1,20 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Random number generator routine
//
// Input:
// - FAC1 (0 - reinitialize the seed with random value, negative - create seed from FAC1)
//
// Output:
// - FAC1
//
rnd_FAC1:
jsr sgn_FAC1_A
// FALLTROUGH to rnd_A
+6 -2
View File
@@ -38,6 +38,8 @@ rnd_generate:
eor #$04
sta RNDX+4
sec // make sure Carry is always set, for adc
// FALLTROUGH
rnd_generate_copy:
@@ -45,7 +47,7 @@ rnd_generate_copy:
// Copy the generated number to FAC1, mangle it a little
lda RNDX+3
eor #$62
adc #$C6
sta FAC1_mantissa+0
lda RNDX+1
@@ -53,10 +55,12 @@ rnd_generate_copy:
sta FAC1_mantissa+1
lda RNDX+4
eor #$97
eor #$62
sta FAC1_mantissa+2
lda RNDX+2
bit RNDX+2
rol
sta FAC1_mantissa+3
// FALLTROUGH