libElysianVMU 1.6.0
Full-featured, accurate, cross-platform library emulating the Dreamcast's Visual Memory Unit
Loading...
Searching...
No Matches
evmu_pic.h File Reference

Go to the source code of this file.

Data Structures

struct  EvmuPicClass
 
struct  EvmuPic
 

Macros

#define EVMU_PIC_NAME   "pic"
 
#define EVMU_ISR_ADDR_RESET   0x00
 
#define EVMU_ISR_ADDR_EXT_INT0   0x03
 
#define EVMU_ISR_ADDR_EXT_INT1   0x0b
 
#define EVMU_ISR_ADDR_EXT_INT2_T0L   0x13
 
#define EVMU_ISR_ADDR_EXT_INT3_TBASE   0x1b
 
#define EVMU_ISR_ADDR_T0H   0x23
 
#define EVMU_ISR_ADDR_T1   0x2b
 
#define EVMU_ISR_ADDR_SIO0   0x33
 
#define EVMU_ISR_ADDR_SIO1   0x3b
 
#define EVMU_ISR_ADDR_RFB   0x43
 
#define EVMU_ISR_ADDR_P3   0x4b
 
#define EVMU_ISR_ADDR_11   0x4f
 
#define EVMU_ISR_ADDR_12   0x52
 
#define EVMU_ISR_ADDR_13   0x55
 
#define EVMU_ISR_ADDR_14   0x5a
 
#define EVMU_ISR_ADDR_15   0x5d
 
Type System

Type UUID and cast operators

#define EVMU_PIC_TYPE   (GBL_TYPEID(EvmuPic))
 
#define EVMU_PIC(self)   (GBL_CAST(EvmuPic, self))
 
#define EVMU_PIC_CLASS(klass)   (GBL_CLASS_CAST(EvmuPic, klass))
 
#define EVMU_PIC_GET_CLASS(self)   (GBL_CLASSOF(EvmuPic, self))
 

Typedefs

typedef GblEnum EVMU_IRQ
 
typedef GblEnum EVMU_IRQ_PRIORITY
 
typedef uint16_t EvmuIrqMask
 

Enumerations

enum  EVMU_IRQ
 
enum  EVMU_IRQ_PRIORITY
 

Functions

GblType EvmuPic_type (void)
 
static EvmuAddress EvmuPic_isrAddress (EVMU_IRQ irq)
 

Detailed Description

EvmuPic programmable interrupt controller peripheral.

This file models the programmable interrupt controller of the VMU.

Todo:
  • shouldn't update be private?
Author
2023 Falco Girgis

Definition in file evmu_pic.h.

Macro Definition Documentation

◆ EVMU_PIC

#define EVMU_PIC (   self)    (GBL_CAST(EvmuPic, self))

Function-style GblInstance cast.

Definition at line 26 of file evmu_pic.h.

◆ EVMU_PIC_CLASS

#define EVMU_PIC_CLASS (   klass)    (GBL_CLASS_CAST(EvmuPic, klass))

Function-style GblClass cast.

Definition at line 27 of file evmu_pic.h.

◆ EVMU_PIC_GET_CLASS

#define EVMU_PIC_GET_CLASS (   self)    (GBL_CLASSOF(EvmuPic, self))

Get EvmuPicClass from GblInstance

Definition at line 28 of file evmu_pic.h.

◆ EVMU_PIC_NAME

#define EVMU_PIC_NAME   "pic"

EvmuPic GblObject name.

Definition at line 31 of file evmu_pic.h.

◆ EVMU_PIC_TYPE

#define EVMU_PIC_TYPE   (GBL_TYPEID(EvmuPic))

Type UUID for EvmuPic.

Definition at line 25 of file evmu_pic.h.

Typedef Documentation

◆ EVMU_IRQ

typedef GblEnum EVMU_IRQ

Enumeration of all the different IRQ types.

Definition at line 62 of file evmu_pic.h.

◆ EVMU_IRQ_PRIORITY

All available interrupt priority levels.

Definition at line 83 of file evmu_pic.h.

◆ EvmuIrqMask

typedef uint16_t EvmuIrqMask

Mask of EVMU_IRQ values shifted and OR'd into a single mask.

Definition at line 92 of file evmu_pic.h.

Enumeration Type Documentation

◆ EVMU_IRQ

enum EVMU_IRQ
Enumerator
EVMU_IRQ_RESET 

Reset.

EVMU_IRQ_EXT_INT0 

INT0.

EVMU_IRQ_EXT_INT1 

INT1.

EVMU_IRQ_EXT_INT2_T0L 

INT2 or T0L overflow.

EVMU_IRQ_EXT_INT3_TBASE 

INT3 or TBase overflow.

EVMU_IRQ_T0H 

TOH Overflow.

EVMU_IRQ_T1 

T1H or T1L overflow.

EVMU_IRQ_SIO0 

SIO0.

EVMU_IRQ_SIO1 

SI01.

EVMU_IRQ_RFB 

Maple.

EVMU_IRQ_P3 

Port 3.

EVMU_IRQ_11 

ISR 11 (?)

EVMU_IRQ_12 

ISR 12 (?)

EVMU_IRQ_13 

ISR 13 (?)

EVMU_IRQ_14 

ISR 14 (?)

EVMU_IRQ_15 

ISR 15 (?)

EVMU_IRQ_COUNT 

Number of ISRs (16)

Definition at line 62 of file evmu_pic.h.

62 {
80};
@ EVMU_IRQ_EXT_INT1
INT1.
Definition evmu_pic.h:65
@ EVMU_IRQ_EXT_INT2_T0L
INT2 or T0L overflow.
Definition evmu_pic.h:66
@ EVMU_IRQ_T1
T1H or T1L overflow.
Definition evmu_pic.h:69
@ EVMU_IRQ_EXT_INT0
INT0.
Definition evmu_pic.h:64
@ EVMU_IRQ_P3
Port 3.
Definition evmu_pic.h:73
@ EVMU_IRQ_13
ISR 13 (?)
Definition evmu_pic.h:76
@ EVMU_IRQ_T0H
TOH Overflow.
Definition evmu_pic.h:68
@ EVMU_IRQ_15
ISR 15 (?)
Definition evmu_pic.h:78
@ EVMU_IRQ_SIO0
SIO0.
Definition evmu_pic.h:70
@ EVMU_IRQ_RFB
Maple.
Definition evmu_pic.h:72
@ EVMU_IRQ_RESET
Reset.
Definition evmu_pic.h:63
@ EVMU_IRQ_14
ISR 14 (?)
Definition evmu_pic.h:77
@ EVMU_IRQ_SIO1
SI01.
Definition evmu_pic.h:71
@ EVMU_IRQ_COUNT
Number of ISRs (16)
Definition evmu_pic.h:79
@ EVMU_IRQ_EXT_INT3_TBASE
INT3 or TBase overflow.
Definition evmu_pic.h:67
@ EVMU_IRQ_11
ISR 11 (?)
Definition evmu_pic.h:74
@ EVMU_IRQ_12
ISR 12 (?)
Definition evmu_pic.h:75

◆ EVMU_IRQ_PRIORITY

Enumerator
EVMU_IRQ_PRIORITY_LOW 

Low.

EVMU_IRQ_PRIORITY_HIGH 

High.

EVMU_IRQ_PRIORITY_HIGHEST 

Highest.

EVMU_IRQ_PRIORITY_COUNT 

Number of levels.

EVMU_IRQ_PRIORITY_NONE 

No level (not valid)

Definition at line 83 of file evmu_pic.h.

83 {
89};
@ EVMU_IRQ_PRIORITY_LOW
Low.
Definition evmu_pic.h:84
@ EVMU_IRQ_PRIORITY_COUNT
Number of levels.
Definition evmu_pic.h:87
@ EVMU_IRQ_PRIORITY_HIGHEST
Highest.
Definition evmu_pic.h:86
@ EVMU_IRQ_PRIORITY_HIGH
High.
Definition evmu_pic.h:85
@ EVMU_IRQ_PRIORITY_NONE
No level (not valid)
Definition evmu_pic.h:88

Function Documentation

◆ EvmuPic_isrAddress()

static EvmuAddress EvmuPic_isrAddress ( EVMU_IRQ  irq)
inlinestatic

Static method returning the corresponding ISR address for a given interrupt routine.

◆ EvmuPic_type()

GblType EvmuPic_type ( void  )

Returns the GblType UUID associated with EvmuPic.