gint/ram, gint/dump: RS memory is 16 kB, not 2 kB

This commit is contained in:
Lephenixnoir 2023-07-10 23:46:13 +02:00
parent e941148996
commit 85fe567964
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 20 additions and 9 deletions

View File

@ -22,14 +22,14 @@ static struct region const regs[] = {
#ifdef FX9860G
{ "ROM", 0x80000000, 0x807fffff, 8 },
{ "RAM", 0x88000000, 0x88040000, 1 },
{ "RS", 0xfd800000, 0xfd8007ff, 1 },
{ "RS", 0xfd800000, 0xfd803fff, 1 },
#endif
#ifdef FXCG50
{ "ROM", 0x80000000, 0x81ffffff, 32 },
{ "RAM_88", 0x88000000, 0x881fffff, 2 },
{ "RAM_8C", 0x8c000000, 0x8c7fffff, 8 },
{ "RS", 0xfd800000, 0xfd8007ff, 1 },
{ "RS", 0xfd800000, 0xfd803fff, 1 },
#endif
};

View File

@ -1,5 +1,6 @@
#include <gint/display.h>
#include <gint/keyboard.h>
#include <gint/cpu.h>
#include <gintctl/util.h>
#include <gintctl/gint.h>
@ -98,29 +99,39 @@ static void explore_region(struct region *r)
{
uint8_t volatile *mem = (void *)r->mem;
r->size = 0;
r->reason = 0;
cpu_atomic_start();
while(r->size < (16 << 20))
{
int x = r->use_lword
? writable_lword(mem + r->size)
: writable(mem + r->size);
r->reason = 1;
if(!x) return;
if(!x)
{
r->reason = 1;
break;
}
if(r->size > 0)
{
int y = r->use_lword
? same_location_lword(mem, mem+r->size)
: same_location(mem, mem+r->size);
r->reason = 2;
if(y) return;
if(y)
{
r->reason = 2;
break;
}
}
r->size += r->step_size;
}
r->reason = 3;
if(r->reason == 0)
r->reason = 3;
cpu_atomic_end();
}
/* Detailed 0xe50[01]xxxx search
@ -219,7 +230,7 @@ void gintctl_gint_ram(void)
{ "PRAM1", 0xfe300000, true, 32, /**/ 0, 0 },
{ "XRAM1", 0xfe340000, true, 32, /**/ 0, 0 },
{ "YRAM1", 0xfe380000, true, 32, /**/ 0, 0 },
{ "X_P2", 0xa5007000, false, 4, /**/ 0, 0 },
{ "RSRAM", 0xfd800000, false, 4, /**/ 0, 0 },
{ "URAM", 0xa55f0000, false, 4, /**/ 0, 0 },
{ "RAM", 0xac000000, false, 1024, /**/ 0, 0 },
{ NULL },