Search
lxdream.org :: lxdream/test/asic.h
lxdream 0.9.1
released Jun 29
Download Now
filename test/asic.h
changeset 815:866c103d72cd
prev812:8cc61d5ea1f8
author nkeynes
date Mon Aug 18 12:20:28 2008 +0000 (14 years ago)
permissions -rw-r--r--
last change Implement memcpy_to_aica, still a work in progress though
file annotate diff log raw
nkeynes@185
     1
nkeynes@185
     2
#include <stdio.h>
nkeynes@185
     3
nkeynes@185
     4
#define EVENT_PVR_RENDER_DONE 2
nkeynes@185
     5
#define EVENT_SCANLINE1 3
nkeynes@185
     6
#define EVENT_SCANLINE2 4
nkeynes@185
     7
#define EVENT_RETRACE   5
nkeynes@185
     8
#define EVENT_PVR_UNK 6
nkeynes@185
     9
#define EVENT_PVR_OPAQUE_DONE 7
nkeynes@185
    10
#define EVENT_PVR_OPAQUEMOD_DONE 8
nkeynes@185
    11
#define EVENT_PVR_TRANS_DONE 9
nkeynes@185
    12
#define EVENT_PVR_TRANSMOD_DONE 10
nkeynes@185
    13
#define EVENT_MAPLE_DMA 12
nkeynes@185
    14
#define EVENT_MAPLE_ERR 13 /* ??? */
nkeynes@185
    15
#define EVENT_IDE_DMA 14
nkeynes@812
    16
#define EVENT_G2_DMA0  15
nkeynes@812
    17
#define EVENT_G2_DMA1  16
nkeynes@812
    18
#define EVENT_G2_DMA2  17
nkeynes@812
    19
#define EVENT_G2_DMA3  18
nkeynes@185
    20
#define EVENT_PVR_DMA   19
nkeynes@753
    21
#define EVENT_SORT_DMA  20
nkeynes@185
    22
#define EVENT_PVR_PUNCHOUT_DONE 21
nkeynes@185
    23
nkeynes@193
    24
#define EVENT_TA_ERROR  31
nkeynes@185
    25
#define EVENT_IDE       32
nkeynes@185
    26
#define EVENT_AICA      33
nkeynes@185
    27
nkeynes@193
    28
#define EVENT_PVR_PRIM_ALLOC_FAIL 66
nkeynes@193
    29
#define EVENT_PVR_MATRIX_ALLOC_FAIL 67
nkeynes@193
    30
#define EVENT_PVR_BAD_INPUT 68
nkeynes@193
    31
nkeynes@753
    32
#define EVENT_SORT_DMA_ERR 92
nkeynes@753
    33
nkeynes@185
    34
/**
nkeynes@185
    35
 * Wait for an ASIC event. 
nkeynes@185
    36
 * @return 0 if the event occurred, otherwise -1 if the wait timed out.
nkeynes@185
    37
 */
nkeynes@185
    38
int asic_wait( int event );
nkeynes@185
    39
nkeynes@185
    40
/**
nkeynes@753
    41
 * Wait for either of a pair of events.
nkeynes@753
    42
 * @return the event ID of the event that occured, or -1 if the wait timed out
nkeynes@753
    43
 */
nkeynes@753
    44
int asic_wait2( int event1, int event2 );
nkeynes@753
    45
nkeynes@753
    46
/**
nkeynes@193
    47
 * Check if an ASIC event is active (does not wait)
nkeynes@193
    48
 * @return 0 if inactive, nonzero if active.
nkeynes@193
    49
 */
nkeynes@193
    50
int asic_check( int event );
nkeynes@193
    51
nkeynes@193
    52
/**
nkeynes@185
    53
 * Clear all asic events
nkeynes@185
    54
 */
nkeynes@185
    55
void asic_clear();
nkeynes@185
    56
nkeynes@185
    57
/**
nkeynes@185
    58
 * Print the contents of the ASIC event registers to the supplied FILE
nkeynes@185
    59
 */
nkeynes@185
    60
void asic_dump( FILE *f );
nkeynes@185
    61
nkeynes@185
    62
void asic_mask_all();
nkeynes@815
    63
nkeynes@815
    64
/**
nkeynes@815
    65
 * Wait until the G2 FIFO buffer is clear to write
nkeynes@815
    66
 */
nkeynes@815
    67
int g2_fifo_wait();
.