File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 44#include <excepman.h>
55#include "tty.h"
66
7- IRX_ID ("ppctty" , 1 , 0 );
7+ IRX_ID (MODNAME , 1 , 0 );
8+
9+ #define IS_DECKARD () \
10+ ({ \
11+ u16 iop_revision; \
12+ asm("mfc0 %0, $15\n" \
13+ : "=r"(iop_revision):); \
14+ iop_revision == 0x30; \
15+ })
816
917volatile uint8_t * PPC_UART_TX = (volatile uint8_t * ) 0x1F80380C ;
1018
@@ -19,7 +27,12 @@ int _start(int argc, char *argv[])
1927{
2028 (void )argc ;
2129 (void )argv ;
22-
30+ if (!IS_DECKARD ())
31+ {
32+ printf (MODNAME ": THIS PS2 IS NOT DECKARD\n" );
33+ return MODULE_NO_RESIDENT_END ;
34+ }
35+
2336 if (tty_init () != 0 )
2437 {
2538 printf ("Failed initializing PPC TTY system!\n" );
Original file line number Diff line number Diff line change @@ -13,9 +13,10 @@ IOP->PPC TTY
1313#include <intrman.h>
1414#include <ioman.h>
1515#include <thsemap.h>
16+ #include "tty.h"
1617
1718#ifdef DEBUG
18- #define DPRINTF (fmt , x ...) printf("ppctty : "fmt, ##x)
19+ #define DPRINTF (fmt , x ...) printf(MODNAME " : " fmt, ##x)
1920#else
2021#define DPRINTF (x ...)
2122#endif
Original file line number Diff line number Diff line change 33
44#include "tamtypes.h"
55#include <stdint.h>
6-
6+ #define MODNAME "ppctty"
77// Prototypes
88int tty_init (void );
99
You can’t perform that action at this time.
0 commit comments