Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public final class ROM {
- /**
- * Gets the ROM size of the cartridge.
- * @param opcode The size opcode.
- * @return The ROM size of the cartridge.
- */
- private int getSize(final byte opcode) {
- if (opcode < 8) {
- return (32 * 1024) << opcode;
- } else if (opcode == 52) {
- return 1179648;
- } else if (opcode == 53) {
- return 1310720;
- } else if (opcode == 54) {
- return 1572864;
- }
- System.err.println("Unknown ROM size");
- return -1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement