wasmboy icon indicating copy to clipboard operation
wasmboy copied to clipboard

Find a way to efficiently scale wasm memory

Open torch2424 opened this issue 7 years ago • 4 comments

As suggested by ISSOtm:

Possible allocation strategy :

  • Allocate one page
  • Dump ROM0 and ROM1, which always exist, in the first 32kB
  • Check cart header
  • Grow() accordingly, and dump ROM
  • Grow() by one page for the rest of the memory (2 pages if it turns out more is needed, though) (Btw, 1 page spans 4 ROM banks)

After referencing the Wasmboy memory map

torch2424 avatar Feb 10 '18 10:02 torch2424

Currently, the Memory is estimated to be about 9MB, which isn't much of a problem, because apparently the cap on wasm memory is 2 gigabytes

torch2424 avatar Feb 10 '18 11:02 torch2424

Honestly, if we throw the cartridge at the end of the memory map, then we can scale suuuuppeerrr easy. May want to do that, since the memory map already differs quite a but anyways, and won't require any more work from out memory mapps to find where everything else (Gameboy internals and Sprite map) should be based on the current bank

torch2424 avatar Feb 10 '18 11:02 torch2424

Updated Memory map accordingly in Wasmboy Memory Map Google Doc

torch2424 avatar Feb 10 '18 11:02 torch2424

See #50 for possible implmeentations

torch2424 avatar Apr 08 '18 18:04 torch2424