Skip to content

Commit 1cecbdc

Browse files
committed
Day Dreamin' Davey Module
1 parent 8b9e6f3 commit 1cecbdc

3 files changed

Lines changed: 61 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ A collection of Lua scripts and RAM watches for [BizHawk](https://github.com/TAS
107107
- Alex Kidd in Miracle World (SMS)
108108
- Alex Kidd in Shinobi World (SMS)
109109
- Balloon Fight (NES)
110+
- Day Dreamin' Davey (NES)
110111
- Drill Dozer (GBA)
111112
- Earthworm Jim 3D (N64)
112113
- Golden Axe Warrior (SMS)

ScriptHawk.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,9 @@ local supportedGames = {
420420
["7E59A4CE"] = {moduleName="games.crash3", friendlyName="Crash Bandicoot 3 - Buttobi! Sekai Isshuu (Japan)", version=3},
421421
["A2E93AEC"] = {moduleName="games.crash3", friendlyName="Crash Bandicoot 3 - Buttobi! Sekai Isshuu (Japan)", version=3},
422422

423+
-- Day Dreamin' Davey
424+
["4C88391318E3BD79C14BFF6724A377688E47261B"] = {moduleName="games.day_dreamin_davey", friendlyName="Day Dreamin' Davey"},
425+
423426
-- Diddy Kong Racing
424427
["B7F628073237B3D211D40406AA0884FF8FDD70D5"] = {moduleName="games.dkr", friendlyName="Diddy Kong Racing (Europe) (En,Fr,De) (Rev A)", version=1},
425428
["DD5D64DD140CB7AA28404FA35ABDCABA33C29260"] = {moduleName="games.dkr", friendlyName="Diddy Kong Racing (Europe) (En,Fr,De)", version=2},

games/day_dreamin_davey.lua

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
if type(ScriptHawk) ~= "table" then
2+
print("This script is not designed to run by itself");
3+
print("Please run ScriptHawk.lua from the parent directory instead");
4+
print("Thanks for using ScriptHawk :)");
5+
return;
6+
end
7+
8+
local Game = {
9+
Memory = {
10+
screen_x_major = 0x13,
11+
screen_y_major = 0x14,
12+
screen_x = 0x15,
13+
screen_y = 0x16,
14+
player_screen_x = 0x63,
15+
player_screen_y = 0x64,
16+
health = 0x67,
17+
},
18+
};
19+
20+
function Game.getScreenX()
21+
return mainmemory.read_s8(Game.Memory.screen_x_major) * 256 + mainmemory.readbyte(Game.Memory.screen_x);
22+
end
23+
24+
function Game.getScreenY()
25+
return mainmemory.read_s8(Game.Memory.screen_y_major) * 256 + mainmemory.readbyte(Game.Memory.screen_y);
26+
end
27+
28+
function Game.getXPosition()
29+
return mainmemory.readbyte(Game.Memory.player_screen_x);
30+
end
31+
32+
function Game.getYPosition()
33+
return mainmemory.readbyte(Game.Memory.player_screen_y);
34+
end
35+
36+
function Game.getHealth()
37+
return mainmemory.readbyte(Game.Memory.health);
38+
end
39+
40+
function Game.applyInfinites()
41+
mainmemory.writebyte(Game.Memory.health, 0xFF);
42+
end
43+
44+
Game.OSD = {
45+
{"Health", Game.getHealth},
46+
{"Separator"},
47+
{"Screen X", Game.getScreenX},
48+
{"Screen Y", Game.getScreenY},
49+
{"Separator"},
50+
{"X"},
51+
{"Y"},
52+
{"Separator"},
53+
{"dY"},
54+
{"dXZ"},
55+
};
56+
57+
return Game;

0 commit comments

Comments
 (0)