Update mul_MEM_FAC1

This commit is contained in:
Rikard Nordgren authored and FeralChild64 committed 2026-04-12 13:13:18 +02:00
1 parent e56e1cf1ac
commit 908b783319
3 files changed
+8 -5

No files matched your search

+1 -1
View File
@@ -219,7 +219,7 @@ Floating point mathematical routines - not official, but well known and broadly
| `$B96F` | `inc_FAC1` | DONE | From the Microsoft BASIC, original name: INCFAC | | `$B96F` | `inc_FAC1` | DONE | From the Microsoft BASIC, original name: INCFAC |
| `$B983` | `shiftr_FAC1` | DONE | From the Microsoft BASIC, original name: SHIFTR | | `$B983` | `shiftr_FAC1` | DONE | From the Microsoft BASIC, original name: SHIFTR |
| `$B9EA` | `log_FAC1` | PARTIAL | not fully tested yet | | `$B9EA` | `log_FAC1` | PARTIAL | not fully tested yet |
| `$BA28` | `mul_MEM_FAC1` | DONE | | | `$BA28` | `mul_MEM_FAC1` | DONE | From the Microsoft BASIC, original name: FMULT |
| `$BA2B` | `mul_FAC2_FAC1` | DONE | | | `$BA2B` | `mul_FAC2_FAC1` | DONE | |
| `$BA8C` | `mov_MEM_FAC2` | DONE | From the Microsoft BASIC, original name: CONUPK | | `$BA8C` | `mov_MEM_FAC2` | DONE | From the Microsoft BASIC, original name: CONUPK |
| `$BA90` | `get_FAC2_via_INDEX` | DONE | From the Microsoft BASIC, no label | | `$BA90` | `get_FAC2_via_INDEX` | DONE | From the Microsoft BASIC, no label |
@@ -3,15 +3,17 @@
;; #LAYOUT# * BASIC_0 #TAKE ;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE ;; #LAYOUT# * * #IGNORE
; ; This file is under the MIT license, it contains code released by Microsoft Corporation.
; See LICENSE for more information.
; Math package - multiplies FAC1 by RAM ; Math package - multiplies FAC1 by RAM
; ;
; This is verified to be identical to the original Microsoft implementation where it was named FMULT
;
; Input: ; Input:
; - .A - address low byte ; - .A - address low byte
; - .Y - address high byte ; - .Y - address high byte
; ;
; Note:
; - C64 Wiki calls it FMULT, this looks like a mistake
; ;
; See also: ; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 113 ; - [CM64] Computes Mapping the Commodore 64 - page 113
+2 -1
View File
@@ -20,13 +20,14 @@ int matches[MAX_SIZE];
int phase_mask[MAX_SIZE+MAX_SIZE]; int phase_mask[MAX_SIZE+MAX_SIZE];
#define NUM_CHUNKS 6 #define NUM_CHUNKS 7
// Pairs of start, end memory addresses of known exact similarity with the open source Microsoft BASIC // Pairs of start, end memory addresses of known exact similarity with the open source Microsoft BASIC
unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = { unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = {
0xB391, 0xB39D, 0xB391, 0xB39D,
0xB3A2, 0xB3A5, 0xB3A2, 0xB3A5,
0xB849, 0xB97D, 0xB849, 0xB97D,
0xB983, 0xB9BB, 0xB983, 0xB9BB,
0xBA28, 0xBA2A,
0xBA8C, 0xBAB6, 0xBA8C, 0xBAB6,
0xBB8F, 0xBCF2, 0xBB8F, 0xBCF2,
}; };