Skip to content

Commit f3721c8

Browse files
authored
Add files via upload
Debug Mode - 1.0
0 parents  commit f3721c8

File tree

1 file changed

+358
-0
lines changed

1 file changed

+358
-0
lines changed
+358
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,358 @@
1+
---------------------------------------------------------------------------
2+
-- Super Punch-Out!!! Debugger Mode | USA Version.
3+
-- Version: 1.0
4+
-- Author: VMMR (VictorMR)
5+
6+
-- NOTES:
7+
-- Face And Stomach:
8+
-- Colors:
9+
-- • Green = Defense - ON
10+
-- • Red = Defense - OFF
11+
-- • Blue = Counterattack / Counterattack Point
12+
-- • Orange = Dodge
13+
-- "!" Symbol: Moment where the Fighter will be instantly knocked Down.
14+
-- Keys:
15+
-- • W: ON Debug
16+
-- • E: OFF Debug
17+
---------------------------------------------------------------------------
18+
19+
local INPUT_KEYNAMES = { -- BizHawk
20+
21+
A=false, Add=false, Alt=false, Apps=false, Attn=false, B=false, Back=false, BrowserBack=false, BrowserFavorites=false,
22+
BrowserForward=false, BrowserHome=false, BrowserRefresh=false, BrowserSearch=false, BrowserStop=false, C=false,
23+
Cancel=false, Capital=false, CapsLock=false, Clear=false, Control=false, ControlKey=false, Crsel=false, D=false, D0=false,
24+
D1=false, D2=false, D3=false, D4=false, D5=false, D6=false, D7=false, D8=false, D9=false, Decimal=false, Delete=false,
25+
Divide=false, Down=false, E=false, End=false, Enter=false, EraseEof=false, Escape=false, Execute=false, Exsel=false,
26+
F=false, F1=false, F10=false, F11=false, F12=false, F13=false, F14=false, F15=false, F16=false, F17=false, F18=false,
27+
F19=false, F2=false, F20=false, F21=false, F22=false, F23=false, F24=false, F3=false, F4=false, F5=false, F6=false,
28+
F7=false, F8=false, F9=false, FinalMode=false, G=false, H=false, HanguelMode=false, HangulMode=false, HanjaMode=false,
29+
Help=false, Home=false, I=false, IMEAccept=false, IMEAceept=false, IMEConvert=false, IMEModeChange=false,
30+
IMENonconvert=false, Insert=false, J=false, JunjaMode=false, K=false, KanaMode=false, KanjiMode=false, KeyCode=false,
31+
L=false, LaunchApplication1=false, LaunchApplication2=false, LaunchMail=false, LButton=false, LControlKey=false,
32+
Left=false, LineFeed=false, LMenu=false, LShiftKey=false, LWin=false, M=false, MButton=false, MediaNextTrack=false,
33+
MediaPlayPause=false, MediaPreviousTrack=false, MediaStop=false, Menu=false, Modifiers=false, Multiply=false, N=false,
34+
Next=false, NoName=false, None=false, NumLock=false, NumPad0=false, NumPad1=false, NumPad2=false, NumPad3=false,
35+
NumPad4=false, NumPad5=false, NumPad6=false, NumPad7=false, NumPad8=false, NumPad9=false, O=false, Oem1=false,
36+
Oem102=false, Oem2=false, Oem3=false, Oem4=false, Oem5=false, Oem6=false, Oem7=false, Oem8=false, OemBackslash=false,
37+
OemClear=false, OemCloseBrackets=false, Oemcomma=false, OemMinus=false, OemOpenBrackets=false, OemPeriod=false,
38+
OemPipe=false, Oemplus=false, OemQuestion=false, OemQuotes=false, OemSemicolon=false, Oemtilde=false, P=false,
39+
ProcessKey=false, Q=false, R=false, RButton=false, RControlKey=false, Return=false, Right=false, RMenu=false, RShiftKey=false,
40+
RWin=false, S=false, Scroll=false, Select=false, SelectMedia=false, Separator=false, Shift=false, ShiftKey=false,
41+
Sleep=false, Snapshot=false, Space=false, Subtract=false, T=false, Tab=false, U=false, Up=false, V=false, VolumeDown=false,
42+
VolumeMute=false, VolumeUp=false, W=false, X=false, XButton1=false, XButton2=false, Y=false, Z=false, Zoom=false
43+
}
44+
--Round Value Function:
45+
function round(x)
46+
return x>=0 and math.floor(x+0.5) or math.ceil(x-0.5)
47+
end
48+
49+
--local SwapHead_Address = mainmemory.readbyte(0x000991)
50+
local Room_Value = mainmemory.readbyte(0x000C00)
51+
local Debug_on = 1
52+
local value_t = 133
53+
local fight_x = mainmemory.readbyte(0x000912)
54+
local image_op_timer = 0
55+
local player_rage_draw_timer = 0
56+
local player_rounds_draw_timer = 0
57+
local boxer_rounds_draw_timer = 0
58+
59+
while true do
60+
--VARIABLES IN LOOP:
61+
local boxer_rounds = mainmemory.readbyte(0x00099D)
62+
local down_check = mainmemory.readbyte(0x000BC0)
63+
local boxer_stamina = mainmemory.readbyte(0x00099F)
64+
local boxer_recover = mainmemory.readbyte(0x009DF)
65+
local boxer_id_address = mainmemory.readbyte(0x000600)
66+
67+
local player_stamina = mainmemory.readbyte(0x00089F)
68+
local player_super_bar = mainmemory.readbyte(0x000B54)
69+
local player_rage = mainmemory.readbyte(0x000B65)
70+
local player_rage_activated = mainmemory.readbyte(0x000B63)
71+
local player_rounds = mainmemory.readbyte(0x00089D)
72+
73+
local boxer_defense = {
74+
[0] = mainmemory.readbyte(0x000967), --One Punch Active (80)
75+
[1] = mainmemory.readbyte(0x000968), --Face - Right
76+
[2] = mainmemory.readbyte(0x000969), --Face - Left
77+
[3] = mainmemory.readbyte(0x00096A), --Stomach - Right
78+
[4] = mainmemory.readbyte(0x00096B), --Stomach - Left
79+
}
80+
81+
local boxer_id = {
82+
[0] = "Gabby Jay",
83+
[1] = "Bear Hugger" ,
84+
[2] = "Piston Hurricane" ,
85+
[3] = "Bald Bull" ,
86+
87+
[4] = "Bob Charlie",
88+
[5] = "Dragon Chan" ,
89+
[6] = "Masked Muscle" ,
90+
[7] = "Mr. Sandman",
91+
92+
[8] = "Aran Ryan" ,
93+
[9] = "Heike Kagero" ,
94+
[10] = "Mad Clown" ,
95+
[11] = "Super Macho Man" ,
96+
97+
[12] = "Narcis Prince" ,
98+
[13] = "Hoy Quarlow" ,
99+
[14] = "Rick Bruiser" ,
100+
[15] = "Nick Bruiser" ,
101+
}
102+
103+
local player_defense = {
104+
[1] = mainmemory.readbyte(0x000868), --Face - Left
105+
[2] = mainmemory.readbyte(0x000869), --Face - Right
106+
[3] = mainmemory.readbyte(0x00086A), --Stomach - Left
107+
[4] = mainmemory.readbyte(0x00086B), --Stomach - Right
108+
}
109+
110+
local boxer_critic_c = mainmemory.readbyte(0x00092A)
111+
112+
local milisec = mainmemory.readbyte(0x000B26)
113+
local milisec_2 = mainmemory.readbyte(0x000B27)
114+
local sec = mainmemory.read_u8(0x000B28)
115+
local sec_2 = mainmemory.readbyte(0x000B29)
116+
local minute = mainmemory.readbyte(0x000B2A)
117+
118+
local User_input = INPUT_KEYNAMES
119+
local next_page = input.get()
120+
121+
--Key Check
122+
User_input.W = next_page.W
123+
User_input.E = next_page.E
124+
125+
--Key Check²
126+
if next_page.W then
127+
Debug_on = 1
128+
else if next_page.E then
129+
Debug_on = 0
130+
end
131+
end
132+
133+
if mainmemory.readbyte(0x000C00) == 06 and Debug_on == 1 then --Room = Fighter And Debug_On Check
134+
135+
--BACKGROUND Top Screen
136+
gui.drawRectangle(120, -4,227,44, "", "black")
137+
gui.drawRectangle(0, -4,121,44, "", "black")
138+
139+
--Timer And Fighter Name:
140+
gui.pixelText(170,215,"TIMER:0"..minute..":"..sec_2..sec..":"..milisec_2..milisec,"white","black",0)
141+
gui.pixelText(0,215,"Fighter:".. boxer_id[boxer_id_address],"white","black",0)
142+
143+
--FIGHTERS - DRAW TEXTs:
144+
--Stamina Fighter And Recover Check:
145+
if down_check == 0 or player_stamina == 0 then
146+
gui.pixelText(120,(0*1)-1,"Stamina:".. boxer_stamina,"red","black",0)
147+
else if down_check > 0 then
148+
--gui.pixelText(120,(0*1)-1,"Recover:".. mainmemory.readbyte(0x0009DF),"red","black",0)
149+
if boxer_recover > 80 then
150+
gui.pixelText(120,(0*1)-1,"Recover:Defeat","red","black",0)
151+
else
152+
gui.pixelText(120,(0*1)-1,"Recover:".. boxer_recover,"red","black",0)
153+
end
154+
end
155+
end
156+
157+
--Attack Timer:
158+
gui.pixelText(120,(8*1)-1,"Atk.Timer:".. mainmemory.readbyte(0x000912),"red","black",0)
159+
--Face Fighter - Status Check:
160+
gui.pixelText(210,2,"Face:","red","black",1)
161+
--Stomach Fighter - Status Check:
162+
gui.pixelText(198,12,"Stomach:","red","black",1)
163+
--Fuzzy Value:
164+
gui.pixelText(120,(8*2),"Fuzzy:".. round(mainmemory.readbyte(0x00092B)/1.76),"red","black",0)
165+
--Defense Check:
166+
gui.pixelText(120,(8*3),"Def.Check:".. mainmemory.readbyte(0x000932),"red","black",0)
167+
--Rounds Fighters:
168+
gui.pixelText(120,(8*4),"Rounds:","red","black",0)
169+
170+
--Draw Cube - Rounds Fighters:
171+
if boxer_rounds == 0 then
172+
gui.drawRectangle(162 ,(8*4)+1,6,6, "darkred", "red")
173+
gui.drawRectangle(162+(10*1),(8*4)+1,6,6, "darkred", "red")
174+
gui.drawRectangle(162+(10*2),(8*4)+1,6,6, "darkred", "red")
175+
else if boxer_rounds == 1 then
176+
gui.drawRectangle(162,(8*4)+1,6,6, "darkgreen", "lightgreen")
177+
gui.drawRectangle(162+(10*1),(8*4)+1,6,6, "darkred", "red")
178+
gui.drawRectangle(162+(10*2),(8*4)+1,6,6, "darkred", "red")
179+
else if boxer_rounds == 2 then
180+
gui.drawRectangle(162, (8*4)+1,6,6, "darkgreen", "lightgreen")
181+
gui.drawRectangle(162+(10*1),(8*4)+1,6,6, "darkgreen", "lightgreen")
182+
gui.drawRectangle(162+(10*2),(8*4)+1,6,6, "darkred", "red")
183+
else if boxer_rounds == 3 then
184+
boxer_rounds_draw_timer = boxer_rounds_draw_timer + 1
185+
if boxer_rounds_draw_timer < 10 then
186+
gui.drawRectangle(162, (8*4)+1,6,6, "darkgoldenrod", "gold")
187+
gui.drawRectangle(162+(10*1),(8*4)+1,6,6, "darkgoldenrod", "gold")
188+
gui.drawRectangle(162+(10*2),(8*4)+1,6,6, "darkgoldenrod", "gold")
189+
end
190+
191+
if boxer_rounds_draw_timer > 20 then
192+
boxer_rounds_draw_timer = 0
193+
end
194+
end
195+
end
196+
end
197+
end
198+
199+
--BLOCK AND DEFENSE OFF CHECK : =========================================================================================
200+
if boxer_defense[1] == 160 then
201+
gui.drawRectangle(231, 2, 6, 6, "green", "green")
202+
else if boxer_defense[1] == 161 or boxer_defense[1] == 0 or boxer_defense[3] == 162 then
203+
gui.drawRectangle(231, 2, 6, 6, "red", "red")
204+
end
205+
end
206+
207+
if boxer_defense[2] == 160 then
208+
gui.drawRectangle(241, 2, 6, 6, "green", "green")
209+
else if boxer_defense[2] == 161 or boxer_defense[2] == 0 or boxer_defense[3] == 162 then
210+
gui.drawRectangle(241, 2, 6, 6, "red", "red")
211+
end
212+
end
213+
214+
--gui.drawRectangle(241, 2, 6, 6, "blue", "blue")
215+
if boxer_defense[3] == 161 or boxer_defense[3] == 0 or boxer_defense[3] == 162 then
216+
gui.drawRectangle(231, 12, 6, 6, "red", "red")
217+
else if boxer_defense[3] == 160 then
218+
gui.drawRectangle(231, 12, 6, 6, "green", "green")
219+
end
220+
end
221+
222+
if boxer_defense[4] == 161 or boxer_defense[4] == 0 or boxer_defense[3] == 162 then
223+
gui.drawRectangle(241, 12, 6, 6, "red", "red")
224+
else if boxer_defense[4] == 160 then
225+
gui.drawRectangle(241, 12, 6, 6, "green", "green")
226+
end
227+
end
228+
229+
-- DODGE LEFT/RIGHT =========================================================================================
230+
if boxer_defense[1] and boxer_defense[2] and boxer_defense[3] and boxer_defense[4] == 132 or
231+
boxer_defense[1] and boxer_defense[2] and boxer_defense[3] and boxer_defense[4] == 130 or
232+
boxer_defense[1] and boxer_defense[2] and boxer_defense[3] and boxer_defense[4] == 164
233+
then
234+
gui.drawRectangle(231, 2, 6, 6, "orange", "orange")
235+
gui.drawRectangle(241, 2, 6, 6, "orange", "orange")
236+
gui.drawRectangle(231, 12, 6, 6, "orange", "orange")
237+
gui.drawRectangle(241, 12, 6, 6, "orange", "orange")
238+
end
239+
240+
-- GUARD-OFF =========================================================================================
241+
if mainmemory.readbyte(0x00092A) == 129 then --Rosto - Direito
242+
gui.drawRectangle(241, 2, 6, 6, "blue", "blue")
243+
end
244+
245+
if mainmemory.readbyte(0x00092A) == 130 then --Rosto - Esquerdo
246+
gui.drawRectangle(231, 2, 6, 6, "blue", "blue")
247+
end
248+
249+
if mainmemory.readbyte(0x00092A) == 135 then --Estomago - Direito
250+
gui.drawRectangle(241, 12, 6, 6, "blue", "blue")
251+
end
252+
253+
if mainmemory.readbyte(0x00092A) == 136 then --Estomago - Esquerdo
254+
gui.drawRectangle(231, 12, 6, 6, "blue", "blue")
255+
end
256+
-- =========================================================================================
257+
258+
--PLAYER - DRAW TEXTS:
259+
gui.pixelText(0,(0*1)-1,"Stamina:".. player_stamina,"cyan","black",0)
260+
261+
--Super (Bar) - Check:
262+
if player_super_bar < 27 then
263+
gui.pixelText(0,(8*1)-1,"Super:".. player_super_bar,"cyan","black",0)
264+
else if player_super_bar == 27 then
265+
gui.pixelText(0,(8*1)-1,"Super:MAX","cyan","black",0)
266+
end
267+
end
268+
--Rage Check:
269+
gui.pixelText(0,(8*2)-1,"Rage Status:".. player_rage,"cyan","black",0)
270+
271+
--Rage Level Text Check:
272+
if player_rage_activated == 0 then
273+
if player_rage < 16 then
274+
gui.pixelText(0,(8*3)-1,"Level:1","snow","black",1)
275+
else if player_rage > 15 and player_rage < 24 then
276+
gui.pixelText(0,(8*3)-1,"Level:2","snow","black",1)
277+
else if player_rage > 23 and player_rage < 32 then
278+
gui.pixelText(0,(8*3)-1,"Level:3","snow","black",1)
279+
else if player_rage > 31 and player_rage < 40 then
280+
gui.pixelText(0,(8*3)-1,"Level:4","snow","black",1)
281+
else if player_rage > 39 and player_rage < 48 then
282+
gui.pixelText(0,(8*3)-1,"Level:5","snow","black",1)
283+
else if player_rage > 47 and player_rage < 56 then
284+
gui.pixelText(0,(8*3)-1,"Level:6","snow","black",1)
285+
end
286+
end
287+
end
288+
end
289+
end
290+
end
291+
end
292+
293+
--LEVEL MAX! - Rage Player:
294+
if player_rage > 64 then
295+
player_rage_draw_timer = player_rage_draw_timer + 1
296+
if player_rage_draw_timer < 15 then
297+
gui.pixelText(0,(8*3)-1,"Level:MAX!","gold","black",1)
298+
else if player_rage_draw_timer == 30 then
299+
player_rage_draw_timer = 0
300+
end
301+
end
302+
end
303+
304+
--Rounds Players:
305+
gui.pixelText(0,(8*3)+8,"Rounds:","cyan","black",0)
306+
307+
--Rounds Player Cube Draw:
308+
if player_rounds == 0 then
309+
gui.drawRectangle(42 ,(8*4)+1,6,6, "darkred", "red")
310+
gui.drawRectangle(42+(10*1),(8*4)+1,6,6, "darkred", "red")
311+
gui.drawRectangle(42+(10*2),(8*4)+1,6,6, "darkred", "red")
312+
else if player_rounds == 1 then
313+
gui.drawRectangle(42,(8*4)+1,6,6, "darkgreen", "lightgreen")
314+
gui.drawRectangle(42+(10*1),(8*4)+1,6,6, "darkred", "red")
315+
gui.drawRectangle(42+(10*2),(8*4)+1,6,6, "darkred", "red")
316+
else if player_rounds == 2 then
317+
gui.drawRectangle(42, (8*4)+1,6,6, "darkgreen", "lightgreen")
318+
gui.drawRectangle(42+(10*1),(8*4)+1,6,6, "darkgreen", "lightgreen")
319+
gui.drawRectangle(42+(10*2),(8*4)+1,6,6, "darkred", "red")
320+
else if player_rounds == 3 then
321+
player_rounds_draw_timer = player_rounds_draw_timer + 1
322+
if boxer_rounds_draw_timer < 10 then
323+
gui.drawRectangle(42, (8*4)+1,6,6, "darkgoldenrod", "gold")
324+
gui.drawRectangle(42+(10*1),(8*4)+1,6,6, "darkgoldenrod", "gold")
325+
gui.drawRectangle(42+(10*2),(8*4)+1,6,6, "darkgoldenrod", "gold")
326+
end
327+
328+
if player_rounds_draw_timer > 20 then
329+
player_rounds_draw_timer = 0
330+
end
331+
end
332+
end
333+
end
334+
end
335+
336+
if boxer_defense[0] == 128 then
337+
image_op_timer = image_op_timer + 1
338+
if image_op_timer > -1 and image_op_timer < 2 then
339+
gui.drawRectangle(250, 2, 3, 10, "aliceblue", "aliceblue")
340+
gui.drawRectangle(251, 4, 1, 10, "aliceblue", "aliceblue")
341+
gui.drawRectangle(250, 16, 3, 2, "aliceblue", "aliceblue")
342+
else if image_op_timer > 1 then
343+
344+
end
345+
end
346+
347+
if image_op_timer > 3 then
348+
image_op_timer = 0
349+
end
350+
else
351+
image_op_timer = 2
352+
end
353+
354+
end
355+
356+
emu.frameadvance();
357+
end
358+

0 commit comments

Comments
 (0)