Skip to content

Commit

Permalink
Added support for the new released debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
Random06457 committed Mar 24, 2020
1 parent 0136dc1 commit fc2c56a
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 78 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The overlays the loader will seek for are the following:
|----------|:-------------:|:------:|
| Japan 1.0 | zelda@srd44 00-03-31 02:22:11 | Yes |
| Japan 1.1 | zelda@srd44 00-04-04 09:34:16 | Yes |
| USA Debug | zelda@srd44.00-07-06 16:46:35 | No |
| USA Debug | zelda@srd44 00-07-06 16:46:35 | No |
| USA Kiosk Demo | zelda@srd44 00-07-12 16:14:06 | Yes |
| USA 1.0 | zelda@srd44 00-07-31 17:04:16 | Yes |
| Europe 1.0 | zelda@srd44 00-09-25 11:16:53 | Yes |
Expand All @@ -52,6 +52,7 @@ The overlays the loader will seek for are the following:
| USA Master Quest | zelda@srd022j 02-12-19 14:05:42 | Yes |
| Europe GameCube Debug | zelda@srd022j 03-02-13 19:46:49 | No |
| Europe Master Quest Debug | zelda@srd022j 03-02-21 00:16:31 | Yes |
| Europe GameCube Debug | zelda@srd022j 03-02-21 00:49:18 | Yes |
| Europe GameCube | zelda@srd022j 03-02-21 20:12:23 | Yes |
| Europe Master Quest | zelda@srd022j 03-02-21 20:37:19 | Yes |
| Japan GameCube Zelda Collection | zelda@srd022j 03-10-08 21:53:00 | Yes |
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/zelda64/Zelda64CodeInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ public Zelda64CodeInfo(long codeDst, long codeVrom, long actorOvlTable, long gam
0x800e5bd0, 0x800fc420, 0x800efb88, -1));
put(Zelda64Version.OotEuropeGC, new Zelda64CodeInfo(0x80010f00, 0xa88000, 0x800e53a0, 0x800ee1b0,
0x800e4ab0, 0x800fb300, 0x800eea68, -1));
put(Zelda64Version.OotEuropeMq, new Zelda64CodeInfo(0x80010f00, 0xa88000, 0x800e5380, 0x800ee190,
put(Zelda64Version.OotEuropeGCMq, new Zelda64CodeInfo(0x80010f00, 0xa88000, 0x800e5380, 0x800ee190,
0x800e4a90, 0x800fb2e0, 0x800eea48, -1));
put(Zelda64Version.OotEuropeMqDbg, new Zelda64CodeInfo(0x8001CE60, 0xa94000, 0x801162a0, 0x8011f830,
put(Zelda64Version.OotEuropeGCMqDbg, new Zelda64CodeInfo(0x8001CE60, 0xa94000, 0x801162a0, 0x8011f830,
0x801159b0, 0x8012d1a0, 0x801200f8, -1));
put(Zelda64Version.OotEuropeGCDbg, new Zelda64CodeInfo(0x8001ce60, 0xa94000, 0x801162c0, 0x8011f850,
0x801159d0, 0x8012d1c0, 0x80120118, -1));
put(Zelda64Version.OotJPUS10, new Zelda64CodeInfo(0x800110a0, 0xa87000, 0x800e8530, 0x800f1340, 0x800e7c40,
0x800fe480, 0x800f1bf8, -1));
put(Zelda64Version.OotJPUS11, new Zelda64CodeInfo(0x800110a0, 0xa87000, 0x800e86f0, 0x800f1500, 0x800e7e00,
Expand All @@ -48,11 +50,11 @@ public Zelda64CodeInfo(long codeDst, long codeVrom, long actorOvlTable, long gam
0x800fd9a0, 0x800f1108, -1));
put(Zelda64Version.OotJapanGcZeldaCollection, new Zelda64CodeInfo(0x80010ee0, 0xa86000, 0x800e7a20,
0x800f0830, 0x800e7130, 0x800fd980, 0x800f10e8, -1));
put(Zelda64Version.OotJapanMq, new Zelda64CodeInfo(0x80010ee0, 0xa86000, 0x800e7a20, 0x800f0830, 0x800e7130,
put(Zelda64Version.OotJapanGCMq, new Zelda64CodeInfo(0x80010ee0, 0xa86000, 0x800e7a20, 0x800f0830, 0x800e7130,
0x800fd980, 0x800f10e8, -1));
put(Zelda64Version.OotUSAGC, new Zelda64CodeInfo(0x80010ee0, 0xa86000, 0x800e7a20, 0x800f0830, 0x800e7130,
0x800fd980, 0x800f10e8, -1));
put(Zelda64Version.OotUSAMq, new Zelda64CodeInfo(0x80010ee0, 0xa86000, 0x800e7a00, 0x800f0810, 0x800e7110,
put(Zelda64Version.OotUSAGCMq, new Zelda64CodeInfo(0x80010ee0, 0xa86000, 0x800e7a00, 0x800f0810, 0x800e7110,
0x800fd960, 0x800f10c8, -1));
// Majora's Mask
put(Zelda64Version.MmEurope10, new Zelda64CodeInfo(0x800a5d60, 0xc8a000, 0x801af760, 0x801BE0A0, 0x801aefc0,
Expand Down
19 changes: 11 additions & 8 deletions src/main/java/zelda64/Zelda64Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ public boolean IsOot() {
case OotEurope10:
case OotEurope11:
case OotEuropeGC:
case OotEuropeMq:
case OotEuropeMqDbg:
case OotEuropeGCMq:
case OotEuropeGCMqDbg:
case OotEuropeGCDbg:
case OotJPUS10:
case OotJPUS11:
case OotJPUS12:
case OotJapanGC:
case OotJapanGcZeldaCollection:
case OotJapanMq:
case OotJapanGCMq:
case OotUSAGC:
case OotUSAMq:
case OotUSAGCMq:
return true;
default:
return false;
Expand Down Expand Up @@ -113,10 +114,12 @@ public String GetVersionLongName() {
return gameName + " Europe 1.1";
case OotEuropeGC:
return gameName + " Europe GameCube";
case OotEuropeMq:
case OotEuropeGCMq:
return gameName + " Europe Master Quest";
case OotEuropeMqDbg:
case OotEuropeGCMqDbg:
return gameName + " Europe Master Quest Debug";
case OotEuropeGCDbg:
return gameName + " Europe GameCube Debug";
case OotJPUS10:
return gameName + " JP/US 1.0";
case OotJPUS11:
Expand All @@ -127,11 +130,11 @@ public String GetVersionLongName() {
return gameName + " Japan GameCube";
case OotJapanGcZeldaCollection:
return gameName + " Japan GameCube Zelda Collection";
case OotJapanMq:
case OotJapanGCMq:
return gameName + " Japan Master Quest";
case OotUSAGC:
return gameName + " USA GameCube";
case OotUSAMq:
case OotUSAGCMq:
return gameName + " USA Master Quest";
default:
return "Invalid or unknown version";
Expand Down
100 changes: 35 additions & 65 deletions src/main/java/zelda64/Zelda64Version.java
Original file line number Diff line number Diff line change
@@ -1,82 +1,52 @@
package zelda64;

public enum Zelda64Version {
Invalid(-1),
Invalid(null),
//Ocarina Of Time
OotJPUS10(0),
OotJPUS11(1),
OotEurope10(2),
OotJPUS12(3),
OotEurope11(4),
OotJapanGC(5),
OotJapanMq(6),
OotUSAGC(7),
OotUSAMq(8),
OotEuropeMqDbg(9),
OotEuropeGC(10),
OotEuropeMq(11),
OotJapanGcZeldaCollection(12),
OotJPUS10("zelda@srd44 98-10-21 04:56:31"),
OotJPUS11("zelda@srd44 98-10-26 10:58:45"),
OotEurope10("zelda@srd44 98-11-10 14:34:22"),
OotJPUS12("zelda@srd44 98-11-12 18:17:03"),
OotEurope11("zelda@srd44 98-11-18 17:36:49"),
OotJapanGC("zelda@srd022j 02-10-29 23:49:53"),
OotJapanGCMq("zelda@srd022j 02-10-30 00:15:15"),
OotUSAGC("zelda@srd022j 02-12-19 13:28:09"),
OotUSAGCMq("zelda@srd022j 02-12-19 14:05:42"),
OotEuropeGCMqDbg("zelda@srd022j 03-02-21 00:16:31"),
OotEuropeGCDbg("zelda@srd022j 03-02-21 00:49:18"),
OotEuropeGC("zelda@srd022j 03-02-21 20:12:23"),
OotEuropeGCMq("zelda@srd022j 03-02-21 20:37:19"),
OotJapanGcZeldaCollection("zelda@srd022j 03-10-08 21:53:00"),
//Marjoa's Mask
MmJapan10(13),
MmJapan11(14),
MmUSADebug(15),
MmUSADemo(16),
MmUSA10(17),
MmEurope10(18),
MmEurope11Debug(19),
MmEurope11(20);
MmJapan10("zelda@srd44 00-03-31 02:22:11"),
MmJapan11("zelda@srd44 00-04-04 09:34:16"),
MmUSADebug("zelda@srd44 00-07-06 16:46:35"),
MmUSADemo("zelda@srd44 00-07-12 16:14:06"),
MmUSA10("zelda@srd44 00-07-31 17:04:16"),
MmEurope10("zelda@srd44 00-09-25 11:16:53"),
MmEurope11Debug("zelda@srd44 00-09-29 09:29:05"),
MmEurope11("zelda@srd44 00-09-29 09:29:41");

static final String[] VERSIONS = new String[] {
//Ocarina Of Time
"zelda@srd44 98-10-21 04:56:31",
"zelda@srd44 98-10-26 10:58:45",
"zelda@srd44 98-11-10 14:34:22",
"zelda@srd44 98-11-12 18:17:03",
"zelda@srd44 98-11-18 17:36:49",
"zelda@srd022j 02-10-29 23:49:53",
"zelda@srd022j 02-10-30 00:15:15",
"zelda@srd022j 02-12-19 13:28:09",
"zelda@srd022j 02-12-19 14:05:42",
"zelda@srd022j 03-02-21 00:16:31",
"zelda@srd022j 03-02-21 20:12:23",
"zelda@srd022j 03-02-21 20:37:19",
"zelda@srd022j 03-10-08 21:53:00",
//Majora's Mask
"zelda@srd44 00-03-31 02:22:11",
"zelda@srd44 00-04-04 09:34:16",
"zelda@srd44 00-07-06 16:46:35",
"zelda@srd44 00-07-12 16:14:06",
"zelda@srd44 00-07-31 17:04:16",
"zelda@srd44 00-09-25 11:16:53",
"zelda@srd44 00-09-29 09:29:05",
"zelda@srd44 00-09-29 09:29:41",
};
public String Name;

public int ID;

private Zelda64Version(int id) {
ID = id;
private Zelda64Version(String name) {
Name = name;
}

public String GetBuildName() {
if (ID != Invalid.ID)
return VERSIONS[ID];
return "";
if (Name != null)
return Name;
return "Invalid";
}

public static Zelda64Version FromString(String s) {
int id = -1;
for (int i = 0; i < VERSIONS.length; i++) {
if (s.equals(VERSIONS[i])) {
id = i;
break;
}
}

for (Zelda64Version v : Zelda64Version.values()) {
if (v.ID == id)
return v;
}
var values = Zelda64Version.values();
for (int i = 0; i < values.length; i++)
{
if (s.equals(values[i].Name))
return values[i];
}
return Zelda64Version.Invalid;
}
}

0 comments on commit fc2c56a

Please sign in to comment.