Once you add more RAM to a Commodore 64, is it still a Commodore 64?
-- Commodore sold a Ram Expansion Unit named "1764" to bring the C64 to 256kb of RAM;
-- it was possible to use the REU for the C128 named "1750" to bring the C64 to 512kb of RAM;
-- and it is possible to expand on that to have a 2MB REU for the C64 - see https://www.neperos.com/article/rlut8ce90fbb7701
You can have two megabytes on the C64, pretty "legally".
As far as I know, we still don't have an open source equivalent of that dma chip.
(The max addressable memory with a C64 REU is 16 Megabytes.)