mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-25 03:56:54 +01:00
one last commit
This commit is contained in:
parent
7163cf7c2e
commit
e6149cd301
@ -129,10 +129,11 @@ static flashcart_err_t ed64_load_rom (char *rom_path, flashcart_progress_callbac
|
|||||||
ed64_save_type_t type = ed64_ll_get_save_type();
|
ed64_save_type_t type = ed64_ll_get_save_type();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case SAVE_TYPE_SRAM:
|
case SAVE_TYPE_SRAM:
|
||||||
rom_size -= KiB(32) - KiB(16);
|
rom_size -= KiB(32);
|
||||||
|
break;
|
||||||
case SAVE_TYPE_SRAM_128K:
|
case SAVE_TYPE_SRAM_128K:
|
||||||
case SAVE_TYPE_FLASHRAM:
|
case SAVE_TYPE_FLASHRAM:
|
||||||
rom_size -= KiB(128) - KiB(16);
|
rom_size -= KiB(128);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -237,6 +237,8 @@ int ed64_ll_get_sram_128 (uint8_t *buffer, int size) {
|
|||||||
|
|
||||||
dma_wait();
|
dma_wait();
|
||||||
|
|
||||||
|
// Offset Large RAM size 128KiB with a 16KiB nudge to allocate enough space
|
||||||
|
// We do this because 128Kib is not recognised and a 32KiB allocates too little
|
||||||
pi_dma_from_sram(buffer, -(size - KiB(16)), size);
|
pi_dma_from_sram(buffer, -(size - KiB(16)), size);
|
||||||
|
|
||||||
dma_wait();
|
dma_wait();
|
||||||
@ -324,6 +326,8 @@ int ed64_ll_set_sram_128 (uint8_t *buffer, int size) {
|
|||||||
data_cache_hit_writeback_invalidate(buffer,size);
|
data_cache_hit_writeback_invalidate(buffer,size);
|
||||||
dma_wait();
|
dma_wait();
|
||||||
|
|
||||||
|
// Offset Large RAM size 128KiB with a 16KiB nudge to allocate enough space
|
||||||
|
// We do this because 128Kib is not recognised and a 32KiB allocates too little
|
||||||
pi_dma_to_sram(buffer, -(size - KiB(16)), size);
|
pi_dma_to_sram(buffer, -(size - KiB(16)), size);
|
||||||
data_cache_hit_writeback_invalidate(buffer,size);
|
data_cache_hit_writeback_invalidate(buffer,size);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user