From 1c8e7a476593b8359c7610129b296c87c4e50fd9 Mon Sep 17 00:00:00 2001 From: Polprzewodnikowy Date: Fri, 21 Jan 2022 21:42:17 +0100 Subject: [PATCH] reduced buffer size --- sw/n64/src/io.h | 4 ++-- sw/riscv/SC64.ld | 4 ++-- sw/riscv/src/sys.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sw/n64/src/io.h b/sw/n64/src/io.h index e6897cf..8e8eb4e 100644 --- a/sw/n64/src/io.h +++ b/sw/n64/src/io.h @@ -230,8 +230,8 @@ typedef struct { io32_t DATA[2]; io32_t VERSION; io32_t __padding[4092]; - io32_t CPU_RAM[3840]; - io32_t BUFFER[256]; + io32_t CPU_RAM[3968]; + io32_t BUFFER[128]; } sc64_regs_t; #define SC64_BASE (0x1FFF0000UL) diff --git a/sw/riscv/SC64.ld b/sw/riscv/SC64.ld index 69d4601..1573836 100644 --- a/sw/riscv/SC64.ld +++ b/sw/riscv/SC64.ld @@ -1,6 +1,6 @@ MEMORY { - ram (rwx) : org = 0x00000000, len = 15k - buffer (rw) : org = 0x00003C00, len = 1k + ram (rwx) : org = 0x00000000, len = 16k - 512 + buffer (rw) : org = 0x00003E00, len = 512 rom (rx) : org = 0x10010000, len = 26k } diff --git a/sw/riscv/src/sys.h b/sw/riscv/src/sys.h index ff90138..0e227d0 100644 --- a/sw/riscv/src/sys.h +++ b/sw/riscv/src/sys.h @@ -22,11 +22,11 @@ typedef volatile uint32_t io32_t; #define RAM_BASE (0x00000000UL) +#define RAMBUFFER_SIZE (512) +#define RAM_SIZE ((16 * 1024) - RAMBUFFER_SIZE) +#define RAMBUFFER_BASE (RAM_BASE + RAM_SIZE) #define RAM (*((io32_t *) RAM_BASE)) -#define RAM_SIZE (15 * 1024) -#define RAMBUFFER_BASE (0x00003C00UL) #define RAMBUFFER (*((io8_t *) RAMBUFFER_BASE)) -#define RAMBUFFER_SIZE (1 * 1024) #define FLASH_BASE (0x10000000UL)