nand2mario / snestang

Super Nintendo Entertainment System for Tang FPGA boards
GNU General Public License v3.0
180 stars 21 forks source link

Feature Request: TANG20K stop from loading roms to large or error message out of memory #15

Open siffland opened 5 months ago

siffland commented 5 months ago

I had to see what would happen when i try to load roms that are to large for the tang20k. Most give garbage errors on the screen, but i loaded up Wizardry 1-2-3 (English translation patched version but it is 4096 in size, the origin Japanese one is also 4MB) and it loads and runs in game. I expect at some point there may be errors (or perhaps it really does not take up all 4MB).

Is there a way to warn user ROM is to big to load, such as exceeded memory size and return to the menu. At first i thought just see game size, but the fact Wizardry 1-2-3 loads, means some large games might be playable. Just think this might save false error reports in the future with users loading roms to big.

Thoughts?

Sean

nand2mario commented 5 months ago

The firmware is implement in plain C. You would call f_stat() in firmware.c to get the file size and then display a message if it is too large.