mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-25 03:56:54 +01:00
use libdragon io
This commit is contained in:
parent
35e4727c16
commit
3d61ed89f1
@ -14,9 +14,7 @@
|
|||||||
|
|
||||||
// FIXME: redefined because its in a .c instead of a .h
|
// FIXME: redefined because its in a .c instead of a .h
|
||||||
#define PI_BASE_REG 0x04600000
|
#define PI_BASE_REG 0x04600000
|
||||||
#define IO_READ(addr) (*(volatile uint32_t *)PHYS_TO_K1(addr))
|
///////////////////////////////////////////////////////
|
||||||
#define IO_WRITE(addr,data) \
|
|
||||||
(*(volatile uint32_t *)PHYS_TO_K1(addr) = (uint32_t)(data))
|
|
||||||
|
|
||||||
#define PIF_RAM_START 0x1FC007C0
|
#define PIF_RAM_START 0x1FC007C0
|
||||||
#define PI_STATUS_ERROR 0x04
|
#define PI_STATUS_ERROR 0x04
|
||||||
@ -38,6 +36,7 @@
|
|||||||
#define PI_BSD_DOM2_PWD_REG (PI_BASE_REG+0x28)
|
#define PI_BSD_DOM2_PWD_REG (PI_BASE_REG+0x28)
|
||||||
#define PI_BSD_DOM2_PGS_REG (PI_BASE_REG+0x2C)
|
#define PI_BSD_DOM2_PGS_REG (PI_BASE_REG+0x2C)
|
||||||
#define PI_BSD_DOM2_RLS_REG (PI_BASE_REG+0x30)
|
#define PI_BSD_DOM2_RLS_REG (PI_BASE_REG+0x30)
|
||||||
|
///////////////////////////////////////////////////////
|
||||||
|
|
||||||
#define PHYS_TO_K0(x) ((unsigned long)(x)|0x80000000) /* physical to kseg0 */
|
#define PHYS_TO_K0(x) ((unsigned long)(x)|0x80000000) /* physical to kseg0 */
|
||||||
#define K0_TO_PHYS(x) ((unsigned long)(x)&0x1FFFFFFF) /* kseg0 to physical */
|
#define K0_TO_PHYS(x) ((unsigned long)(x)&0x1FFFFFFF) /* kseg0 to physical */
|
||||||
|
Loading…
Reference in New Issue
Block a user