PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
main.c
1
#include <
tamtypes.h
>
2
#include <
stdio.h
>
3
#include <
loadcore.h
>
4
#include <
excepman.h
>
5
#include <
ioman.h
>
6
#include <
iop_regs.h
>
7
#include "tty.h"
8
9
IRX_ID(MODNAME, 1, 0);
10
11
volatile
uint8_t *PPC_UART_TX = (
volatile
uint8_t *) 0x1F80380C;
12
13
// send a string to PPC TTY for output.
14
void
tty_puts(
const
char
*str)
15
{
16
const
char
*p = str;
17
while
(p && *p) *PPC_UART_TX = *(p++);
18
}
19
20
int
_start(
int
argc,
char
*argv[])
21
{
22
(void)argc;
23
(void)argv;
24
if
(IOP_CPU_TYPE == IOP_TYPE_MIPSR3000)
25
{
26
printf(MODNAME
": THIS PS2 IS NOT DECKARD\n"
);
27
return
MODULE_NO_RESIDENT_END;
28
}
29
30
if
(tty_init() != 0)
31
{
32
printf(
"Failed initializing PPC TTY system!\n"
);
33
return
MODULE_NO_RESIDENT_END;
34
}
35
36
FlushIcache();
37
FlushDcache();
38
39
printf(
"IOP PPC TTY installed!\n"
);
40
41
return
MODULE_RESIDENT_END;
42
}
excepman.h
ioman.h
iop_regs.h
loadcore.h
stdio.h
tamtypes.h
iop
debug
ppctty
src
main.c
Generated on Tue Feb 11 2025 21:35:57 for PS2SDK by
1.12.0