Skip to content

Commit

Permalink
beta testing bug fixes and adjustments
Browse files Browse the repository at this point in the history
updated documentation
  • Loading branch information
glankk committed Dec 23, 2016
1 parent 72be63a commit c30f1d6
Show file tree
Hide file tree
Showing 22 changed files with 1,087 additions and 355 deletions.
17 changes: 10 additions & 7 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
## Installing gz
The currently supported games are:
- The Legend of Zelda: Ocarina of Time (NTSC Version 1.0)
- The Legend of Zelda: Ocarina of Time (NTSC Version 1.2)
- The Legend of Zelda: Ocarina of Time (NTSC-U/J 1.0)
- The Legend of Zelda: Ocarina of Time (NTSC-U/J 1.1)
- The Legend of Zelda: Ocarina of Time (NTSC-U/J 1.2)

There are two methods of using this software, described below.

### Using gz with a Gameshark
*Note: Gameshark support has been deprecated. It is still provided, but untested and without guarantees.*
You will need:
- An N64 with a supported game cartridge, and an Expansion Pak.
- A Gameshark with a functional parallel port (note that some 3.3s only have dummy ports).
Expand All @@ -15,9 +17,9 @@ You will need:

Follow these steps;

1. Boot the Gameshark with your game cartridge. If your game requires a special keycode to boot, you'll first
need to boot the Gameshark with a game that works with the default keycode, select the the required keycode in
the Key Codes menu, and then reboot with the game you wish to use with gz.
1. Boot the Gameshark with your game cartridge. If your game requires a special keycode to boot,
you'll first need to boot the Gameshark with a game that works with the default keycode,
select the the required keycode in the Key Codes menu, and then reboot with the game you wish to use with gz.
2. In the Select Cheat Codes menu, select your game and make sure the `(M)` code is active, if one exists.
3. In the Start Game submenu, enable the Code Generator option, and select Start Game With Selected Codes.
4. Connect the Gameshark to your computer with your Parallel to USB adapter cable.
Expand All @@ -29,8 +31,9 @@ Follow these steps;
8. When the upload is completed, you can disconnect the USB cable and start playing.

### Using gz with an emulator / flash cart
Drag and drop the rom you wish to patch onto the `patch.bat` script. A patched rom will be
created in the same directory as the script. The patched rom can be played with an emulator or transferred to a flash cart.
Drag and drop the rom you wish to patch onto the `patch.bat` script.
A patched rom will be created in the same directory as the script.
The patched rom can be played with an emulator or transferred to a flash cart.
For emulator usage, you will need to enable Expansion Pak emulation.
On some emulators, you may need to change CPU Core Style to Interpreter.
For use with a flash cart, your N64 will need an Expansion Pak.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## About
This is a trainer / practice / testing utility for The Legend of Zelda: Ocarina of Time.
This is a trainer / practice / testing utility for The Legend of Zelda: Ocarina of Time,
formally known by its codename **gz**, but generally referred to as _"the practice rom"_.

## Download
The latest release can be found on the [releases page](https://github.com/glankk/gz/releases).
Expand Down
335 changes: 278 additions & 57 deletions USAGE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion oot-1.0/upload.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
pushd .
cd %~dp0
gs -w bin 0x80600000 1024 ../bin/gz/oot-1.0/gz.bin -w text text_hook.gsc -u
gs -w bin 0x80400060 1024 ../bin/gz/oot-1.0/gz.bin -w text text_hook.gsc -u
popd
pause
2 changes: 1 addition & 1 deletion oot-1.1/upload.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
pushd .
cd %~dp0
gs -w bin 0x80600000 1024 ../bin/gz/oot-1.1/gz.bin -w text text_hook.gsc -u
gs -w bin 0x80400060 1024 ../bin/gz/oot-1.1/gz.bin -w text text_hook.gsc -u
popd
pause
2 changes: 1 addition & 1 deletion oot-1.2/upload.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
pushd .
cd %~dp0
gs -w bin 0x80600000 1024 ../bin/gz/oot-1.2/gz.bin -w text text_hook.gsc -u
gs -w bin 0x80400060 1024 ../bin/gz/oot-1.2/gz.bin -w text text_hook.gsc -u
popd
pause
Binary file added res/gz/pause_icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions res/resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@
"format": "ia8",
"tile_height": 8
},
"pause_icons.png":
{
"type": "texture",
"name": "pause_icons",
"format": "ia8",
"tile_height": 16
},
"crosshair.png":
{
"type": "texture",
Expand Down
38 changes: 23 additions & 15 deletions src/gz/explorer.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "input.h"
#include "menu.h"
#include "resource.h"
#include "settings.h"
#include "z64.h"
#include "zu.h"

Expand Down Expand Up @@ -190,14 +191,18 @@ static void draw_crosshair(struct menu_item *item)
static int enter_proc(struct menu_item *item)
{
input_reserve(BUTTON_D_UP | BUTTON_D_DOWN | BUTTON_D_LEFT | BUTTON_D_RIGHT |
BUTTON_Z | BUTTON_R);
BUTTON_Z);
input_bind_set_override(COMMAND_PREVROOM, 1);
input_bind_set_override(COMMAND_NEXTROOM, 1);
return 0;
}

static int leave_proc(struct menu_item *item)
{
input_free(BUTTON_D_UP | BUTTON_D_DOWN | BUTTON_D_LEFT | BUTTON_D_RIGHT |
BUTTON_Z | BUTTON_R);
BUTTON_Z);
input_bind_set_override(COMMAND_PREVROOM, 0);
input_bind_set_override(COMMAND_NEXTROOM, 0);
return 0;
}

Expand Down Expand Up @@ -448,18 +453,6 @@ static int draw_proc(struct menu_item *item,
return 1;
}

static int navigate_proc(struct menu_item *item, enum menu_navigation nav)
{
struct item_data *data = item->data;
if (data->state == STATE_RENDER && (input_pad() & BUTTON_R)) {
if (nav == MENU_NAVIGATE_UP)
data->room_next = (data->room_next + 1) % data->no_rooms;
else if (nav == MENU_NAVIGATE_DOWN)
data->room_next = (data->room_next + data->no_rooms - 1) % data->no_rooms;
}
return 1;
}

static int activate_proc(struct menu_item *item)
{
struct item_data *data = item->data;
Expand Down Expand Up @@ -494,6 +487,21 @@ void explorer_create(struct menu *menu)
item->leave_proc = leave_proc;
item->think_proc = think_proc;
item->draw_proc = draw_proc;
item->navigate_proc = navigate_proc;
item->activate_proc = activate_proc;
}

void explorer_room_prev(struct menu *menu)
{
struct menu_item *item = menu->items.first;
struct item_data *data = item->data;
if (data->state == STATE_RENDER)
data->room_next = (data->room_next + data->no_rooms - 1) % data->no_rooms;
}

void explorer_room_next(struct menu *menu)
{
struct menu_item *item = menu->items.first;
struct item_data *data = item->data;
if (data->state == STATE_RENDER)
data->room_next = (data->room_next + 1) % data->no_rooms;
}
2 changes: 2 additions & 0 deletions src/gz/explorer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
#include "menu.h"

void explorer_create(struct menu *menu);
void explorer_room_prev(struct menu *menu);
void explorer_room_next(struct menu *menu);

#endif
Loading

0 comments on commit c30f1d6

Please sign in to comment.