mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 22:25:28 +00:00
Removed union and structures for Suzy math
This commit is contained in:
@@ -227,36 +227,7 @@ enum {
|
|||||||
SPRITEWORKING = 0x01 // sprite process is active
|
SPRITEWORKING = 0x01 // sprite process is active
|
||||||
};
|
};
|
||||||
|
|
||||||
// Structures for math registers
|
// Suzy hardware registers
|
||||||
struct _math_unsigned_multiply {
|
|
||||||
unsigned int factor1; // 0xFC52 - 0xFC53
|
|
||||||
unsigned int factor2; // 0xFC54 - 0xFC55 write starts multiply
|
|
||||||
unsigned char unused2[10]; // 0xFC56 - 0xFC5F do not use
|
|
||||||
unsigned long product; // 0xFC60 - 0xFC63
|
|
||||||
unsigned char unused3[8]; // 0xFC64 - 0xFC6B do not use
|
|
||||||
unsigned long accumulate; // 0xFC6C - 0xFC6F
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _math_signed_multiply {
|
|
||||||
int factor1; // 0xFC52 - 0xFC53
|
|
||||||
int factor2; // 0xFC54 - 0xFC55 write starts multiply
|
|
||||||
unsigned char unused2[10]; // 0xFC56 - 0xFC5F do not use
|
|
||||||
long product; // 0xFC60 - 0xFC63
|
|
||||||
unsigned char unused3[8]; // 0xFC64 - 0xFC6B do not use
|
|
||||||
long accumulate; // 0xFC6C - 0xFC6F
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _math_divide {
|
|
||||||
unsigned long quotient; // 0xFC52 - 0xFC55
|
|
||||||
unsigned int divisor; // 0xFC56 - 0xFC57
|
|
||||||
unsigned char unused2[8]; // 0xFC58 - 0xFC5F do not use
|
|
||||||
unsigned int dividend2; // 0xFC60 - 0xFC61
|
|
||||||
unsigned int dividend1; // 0xFC62 - 0xFC63 write starts divide
|
|
||||||
unsigned char unused3[8]; // 0xFC64 - 0xFC6B do not use
|
|
||||||
unsigned long remainder; // 0xFC6C - 0xFC6F
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Suzy Hardware Registers */
|
|
||||||
struct __suzy {
|
struct __suzy {
|
||||||
unsigned char *tmpadr; // 0xFC00 Temporary address
|
unsigned char *tmpadr; // 0xFC00 Temporary address
|
||||||
unsigned int tiltacc; // 0xFC02 Tilt accumulator
|
unsigned int tiltacc; // 0xFC02 Tilt accumulator
|
||||||
@@ -284,29 +255,22 @@ struct __suzy {
|
|||||||
unsigned char *procaddr; // 0xFC2E address of current spr data proc
|
unsigned char *procaddr; // 0xFC2E address of current spr data proc
|
||||||
unsigned char unused0[32]; // 0xFC30 - 0xFC4F reserved/unused
|
unsigned char unused0[32]; // 0xFC30 - 0xFC4F reserved/unused
|
||||||
unsigned char unused1[2]; // 0xFC50 - 0xFC51 do not use
|
unsigned char unused1[2]; // 0xFC50 - 0xFC51 do not use
|
||||||
union {
|
unsigned char mathd; // 0xFC52
|
||||||
struct {
|
unsigned char mathc; // 0xFC53
|
||||||
unsigned char mathd; // 0xFC52
|
unsigned char mathb; // 0xFC54
|
||||||
unsigned char mathc; // 0xFC53
|
unsigned char matha; // 0xFC55 write starts a multiply operation
|
||||||
unsigned char mathb; // 0xFC54
|
unsigned char mathp; // 0xFC56
|
||||||
unsigned char matha; // 0xFC55 write starts a multiply operation
|
unsigned char mathn; // 0xFC57
|
||||||
unsigned char mathp; // 0xFC56
|
unsigned char unused2[8]; // 0xFC58 - 0xFC5F do not use
|
||||||
unsigned char mathn; // 0xFC57
|
unsigned char mathh; // 0xFC60
|
||||||
unsigned char unused2[8]; // 0xFC58 - 0xFC5F do not use
|
unsigned char mathg; // 0xFC61
|
||||||
unsigned char mathh; // 0xFC60
|
unsigned char mathf; // 0xFC62
|
||||||
unsigned char mathg; // 0xFC61
|
unsigned char mathe; // 0xFC63 write starts a divide operation
|
||||||
unsigned char mathf; // 0xFC62
|
unsigned char unused3[8]; // 0xFC64 - 0xFC6B do not use
|
||||||
unsigned char mathe; // 0xFC63 write starts a divide operation
|
unsigned char mathm; // 0xFC6C
|
||||||
unsigned char unused3[8]; // 0xFC64 - 0xFC6B do not use
|
unsigned char mathl; // 0xFC6D
|
||||||
unsigned char mathm; // 0xFC6C
|
unsigned char mathk; // 0xFC6E
|
||||||
unsigned char mathl; // 0xFC6D
|
unsigned char mathj; // 0xFC6F
|
||||||
unsigned char mathk; // 0xFC6E
|
|
||||||
unsigned char mathj; // 0xFC6F
|
|
||||||
};
|
|
||||||
struct _math_unsigned_multiply unsigned_multiply;
|
|
||||||
struct _math_signed_multiply signed_multiply;
|
|
||||||
struct _math_divide divide;
|
|
||||||
} math;
|
|
||||||
unsigned char unused4[16]; // 0xFC70 - 0xFC7F do not use
|
unsigned char unused4[16]; // 0xFC70 - 0xFC7F do not use
|
||||||
unsigned char sprctl0; // 0xFC80 sprite control bits 0
|
unsigned char sprctl0; // 0xFC80 sprite control bits 0
|
||||||
unsigned char sprctl1; // 0xFC81 sprite control bits 1
|
unsigned char sprctl1; // 0xFC81 sprite control bits 1
|
||||||
@@ -333,9 +297,7 @@ struct __suzy {
|
|||||||
// 0xFCC5 - 0xFCFF unused
|
// 0xFCC5 - 0xFCFF unused
|
||||||
};
|
};
|
||||||
|
|
||||||
// Deprecated definitions
|
// Hardware math registers
|
||||||
|
|
||||||
/* Hardware Math */
|
|
||||||
#define FACTOR_A *(unsigned int *) 0xFC54
|
#define FACTOR_A *(unsigned int *) 0xFC54
|
||||||
#define FACTOR_B *(unsigned int *) 0xFC52
|
#define FACTOR_B *(unsigned int *) 0xFC52
|
||||||
#define PRODUCT0 *(unsigned int *) 0xFC60
|
#define PRODUCT0 *(unsigned int *) 0xFC60
|
||||||
@@ -353,6 +315,8 @@ struct __suzy {
|
|||||||
#define REMAINDER1 *(unsigned int *) 0xFC6E
|
#define REMAINDER1 *(unsigned int *) 0xFC6E
|
||||||
#define REMAINDER *(long *) 0xFC6C
|
#define REMAINDER *(long *) 0xFC6C
|
||||||
|
|
||||||
|
// Deprecated definitions
|
||||||
|
|
||||||
/* MAPCTL $FFF9 */
|
/* MAPCTL $FFF9 */
|
||||||
#define HIGHSPEED 0x80
|
#define HIGHSPEED 0x80
|
||||||
#define VECTORSPACE 0x08
|
#define VECTORSPACE 0x08
|
||||||
|
Reference in New Issue
Block a user