forked from Lephenixnoir/PythonExtra
Added python ram in a dirty way
This commit is contained in:
parent
f9d6f55625
commit
b39dc00203
|
@ -38,7 +38,7 @@ UI:
|
|||
- A decent keymap that can input all relevant characters into the shell
|
||||
|
||||
Test cases:
|
||||
- [ ] Chute tridimensionnelle (Memory error on G35+eII)
|
||||
- [x] Chute tridimensionnelle (Working on G35+eII)
|
||||
- [ ] Bad Apple
|
||||
- [ ] Island of the Dead Kings
|
||||
- [ ] Synchro-Donjon
|
||||
|
|
|
@ -22,6 +22,7 @@ font_4x4.png:
|
|||
grid.size: 4x4
|
||||
grid.padding: 1
|
||||
grid.border: 0
|
||||
proportional: true
|
||||
|
||||
font_4x6.png:
|
||||
type: font
|
||||
|
|
|
@ -143,11 +143,22 @@ int main(int argc, char **argv)
|
|||
/* Initialize the MicroPython GC with most available memory */
|
||||
mp_stack_ctrl_init();
|
||||
#ifdef FX9860G
|
||||
/* Add some Python ram */
|
||||
kmalloc_arena_t python_ram;
|
||||
python_ram.name = "_uram";
|
||||
python_ram.is_default = 0;
|
||||
python_ram.start = (void*)0x88053800;
|
||||
python_ram.end = (void*)0x8807f000;
|
||||
kmalloc_init_arena(&python_ram, 1);
|
||||
bool success = kmalloc_add_arena(&python_ram);
|
||||
if(!success) {
|
||||
pe_debug_panic("Can't use Python ram!");
|
||||
}
|
||||
/* Get *some* memory from the OS heap */
|
||||
void *gc_area = malloc(32768);
|
||||
if(!gc_area)
|
||||
pe_debug_panic("No heap!");
|
||||
gc_init(gc_area, gc_area + 32768);
|
||||
gc_init(python_ram.start, python_ram.end);
|
||||
#else
|
||||
/* Get everything from the OS stack (~ 350 ko) */
|
||||
size_t gc_area_size;
|
||||
|
|
Loading…
Reference in New Issue