News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Castlevania II: Simon's Quest ASM Hacking help  (Read 9491 times)

locke nes

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Castlevania II: Simon's Quest ASM Hacking help
« on: April 25, 2010, 04:06:24 pm »
EDIT:

Hey, I want to change the speed and jump height of Simon Belmont in Castlevania II. I assume to do this, I have to use FCEUDx and use ASM hacking?

I tried to read a few documents on this, particularly "FCEUd, Tutorial #1 (Hacking Character Stats)" by Parasyte, but I don't understand it. Can anyone help me?














« Last Edit: April 25, 2010, 09:55:33 pm by locke nes »

Dwedit

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • Dwedit's Website
Re: Castlevania II: Simon's Quest.
« Reply #1 on: April 25, 2010, 05:01:05 pm »
It's an incomplete rom, or has the wrong number of banks.  A complete rom is 256k in size.
"We are merely sprites that dance at the beck and call of our button-pressing overlord."

locke nes

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Castlevania II: Simon's Quest.
« Reply #2 on: April 25, 2010, 05:45:24 pm »
Thanks, that fixed the main problems. Luckily, I didn't do that much yet, so it's ok to start over. I'll see if the pallete thing happens again, and see what I can do about the Oak Stake.

I also want to make him walk faster and jump higher. What's a good method for finding the hex values that correspond to specific details like that?

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 972
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: Castlevania II: Simon's Quest.
« Reply #3 on: April 27, 2010, 10:57:57 pm »
Thanks, that fixed the main problems. Luckily, I didn't do that much yet, so it's ok to start over. I'll see if the pallete thing happens again, and see what I can do about the Oak Stake.

I also want to make him walk faster and jump higher. What's a good method for finding the hex values that correspond to specific details like that?

Honestly?

Find some Game Genie codes that do what you're aiming for (or at least something similar). All Game Genie codes are just snippets of data that tell the game to "replace Byte XX with Value YY at Location ZZZZ"; you can determine exactly what's being replaced with what (and where) by plugging the code into a Game Genie decoder. Then it's just a matter of pulling up that location in the ROM file and trying out various values until you get one you're happy with.

locke nes

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #4 on: April 28, 2010, 12:11:16 am »
Well, I thought about that, unfortunately....

AISKTIAL        Start with more energy
AZSTTIAL        Start with less energy
Work on 1st game only, not continues
SZSSYLSA        Infinite energy
PASGLILA        Start with 1 life
TASGLILA        Start with 6 lives
PASGLILE        Start with 9 lives
IZSKZIAI        Start game with 25 hearts
IYSKZIAI        Start game with 75 hearts

That's all the codes. Nothing I want in there, unfortunately. I was tinkering with FCEUX to see how to achieve what I want, but no luck so far.
There's some useful ones at GSHI, but there are problems..
« Last Edit: April 28, 2010, 01:03:22 am by locke nes »

Dwedit

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • Dwedit's Website
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #5 on: April 28, 2010, 01:05:37 am »
Use a cheat finder to find the address in memory of your position, then use data breakpoints to see what code changes it.
"We are merely sprites that dance at the beck and call of our button-pressing overlord."

locke nes

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #6 on: April 28, 2010, 02:08:17 am »
How do I use a cheat finder to find the address of the memory?

I'm using FCEUX 2.1.3 (the newest iirc)
Can you show me the steps to use that feature? I'm still very new to the interface, and I don't know how to use it fully.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6882
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #7 on: April 28, 2010, 09:36:02 am »
Just type the Game Genie code into FCEUX's GG Decoder/Encoder and it will tell you the ROM address(es).
"My watch says 30 chickens" Google, 2018

locke nes

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Castlevania II: Simon\'s Quest ASM Hacking help
« Reply #8 on: April 29, 2010, 03:14:16 am »
Thank you, that helped. Still learning some new tricks in FCEUX, and it's a pretty cool program I must say.

April 30, 2010, 12:32:41 am - (Auto Merged - Double Posts are not allowed before 7 days.)
In FCEUX, could I tell the program to halt the game when a certain byte has a certain value written to it?

Like, I found the byte that controls horizontal movement, and changed it so he runs faster now! :D
But, when he jumps + direction, he still jumps slowly. I realized that the byte I changed has a different value.

When walking left it was 00, right it was FF. I changed it to 01 and FE.
But now, it's only 00 when jumps left, and FF when he jumps right.

For practical reasons, its hard to jump + direction without walking a little first. But the program would halt whenever I moved, but If I could tell it
to halt only when the byte was 01 or FF, this would be easier.

Thanks.
« Last Edit: April 30, 2010, 12:32:41 am by locke nes »

Zakyrus

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #9 on: October 02, 2011, 01:18:20 am »
Hey, did you ever get this figured out? 

Another cheat worth looking into is:


UNNASEKN - Simon jumps higher

or
00C905  change from FC to FB

Other values:
FF makes you barely jump at all, (hilarious) and F0 your rocket to the top of the screen, the latter of which might be useful for some kind of power up that lets you jump super high.

Hope it helps. :thumbsup:

~Z
« Last Edit: October 02, 2011, 01:27:13 am by Zakyrus »

Sliver X

  • Hero Member
  • *****
  • Posts: 1036
  • EX•CINERIBVS•IGNIS•EXCITABITVR
    • View Profile
    • Panicus - A Fragment of Memory
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #10 on: October 02, 2011, 11:01:53 am »
Quote
But the program would halt whenever I moved, but If I could tell it
to halt only when the byte was 01 or FF, this would be easier.

You want to set a conditional breakpoint for this. I've never used FCEUX, but I would assume it uses the same syntax as FCEUXD SP...

Like, take your memory address where Simon's speed index is being loaded. I don't recall what this is off hand (I've some some assembly work on this game in the past), but lets say it's at $325. The breakpoints would be like so:

$325 == #01
$325 == #FF

$325 is the memory address, == is a C style "Is equal to" condition and #XX means literal numerical value (Instead of a memory address).

You can also set conditions on things other than memory addresses, like register values and such.

RetroProf

  • Full Member
  • ***
  • Posts: 133
    • View Profile
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #11 on: October 05, 2011, 07:53:17 am »
I did a search but couldn't find any related topic, and I don't want to create a new topic for an insignificant question, so I'll ask in here since we're all talking CVII:SQ

A few years back someone mentioned they were working on a hack to make improvements, such as correcting incorrect text and removing the message screen when it switches between day/night. Nothing major, no big map changes, no making it more difficult (I hate those types of hacks), more a streamlining of the experience. Making it slicker, and more logical with regards to the puzzles.

Problem is I can't recall who was working on it, what happened to it, or any other features, apart from a strong desire to remove the day/night message.

Anyone know which project I'm talking about? I don't see it listed anywhere...

TheWhipperSnapper

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #12 on: October 06, 2011, 08:25:12 pm »
I assume you know about the Simon's Quest Redacted patch.

PS. thanks to the person who found the jump and speed values.

Zakyrus

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #13 on: October 06, 2011, 09:29:50 pm »
What's the movement speed value for walking? I can't seem to find it for the life of me...  :banghead:


By the by, here's a few more useful codes...

NYSSLI    Experience And Hearts Go Up Faster    
PAZNGO   Start With 100 EXP    
OSLAAX    Enemies Always Leaves Better Value Hearts    
NYIIZI    Collect 1 Heart To Max Out Your Health    
ATLESI    Enemies And Bosses Don't Shoot Fireballs    

ATTEAY    Collect A Heart And Receive The Gold Dagger, Sometimes The Other Daggers Show Up    

This one seems to randomly "rearrange" your inventory, sometimes you'll have two daggers and a diamond, then you collect a heart and you'll have the gold dagger and holy water... Might be useful for a "randomized" inventory system.


~Z
« Last Edit: October 06, 2011, 09:37:00 pm by Zakyrus »

RetroProf

  • Full Member
  • ***
  • Posts: 133
    • View Profile
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #14 on: October 07, 2011, 07:22:05 am »
I assume you know about the Simon's Quest Redacted patch.

PS. thanks to the person who found the jump and speed values.

That might actually be the one I was thinking of - thank you!

Zakyrus

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #15 on: October 10, 2011, 12:52:42 am »
8778   69 - some weird moon-walking stuff, enjoy!


Perhaps someone can help me out with this......

I took the code 6-digit code, ATIEAY, "Walk Faster Left To Right Only "

......then used the nifty process of converting it into an 8-digit code (thanks to Tony Hedstrom's nifty document, Convert nes codes 6-digit to 8 document)

The result was:

ATSEANNY
8758 60 (was FF)

Long story short, anytime I try to make this code permanent by changing the hex value, it freezes up the game, glitches or nothing happens.
:banghead: Can someone take a look and see what I'm doing wrong in the "make this code permanent" process? It works just fine as a code in itself...
Thanks a trillion.

Also, if someone can help me figure out the "Walk Faster Right To Left" code, I would appreciate it.


~Z

Sliver X

  • Hero Member
  • *****
  • Posts: 1036
  • EX•CINERIBVS•IGNIS•EXCITABITVR
    • View Profile
    • Panicus - A Fragment of Memory
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #16 on: October 10, 2011, 02:11:55 pm »
I somehow lost 99% of my project folders and notes a few months back, but I still have a small text file of some of my preliminary CV2 work. It's pretty minimal compared to what I *did* have, but could be useful as the start for several things...

Note: I tend to denote RAM with a $ at the beginning and ROM addresses without the hex denotation.

Code: [Select]
@@@@@
Music


1EB1: Beginning of Game Start song.

BX is kick bass, AX is snare drum.

Tempo > Instrument > ? > ? > ? > ?

Note, Tempo,Octave and repeats are the same as CV1.

FE is repeat. Next values is how many times.

FEFF followed by a two byte pointer is "Repeat Forever", End of Track.

@@@
AsM


1D7A4: 20 CA D7 = JSR to Day/Night Counter Check

1D7A4: EAEA60 = Never turn night.

1D7A8: Counter value for change. Value x 4 seconds (00 is simply 4 second Day/Night)

E26 - 1219: Town Song

41A2: EAEA makespeople vanish.

C903/$88F3: Jump Height Routine (Lower is higher)

$90: Currently Selected Sub Weapon

$91:Body Parts + Orbs, etc

$4A: Sub Weapons?

$4F: Currently Selected Part/Orb

$F1: Current Input

$80 = Health

$434: Whip Type


1FEF0: Free Space

DD10: Free Space (In Range of Jump routine: $9D00)

@@@@@@@@@@@@@@@@@@@@@@@
Checking For Orb

$85FE:A5 4F     LDA $004F = #$01
$8600:C9 06     CMP #$06
$8602:F0 07     BEQ $860B
$8604:BD C6 03  LDA $03C6,X @ $03CC = #$20
$8607:09 20     ORA #$20
$8609:D0 05     BNE $8610
$860B:BD C6 03  LDA $03C6,X @ $03CC = #$20
$860E:29 DF     AND #$DF
$8610:9D C6 03  STA $03C6,X @ $03CC = #$20
$8613:4C BB 85  JMP $85BB

@@@@@@@@@@@@@@
Damage Writing

$D354:85 08     STA $0008 = #$08
$D356:A5 80     LDA $0080 = #$30
$D358:38        SEC
$D359:E5 08     SBC $0008 = #$08
$D35B:B0 02     BCS $D35F
$D35D:A9 00     LDA #$00
$D35F:85 80     STA $0080 = #$30
$D361:60        RTS

$$$$$$$
$HACKS$
$$$$$$$

###################
Make Item High Jump

Hook: C904 - 20009DEA

Routine: DD1D - A000 A54F C905 F003 A9FC60 A9FA60
    |              |
Item Binding New Jump Height   


B Action

20 2F D8: Subweapon Routine
4C 55 DB: Whip Routine

Subweapon Routine
A5 90: Load Subweapon ID
20 BB C5: Go to main Routine.


Whip Routine:

00:8943:4C 55 DB  JMP $DB55 <--- Now that we've determined Up+B hasn't been pressed, Whip It!

DD20: Free space

00:DB55:A9 0A     LDA #$0A <--- Huh.
00:DB57:AC 34 04  LDY $0434 = #$02 <--- Check Whip Type
00:DB5A:C0 02     CPY #$02 <--- See if it's the Chain Whip
00:DB5C:90 0B     BCC $DB69 <---- If it's not, branch.
00:DB5E:C0 04     CPY #$04 <--- See if it's the flame whip.
00:DB60:D0 05     BNE $DB67 <---- Branch if it's not.
00:DB62:A9 0F     LDA #$0F <--- Huh.
00:DB64:4C 69 DB  JMP $DB69 <---- Flame Whip Routine?
00:DB67:A9 0E     LDA #$0E
00:DB69:20 18 C1  JSR $C118 <--- Leather/Thorn/Chain/Morningstar?
00:DB6C:A9 80     LDA #$80
00:DB6E:8D EA 03  STA $03EA = #$80
00:DB71:A9 FF     LDA #$FF
00:DB73:8D B5 03  STA $03B5 = #$00
00:DB76:60        RTS

Zakyrus

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Castlevania II: Simon's Quest ASM Hacking help
« Reply #17 on: October 10, 2011, 05:47:43 pm »
Oh, thanks Silver-X!!! ;D

Here's some other useful things I found while scouring the 'net.
Some of these might be repeats of what you have, but hey, let's get all the CV2 stuff in one spot.
I'll grab all that I can find and we'll make one big document...

Code: [Select]
0031 - Lives
0037 - D-Pad Pushing (00-Idle 01-Left FF-Right)
0046 - Experience: 99XX
0047 - Experience: XX99
0048 - Hearts: 99XX
0049 - Hearts: XX99
004A - Weapon Bit Flag
01 - Dagger
02 - Silver Dagger
03 - Golden Knife
04 - Holy Water
05 - Crystal
06 - Sacred Flame
07 - Oak Stake
08 - Nothing
004C - Laurels
004D - Garlic
0058 - Map X Chunk
0059 - Map X Position
006A - Simon Y Position
0077 - Dialog writing text row
0078 - Dialog writing text column
007B - Dialog text timeout until next letter.
007C - Dialog text memory offset
007D - Dialog starting column
Also the dialog timeout to automatically disappear
Also the option highlighted for Yes/No questions.
007F - Sun flag (1=Day, 0=Night)
0080 - Current Hit Points (x8)
0080 - Maximum Hit Points (x8)
0083 - Game Time (Days)
0084 - Game Time (Seconds)
0085 - Game Time (Minutes)
0086 - Game Time (Hours) (6-17 Day time, 18-5 Night time)
0087 - Counter for day/night palette shift.
0088 - Counter for day/night palette shift.
008B - Level
0091 - Inventory Bit Flag
01 - Rib
02 - Heart
03 - Eye
04 - Nail
05 - Ring
06 - White Crystal
07 - Blue Crystal
6+7 - Red Crystal
0092 - Carry Items Bit Flag
01 - Silk Bag
02 - Magic Cross
03 - Laurels
04 - Garlic
0300 - Simon Sprite Frame
0303-0305 - Weapon Frame
0306-030B - Object Frame
0318-031D - Object Palette
0324 - Simon Y Pos on Screen
0327-0329 - Weapon Y
032A-032F - Object Y
0336 - Simon Jumping Work ?
0339-033B - Weapon Work 1?
033C - Object Work ?
0348 - Simon X Pos on Screen
034B-034D - Weapon X
034E-0353 - Object X
0360 - Object Work?
036C - Simon Y Delta
036F-0371 - Weapon Y Delta (Signed)
0372-0377 - Object Y Delta (Signed)
037E - Object Work ?
0381-0383 - Weapon Work 2?
0384 - Object Work?
0393-0395 - Weapon X Delta (Signed)
0396-039B - Object X Delta (Signed)
03B7-03B9 - Weapon Index (See List)
03BA-03BF - Object Index (See List)
03D8 - Simon Action
00 - Idle
01 - Walking
02 - Jumping
03 - Crouching
04 - Attacking
03DB-03DD - Weapon Flags
0402-0407 - Object Frame
040E - Movement flag? (00 - when moving, 01 - When jumping or crouching, 11 - When idle)
0420 - Simon Sprite Mirroring
0423-0425 - Weapon Sprite Mirroring
0426-042B - Object Sprite Mirroring
0434 - Whip
00 - Leather Whip
01 - Thorn Whip
02 - Chain Whip
03 - Morning Star
04 - Flame Whip
0445 - Whip State
00 - Idle
01 - Back
02 - Middle
03 - Forward
0446 - Jumping Flag
0447-0449 - Weapon Flags
044A - Object Work?
0457 - Delay between next whip.
045C - Object Work?
046E - Object Work?
04C2 - Set at 1 when up is pressed, set to 0 when down is pressed.
04C5-04C7 - Weapon State
04C8-04CD - Object Hit Points / OR - Index2 (See Table)
04DA - Object Work?
04F8 - Invincibility Timeout

Weapon Index
Code: [Select]
01 - Dagger
02 - Silver Dagger
03 - Golden Knife
04 - Holy Water
05 - Diamond
06 - Sacred Fire
07 -
08 -
09 - Garlic

Object Index
Code: [Select]
00 - None
01 - Town Bat
02 -
03 - Skeleton / Skeleton Warrior
04 - Fishman
05 - Spearman
06 - Gator Men
07 -
08 - Floating Eye
09 - Bat (Flying)
0A - Medusa
0B -
0C - Bouncing Skeleton Bone Fire
0D - Bouncing Skeleton
0E - Spider
0F - Winged Devil
10 - Floating Skull
11 - Bat (Swooping)
12 -
13 -
14 -
15 -
16 -
17 - Town Zombie
18 - Marsh Spitter
19 -
1A - Spider Silk
1B -
1C -
1D - Burning Man
1E - Old Man In Cemetery
1F - Slime
20 - Flying Spike
21 - Horizontally moving platform (Tall)
22 - Horizontally moving platform (Wide) / Vertically Moving Platform (Wide)
23 -
24 - Sign
25 - Crystal Orb / Bag
26 -
27 - Clue Book
28 -
29 - Red Woman
2A - Man
2B -
2C - Old Woman
2D - Priest
2E - Cloaked Man (Town)
2F - Cloaked Man (Outside)
30 - Enemy Fireball
31 -
32 - Seeking Fireball
33 - Spider Web
34 - Vertically moving platform (Narrow)
35 - Old Man
36 - Enemy Explosion
37 - Heart / Half Heart / Big Heart
38 - Cemetery Hand
39 -
3A - Mummy
3B - Harpy
3C - Ferryman
3D - Ferryboat
3E -
3F - Giant Plant
40 - Leech
41 -
42 - Camilla
43 - Marsh?
44 - Grim Reaper
45 - Camilla Tear
46 - Reaper Scythe
47 - Dracula
48 - Dracula Scythe
49 -
4A -
4B - Organ Bag
4C - Dracula Summoning Fire
4D - Dracula Explosion Fire


Object Index 2
Code: [Select]
18 - Orb (Rib)
19 - Orb (Heart)
1A - Orb (Eyeball)
1B - Orb (Nail)
1C - Orb (Ring)
77 - Golden Knife
42 - Cloaked man selling Chain Whip


......

And CV2_Notes


~Z