Skip to content

Commit 6dbc289

Browse files
authored
Merge pull request #197 from NicholasMoser/master
Add Naruto Rev3 PAL and Fix Rev3 US and GNT4/SCON4
2 parents 2f46e6a + 9befd91 commit 6dbc289

File tree

4 files changed

+58
-8
lines changed

4 files changed

+58
-8
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
* The SpongeBob SquarePants Movie (NTSC-U v1.1, PAL v1.0)
9696
* Super Mario Strikers (NTSC-U v1.0)
9797
* TimeSplitters 2 (NTSC-U v1.0)
98-
* Naruto - Clash of Ninja Revolution 3 (NTSC-U v1.0)
98+
* Naruto - Clash of Ninja Revolution 3 (NTSC-U v1.0, PAL v1.0)
9999
* Naruto - Gekitou Ninja Taisen! 4 (NTSC-J v1.0)
100100
- [Naruto: Super Clash of Ninja 4](https://gnt4.online/scon4/)
101101
* Need for Speed Underground 1 (NTSC-U v1.0)

source/modules/games/G4NJDA-0.lua

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ local game = core.newGame()
77
local polling_addresses = {
88
0x80222D40,
99
0x80222D74,
10-
0x80222DA8,
11-
0x80222DDC,
12-
0x80222E10,
10+
0x80222DA8
1311
}
1412

1513
local controllers = {

source/modules/games/RNEEDA-0.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ local polling_addresses = {
1010
}
1111

1212
local controllers = {
13-
[1] = 0x40 * 0,
14-
[2] = 0x40 * 1,
15-
[3] = 0x40 * 2,
16-
[4] = 0x40 * 3,
13+
[1] = 0xC * 0,
14+
[2] = 0xC * 1,
15+
[3] = 0xC * 2,
16+
[4] = 0xC * 3,
1717
}
1818

1919
local controller_struct = {

source/modules/games/RNEPDA-0.lua

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
-- Naruto - Clash of Ninja Revolution 3 (PAL v1.0)
2+
3+
local core = require("games.core")
4+
5+
local game = core.newGame()
6+
7+
local polling_addresses = {
8+
0x803BE480,
9+
0x803BE4B0,
10+
}
11+
12+
local controllers = {
13+
[1] = 0xC * 0,
14+
[2] = 0xC * 1,
15+
[3] = 0xC * 2,
16+
[4] = 0xC * 3,
17+
}
18+
19+
local controller_struct = {
20+
[0x0] = { type = "short", name = "controller.%d.buttons.pressed" },
21+
[0x2] = { type = "sbyte", name = "controller.%d.joystick.x" },
22+
[0x3] = { type = "sbyte", name = "controller.%d.joystick.y" },
23+
[0x4] = { type = "sbyte", name = "controller.%d.cstick.x" },
24+
[0x5] = { type = "sbyte", name = "controller.%d.cstick.y" },
25+
[0x6] = { type = "byte", name = "controller.%d.analog.l" },
26+
[0x7] = { type = "byte", name = "controller.%d.analog.r" },
27+
[0xA] = { type = "byte", name = "controller.%d.plugged" },
28+
}
29+
30+
for _, polling_addr in ipairs(polling_addresses) do
31+
-- For every polling address..
32+
for port, controller_addr in ipairs(controllers) do
33+
-- For every controller
34+
for offset, info in pairs(controller_struct) do
35+
game.memorymap[polling_addr + controller_addr + offset] = {
36+
type = info.type,
37+
debug = info.debug,
38+
name = info.name:format(port),
39+
}
40+
end
41+
end
42+
end
43+
44+
function game.translateJoyStick(x, y)
45+
x = x/100
46+
y = y/100
47+
return x, y
48+
end
49+
50+
game.translateCStick = game.translateJoyStick
51+
52+
return game

0 commit comments

Comments
 (0)