mirror of
https://github.com/cc65/cc65.git
synced 2024-12-26 08:32:00 +00:00
Changed to C style comments
This commit is contained in:
parent
0c018919fe
commit
3dad6c76fa
@ -109,7 +109,7 @@ struct __mikey {
|
||||
} vectors;
|
||||
};
|
||||
|
||||
// TIM_CONTROLA control bit definitions
|
||||
/* TIM_CONTROLA control bit definitions */
|
||||
enum {
|
||||
ENABLE_INT = 0x80,
|
||||
RESET_DONE = 0x40,
|
||||
@ -117,13 +117,13 @@ enum {
|
||||
ENABLE_COUNT = 0x08
|
||||
};
|
||||
|
||||
// AUD_CONTROL control bit definitions
|
||||
/* AUD_CONTROL control bit definitions */
|
||||
enum {
|
||||
FEEDBACK_7 = 0x80,
|
||||
ENABLE_INTEGRATE = 0x20
|
||||
};
|
||||
|
||||
// Audio and timer clock settings for source period
|
||||
/* Audio and timer clock settings for source period */
|
||||
enum {
|
||||
AUD_LINKING = 0x07,
|
||||
AUD_64 = 0x06,
|
||||
@ -135,7 +135,7 @@ enum {
|
||||
AUD_1 = 0x00
|
||||
};
|
||||
|
||||
// TIM_CONTROLB control bit definitions
|
||||
/* TIM_CONTROLB control bit definitions */
|
||||
enum {
|
||||
TIMER_DONE = 0x08,
|
||||
LAST_CLOCK = 0x04,
|
||||
@ -143,7 +143,7 @@ enum {
|
||||
BORROW_OUT = 0x01
|
||||
};
|
||||
|
||||
// MPAN and MSTEREO registers bit definitions
|
||||
/* MPAN and MSTEREO registers bit definitions */
|
||||
enum {
|
||||
LEFT3_SELECT = 0x80,
|
||||
LEFT2_SELECT = 0x40,
|
||||
@ -157,7 +157,7 @@ enum {
|
||||
RIGHT_ATTENMASK = 0x0F
|
||||
};
|
||||
|
||||
// Interrupt Reset and Set bit definitions
|
||||
/* Interrupt Reset and Set bit definitions */
|
||||
enum {
|
||||
TIMER7_INT = 0x80,
|
||||
TIMER6_INT = 0x40,
|
||||
@ -172,13 +172,13 @@ enum {
|
||||
HORIZONTAL_INT = TIMER0_INT
|
||||
};
|
||||
|
||||
// SYSCTL1 bit definitions
|
||||
/* SYSCTL1 bit definitions */
|
||||
enum {
|
||||
POWERON = 0x02,
|
||||
CART_ADDR_STROBE = 0x01
|
||||
};
|
||||
|
||||
// IODIR and IODAT bit definitions
|
||||
/* IODIR and IODAT bit definitions */
|
||||
enum {
|
||||
AUDIN_BIT = 0x10, // different from AUDIN address
|
||||
READ_ENABLE = 0x10, // same bit for AUDIN_BIT
|
||||
@ -189,7 +189,7 @@ enum {
|
||||
EXTERNAL_POWER = 0x01
|
||||
};
|
||||
|
||||
// SERCTL bit definitions for write operations
|
||||
/* SERCTL bit definitions for write operations */
|
||||
enum {
|
||||
TXINTEN = 0x80,
|
||||
RXINTEN = 0x40,
|
||||
@ -200,7 +200,7 @@ enum {
|
||||
PAREVEN = 0x01
|
||||
};
|
||||
|
||||
// SERCTL bit definitions for read operations
|
||||
/* SERCTL bit definitions for read operations */
|
||||
enum {
|
||||
TXRDY = 0x80,
|
||||
RXRDY = 0x40,
|
||||
@ -212,7 +212,7 @@ enum {
|
||||
PARBIT = 0x01
|
||||
};
|
||||
|
||||
// DISPCTL bit definitions
|
||||
/* DISPCTL bit definitions */
|
||||
enum {
|
||||
DISP_COLOR = 0x08, // must be set to 1
|
||||
DISP_FOURBIT = 0x04, // must be set to 1
|
||||
@ -220,7 +220,7 @@ enum {
|
||||
DMA_ENABLE = 0x01 // must be set to 1
|
||||
};
|
||||
|
||||
// MTEST0 bit definitions
|
||||
/* MTEST0 bit definitions */
|
||||
enum {
|
||||
AT_CNT16 = 0x80,
|
||||
AT_TEST = 0x40,
|
||||
@ -232,7 +232,7 @@ enum {
|
||||
CPU_TEST = 0x01
|
||||
};
|
||||
|
||||
// MTEST1 bit definitions
|
||||
/* MTEST1 bit definitions */
|
||||
enum {
|
||||
P_CNT16 = 0x40,
|
||||
REF_CNT16 = 0x20,
|
||||
@ -243,7 +243,7 @@ enum {
|
||||
REF_DIS = 0x01
|
||||
};
|
||||
|
||||
// MTEST2 bit definitions
|
||||
/* MTEST2 bit definitions */
|
||||
enum {
|
||||
V_STROBE = 0x10,
|
||||
V_ZERO = 0x08,
|
||||
@ -252,7 +252,7 @@ enum {
|
||||
V_BLANKEF = 0x01
|
||||
};
|
||||
|
||||
// MAPCTL bit definitions
|
||||
/* MAPCTL bit definitions */
|
||||
enum {
|
||||
TURBO_DISABLE = 0x80,
|
||||
VECTOR_SPACE = 0x08,
|
||||
|
@ -27,7 +27,7 @@
|
||||
#ifndef __SUZY_H
|
||||
#define __SUZY_H
|
||||
|
||||
// JOYSTICK bit definitions
|
||||
/* JOYSTICK bit definitions */
|
||||
enum {
|
||||
JOYPAD_RIGHT = 0x10,
|
||||
JOYPAD_LEFT = 0x20,
|
||||
@ -39,14 +39,14 @@ enum {
|
||||
BUTTON_OUTER = 0x01
|
||||
};
|
||||
|
||||
// SWITCHES bit definitions
|
||||
/* SWITCHES bit definitions */
|
||||
enum {
|
||||
CART1_IO_INACTIVE = 0x04,
|
||||
CART0_IO_INACTIVE = 0x02,
|
||||
BUTTON_PAUSE = 0x01
|
||||
};
|
||||
|
||||
// SPRCTL0 bit definitions
|
||||
/* SPRCTL0 bit definitions */
|
||||
enum {
|
||||
BPP_4 = 0xC0,
|
||||
BPP_3 = 0x80,
|
||||
@ -64,7 +64,7 @@ enum {
|
||||
TYPE_BACKGROUND = 0x00
|
||||
};
|
||||
|
||||
// SPRCTL1 bit definitions
|
||||
/* SPRCTL1 bit definitions */
|
||||
enum {
|
||||
LITERAL = 0x80,
|
||||
PACKED = 0x00,
|
||||
@ -79,9 +79,10 @@ enum {
|
||||
DRAWLEFT = 0x01
|
||||
};
|
||||
|
||||
// Sprite control block (SCB) definitions
|
||||
/* Sprite control block (SCB) definitions */
|
||||
|
||||
typedef struct SCB_REHVST_PAL { // SCB with all attributes
|
||||
/* SCB with all attributes */
|
||||
typedef struct SCB_REHVST_PAL {
|
||||
unsigned char sprctl0;
|
||||
unsigned char sprctl1;
|
||||
unsigned char sprcoll;
|
||||
@ -96,7 +97,8 @@ typedef struct SCB_REHVST_PAL { // SCB with all attributes
|
||||
unsigned char penpal[8];
|
||||
} SCB_REHVST_PAL;
|
||||
|
||||
typedef struct SCB_REHVST { // SCB without pallette
|
||||
/* SCB without pallette */
|
||||
typedef struct SCB_REHVST {
|
||||
unsigned char sprctl0;
|
||||
unsigned char sprctl1;
|
||||
unsigned char sprcoll;
|
||||
@ -110,7 +112,8 @@ typedef struct SCB_REHVST { // SCB without pallette
|
||||
unsigned int tilt;
|
||||
} SCB_REHVST;
|
||||
|
||||
typedef struct SCB_REHV { // SCB without stretch/tilt
|
||||
/* SCB without stretch/tilt */
|
||||
typedef struct SCB_REHV {
|
||||
unsigned char sprctl0;
|
||||
unsigned char sprctl1;
|
||||
unsigned char sprcoll;
|
||||
@ -122,7 +125,8 @@ typedef struct SCB_REHV { // SCB without stretch/tilt
|
||||
unsigned int vsize;
|
||||
} SCB_REHV;
|
||||
|
||||
typedef struct SCB_REHV_PAL { // SCB without str/tilt, w/ penpal
|
||||
/* SCB without stretch/tilt, with penpal */
|
||||
typedef struct SCB_REHV_PAL {
|
||||
unsigned char sprctl0;
|
||||
unsigned char sprctl1;
|
||||
unsigned char sprcoll;
|
||||
@ -135,7 +139,8 @@ typedef struct SCB_REHV_PAL { // SCB without str/tilt, w/ penpal
|
||||
unsigned char penpal[8];
|
||||
} SCB_REHV_PAL;
|
||||
|
||||
typedef struct SCB_REHVS { // SCB w/o tilt & penpal
|
||||
/* SCB without tilt/penpal */
|
||||
typedef struct SCB_REHVS {
|
||||
unsigned char sprctl0;
|
||||
unsigned char sprctl1;
|
||||
unsigned char sprcoll;
|
||||
@ -148,7 +153,8 @@ typedef struct SCB_REHVS { // SCB w/o tilt & penpal
|
||||
unsigned int stretch;
|
||||
} SCB_REHVS;
|
||||
|
||||
typedef struct SCB_REHVS_PAL { // SCB w/o tilt w/penpal
|
||||
/* SCB without tilt, with penpal */
|
||||
typedef struct SCB_REHVS_PAL {
|
||||
unsigned char sprctl0;
|
||||
unsigned char sprctl1;
|
||||
unsigned char sprcoll;
|
||||
@ -162,7 +168,8 @@ typedef struct SCB_REHVS_PAL { // SCB w/o tilt w/penpal
|
||||
unsigned char penpal[8];
|
||||
} SCB_REHVS_PAL;
|
||||
|
||||
typedef struct SCB_RENONE { // SCB w/o size/stretch/tilt/pal
|
||||
/* SCB without size/stretch/tilt/penpal */
|
||||
typedef struct SCB_RENONE {
|
||||
unsigned char sprctl0;
|
||||
unsigned char sprctl1;
|
||||
unsigned char sprcoll;
|
||||
@ -172,7 +179,8 @@ typedef struct SCB_RENONE { // SCB w/o size/stretch/tilt/pal
|
||||
signed int vpos;
|
||||
} SCB_RENONE;
|
||||
|
||||
typedef struct SCB_RENONE_PAL { // SCB w/o size/str/tilt w/penpal
|
||||
/* SCB without size/str/tilt, with penpal */
|
||||
typedef struct SCB_RENONE_PAL {
|
||||
unsigned char sprctl0;
|
||||
unsigned char sprctl1;
|
||||
unsigned char sprcoll;
|
||||
@ -199,13 +207,13 @@ typedef struct PENPAL_1 {
|
||||
unsigned char penpal[1];
|
||||
} PENPAL_1;
|
||||
|
||||
// SPRGO bit definitions
|
||||
/* SPRGO bit definitions */
|
||||
enum {
|
||||
SPRITE_GO = 0x01, // sprite process start bit
|
||||
EVER_ON = 0x04 // everon detector enable
|
||||
};
|
||||
|
||||
// SPRSYS bit definitions for write operations
|
||||
/* SPRSYS bit definitions for write operations */
|
||||
enum {
|
||||
SIGNMATH = 0x80, // signed math
|
||||
ACCUMULATE = 0x40, // accumulate multiplication results
|
||||
@ -215,7 +223,8 @@ enum {
|
||||
CLR_UNSAFE = 0x04, // unsafe access reset
|
||||
SPRITESTOP = 0x02 // request to stop sprite process
|
||||
};
|
||||
// SPRSYS bit definitions for read operations
|
||||
|
||||
/* SPRSYS bit definitions for read operations */
|
||||
enum {
|
||||
MATHWORKING = 0x80, // math operation in progress
|
||||
MATHWARNING = 0x40, // accumulator overflow on multiple or divide by zero
|
||||
@ -227,7 +236,7 @@ enum {
|
||||
SPRITEWORKING = 0x01 // sprite process is active
|
||||
};
|
||||
|
||||
// Suzy hardware registers
|
||||
/* Suzy hardware registers */
|
||||
struct __suzy {
|
||||
unsigned char *tmpadr; // 0xFC00 Temporary address
|
||||
unsigned int tiltacc; // 0xFC02 Tilt accumulator
|
||||
@ -297,7 +306,7 @@ struct __suzy {
|
||||
// 0xFCC5 - 0xFCFF unused
|
||||
};
|
||||
|
||||
// Hardware math registers
|
||||
/* Hardware math registers */
|
||||
#define FACTOR_A *(unsigned int *) 0xFC54
|
||||
#define FACTOR_B *(unsigned int *) 0xFC52
|
||||
#define PRODUCT0 *(unsigned int *) 0xFC60
|
||||
@ -315,7 +324,7 @@ struct __suzy {
|
||||
#define REMAINDER1 *(unsigned int *) 0xFC6E
|
||||
#define REMAINDER *(long *) 0xFC6C
|
||||
|
||||
// Deprecated definitions
|
||||
/* Deprecated definitions */
|
||||
|
||||
/* MAPCTL $FFF9 */
|
||||
#define HIGHSPEED 0x80
|
||||
|
@ -79,12 +79,12 @@
|
||||
/* No support for dynamically loadable drivers */
|
||||
#define DYN_DRV 0
|
||||
|
||||
// Addresses of static drivers
|
||||
/* Addresses of static drivers */
|
||||
extern void lynx_stdjoy_joy[]; // Referred to by joy_static_stddrv[]
|
||||
extern void lynx_comlynx_ser[]; // Referred to by ser_static_stddrv[]
|
||||
extern void lynx_160_102_16_tgi[]; // Referred to by tgi_static_stddrv[]
|
||||
|
||||
// Sound support
|
||||
/* Sound support */
|
||||
void lynx_snd_init (void); // Initialize the sound driver
|
||||
void lynx_snd_pause (void); // Pause sound
|
||||
void lynx_snd_continue (void); // Continue sound after pause
|
||||
@ -93,18 +93,18 @@ void lynx_snd_stop (void); // Stop sound on all channels
|
||||
void __fastcall__ lynx_snd_stop_channel (unsigned char channel); // Stop sound on all channels
|
||||
unsigned char lynx_snd_active(void); // Show which channels are active
|
||||
|
||||
// Cartridge access
|
||||
/* Cartridge access */
|
||||
void __fastcall__ lynx_load (int file_number); // Load a file into RAM using a zero-based index
|
||||
void __fastcall__ lynx_exec (int file_number); // Load a file into ram and execute it
|
||||
|
||||
// EEPROM access
|
||||
/* EEPROM access */
|
||||
unsigned __fastcall__ lynx_eeprom_read (unsigned char cell); // Read a 16 bit word from the given address
|
||||
unsigned __fastcall__ lynx_eeprom_write (unsigned char cell, unsigned val); // Write the word at the given address
|
||||
void __fastcall__ lynx_eeprom_erase (unsigned char cell); // Clear the word at the given address
|
||||
unsigned __fastcall__ lynx_eeread (unsigned cell); // Read a 16 bit word from the given address 93C46, 93C66 or 93C86
|
||||
unsigned __fastcall__ lynx_eewrite (unsigned cell, unsigned val); // Write the word at the given address 93C46, 93C66 or 93C86
|
||||
|
||||
// TGI extras
|
||||
/* TGI extras */
|
||||
#define tgi_sprite(spr) tgi_ioctl(0, spr)
|
||||
#define tgi_flip() tgi_ioctl(1, (void*)0)
|
||||
#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (void*)(bgcol))
|
||||
|
Loading…
Reference in New Issue
Block a user