Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Functions
cia6526.c File Reference
#include "xemu/emutools.h"
#include "xemu/cia6526.h"
Include dependency graph for cia6526.c:

Go to the source code of this file.

Macros

#define ICR_CHECK()
 
#define ICR_SET(mask)
 
#define ICR_CLEAR(mask)
 

Functions

void cia_reset (struct Cia6526 *cia)
 
void cia_flag (struct Cia6526 *cia)
 
void cia_init (struct Cia6526 *cia, const char *name, void(*outa)(Uint8 data), void(*outb)(Uint8 data), void(*outsr)(Uint8 data), Uint8(*ina)(void), Uint8(*inb)(void), Uint8(*insr)(void), void(*setint)(int level))
 
Uint8 cia_read (struct Cia6526 *cia, int addr)
 
void cia_write (struct Cia6526 *cia, int addr, Uint8 data)
 
void cia_ugly_tod_updater (struct Cia6526 *cia, const struct tm *t, Uint8 sec10, int hour_offset)
 
void cia_tick (struct Cia6526 *cia, int ticks)
 
void cia_dump_state (struct Cia6526 *cia)
 

Macro Definition Documentation

◆ ICR_CHECK

#define ICR_CHECK ( )
Value:
do { \
if (cia->ICRmask & cia->ICRdata & 31) { \
cia->ICRdata |= 128; \
if (!cia->intLevel) { cia->intLevel = 1; cia->setint(1); DEBUG("%s IRQ to 1" NL, cia->name); } \
} else { \
cia->ICRdata &= 127; \
if ( cia->intLevel) { cia->intLevel = 0; cia->setint(0); DEBUG("%s IRQ to 0" NL, cia->name); } \
} \
} while(0)

Definition at line 39 of file cia6526.c.

◆ ICR_CLEAR

#define ICR_CLEAR (   mask)
Value:
do { \
cia->ICRdata &= 255 - (mask); \
ICR_CHECK(); \
} while(0)

Definition at line 55 of file cia6526.c.

◆ ICR_SET

#define ICR_SET (   mask)
Value:
do { \
cia->ICRdata |= (mask) & 31; \
DEBUG("%s ICR set to data $%02X, mask is $%02X" NL, cia->name, cia->ICRdata, cia->ICRmask); \
ICR_CHECK(); \
} while(0)

Definition at line 49 of file cia6526.c.

Function Documentation

◆ cia_dump_state()

void cia_dump_state ( struct Cia6526 cia)

Definition at line 323 of file cia6526.c.

◆ cia_flag()

void cia_flag ( struct Cia6526 cia)

Definition at line 82 of file cia6526.c.

◆ cia_init()

void cia_init ( struct Cia6526 cia,
const char *  name,
void(*)(Uint8 data outa,
void(*)(Uint8 data outb,
void(*)(Uint8 data outsr,
Uint8(*)(void)  ina,
Uint8(*)(void)  inb,
Uint8(*)(void)  insr,
void(*)(int level)  setint 
)

Definition at line 98 of file cia6526.c.

◆ cia_read()

Uint8 cia_read ( struct Cia6526 cia,
int  addr 
)

Definition at line 121 of file cia6526.c.

◆ cia_reset()

void cia_reset ( struct Cia6526 cia)

Definition at line 63 of file cia6526.c.

◆ cia_tick()

void cia_tick ( struct Cia6526 cia,
int  ticks 
)

Definition at line 281 of file cia6526.c.

◆ cia_ugly_tod_updater()

void cia_ugly_tod_updater ( struct Cia6526 cia,
const struct tm *  t,
Uint8  sec10,
int  hour_offset 
)

Definition at line 270 of file cia6526.c.

◆ cia_write()

void cia_write ( struct Cia6526 cia,
int  addr,
Uint8  data 
)

Definition at line 169 of file cia6526.c.

NL
#define NL
Definition: fat32.c:37
mask
int mask
Definition: dma65.c:83
DEBUG
#define DEBUG(...)
Definition: emutools_basicdefs.h:167