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

Author Topic: Contra Demo - Sixth Edition  (Read 8189 times)

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Contra Demo - Sixth Edition
« on: January 12, 2013, 03:15:06 pm »
Hello to all Contra fans. This is the subject for the 6th enactment of my yet unnamed hack of Contra...

I wish I could have said, yeah, everything is finished, enjoy the show. No, sorry. I started working on level 6 after the project was put on ice once again. Level 6 sucks, at least from a level design perspective. The tileset is confusing and limited. Enemies are also limited: the only novelties are energy beams (3 directions), and the final boss. You can't have any cannons (gray or red), because the tiles don't exist. There will be a new enemy made from ASM hacking, another variation of the mortar shot. Other than that, I presume the level won't be very long, because after a few screens, there's nothing much left to do before it becomes repetitive. But don't take it bad, I'll make sure this level will be challenging and worth playing, and it will still be longer than its original counterpart, that's for sure...

Here's a screenshot of level 6 WIP:

Stay tuned!

PolishedTurd

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Contra Demo - Sixth Edition
« Reply #1 on: January 19, 2013, 05:03:44 pm »
I never liked the energy zone much... The energy beams are unorthodox for Contra; I think of the essence of Contra as dodging a hailstorm of bullets, any one of which causes instant death on contact. You could emphasize rifle guys and platforms over the beams, or you could leave this one out and/or replace it with something else.

I finally have a Mac, so I can try putting together my own levels with Red Falcon! They probably won't be as brutal as yours... Do you have a cheat sheet for the various properties of AI (how often rifle man fires, how many bullets he fires per spray, how many hits it takes to kill a tank, etc.)? I can probably find them without too much effort, but docs always help.

My next trick will be finding the time.

I'm glad to see you are still working on this. It's a great game and a great project.

snarfblam

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 590
  • CANT HACK METROID
    • View Profile
    • snarfblam
Re: Contra Demo - Sixth Edition
« Reply #2 on: January 20, 2013, 09:58:34 am »
I've never minded this level, but now that I think about it I've always blasted through it. Looking at your screen shot, I've like what you've done so far.

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Re: Contra Demo - Sixth Edition
« Reply #3 on: January 20, 2013, 08:55:08 pm »
In the original game, if you take the B powerup, you end up running through the most dangerous part of the 6th level without paying attention, and if you don't waste time, you reach the end of the level unharmed. In my hack, with the new Mortar Shot variation, it will probably look like a shower of bullets in some sections of the level...

Quote from: Polished Turd
I finally have a Mac, so I can try putting together my own levels with Red Falcon! They probably won't be as brutal as yours... Do you have a cheat sheet for the various properties of AI (how often rifle man fires, how many bullets he fires per spray, how many hits it takes to kill a tank, etc.)? I can probably find them without too much effort, but docs always help.

That's good news, indeed. What you suggest, I realize I should have done that a long time ago. Seems like it would make a very convenient companion document. I'll start working on it as soon as possible. In the meantime, check out my disassembly of Bank 0. This bank has one purpose: enemy routines. Except a few enemies that are common to many level, they are all there, right at the beginning of the ROM. I left many comments, so you can find a ton of useful information. Until I make a simplified list of all variables and attributes, this will come handy...

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Contra - Enemy Attributes Reference
« Reply #4 on: January 30, 2013, 10:38:59 pm »
Here, I finally put everything that was tested (so far) into a comprehensive document. Like many other docs, it's bound to be updated when more information is extracted from the game and decoded. I tend to explore the levels in parallel with the development of my hack, so right now, information on enemies specific to levels 7 and 8 are missing. For now...

Download the Enemy Attributes document here. UTF-8 encoded...

All the variables explained in this document are not the only ones that can be tweaked, far from it. This is about what you can change through the Red Falcon editor. Or using any hex editor, if you are enclined to do it this way. It's a variable that is set in the Enemy Data tables, starting at $B82B (add $10 for header). All enemies have their own sets of variables that are used through the game in many ways, some of them are hard-coded, some are taken from a table, some are dependent of the weapon you are currently carrying, etc...

Many of these variables are explained (not in detail, since it's in the form of ASM comments) in the Bank 0 disassembly document I mentioned earlier. I changed many of these variables in my hack. When time permits, I will make an extensive reference of all the variables I know of, and how you can change them to make the game harder or easier...

If you have any questions, let me know...

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Re: Contra Demo - Sixth Edition
« Reply #5 on: May 06, 2013, 02:29:35 pm »
Time for a late update. Level 6 is not complete yet, but it's progressing. I'm working on the Alternate Mortar Shot, which is not a stroll in the park. I need to be very careful with ASM bridges and conditions, because I don't want to break the current behavior of the Mortars in Level 5. Every time a new routine is needed, I have to check if the current level is 6 (or greater than 5, at least). Sometimes, this single check calls for more ASM code created from scratch...

My design decision is based on the different attributes of the Mortar Shots. Theoretically, you can have 8 types of Mortar Shots because attributes are 3 bits long. In the original game, the only Mortars are generated by the Scuba Diver, but nothing prevents you from placing a lone Mortar Shot as a standalone enemy anywhere you want. I make extensive use of it in Level 1. In Level 3, I use the Scuba Divers as is, since the tile mappings permit it and it makes sense to have guys hidden in water. In Level 5, I use both: Scuba Divers in small ponds of water, and Mortar Shots that seem to come from nowhere...

The initial Mortar Shot has attribute 0. When it divides, it creates 3 Mortar Shots with attributes 1, 2 and 3. In Level 6, I intend to use attributes 4, 5, 6 and 7 to create new Mortars with different behaviors. I could also add some randomization in the process...

That's it for now...

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Contra Demo - Sixth Edition - Release
« Reply #6 on: June 06, 2013, 04:35:07 pm »

Alright. Job's done. Level 6 is ready...

Now my hack has a name: Revenge of the Red Falcon. It's about time, anyway. The intro screen was modified more extensively than with previous iterations, to make place for the new title. I'm quite satisfied with the colors, and I tried to move the elements around and remove some of them. The final layout is not definitive, though...



Level 6 is Energy Zone, renamed to Power Plant in the hack. I fiddled with the palettes, and I finally chose a mix of dark red and green tones. The length of the level passed from 11 to 30 screens, so you'll have plenty of occasions to die...

Not a lot of new enemies in level 6. We have now three different types of Fire Bursts, down, left and right. No change was made to their behavior. I could have made them faster, but I feel like it doesn't add a lot to the gameplay, except die faster. There's a table at $2A0B that let you change the 4 possible lengths of the beams, according to their attribute value. Another attribute (different bit field) lets you change the delay between the bursts, which can be zero. A short beam with 0 delay means you can't pass it, so you have to be cautious with the attributes. A very long beam with no delay is still acceptable because by the time it retracts and comes back, you can clear it. For some reason, the rightward beam seems to be coded with some random factor added. This means the delay is somewhat unpredictable. I think it feels like fake difficulty, so I used it only once in the entire level...

The other new enemy in level 6 is the Boss Robot, modified slightly. He moves a little faster, jumps less high (loses less time in the air), and can shoot many more consecutive Spiked Disks. You will have to time your jumps carefully. His HP was beefed up quite a bit, so he can now take a lot of punishment before being destroyed. The Spiked Disks he throws can also be modified with ease, tables are readily modifiable. I tried many different combinations, trying to make them move faster, but in the end, it was becoming awfully hard no to die, so I left them unchanged...

There's an enemy you've seen since level 1, but with a different behavior in level 6: the Mortar shots. These new types of Mortars act like fragmentation grenades. Level 5 had single Mortars that appeared out of nowhere, fired at different angles. This time, Mortars divide into bullets in 4 different patterns. The Triple Mortar (with gravity bombs) is also present, as usual. I had to create new ASM code to make sure the new behavior of the mortar in level 6 would not break the old behavior in level 5 (and vice-versa)...

I added another small change. The Standard Weapon (white bullets) and the F Weapon can now have 8 bullets on screen at any given time, instead of 4. Since the difficulty is very high, I thought that it would at least remove the annoyance of having to wait for some bullets to disappear before being able to shoot again. Other weapons were not changed. The M Weapon has a maximum of 6, and the S Weapon has a maximum of 10...

Oh, and more good news. I found a way to expand the ROM successfully, and with minimal change to the original code. This demo doesn't have the ROM expanded, because I didn't want to delay the release further, so it's still the second part that starts with level 5. The next demo (or the final release, maybe?) will have all the levels in one neat ROM. This will be awesome...

Now, go ahead and enjoy the challenge!

Contra - Demo Part 2 - Level 5-6

Original ROM: Contra (U) [!].nes

Any questions?

snarfblam

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 590
  • CANT HACK METROID
    • View Profile
    • snarfblam
Re: Contra Demo - Sixth Edition
« Reply #7 on: June 06, 2013, 06:59:22 pm »
The Standard Weapon (white bullets) and the F Weapon can now have 8 bullets on screen at any given time
I like this change very much.

Oh, and more good news. I found a way to expand the ROM successfully, and with minimal change to the original code.
Good news indeed.

Your energy zone remake turned out excellent, especially given the little this level offered to begin with. It's much more open than the other levels, but still by no means easy. I've yet to beat it, but I got to the boss.

Keep up the amazing work. Can't wait for the finished product!


Edit: Proof http://www.youtube.com/watch?v=NJeo0ssj-gA
« Last Edit: June 06, 2013, 07:16:09 pm by snarfblam »

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Contra Demo - Single Levels
« Reply #8 on: June 09, 2013, 05:34:21 pm »
Many people asked me if there was a way to only try a single level, without having to go through what comes before. Here are the respective IPS files that let you do that:

Start at Level 2
Start at Level 3
Start at Level 4
Start at Level 6

Levels 2, 3 and 4 are all based on the 4th edition of the demo, and not their respective release...

There's a minor new thing that I added with the release of the 6th demo, but forgot to mention it in the first post. I took advantage of an unused Enemy ID (Enemy Type 09) to create a very simple object that changes the music. When you get close to the Boss Robot in Level 6, the music changes to the Indoor (Base I/II) Boss Theme, which I think is a cool theme. The code I created to achieve this is actually very simple:

Code: [Select]
1FBA0: Pointer table for Enemy Type 9 (2 bytes)

B0FB -> 1FBB0

--

1FBB0: A9 42 LDA #$42 ; A = 42 (42 = Base I/II Boss Music)
1FBB2: 20 6BC1 JSR $C16B ; Play Sound

1FBB5: 4C 09E8 JMP $E809 ; Remove Enemy

The Enemy has only one pointer in its routines pointer table. As soon as it is generated on screen (it doesn't appear because there's no tile associated to it, like the Exploding Bridge object, for example), it starts the Boss Music (Sound ID 42) and removes itself...

By the way Snarf, is the video you posted a Let's Play or you gave it a few tries before recording? If it's your first time, I can say it's quite amazing that you got that far. Hats off. The only thing that sucks with Contra video recordings is how the bullets flicker and therefore not always appear in the recording frame. It means you are always seeing only part of the total bullets on screen and it's visually annoying...

snarfblam

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 590
  • CANT HACK METROID
    • View Profile
    • snarfblam
Re: Contra Demo - Single Levels
« Reply #9 on: June 09, 2013, 09:41:19 pm »
By the way Snarf, is the video you posted a Let's Play or you gave it a few tries before recording? If it's your first time, I can say it's quite amazing that you got that far. Hats off. The only thing that sucks with Contra video recordings is how the bullets flicker and therefore not always appear in the recording frame. It means you are always seeing only part of the total bullets on screen and it's visually annoying...

I ran out of continues once, and then got to the boss on my next try, so no, not that amazing. I was impressed with myself the next day when I managed to beat both levels without using any continues, though.

And, yeah, the invisible bullet issue is annoying. I've managed to blend even and odd frames together using Avisynth, which produces perfect results on YouTube, but I kept running into audio issues (missing or out of sync), so I gave up on that.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6923
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Contra Demo - Single Levels
« Reply #10 on: June 09, 2013, 09:44:41 pm »
Many people asked me if there was a way to only try a single level, without having to go through what comes before. Here are the respective IPS files that let you do that:

Start at Level 2
Start at Level 3
Start at Level 4
Start at Level 6

Wouldn't using a Game Genie code be easier? :)
"My watch says 30 chickens" Google, 2018

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Re: Contra Demo - Sixth Edition
« Reply #11 on: June 10, 2013, 01:46:20 am »
Actually, it's not possible with a Game Genie code. There is no single command in the code that says "set Current Level to 0". In Contra, the RAM address for the Current Level is $30. At 1C47F, memory addresses from $28 to $EF are zeroed, and $30 is part of that...

So what I did for the IPS files (and to start at level 5 when I had to split the hack in 2 ROMs), is to create a small bridge at 1C43E, where the initialization routine 1C47F is called. I replace the JSR with my own ASM:

1C43E: 20 7FC4   JSR $C47F

*** Lets you start at any level ***

1C43E: 20 30F6   JSR $F630

--

1F630: 20 7FC4   JSR $C47F

1F633: A9 04   LDA #$04   ; can be any level
1F635: 85 30   STA $30

1F637: 60   RTS

***

Popolov

  • Guest
Re: Contra Demo - Sixth Edition
« Reply #12 on: June 11, 2013, 03:20:55 am »
Contra one of the best games I have ever play . First time I play this game nearly 13-15 years ago and that was awesome .