VitorVilela7 / UberASMTool

This tool lets you insert level, overworld, game mode, status bar, sprite and global ASM without using a patch.
GNU General Public License v3.0
19 stars 13 forks source link

Implement "Advanced RATS Protection System" #6

Open VitorVilela7 opened 5 years ago

VitorVilela7 commented 5 years ago

On complex data structures ROM corruption is a thing that can easily happen.

Because UberASM Tool has many different ways of managing data, including ones written by third party users, there's always a risk of part of the ROM data getting corrupted.

Write a system for mapping all RATS tags on the ROM which is executed when the ROM is just loaded and before the ROM is saved, for monitoring and tracking potential known issues or new ones generated because of some .asm file.

randomdude999 commented 5 years ago

Can you bring an example of the kinds of corruption this could fix? Also, counting all the rats tags on rom load is sensible, but I feel like you should be able to use asar's getwrittenblocks api to find the changes a patch does.

VitorVilela7 commented 5 years ago

Late response but the idea is it being an additional layer of checking where all RATS tags are scanned before the ROM is manipulated and after it is, having an image of the differences and with that allowing UberASM Tool better control of the all blocks modified and yup, using getwrittenblocks api from Asar is a nice plus for data comparison.

There were recent cases on some SMW hacks of certain RATS tags getting erased and while I have thought that UberASM Tool had something to do, one of them had just the regular uberASM patch instead of the tool version. But because users can insert external data and manipulate freecode labels without checking for data leakage, I think it would be important to UberASM Tool monitor them and throw an error if a certain block is not added to the protect block list.

Everything is just speculation for now, of course.

Scanning for all RATS tag on the beginning might be a good speed boost in case too many RATS scans are done, since by doing a full scan at the beginning you will know ahead all freespace blocks available and using the asar api it will let you also monitor for changes and have much more control in the end.

Everything is just ideas for now.