Fix "ValueError: negative shift count" error in SNESParser, and add range check in ROM and RAM size calculations