Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [ID] Topic: Oh. My. God. Game-breaking bug in CV1 crow's code!  (Read 5914 times)

0 Members and 1 Guest are viewing this topic.

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Oh. My. God. Game-breaking bug in CV1 crow's code!
« on: May 12, 2016, 12:17:55 PM »
0
I hated crows in CV1. Not because of their annoying flight pattern (fly straight toward you, then swoop up or down toward you, then repeat, then fly off the screen), but because of the fact that they flew straight at you unnaturally. Well, I was reading the code and that is exactly what the code tells it to do.

...Except that wasn't what the code intended crows to do.

Code: [Select]
//Check if crow has flown horizontally past Belmont
$886E:A9 08     LDA #$08                   
$8870:BC F8 04  LDY $04F8,X @ $0501 = #$01
$8873:F0 0B     BEQ $8880                 
$8875:49 FF     EOR #$FF                   
$8877:6D 8C 03  ADC $038C = #$80           
$887A:DD 8C 03  CMP $038C,X @ $0395 = #$77
$887D:B0 09     BCS $8888                 

//Find out if Belmont is above or below the crow
$8888:20 9A 87  JSR $879A                 
$879A:A0 00     LDY #$00                   
$879C:AD 54 03  LDA $0354 = #$4C           
$879F:DD 54 03  CMP $0354,X @ $035D = #$75
$87A2:B0 01     BCS $87A5                 
$87A4:C8        INY                       
$87A5:98        TYA                       
$87A6:9D DC 04  STA $04DC,X @ $04E5 = #$01
$87A9:60        RTS                     

//Set the HORIZONTAL speed to 1/2
$888B:A9 00     LDA #$00                   
$888D:A0 80     LDY #$80                 
$888F:20 DF EC  JSR $ECDF                 
$ECDF:9D FC 03  STA $03FC,X @ $0405 = #$01
$ECE2:98        TYA                       
$ECE3:9D 18 04  STA $0418,X @ $0421 = #$98

See that second half? The crow checks its vertical relation to Belmont and then sets its horizontal speed. The programmers called the wrong subroutine! At this point in the code, the horizontal speed had already been set, hence the check if the crow had flown past Belmont yet.

If you want to see how the game was meant to run, open up the Japanese ROM of CV1 (addressing may be different in the US or PAL versions), jump to address 0148A0 which should be set to DF and change it to 57. Then set address 0148A1 which should be set to EC to ED.'

It will still fly straight toward you, but now it won't just fly backwards off the screen. It will swoop much more often, even if its pattern is still seemingly erratic.

UPDATE In the US version of Castlevania, you only need to change 0148A0 which should be 4E by default to C6 (if I read it correctly).
« Last Edit: May 12, 2016, 01:40:28 PM by TheouAegis »
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline XombieMike

  • Hunter in Training
  • **
  • Posts: 88
  • Gender: Male
  • I'm interested in this
    • Bloodstained Fan Forums
    • Awards
  • Favorite Game: Castlevania: Symphony of the Night (PS1/SS)
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #1 on: May 12, 2016, 05:20:25 PM »
0
I don't know how to do any of that, but it sounds great. I'd like to see a video of it. Did you discover this? That's really cool, man!

I bet the programmers just left it like that thinking they are fine as unintended.
XombieMike- DM of the Castlevania Ravenloft RPG
admin at bloodstained.forums.net

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #2 on: May 12, 2016, 06:00:41 PM »
0
If you have a hex editor, you can open the ROM (if you have a ROM) in the hex editor, go to the address I said, and do the changes. If you have the FCEUX emulator, open the ROM, open the built-in hex editor, change the view to PROM or whatever it's labeled as, find the address I said, and do the changes.

If you want to see what bug I'm talking about, get to the 3rd level (where you first meet Fleamen) and climb the first set of stairs. Inch forward until the first Crow appears. Duck at the edge of that ledge until the Crow swoops down. It should stop at about foot level. Wait for it to start to fly toward you, then fall off the ledge before the Crow hits you. Now stay where you are ducking the whole time. The crow should swoop down and stop just above your head. It will then start flying back and forth without hitting you. After 2 or 3 passes, it will just fly straight off the screen.

My fix will prevent that last glitch from ever happening.
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Ratty

  • A Little Pile of Secrets
  • Global Moderator
  • Master Hunter
  • *****
  • Posts: 1850
  • Tea. Earl Grey. Hot.
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom.
    • Awards
  • Favorite Game: Other (?)
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #3 on: May 13, 2016, 06:53:19 AM »
0
Huh, fascinating. I actually always liked the fact that the crows didn't dive bomb as much as they did in some of the later games (Bloodlines is the one that comes to mind) and if you were just able to dodge them long enough they would fly away. Seemed like great design to keep them from being too cheap or annoying. I guess that's what you call art through adversity! Or maybe even accidental art.

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #4 on: May 13, 2016, 10:06:15 AM »
0
Well the good news is that it still doesn't move naturally and it's very likely to miss you even at that point. When I tested the corrected code, instead of flying backwards off-screen (see, that's what really irked me about the code - it flew BACKWARDS!), it swooped down below Simon and then around to the other side. If I remember right, it came really close, but I think it stopped in whip range.

At least Crows go POOF when they hit you, rather than hounding you indefinitely.
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Inccubus

  • Wannabe Great Old One
  • Master Hunter
  • *****
  • Posts: 3265
  • Gender: Male
  • Warrior
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. SuperOld Dungeonite: Members who have been around since the oldOLD days. Permanent Resident: Seems to always be around to post/reply.
    • Awards
  • Favorite Game: Vampire Killer (MSX)
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #5 on: May 13, 2016, 08:12:50 PM »
0
Really nice find.
If it's alright with you I'm going to turn it into IPS patch so people can use it more easily.

I tried it out and if anything they seem to be a little easier to deal with if you are patient and don't rush in.
They can be a handful if there are several of them or there are other enemies forcing you to move around, but it's still way more organic than before.

I can't seem to find the code in the "(USA) Rev A" version, any ideas?
« Last Edit: May 13, 2016, 08:22:09 PM by Inccubus »
"Stuff and things."

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #6 on: May 14, 2016, 12:54:09 AM »
0
I think I used an unedited USA rom. I was pretty sure the pointer in the ROM data itself was in the same location, just the location of the routine had changed.

Just locate this code in the ROM:

4EECA979A0044C10EDDE4C05D0034CB5

And change it to this code:

C6ECA979A0044C10EDDE4C05D0034CB5


More 'accidental art' for Ratty:
The giant bats just before fighting Dracula have a bugged code as well. Rather than recycling the bat boss' code, new code was written up. It has two typos in it. I fixed them, but the difference when you actually run the game is pretty negligible. You wouldn't know the code was changed even with side-by-side comparisons.
« Last Edit: May 14, 2016, 01:33:23 AM by TheouAegis »
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline MooMilk

  • Vampire Hunter
  • ***
  • Posts: 178
  • Only at the Castle Gate...
    • Awards
  • Favorite Game: Castlevania Adventure (GB)
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #7 on: May 14, 2016, 10:33:05 AM »
0
I too also vote for a youtube video. You might wanna show people your discovery.

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #8 on: May 14, 2016, 11:39:46 AM »
0
Inccubus, add this to your patch:

For the Japanese version, jump to address 0153B0 and paste this in:

A5029DE003A900A0C020DFEC4CC093A6
4EA40220DFECA9009DC403A9C09DE003

For the US version, jump to the same address and paste this in:

A5029DE003A900A0C0204EEC4CC093A6
4EA402204EECA9009DC403A9C09DE003


That will take care of the typo in the Giant Bats.But like I said, it's a minor difference - the bat's still going to move diagonally, just along a slightly different vector.


Update: The lesser vampire bat's whole code is a bit of a mess - almost like they wrote it up near the end of the game as an afterthought and they ran out of energy drinks.
« Last Edit: May 15, 2016, 11:39:52 AM by TheouAegis »
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Inccubus

  • Wannabe Great Old One
  • Master Hunter
  • *****
  • Posts: 3265
  • Gender: Male
  • Warrior
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. SuperOld Dungeonite: Members who have been around since the oldOLD days. Permanent Resident: Seems to always be around to post/reply.
    • Awards
  • Favorite Game: Vampire Killer (MSX)
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #9 on: December 04, 2019, 06:58:57 PM »
0
Sorry for the necro bump, but I wanted to say that I never did find the correct code in the USA version.
But in the mean time I'm going to make that IPS I promised ages ago and get it submitted to ROMHacking.net
"Stuff and things."

Offline Jorge D. Fuentes

  • Boogeymen check under their beds for Julius Belmont.
  • Administrator
  • Master Hunter
  • *****
  • Posts: 15262
  • Gender: Male
  • It will always be Brinstar, dammit!
  • Awards A great musician and composer of various melodies both original and game-based. The Artist: Designs copious amounts of assorted artwork. 2015-03-3D Art Contest GOLD Award SuperOld Dungeonite: Members who have been around since the oldOLD days. ICVD Denizen: Those that dwell in the corrupted, mirror image of The Dungeon.
    • Jorge's DeviantArt Page
    • Awards
  • Favorite Game: Super Castlevania IV (SNES)
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #10 on: December 07, 2019, 10:44:43 AM »
0
For the love of all that is good and wholesome, make a video!
You must obey Da Rulez!
Jorge's Kickass VG Radio Station Open it in Winamp/MPClassic (broadband connection preferred)
Jorge's Kickass Youtube CV Music Channel
My Personal Minecraft Server (send me your In-Game Name so that I may Whitelist you)

Offline Gaawa-chan

  • Legendary Hunter
  • ****
  • Posts: 527
  • Gender: Female
  • Awards One-Time Show: Not quite a lurker, but posts infrequently and in only few areas. Permanent Resident: Seems to always be around to post/reply. The Artist: Designs copious amounts of assorted artwork.
    • Awards
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #11 on: December 12, 2019, 12:42:11 AM »
0
Speaking of the original Castlevania,
https://www.youtube.com/watch?v=AtDUnJCoTb8

But seriously, would be cool if we could see a video of this.

Offline Inccubus

  • Wannabe Great Old One
  • Master Hunter
  • *****
  • Posts: 3265
  • Gender: Male
  • Warrior
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. SuperOld Dungeonite: Members who have been around since the oldOLD days. Permanent Resident: Seems to always be around to post/reply.
    • Awards
  • Favorite Game: Vampire Killer (MSX)
  • Likes:
Re: Oh. My. God. Game-breaking bug in CV1 crow's code!
« Reply #12 on: December 15, 2019, 09:54:44 PM »
0
Didn't have access to a computer for a long while, but sure.
I'll see if can get one up.
"Stuff and things."

Tags:
 

anything