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 Wed Dec 02 10:36:49 2009 +1000 (14 years ago)
permissions -rw-r--r--
last change Add missing SUBV instruction to the emulation core (translation core is ok),
along with test cases. Thanks to D. Jeff Dionne for pointing this out.
view annotate diff log raw
     2 #include <stdio.h>
     4 #define EVENT_PVR_RENDER_DONE 2
     5 #define EVENT_SCANLINE1 3
     6 #define EVENT_SCANLINE2 4
     7 #define EVENT_RETRACE   5
     8 #define EVENT_PVR_UNK 6
     9 #define EVENT_PVR_OPAQUE_DONE 7
    10 #define EVENT_PVR_OPAQUEMOD_DONE 8
    11 #define EVENT_PVR_TRANS_DONE 9
    12 #define EVENT_PVR_TRANSMOD_DONE 10
    13 #define EVENT_MAPLE_DMA 12
    14 #define EVENT_MAPLE_ERR 13 /* ??? */
    15 #define EVENT_IDE_DMA 14
    16 #define EVENT_G2_DMA0  15
    17 #define EVENT_G2_DMA1  16
    18 #define EVENT_G2_DMA2  17
    19 #define EVENT_G2_DMA3  18
    20 #define EVENT_PVR_DMA   19
    21 #define EVENT_SORT_DMA  20
    22 #define EVENT_PVR_PUNCHOUT_DONE 21
    24 #define EVENT_TA_ERROR  31
    25 #define EVENT_IDE       32
    26 #define EVENT_AICA      33
    28 #define EVENT_PVR_PRIM_ALLOC_FAIL 66
    29 #define EVENT_PVR_MATRIX_ALLOC_FAIL 67
    30 #define EVENT_PVR_BAD_INPUT 68
    32 #define EVENT_SORT_DMA_ERR 92
    34 /**
    35  * Wait for an ASIC event. 
    36  * @return 0 if the event occurred, otherwise -1 if the wait timed out.
    37  */
    38 int asic_wait( int event );
    40 /**
    41  * Wait for either of a pair of events.
    42  * @return the event ID of the event that occured, or -1 if the wait timed out
    43  */
    44 int asic_wait2( int event1, int event2 );
    46 /**
    47  * Check if an ASIC event is active (does not wait)
    48  * @return 0 if inactive, nonzero if active.
    49  */
    50 int asic_check( int event );
    52 /**
    53  * Clear all asic events
    54  */
    55 void asic_clear();
    57 /**
    58  * Print the contents of the ASIC event registers to the supplied FILE
    59  */
    60 void asic_dump( FILE *f );
    62 void asic_mask_all();
    64 /**
    65  * Wait until the G2 FIFO buffer is clear to write
    66  */
    67 int g2_fifo_wait();
.