diff --git a/TODO b/TODO index ebaca3a..fe76cca 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,5 @@ Extensions on existing code: +* stdio: support %f in printf * project: add license file * kernel: group linker script symbols in a single header file * kernel: be consistent about *tlb_mapped_memory() in hw_detect() @@ -20,3 +21,5 @@ Future directions. * USB communication, using Yatis' reverse-engineering of the module * Make fx9860g projects work out of the box on fxcg50 * Use the DSP to enhance parallel computation +* Dynamic memory allocation +* Base for Yatis' threads library diff --git a/src/kernel/hardware.c b/src/kernel/hardware.c index f957ff6..129abd0 100644 --- a/src/kernel/hardware.c +++ b/src/kernel/hardware.c @@ -98,10 +98,12 @@ void hw_detect(void) *R4 = b4; gint[HWRAM] = ext ? (512 << 10) : (256 << 10); - /* Will be detected later on */ - gint[HWURAM] = -1; /* Traditionally 4 MiB, Graph 35+E II has 8 MiB */ gint[HWROM] = (gint[HWCALC] == HWCALC_G35PE2) ? (8 << 20) : (4 << 20); + + /* Mapped memory */ + if(isSH3()) tlb_mapped_memory(NULL, NULL); + else utlb_mapped_memory(NULL, NULL); } #endif /* FX9860G and platform-agnostic */ @@ -130,8 +132,7 @@ void hw_detect(void) gint[HWROM] = (32 << 20); /* Mapped memory */ - if(isSH3()) tlb_mapped_memory(NULL, NULL); - else utlb_mapped_memory(NULL, NULL); + utlb_mapped_memory(NULL, NULL); } #endif /* FXCG50 */ diff --git a/src/render-cg/dvram.c b/src/render-cg/dvram.c index e1a9031..e9f7b83 100644 --- a/src/render-cg/dvram.c +++ b/src/render-cg/dvram.c @@ -32,6 +32,7 @@ __attribute__((constructor)) static void init_vram(void) { /* On Prizm and fx-CG Manager, move address to 0xa8000000 */ + /* TODO: Detect base RAM address in BSC rather than hardcoding it */ if(gint[HWCALC] == HWCALC_PRIZM || gint[HWCALC] == HWCALC_FXCG_MANAGER) { main = (void *)main - 0x04000000;