Instead of using match mem[0x147], I believe we should use a constant for that address, so that it is easier to understand what it refers to, e.g., match mem[consts::CARTRIDGE_TYPE].
Not only in the memory code, but wherever looks appropriate.
I've created two files for this purpose, cpu/consts.rs and mem/consts.rs. So, the consts should be added in one or the other according to their meaning.
Instead of using
match mem[0x147]
, I believe we should use a constant for that address, so that it is easier to understand what it refers to, e.g.,match mem[consts::CARTRIDGE_TYPE]
.Not only in the memory code, but wherever looks appropriate.
I've created two files for this purpose, cpu/consts.rs and mem/consts.rs. So, the consts should be added in one or the other according to their meaning.